I made a gocart for my kids, 6+8 years. Bought an e-bike-kit with a 800W brushed motor, along with a speed controller that takes 36 volts. Worked great for over a year, but now: dead, just stopped working.
It's a clunky solution with relays and switches and an on/off motor shortcut brake...
Anyway, I just entered the Arduino world, and loving it. Not very experienced in electronics or programming yet.
I havent found the problem in the current setup, it's just dead and I suspect it's the power controller. I can get a new speed controller off Ebay for $40+$40 shipping but I'd rather not go for that design again.
I'd like to make an arduino solution to this. The thing I haven't figured out is the posibility of driving an 800W 36 volt motor from an arduino. I haven't measured the amps, but they are probably very high during starts and going up-hill and other situations normal drivers would never perform.
The power comes from 3x12v 7Ah lead cells, thinking of going lipo at some point in the future. Gas pedal is connected to a 10k sliding resistor.
Is there a power board/shield or product to inteface easily with the Arduino and deliver the kind om power I need? I found some for 24 volts, but nothing that covers my need.
The current power controller uses a 1-4 volt input signal to determine speed. Not TTL. How can I make a variable 1-4 volt output? Not sure the speed regulator appreciates a pulsed signal...
At 800W you are looking at around 22A constant current plus some nice big surges at start and finish.
However, your standard MOSFET (say IRF530 or something) can handle a dozen amps so just put 3 in parallel and drive them off a PWM pin from your arduino. Nice chunky heat-sinks and a whopping reverse-current diode and you have full PWM control over an 800W motor! That would be my first plan anyway, but there may be better to follow.
Dr_Ugi: That sound perfect, and sounds so simple when you say it!
Just one problem: From your statement to a circuit diagram of some sort... If you have the time and interest, could you make some sort of schematic and specification on components? Which diode and where to connect it?
sbright:
The gocart no, it's a one of a kind I think, bought it rusty and damaged for $30. Sandblasted it, painted it silver, welded on some motor mountings, bought some cogs and a chain, and there you go.
The motorkit can be found on Ebay, but shipping is a killer. I got it from this Swedish webshop: Rull
Well, your 36V from your battery could be up to, maybe 45V and you would need to allow a fair bit of extra current handling capacity for the surge when the motor starts. However, there are plenty of very high current, low-on-resistance MOSFETS available. A quick search on farnell suggests something like STP55NF06L which can handle 55A and would dissipate less than 0.5W at a 25A current. I would still use two in parallel since they are only 75p each!
You would connect the source of the MOSFET to the -ve on your battery, the drain to the motor and the gate to a PWM pin (say D6) of your arduino via a resistor (1K should be fine). Power your arduino from the most -ve battery in your group but (since at full charge it will be above 12V) maybe put a 3.3V zener (e.g. 1N4728A allowing for 300mA assuming you're not running too much from the Arduino) between the battery and the board to take a bit of the heat off the regulator.
I would put a 10K potentiometer connected with the outside pins to +5V and Gnd and the middle pin to A0.
Then read your potentiometer using AnalogueRead on A0 and write the corresponding value to D6 with AnalogueWrite. As you turn the pot' you should get increasing current to the motor but it will always see pulses of 36V so you should get good torque at low revs.
Edit - sorry, I forgot about the protection diode.
Essentially, when your motor is turning but the power is turned off, it acts as a generator. That can cause a significant -ve voltage across the terminals. As a result, it's usual to place a suitably rated diode across the terminals of the motor so as to protect your MOSFETs etc from this reverse voltage. Farnell again suggests something like DSEI60-02A at around £2.50 should be fine (takes 69A and 600A surges) but there are others who know much more about this than me. Your motor may already have a protection diode fitted. Obviously the diode is arranged so as not to conduct when normal power is applied but to short any generate reverse voltage.
Edit2 - this reverse-protection diode may not be ideal for a motor this size because I guess it will provide significant braking during the non-pulse part of the PWM cycle. Maybe you would be better with two diodes (the same ones would do), one either side of your motor to protect from back-voltages.
You could probably have PWM breaking also if you attached a diode and another MOSFET (& power resistor) across the terminals of the motor to allow reversed-current in a controlled way... I'll have a think and suggest a circuit later if I can.
I don't have facility to upload pictures from here. Sorry.
I just ordered most of the stuff I need, including the STP55NF06L.
Could not find a source for DSEI60-02A, could you help me find another equal that is available somewhere, preferably on Ebay?
Edit2: Found and ordered 2x DSEI 60-06A instead, It's 600v instead of 200...and it exists! Should be fine, right?
I would very much like to do braking and possibly reverse too. I have a power resistor that works well today when i put M+ and M- over it, brakes the vehicle just right. But the faster you go, the harder it brakes...PWM would be nice. Recommendations appreciated. If complicated, I can do reverse using a switch over the motor, which is the case today. Hoping it doesn't shortcut.
I will create a crude schematic as best I can, when I can, and upload for your consideration and approval.
hi ; I'm actually in that situation too. Working on an e-bike (24v "currie system", but would like to boost it to 36v), dead controller and prefering to work with tools that give me a better understanding of my vehicule with arduino.
1st question on that design : would it be better to separate the ground of the motor and the ground of arduino?
2nd question : is there a formula to calculate how many v and a mosfets can switch ; how about placing them in parallel?
3rd question : would it be possible, with that design, to have different battery voltages (ie using 2*12v normally and add a "turbo switch" to add a 3rd battery to boost voltage in the mosfet from 24v to 36v, or even a 4th to go from 24v to 48v)?
Now all I need is basic info on how to hook it up.
Also, I would appreciate a pointer on how to get e-braking on this baby. I have a really big ceramic resistor from an RC-car, which worked really well in my old "wires and relays" design.. Should I put that and a 30Amp relay over the motor? Can the Arduino pull a standard car Relay? I was thinking I should put the braking pedal on one of the inputs to the arduino, and both cut motor power and activate the brake relay when the brake is pushed. Or can I accomplish braking in a more civilised manner using the Arduino and above components?
Thanks in advance,
Magnus
P.s. I'd be happy to buy you a beer over Paypal if this works out... D.s.
i havent read all the thread so i appologise if this has been said already ,
but,
just put a RC ESC onto the motor , and use PWM to control it,
i have an rc boat that uses a beast trolling motor, the esc can handle 40A and i added a fan to it to make it even safer,
the only down side is a bit of motor whine, (which if anyone knows how to fix i would be greatful)
i have mine powered from lipos, i have 10 3s 5000mah wired so that they are effectivly 5 3s 10000mah,
i would recomend lipos, they will give you a much better kick out of the motor
the problem as mentioned is the voltage. I need 36 volts, not 12.
And 1.4 Amps is nothing. I'm probably doing 40-50 at peak and at least 20 sustained. At 36 volts.
The motor and its flyback diode must be connected between the +36v supply and the drain terminals of the mosfets. The source terminals of the mosfets must be grounded.
Driving the mosfet gates direct from the Arduino pin isn't very kind to the Arduino. You should use a series resistor. I would use 220 ohms in series with each gate. That said, in view of the high currents you are switching, it might be better to use a mosfet driver chip to ensure that the mosfets turn on and off quickly, which helps to keep them cool.
Connect a pulldown resistor (e.g. 10K) between the Arduino output pin that drives the gate and ground, to ensure that the mosfets are held off until the Arduino has set the pin mode.
You can do both e-braking and reverse using an H-bridge. The easiest way to make a high-power H-bridge is to use a purpose-designed driver IC such as http://www.farnell.com/datasheets/32553.pdf to drive the mosfets.
Dr_Ugi:
... A quick search on farnell suggests something like STP55NF06L which can handle 55A and would dissipate less than 0.5W at a 25A current. I would still use two in parallel since they are only 75p each!
I'm not sure how you work out 0.5W at 25A. The datasheet gives Rds(on) = 0.020 ohms max @ Vgs=5V, which would result in dissipation of 12.5W @ 25A. So if these mosfets are used, a heatsink will certainly be necessary.
Iv'e been really hitting the webs in the last 24 hrs, learning and understanding about H-bridge and Mosfets.
It seems a controller is a very good idea after all. The one you suggested looks fantastic, the datasheet even comes with a nearly complete design, perfect for me!
I was planning to use a computer CPU heatsink, possibly with a fan, to do the cooling.
Questions though:
Will the Mosfets I have work with this controller, or should I get new ones? Can you recommend a particular kind? The Ones I have are Logic level, will the driver work with logic levels to the mosfets?
I need 30Amps cont, peak 50A I guess. Should I get twice as many mosfets and just put in parallell? I read that the stated Amps in the specs should generally be considered a lie and that you should always double-up.
Will the Mosfets I have work with this controller, or should I get new ones? Can you recommend a particular kind? The Ones I have are Logic level, will the driver work with logic levels to the mosfets?
Logic level mosfets are quite happy with higher voltage gate drive (most have Rds(on) specified at 10V as well as 4.5V), as long as the gate drive is well below the maximum Vgs rating. For those particular mosfets, Rds(on) is quoted at 27.5A for both Vgs=5V and 10V. Treat that current as the absolute current limit per mosfet. So if you expect 50A peak, you will need to use at least 2 in parallel (8 mosfets total for the H bridge). I would instead choose a mosfet with higher current rating and 0.005 ohm Rds(on) maximum. It doesn't need to be logic level if you are using the driver chip. http://uk.farnell.com/infineon/ipp057n08n3-g/mosfet-n-ch-80a-80v-pg-to220-3/dp/1775626 looks suitable and is inexpensive.
magnusvr:
2. I need 30Amps cont, peak 50A I guess. Should I get twice as many mosfets and just put in parallell? I read that the stated Amps in the specs should generally be considered a lie and that you should always double-up.
The mosfet I've linked to is rated at 80A continuous. However, you need to make a very good connection to the source lead if you want to pass 50A (you can normally connect to the drain via the tab). Also, at 50A it will dissipate 12.5W. I would still consider using 2 in parallel. This also cuts the power dissipated in each mosfet by a factor of 4.
magnusvr:
3. How is e-braking achieved when using a driver IC?
You manipulate the inputs to turn either both low side mosfets on or both high side mosfets on, which shorts the motor. Use PWM if you want to vary the braking force.