scratch build 24v electric scooter controller?

Thread Starter

rudyauction8

Joined Jan 27, 2012
250
Also when interfacing the throttle (variable resistor) would I be better using a resistor/capacitor discharge time or using the analog to digital converter?
 

ronv

Joined Nov 12, 2008
3,770
Running them with 12 volts is probably a good idea, but to do it since they are emitter followers you need to level shift the input to the driver up to 12 volts - like below: This will invert the signal so you will need to turn the micro upside down. :D

The gate resistor is a good idea as well.

Assuming the heat sink came of a 1 or 200 watt cpu, you should be able to run your fets at full power.

Don't forget about the diode. He can get pretty hot as well.

Edit: I think I would use the a to d converter to read the pot.
 

Attachments

Thread Starter

rudyauction8

Joined Jan 27, 2012
250
Running them with 12 volts is probably a good idea, but to do it since they are emitter followers you need to level shift the input to the driver up to 12 volts - like below: This will invert the signal so you will need to turn the micro upside down. :D

The gate resistor is a good idea as well.

Assuming the heat sink came of a 1 or 200 watt cpu, you should be able to run your fets at full power.

Don't forget about the diode. He can get pretty hot as well.

Edit: I think I would use the a to d converter to read the pot.

Why would I need to add a level shift? I'm trying to keep this as cheap as possible. If I would need to reverse the microcontroller and add more parts I think I'll just run them at 5 volts. Why can't I drive the 12v driver stage directly from the microcontroller's 5 volts? Am I missing something?

Also the heatsink came from a 1,000 watt amplifier and is 4x the size of a large CPU heatsink, but I'm going to cut it in half since I still need part of it for another project.
 

THE_RB

Joined Feb 11, 2008
5,438
Thanks, I may design a current limiter if I get my hands on a more powerful motor or decide to over-volt this one. What resistor would I use for a motor that draws ~40 amps?
...
I would use a ready made current sensor module, like this +75A/-75A one from Pololu;



They have more choices on this page;
http://www.pololu.com/search?query=current+sensor&x=0&y=0

A really good technique with vehicle DC motoro control is to adjust both PWM and the current limit as the throttle is turned.

So low throttle settings have low PWM duty (low motor voltage) and also have low current limit. As the throttle is increased the PWM duty increases and also the max current. That gives a very natural safe throttle feel, more like a small gasoine powered engine.

If you don't reduce the current limit with reduced throttle you can get enormous torques at very low RPMs, which is great for locomotives but can be un-natural and jerky on a light vehicle like a scooter.
 

Thread Starter

rudyauction8

Joined Jan 27, 2012
250
I would use a ready made current sensor module, like this +75A/-75A one from Pololu;



They have more choices on this page;
http://www.pololu.com/search?query=current+sensor&x=0&y=0

A really good technique with vehicle DC motoro control is to adjust both PWM and the current limit as the throttle is turned.

So low throttle settings have low PWM duty (low motor voltage) and also have low current limit. As the throttle is increased the PWM duty increases and also the max current. That gives a very natural safe throttle feel, more like a small gasoine powered engine.

If you don't reduce the current limit with reduced throttle you can get enormous torques at very low RPMs, which is great for locomotives but can be un-natural and jerky on a light vehicle like a scooter.

I'll consider it, but currently getting one of those sensors would literally double my budget. If I can't get smooth control (its only a 250 watt scooter with ~50lbs of batteries) I'll definately add it. Either way my controller should be as good as or better than the $50 china controllers available.

I'm also considering adding a switch that will limit the duty cycle to about 70-80% to improve efficiency, or allow full power for hill climbs or top speed runs where battery life isn't an issue. I'm also considering adding a delay between off and full power so the scooter won't jump when I give full power.


Side question, what's the easiest way without inverting the signal to drive 12 volts to a regular mosfet? Then I'd have many more options in my price range, and possibly one for 50+ volts if I decide to overvolt the scooter.

Like these: http://www.ebay.com/itm/5-x-IRF3205...801?pt=LH_DefaultDomain_0&hash=item33843feff1
 
Last edited:

ronv

Joined Nov 12, 2008
3,770
The driver is an emitter follower, so it's output voltage follows it's input voltage, minus a little, but it can supply more current to switch the FETs faster.
Since your thinking about changing FETs (good idea) and trying to reduce cost, why don't you think about loosing the micro and just running it with a simple 555 and one 12 volt regulator.
 

Thread Starter

rudyauction8

Joined Jan 27, 2012
250
The driver is an emitter follower, so it's output voltage follows it's input voltage, minus a little, but it can supply more current to switch the FETs faster.
Since your thinking about changing FETs (good idea) and trying to reduce cost, why don't you think about loosing the micro and just running it with a simple 555 and one 12 volt regulator.

OK I'm still not sure how this works but I think I'm going to stick with 5 volts. As for using a 555, I already have a dozen microcontrollers and I'd prefer to have the ability to finely tune the performance of the speed control.
 

Thread Starter

rudyauction8

Joined Jan 27, 2012
250
Sure, you could, but there is no reason to. The 555 can generate the PWM signal and can drive enough current to drive your FETs. The interface to the speed control pot is two wires. But you can't do anything else because it is all hardware.
http://schematiccircuit.com/pwm-dc-motor-driver-with-ic-ne555/

I'd like to drive the 555 with a microcontroller so I can set up throttle curves, low voltage cutoff, multiple power modes, battery level indicator, etc. and not have to invert the signal. I have all of the parts on hand so it shouldn't cost more.
 

THE_RB

Joined Feb 11, 2008
5,438
I'll consider it, but currently getting one of those sensors would literally double my budget. ...
...
What's your budget? :eek:
That 75 Amp sensor module is $9.95 and the 31 Amp module is $3.95.

Surely you are not saying you budgeted only $10 to build an entire 50A DC motor controller?

Or is this some type of commercial design you are working on where every cent counts?
 

Thread Starter

rudyauction8

Joined Jan 27, 2012
250
What's your budget? :eek:
That 75 Amp sensor module is $9.95 and the 31 Amp module is $3.95.

Surely you are not saying you budgeted only $10 to build an entire 50A DC motor controller?

Or is this some type of commercial design you are working on where every cent counts?

Actually, considering I have everything except the mosfets, I have a $6 budget. The reason I'm trying this is because the cheap controllers on ebay that have a relatively high current limit cost $30 and I don't have that kind of money to spend right now.

In case you're wondering why I have so little money, I was robbed 2x this month and lost almost all of my cash and had to replace my TV, phone and computer, so I have only a couple $ left over for fun projects.
 
Last edited:

Thread Starter

rudyauction8

Joined Jan 27, 2012
250
I ordered the parts today, I got the logic mosfets and a 555 timer. I'm going to build the speed control around the 555 and add the microcontroller later.
 

Thread Starter

rudyauction8

Joined Jan 27, 2012
250
I was afraid of that.
The diode(s) should be rated for at least 1/2 the maximum motor current. So at least 25 to 30 amps. They should also be fast (not 1/2 wave rectifiers).
http://www.mouser.com/ds/2/115/SBR4045-92036.pdf

It will need to be mounted on a heat sink as well as the FETs, so be careful of isolation.
The diodes you listed are the same as the 1/2 wave rectifiers I was talking about. I have a dozen of them that I could use. 2 diodes in a 3 pin case similar to the mosfets.
 

THE_RB

Joined Feb 11, 2008
5,438
You can get fast TO-220 diodes from PC PSUs, most PC PSUs have a couple of fast high current diodes in them you can strip out for free.

And sorry to hear about your cash problems.
 

Thread Starter

rudyauction8

Joined Jan 27, 2012
250
You can get fast TO-220 diodes from PC PSUs, most PC PSUs have a couple of fast high current diodes in them you can strip out for free.

And sorry to hear about your cash problems.
That's where I got mine, I had about a dozen computer power supplies that I scrapped a while back for capacitors, heat sinks, transistors, diodes, fans and transformers.

And thanks, hopefully my renter's insurance will cover me, still waiting on that though.
 
Top