Go Down

Topic: High current motor control (Read 4776 times) previous topic - next topic

MuttDriver

Hello All,
I'm doing a ride-on mower electric conversion for a fun winter project. An Arduino is going to be the brains of the system. I have no background in electronics or programming (so please excuse my non-technical English), which makes this project quite challenging. Basically I've been googling a lot, and from that trying to implement other peoples experiences in my project. My lack of knowledge makes me expect a lot of confusion, headaches and smoke, but I'm hoping to minimize the smoke, with some help from you guys.

Description and schematics below.

Here is where I need your help:
1.   Is the mosfets I've chosen good enough? (They will be mounted to large heatsinks with fans. The stall current of motors is unknown, but my code will shutdown power to each motor if current is more than 200A or if current is more than 130A for more than 5 sec. I plan to use PWM frequency of 31khz)
2.   Can I use a single mosfet driver for driving 5 mosfets in parallel? And is my driver chip up to the job?
3.   Can I use 0.1uf small ceramic disc capacitors for noise suppression on such a large motor? (I have copied what others have used for much smaller motors, not being able to find examples for high current motors)
4.   Do you see anything in my circuit that will cause smoke, simply not work or is redundant?

Any input is greatly appreciated  :)

The project:
Ride-on mower with one motor for drive (mechanical gearbox, so only one direction speed control is needed) and one motor for blades/cutter-deck. Arduino will be controlling speed of motors and monitoring voltage, drive-motor current, blade-motor current, system current, rpm for motors, safety switch, brakes (mechanical brakes) and "reverse-selected". User interface will be an Android phone communicating by Bluetooth with Arduino.

Progress:
I have written the code for Arduino and Android and it works with simulated sensor values. Almost all parts have been bought, and next step is assembly.

Important parts:
Arduino Uno R3

Motors: 24V, 130A continuous, 2600 rpm, series-wound DC (unknown: stall current)

Batteries: 4pcs. Marine deep cycle 12V 75ah, flooded type (connected for 24V)

Mosfets: 5 pcs. IRL 1404 in parallel for each motor. Datasheet: http://www.irf.com/product-info/datasheets/data/irl1404.pdf

Mosfet Driver: TC4422, one for each bank of mosfets. Datasheet: http://ww1.microchip.com/downloads/en/devicedoc/21420d.pdf

Power supply for each mosfet driver: http://www.ebay.co.uk/itm/130680030803?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

12V supply for Arduino, lights etc.: http://www.ebay.co.uk/itm/24V-to-12V-DC-DC-Car-Power-Supply-Converter-30A-New-/180743402619?pt=LH_DefaultDomain_3&hash=item2a1525747b

5V supply: http://www.ebay.co.uk/itm/UBEC-5A-8-26v-SBEC-Switching-BEC-Lipo-UK-Sale-/330792884209?pt=UK_ToysGames_RadioControlled_JN&hash=item4d04cad7f1

Current Sensors (200A each): http://www.ebay.co.uk/itm/110894073072?var=410115820134&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

Hall Sensors: http://www.ebay.co.uk/itm/Hall-Sensor-Module-for-Magnetic-Field-Detecting-0-15V-/320748421434?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item4aae18813a

Relays for lights, reversing light, horn and contactors: http://arduino-direct.com/sunshop/index.php?l=product_detail&p=156



kf2qd

It might cost more, but you would probably be better served looking for a motor controller for each of those motors. You would be getting a lot of additional features - current limiting and overload sensing that is more difficult to do. While it is nice to roll your own, some components will give better service if you use a commercial product. As you state that you are new to this, you will have your hands full with software and interconnects and having some components that you can plug and run will get you closer to success without so much time spent trying to fix pieces that would be better bought.

Your motor drive is only good for 1 direction. The 1N4004 is sized way to small for the size of that motor. You show reverse lights? Why? your motor drivers are not capable of running in reverse. You need to look at H-Bridge drivers if you want reverse. I would suggest looking for a commercial design rather than rolling you own. At 200A things can fail pretty fast.

Where are you going to generate your PWM frequency? Standard Arduino PWM is 500Hz.

MuttDriver

Thank you for your reply kf2qd. I have mechanical reverse, so only one motor-direction is needed. The commercial controllers I have found, that are capable of the current needed, are too expensive for me, so I would like to take my changes with my simple mosfet circuit, if at all possible.
I have manipulated timer1 for PWM frequency of 31khz.
Would a 20A 100V SCHOTTKY DIODE be a good choice for flyback protection instead of 1N4004?

o_lampe

#3
Oct 03, 2012, 10:37 am Last Edit: Oct 03, 2012, 11:17 am by o_lampe Reason: 1
You would only need the precharge resistors for huge capacitors ( I don't see any yet? ). They should only be switched on for a short period of time, not permanently. The ON time can be determined by comparing battery-voltage against capacitor-voltage. When the capacitor is 80-90% full, it is save to close the maincontactors without the risk of sparking.
You could also use the 'start' function from the original keyswitch to precharge. When you relase the key, you can close the maincontactors.

PS: Yould could install a normally open 'seatswitch' in series to the emergency switch, also a tilt-sensor to cutoff both motors when you fall from the chair while pulling a wheely ;)
Another good idea is, you have to have a foot on the brake, to close the contactors.

PSS: I don't see a separate arduino-input/switch for the blademotor?
It's not my fault when my Posts are full of Errors. This stupid autocorrection from my browser is set up for german grammar.

MuttDriver

Hi o_lampe, thank you for your reply.

I didn't plan on using capacitors in the high current circuits for the motors, maybe I should? Anyway, without capacitors, the precharge resistors are probably redundant, thanks for pointing that out. I've got a small delay in my code to make sure that the contactors are closed before the motors are started, so hopefully, that will take care of sparking.

The safety-switch is actually the "seatswitch". I've also programmed for a "soft throttle response", and the mower is going to be quite heavy, so I don't foresee any wheelies, although the redneck in me kind of wished I could pull a wheely on a lawnmower  :D

Also my code makes sure that the mower can't be activated if the throttle is pressed at startup.

All input switches are taken care of by the "Android user-interface". I've attached a picture below.

Where I am in most doubt is regarding the mosfets and mosfetdriver I've chosen, my mosfet-circuit, sizing of flyback diode (I'm now thinking of using these http://www.diodes.com/datasheets/ds31413.pdf, as I already have two of them for another project) and noise suppression capacitors. Does anybody have any input/suggestions on this? I would like to avoid buying commercial motor controllers, if at all possible.



dc42

Looks like an interesting project! I can see a couple of problems with your mosfet module:

- The 10K resistors from each mosfet gate to ground don't do anything useful and should be removed. However, you DO need a resistor (I would use 1K in case of interference pickup) from the TC4422 input to ground, to hold the mosfets off until the Arduino output pin gets configured as an output.

- When the mosfets turn off, the flyback diode in parallel with the motor gets a pulse of current equal to the current that the mosfets were passing. So you need a diode that is rated to stand a repetitive 200A surge. Use a Schottky diode.

The TC4422 should be OK to to drive all 5 mosfets. The switching time will be limited by the 20 ohm gate resistors. Expect the mosfets to dissipate around 10W each @ 200A, so good heatsinking will be needed. I suggest you use the AUIRLZ1404 instead f the IRL1404, it has lower Rds(on) so will generate less heat.

It might be better to use a lower PWM frequency to reduce switching losses, say 20KHz. It's hard to know what the switching losses will be without trying it out and using an oscilloscope to measure the switching time.

Layout will be critical. The wires between battery, motor and mosfet should be laid out so as to minimise the area enclose by the complete circuit (battery - motor - mosfet - battery) to reduce inductance and also to reduce interference caused by the switched current. I suggest you build both mosfet modules as a single unit, and ground the Arduino and associated circuitry to the mosfet module. Otherwise, the grounds of the mosfet modules will have a lot of differential noise due to the switched current, which makes driving them both from one Arduino difficult.

I suggest you measure the DC resistance of the motors to determine their stall current. If it is much higher than 130A, then consider implementing hardware to cut the mosfet drive when the current sensors detect a stall, so that you are not dependent on the response time of the Arduino.

What is the reason for the 100 ohm resistors in series with the Arduino inputs used for the switches? Also, it's more usual to wire switches between the pin and ground so that you can use the internal pullup, and only use an external pullup resistor if you need a lower value to reduce interference.

I suggest a resistor from the wiper of the throttle pot to ground, as a safety feature in case the pot wiper has an intermittent contact to the track.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

MuttDriver

Hi dc42, Thank you very much for your reply, its very helpful!

The 100 ohm resistors, are for protecting the input pins, in case they are accidentally configures as outputs, but it seems a bit "clumsy", and I'll go for the more usual approach with pullup resistors. 

I already have the IRL1404 mosfets, so I'll probably try my luck with them. I'll be using some very large heatsinks scavenged from an electric forklift.

Setting the PWM frequency to about 20 khz should be possible for timer1, but I'll have to read up on that. There are already a couple of threads on this forum on the subject, but it's hard to understand.

I'm now thinking of using these for flyback diodes: http://www.sanrex.com/images/PDFs/BKR400AB10.pdf , but I can't make out if they are fast enough. Would it be a good choice? Or can anyone suggest an appropriate diode?

I have some more questions regarding noise suppression.

What kind of capacitors should I use for motor noise suppression?
I'm planning of using the mower chassis for common ground (like most cars). Is that a bad idea?

dc42


I'm now thinking of using these for flyback diodes: http://www.sanrex.com/images/PDFs/BKR400AB10.pdf , but I can't make out if they are fast enough. Would it be a good choice? Or can anyone suggest an appropriate diode?


I would go for something a little smaller, perhaps http://uk.farnell.com/stmicroelectronics/stps200170tv1/diode-schottky-2x100a-170v/dp/1295321 or http://uk.farnell.com/genesic-semiconductor/fst16035/diode-rectifier-35v-160ato-249ab/dp/1862671. Although it needs to handle a peak current of 200A (or whatever the motor stall current is), the average current will be very much less. Unfortunately, reverse recovery time isn't quoted for any of the high current Schottky diodes I found.


I'm planning of using the mower chassis for common ground (like most cars). Is that a bad idea?


Using the chassis as ground is OK for accessories like lights, but a bad idea for signal connections and power connections.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

dc42


What kind of capacitors should I use for motor noise suppression?


That's a tough one. I've never worked with such high-current motors, so this is outside my experience. But I suggest you look for capacitors with low ESR and large terminals, because they are going to have a large 20kHz or 31kHz ripple current going through them, and you don't want them to overheat. Maybe something like http://uk.farnell.com/vishay-bc-components/bfc238680474/capacitor-snubber-0-47%C2%B5f-1250vdc/dp/1289281.

Locate the capacitor close to the motor. To reduce the surge current when the mosfets turn on and the capacitor charges, I would connect a small resistance in series with the capacitor, maybe 0.05 ohms, and/or a small inductor between the mosfet drains and the motor (but be sure to connect the flywheel diode to the mosfet side of the inductor).
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

MuttDriver

Thank you all very much for your suggestions and advice. I'm sure more questions will arise, when I start building :D

Go Up