Ebike problems

bhanlon56

New Member
More problems.
I developed the circuit using an 18Volt cordless drill battery and motor.
Thinking it worked, I installed in the bicycle.
There was always a small spark when I connected the 18V battery. I thought it was due to the capacitors charging, so ignored it.
The bike battery is a 24V 6AHr lithium-ion unit connected to a 250W brushed motor.
When the battery is connected there is a large spark that jumps across the screw terminals I'm using. Its enough to burn the connections. It also trips the battery management system built into the battery. This causes the output voltage to fall to about 3V. It stays at 3V unless the battery is disconnected and, on reconnection, it happens again.
Disconnecting the motor reduces the spark. I'm assuming the pulse affects the 08M2 or the Mosfet so that the Mosfet turns on long enough to trip the BMS.
On another forum devoted to drone flying a member described a similar problem to mine. The fix was to wire a resistor in series with the positive screw terminal connection. The idea is that the resistor closes the circuit first, charging the capacitors so that there is no spark when the main positive wire is connected. They used 470ohm. I had a 100ohm so used that. It cured the spark but, if I dawdled over connecting the main positive lead, the current through the resistor would heat up. The current draw (no motor connected) is 80mA. That seems a bit high. The current draw for the two regulators should be about 16mA. The 08M2 and MCP1407 might be a few mA.
My questions are these:
Why the spark? The amount of capacitance I have in the circuit in about 110uF.
What causes the motor to turn on?
Is there a way of suppressing the spark other than using a resistor?
Why is the current draw so large?
Thanks,
Brendan
 

mortifyu

New Member
The 100ohm resistor you are talking about sounds more or less a band-aid that hides the actual issue. This is NOT something I would be implementing.

Please confirm what happens regards to your 'SPARK' if you remove R3 from the circuit and also short the GATE of Q3 to GND, and then connect the power. Under this condition being that the FET is a N-Channel, there should be no current drawn through this transistor via the motor if the FET is not damaged. If the spark you talk of becomes non-existent doing this, replace R3, remove the GATE short to GND and then disconnect PIN 5 of U2 from the circuit making sure you leave R7 still in the circuit and confirm what happens regards to your 'SPARK'.

Also why is PIN2 of U3 marked SERIN? From the datasheet I read, this is a TTL/CMOS INPUT, not a serial data input.



Regards,
Mort.
 

hippy

Senior Member
Disconnecting the motor reduces the spark.
The notable thing there is you don't say it eliminates the spark. This suggests to me there is a fair amount of current flowing even with the motor disconnected. And that suggests something very wrong though I am not sure what.
 

techElder

Well-known member
There was always a small spark when I connected the 18V battery. I thought it was due to the capacitors charging, so ignored it.
The bike battery is a 24V 6AHr lithium-ion unit connected to a 250W brushed motor.
When the battery is connected there is a large spark that jumps across the screw terminals I'm using. Its enough to burn the connections.
Is it really all that difficult to take any cheap ohmmeter, place it across the un-powered connection that you are trying to make (not the battery!) and find out what the internal resistance of your gadget really is? :D
 

erco

Senior Member
$30 gets your choice of several premade controllers from http://electricscooterparts.com/speedcontrollers24volt.html

Sure seems worth it from a cost/safety/effort standpoint IMO. When I worked at Mattel, I saw professional, degreed EEs fail time after time trying to build their own controllers, frying countless pricey MOSFETS in vain. Eventually they gave up and bought one from that website.
 
Last edited:

rq3

Senior Member
Your issue may be that you are using a MOSFET to raise ground, rather than get rid of D3, and just switch the motor supply directly to common ground. In other words, the logic is reversed. Unless the grounds are top notch (and they ARE massive current conductors in this case), switching the motor current as you do will apply a pretty massive jump in the voltage applied to everything else, including the regulators that you are relying upon to control everything.

Plus, you have that pesky, heat creating inefficiency of the voltage drop across D3, which serves no useful function at all.
 

Hemi345

Senior Member
@rq3, isn't D3 protection for the mosfet from inductive kick generated by the motor when the mosfet turns off? Vss appears to be the common ground. :unsure:

I'd probably wire U1's input to the output of U4. Then it only needs to regulate 12V down to 5V resulting in less heat.
 
Last edited:

inglewoodpete

Senior Member
Plus, you have that pesky, heat creating inefficiency of the voltage drop across D3, which serves no useful function at all.
D3 is there to reduce back EMF from the motor, so it is normally blocking when the MOSFET is on. Its 1 volt drop will only be caused by the reactive response of the motor when the MOSFET shuts off. It's better to generate a bit of heat than have 150 - 200 volts jumping around the circuit! I would suggest a proper snubber (high voltage capacitor plus series resistance) instead of D3.

Also, it may have been already discussed but I question the need for R3: it can only make the MOSFET less efficient when using PWM. Does Microchip recommend the series resistor in its spec sheet for the MCP1407?
 
Last edited:

Hemi345

Senior Member
I believe I've seen mention of using a low value resistor used on the gate to reduce ringing.
 

WhiteSpace

Well-known member
In case it’s of any interest/help, I see that the MCP1407 is described as an improved version of the TC4469 that I’m using on my project here: https://picaxeforum.co.uk/threads/infrared-motor-control.31793/. The application note for the TC4469 recommends using a low value series resistor on the lower MOSFET gates (shown in the circuit diagram that I have posted). It explains that “In the lower rail devices, a small series resistor helps prevent gate oscillation and slows transition time, helping the upper device to stay "OFF.””. I have insufficient knowledge of electronics to be able to say whether that is true or makes sense (although I would be interested to know the views of the experts here), but it seems to be consistent with the design in this post.
 

WhiteSpace

Well-known member
Except mine of course is TC4469 (although also by Microchip) and the MCP1407 is a replacement for TC4429. So maybe my last post is nonsense. Or maybe the same principle applies to both drivers.
 

tmfkam

Senior Member
I know when I built a 240V@50Hz to 240V@25-250Hz (variable) frequency inverter the IGBT drivers recommended a similar, low value resistor arrangement.
 

julianE

Senior Member
I'm liking the idea of a simple electric bike. i loathe spending a fortune to convert a bike to get specs i don't need, i'd just like a little assist and maybe a 5 mile range, 10 miles an hour is plenty fast. Anything like that out there? I like that you are only using a 24 Volt battery almost everything is 36.
 

premelec

Senior Member
Many years ago I had an electric motor with 2" diameter rough face drive wheel... and push button switch like you'd find on an old floor switch on the floor of a car [headlight or starter]. The motor was hinged from the handlebars when pushed down onto the front wheel it would drive the wheel by friction being turned on with the floor switch... I sold it on Ebay ;-0 That's about as simple as you can get - not elegant or complicated and if something doesn't work it's obvious what that is... like the hole in the front tire when you stall with the motor running :oops:
 

julianE

Senior Member
Thanks Premelec, I was thinking of something similar to your idea, maybe use a cordless drill to friction drive the front wheel. I would not mind spending a bit more money for a little more complication. I'm researching the powered front wheel unit. the ones i've seen have so much to them, massive speed control, big batteries, sensors everywhere. My thinking is to just have a single speed, maybe use a 24 volt battery, less if possible and as far as control, just on or off, use a picaxe to control an in series relay and cut the power in case of a too high a current draw, maybe have a picaxe sense when the bike is not upright and power off the motor in case of a mishap. To sum it up, you hop on a bike, pedal it up to speed, activate the picaxe so it closes the relay and then turn the motor on with a plain switch and off you go. Sorry for hijacking the thread, on off chance there is interest I'll start a new one.
 

julianE

Senior Member
I just realized the front wheel hub drive motor is brushless so it has to be electronically controlled so a plain switch is out of the question.
 

erco

Senior Member
I just realized the front wheel hub drive motor is brushless so it has to be electronically controlled so a plain switch is out of the question.
On a DC system, a simple switch or relay will arc, burn, and weld itself into the on position the first time used under load.. Trust me, it happened to me! BTW 36V systems are popular because they use lower currents than 24V, so you can use smaller wiring and components.

 

julianE

Senior Member
On a DC system, a simple switch or relay will arc, burn, and weld itself into the on position the first time used under load.. Trust me, it happened to me! BTW 36V systems are popular because they use lower currents than 24V, so you can use smaller wiring and components.
Love the video! I'm thinking there has to be a chart showing how much power is used for cruising when the current consumption is lowest. I have seen systems that have all the electronics in the hub itself which eliminates the heavy wiring. I doubt there is any money to be made on a simple power assist, people do love speed and honestly how will I ever become morbidly obese by pedaling, I need to save up and get a 48V, 1500W bike :)
 

bhanlon56

New Member
Thanks for the replies and ideas.
I've the replaced the 08M2 and the axe027 cable (!!). It seems neither liked being in circuit when the battery was connected. The current draw has fallen from 80mA to about 20mA. I also found a dry joint where R4 and D2 join the gate of the MosFet. I still get a bit of sparking when connecting the battery but nothing like before. The motor runs correctly using a pwm frequency of 1000Hz. It makes a whine though. If anybody asks I'll tell them its my turbo....
@erco. I agree. I ordered a 250W brushed controller and thumb throttle for the princely sum of $25AU at one of my low points. It does not have though, the elegant mess of components soldered/unsoldered/resoldered on a piece of matrix board that is my circuit. I'd love to say that I got a buzz from solving the mechanical/electronic problems but at the moment I'm just glad it finally works.
There is another side to diy that is worth mentioning.
That is this forum.
My wife belongs to facebook chat group based around cooking and books. They are unfailingly supportive and nice to each other. Quite different to other forums I've seen.
I've started looking at other posts here. Maybe its the subject matter but the replies are always polite, encouraging and with good ideas.
So thanks again. I'll probably be back with my next job. A replacement salt water pool controller.
 

WhiteSpace

Well-known member
@bhanlon56 as a newcomer to this forum I had also noticed how supportive and patient the replies are. Senior members who clearly have many years of experience have been unfailingly helpful in suggesting code, explaining basic issues etc, in replies that must take considerable time to compose. I for one am very grateful and it gives this forum a very different feel from many other fora that are full of sarcasm and point-scoring.
 

hippy

Senior Member
Many thanks for the kind words and it's a good enough cue to once again thank all members of the community for making the forum such a pleasant and welcoming place.

We continue to be grateful to all those who have selflessly helped and assisted others for no reward other than the satisfaction of having done so, helping others to resolve their problems, enhance their understanding, and progress their projects.

So again; thank you.
 

bhanlon56

New Member
@julianE: Photos attached. The first shows how I ground off some of the motor so that it will fit (with some encouragement from a hammer) in the bike frame. The motor I got years ago and could not figure out how to mount it. Finding this particular bike (giant elwood se) was the inspiration. The motor is still available on asian websites (like aliexpress) and ebay. The second photo shows the aluminum bracket that holds the motor in the frame and carries the electronics. The battery (just seen in blue at the top of the picture) is held in place with a drink bottle bracket. The battery is only 24V/6AHr. The bike came with 3 front chainrings (gears). The chain goes around the innermost (low gear) chain ring. It didn't clear the front derailleur so I trimmed it with a dremel tool. The chain passes over a 16 teeth freewheel. The freewheel allows you to cycle without using the motor. I got it from aliexpress but they're commonly available as spares for bmx bikes. Mine came with a 34mm internal thread. The motor has a 10mm axle. I got an adapter made at a local machine shop. The chainring and electric motor are fixed in place. Joining the chain ends with a master link results in a chain slightly too long. I thought about recycling an old rear derailleur (available here from council recycling centres) but elected to use one of the mounting bolts. The chain runs over a metal sleeve fitted over the bolt. I'm looking for a bigger diameter teflon tube to use as a sleeve. The overall gearing is not quite right for me. My cadence is about 1 per second ie it takes about 1 second to rotate the pedals. This is 60 rpm. The motor has internal gearing of about 10:1. The chainwheel-freewheel ratio is 28:16. So the no-load rotation (at full power) is 2750/17.5 or about 155 rpm. It still works OK as it slows under load.
Let me know if you want any more information.
 

Attachments

bhanlon56

New Member
I'll also cover the electronics in a layer of epoxy to shock proof them. It doesn't rain in Australia. At least not much. Its partly a consequence of government policy encouraging fossil fuel use, so water ingress in the handlebar switches I'm not too concerned about.
 

julianE

Senior Member
Thanks for the pictures and information, I like your method of building and the use of parts on hand. Very impressive.
 

erco

Senior Member
Two pics of my homemade E-bike with a 250W 36V motor. I made a triangular mounting plate out of 1/8" aluminum sheet, then fastened that using aluminum L-bracket to 4 screws in the dropouts for the water bottle screws. Steel Schwinn bike frame, BTW. I aligned the gearmotor cog with the small chainring and used a short secondary chain to link those two. Simple and works great, but a bit unusual because it forces my pedals to rotate when the motor is on. I don't mind, I'm a spinner.

BTW the pics show that I initially removed the front derailleur, since the chain never leaves the big chainring. I put it back on. Turns out you still need it as a chain guide. On a big bump, the chain bounces and can come off without it.

That's the speed control mounted above the motor. Small wires go forward to twist throttle and brake levers (kill switches if either brake applied), big wires aft to 36V, 10 AH Li-Fe battery.

The motor location is slightly adjustable to take the slack out of the chain going down to the small chainring.

ebike1.jpg

ebike2.jpg
 

julianE

Senior Member
Erco, thank you for sharing the pics of your bike, simply brilliant. I've seen the motor you used on ebay and it's reasonable, i have no need for as much battery as you have. i like the idea of the pedals spinning when motor is on it would just make the pedaling easier a little boost is all i'm looking for. only question i have is what happens when the motor is off or the battery is depleted how much resistance do you get from turning the motor in addition to the bike, if any.
 

erco

Senior Member
Oh, there is zero chance of pedaling the motor with a dead battery on my rig. Like 50X harder than pedaling the bike alone! That's why I have a big battery. If the battery dies or the motor controller blows (it happened to me) I have to stop & remove the small chain, using a removeable link.
 
Top