brushed dc motor control 10-20A cont up to 30-50A peaks - Page 1
Forum section: electronics / projects

author: M. András
author_rank: Super Contributor
timestamp: May 30, 2014, 09:23:52 pm
content: Im trying to make a control solution to run the little bastards and be able to brake them before their own inertia and the driven gears would stop it. its for airsoft btw, original switch contacts burns in all the time and the gears chew up the teeths on the piston cos its overspinning by design.i was looking at complete control chips but most of them simply not designed for that amount of current what those motors can draw from a lipo battery.found some automotive brushed motor control ic-s from ST vnh2sp30 and vnh5019-e, these would be suitable for this but the datasheet is not clear for the maximum output current of the drives, if that 30A is for the whole bridge inside the package or per half bridge, second problem the vnh2sp30 is meant for 5v interface logic high is 3.25v which is way over of the little lpc11u14 logic high level 0.7*vdd which i choose for this (battery monitoring, stopping the motor at the right time via looking at its current draw if i can accomplish the code for it as im learning the digital side of the things and god knows what else) what would be the best solution to bridge the logic treshholds for the 2 chip?The problem with the 5019 its not avaiable in europe as i could find trustable sources for it or company only distributorslpc11u14 has good capabilities but the odd thing for me the datasheet of the mcu does not mention any code protection however the manual does if anyone used this series can comment on it maybe?I remembered for some allegro motor control H bridge drivers when i was looking at their current sensors the A3921k would be good again without any additional logic or discretes between the mcu and the driver but same as the 5019, A3941k is available at farnell but again 5v logic levels.i was looking for some thermally conductive potting compund if this mcu has no means to protect the code in the flash to pot the whole board with black epoxy then i realised i need some kind of mould relase agent for this, which is the most common for this application, atleast to make it harder for the common dude to acces the chip.

author: rob77
author_rank: Super Contributor
timestamp: May 30, 2014, 10:03:51 pm
content: if the 5V input is TTL levels then anything between 2V and vcc will be High. so you should be able to drive it from a 3.3V circuit without any issues.if the 5V input is CMOS levels then it should be above 2/3 of vcc and it's a problemand to be honest i'm surprised that someone with 900+ posts is asking a question how to interface 2 levelsbut never mind...i'm using either a open collector buffer/inverter capable of handling the higher voltage on it's open collector and a pull-up. or a simple NPN transistor ("single stage" open collector inverter)considering the fact that you need to keep it small, and you need to interface only the PWM and direction signals for the bridge... i would go for the simplest approach with 3 transistors. of course those will invert the signals - so you'll have to do active-low logic on the MCU outputs.

author: M. András
author_rank: Super Contributor
timestamp: May 31, 2014, 10:55:51 am
content: Quote from: rob77 on May 30, 2014, 10:03:51 pmwell, i stayed away from the digital sides of electronics as long as i could so interfacing voltage levels between 2 ic wasnt a problem for me. this is a hobby for me as i did not finish the school if i found the right translation for it, i would be an electrotechnician either working with high power electrical system or low power control systems etc job descrtiptions mention however circuit design etc but we never did any of that in the school as it was 4+2 years and i left it in the 3rd and i dont work nowhere near the field to pickup knowledge, so i have the only electronics knowledge what i learned along the years by myself, following app notes end reference designs is easy.the driver chips are cmos, another look at this problem buffer/line drivers with 3.3v supply should do the trick as their output is vcc and pretty cheap too soic and so packages arent too large, but if the driver input pins may have a pull up resistor inside and have voltage on it the clamp diodes will conduct with 3.3vcc on the buffer i really want to avoid another vreg for this purpose. or just simply order the 3.3v compatible parts from digikey if i found out somehow which curier charges less for the paperwork and handling of the package when it arrives here vat and import duty are already enough extra to pay less then 50euro import limit without vat and import duty sucks.but the question still remains about the st motor drivers if both channel is rated for 30amps continous or the whole device, i dont really need pwm operation for this as the suggested capacitors for it wouldnt even fit inside those rifles anyway however it would lower the power dissipation

author: ovnr
author_rank: Frequent Contributor
timestamp: May 31, 2014, 11:48:51 am
content: Reading a bit between the lines:* You've got a 30+ amp motor load that needs to be switched, as well as brake (I'm not sure if you need it to reverse too? I'm going to assume "no")* You're running it at a reasonably low voltage (<30 volts I expect)* You want to control it with a 3.3v micro, possibly PWMWell, instead of buying those all-in-one drivers, I'd just grab a half-bridge driver (sensible cheap option: LM5106) and a couple nice beefy power MOSFETs (I'd pick 2x PSMN8R5-60YS,115 - 76A rating, 8 mOhm Rds(on), 60V). Ends up costing less ($3-4 vs $8) as well as being more powerful, plus it'd be easier to get parts. If you need help finding parts from a specific store, you can PM me.Oh - you'd connect the positive side of your motor to the positive rail, then alternatively switch the negative side to either ground (drive) or the positive rail (brake).As for the VNH5019: It's rated for 30 amps if you use it as designed (as a H-bridge driver). If you parallel the two half bridges, itshoulddouble the capacity.Good luck!

author: M. András
author_rank: Super Contributor
timestamp: June 01, 2014, 09:22:17 am
content: Quote from: ovnr on May 31, 2014, 11:48:51 amThanks.The allegro drivers are external switch h bridge chips that was my other way to make this happen, pwm and reversing is not essential at all, so even the half bridge would be good, reversal would only play role if the connections to the motor are soldered on at reversed polarity and the whole thing is assembled, but its not a problem for me.I've used before those nxp lfpak fets nice little buggers with impressive specs for the priceedit: voltage max 16v i looked at the all in one drivers for integrated protections for the switching elements and also current sense output.

author: JamesAus
author_rank: Contributor
timestamp: June 01, 2014, 10:50:33 am
content: If you're after a beefier solution, although not quite as integrated as the ST parts have a look at the Infineon Novalith half bridges. I have used the BTN7970B in previous designs with 3.3v logic and they work flawlessly. This particular component is EOL though and it's replacement is the BTN8982TA. I have some here but yet to test them. All the specs I've read are favorable though. Check it out. They can be hard to get in small quantities at times since they are pretty much all consumed by the automotive industry, but I might be able to find a few if you were in a bind.James

author: Jeroen3
author_rank: Super Contributor
timestamp: June 01, 2014, 02:36:21 pm
content: Most modern parts have 5V tolerant pins, so a 3.3 Volt high output from mcu pin will almost certainly be a high for your ttl chip, and a low is just a shorted fet to ground so the low is no issue. A reversed 5V pullup on the other end is also no problem since there are internal diodes and level converters to do this for you. Please note this level conversion only works if the chip is powered.In the LPC11u14 the CPR levels are set by writing a specific pattern to flash address 0x000002FC.If you decide to create a h-bridge yourself, keep in mind nxp timers only have 3 pwm channels per timer. I fell for that once.And FET drivers are required, especially high side, for the low side the load of a high power fet might be too much for a mcu pin, the mcu might get hot. Limiting your ambient temperature range.Also note that running such currents through a pcb requires huge traces, so maybe you need to offload the powerstage from your board.

author: ovnr
author_rank: Frequent Contributor
timestamp: June 01, 2014, 09:38:32 pm
content: Quote from: M. András on June 01, 2014, 09:22:17 amWell, current sense output is pretty simple - just throw a small resistor (I'd probably go for 0.5 mOhm to 2 mOhm) on the positive leg, and slap on a current sense amp. A x50 gain amp and a 1 mOhm resistor gives you 1.5 volts out at 30 amps. Expect to spend $2-$3 for all the required components. If your micro has built-in comparators you can also route the current sense into them, and have it fail over instantly if something goes badly wrong (as opposed to wait for your code to notice the issue).I'd also point out that going with a discrete solution means you're going to have a much nicer experience debugging any eventual problems, plus it will likely be much more robust. You should be able to handle a shorted output (blown motor, etc) with no issue up to around 100 amps, probably a bit more - well, assuming your controller notices the problem and stops trying to light itself on fire.

author: M. András
author_rank: Super Contributor
timestamp: June 03, 2014, 05:03:33 pm
content: Quote from: Jeroen3 on June 01, 2014, 02:36:21 pmwell the high output of that lpc chip is around 2.8v from the datasheet, the st bridge chip needs minimum of 3.15v, the pullup on the other end is an intresting idea will test that, pwm is not needed, as i will operate the motor at full on or off/brake states,if i choose to use the st bridge chip, i will use its 16cm2 refence layout from the datasheet doubling that area on the other side of the pcb and maybe adding some keepout regions in the soldermask and paste mask to have an option to solder in the polygon pours some copper braid or wire.

author: M. András
author_rank: Super Contributor
timestamp: June 03, 2014, 05:30:23 pm
content: Quote from: ovnr on June 01, 2014, 09:38:32 pmive planned to use of the allegro hall effect current sensors for that.The resistor solution is good one too atleast 2-3 watt rated sense resistor in smd format after looking at some of the available series at farnell cos of their max current handling capacity and that is given in pulse ratings too...the whole thing will be fused off board with an automotive fast blow blade fuse with a decent amperage rating to protect the whole thing, i know the fets will protect the fuse faster if they fail open, if they fail sorted then the fuse blows no fire etc, as im not a huge fan of the unprotected lipo packs at an 5000mah pack with 30-50C discharge rating thats insane amount of current for the wiring they use on those batteries.i would gladly build it robust atleast 5 times the max current draw of the motor but that would get pretty expensive immediatly and big in formfactor.

author: M. András
author_rank: Super Contributor
timestamp: June 03, 2014, 05:42:39 pm
content: Quote from: JamesAus on June 01, 2014, 10:50:33 amthanks, nicely characterized parts too digikey have a decent stock from the btn7970, another solution added to my list

author: M. András
author_rank: Super Contributor
timestamp: June 03, 2014, 05:58:39 pm
content: anyone have a solution for 14-20 pin box headers and plugs for1.27mm.64mm pitch ribbon cable or any type of connector which can be used with 1.27mm pitch ribbon, i really love those box headers on the lpc link 2 board but in the shematich the part numbers for them isnt right cos its for the simple headers but the boxed ones are expensive as hell, i wonder how much do they lose on those boards selling it for 20 bucks while each of those connectors cost 2-3 bucks depending on source in low volume, i know these are made by the thousand but ffs those connectors still expensive ? in the reasonable price range, for driving multiplexed 7 segment displays or a cheaper solution to drive them using fewer pins then using the MAX7219 chip for them or a cheap spi or i2c 8x2 dot matrix display?

author: ovnr
author_rank: Frequent Contributor
timestamp: June 03, 2014, 09:02:58 pm
content: Quote from: M. András on June 03, 2014, 05:58:39 pmThe connectors on the LPC-Link 2 board look like 1.27mm pitch; they would be using 0.635mm pitch cable. Standard dual-row headers use cable that's 2x the pin pitch (so 1.27mm cable for 2.54mm pitch connectors, etc).In any event, Digikey has those connectors (using 14-pin as an example) for $0.78 for theSMD PCB-mount connector, $1.10 for thecable-mount connector, and they also sell 0.64mm pitch cable for reasonable prices. If you up the quantity (say, 100 units of each), you're looking at $0.59 and $0.83, respectively.Also - and no, I have no affiliation with them - Digikey does offer free shipping to Hungary if you order for more than $200. Be sure to get it shipped DDP (ie, pay in Euros or whatever your local currency is), or UPS will likely give you a shocker for a customs handling bill.Edit: For display use, I'd strongly suggest just sticking a plain old boring microcontroller on your display board, and have that do the business - and just communicate over whatever serial bus you prefer. Alternatively, there are cheapish I2C-controlled displays on eBay. I ended up making my own integrated drivers (PCB the size of your usual 4-digit 7-segment display) which handle PWM dimming, display, etc, all over I2C or RS232. Ended up costing $8/pop, including PCB, display and connectors. I'd be happy to share the files if that's what you need, saves you the effort of coming up with a solution yourself.

author: M. András
author_rank: Super Contributor
timestamp: June 04, 2014, 04:47:20 pm
content: Quote from: ovnr on June 03, 2014, 09:02:58 pmThanks for the correction on the cable pitch i realised laster that i wrote a wrong pitch, i usually check local distributors which sells to inviduals first, i rarely look at digikey, as god knows what will the curier charge above the tax+duty combo, they offer fedex, dhl, and ups. maybe afterall i will order all the components from digikey i bet it would come out cheaper then from farnell.display board with its on micro sounds good, i have no experience for any kind of micro apart from this cortex micro which i have in front of me and an st cortex m4 discovery in the drawer, but sounds doable by me, it does not need built in adc to drive a display so its even cheaper.the biggest effort will be for me on this to actually get the code done in reasonable time, got trough 1/3rd of the Keil's uvision user manual 32k size free limit is good for this micro anyway, to be able to set it up and not just use the sample project settings, after that the lpc open library manual to get some knowledge from it.does anyone know what can be used for relase agent from a mould with this epoxy resin?http://hu.farnell.com/robnor/px700k-1-bk-250/encapsulant-epoxy-flam-retard-250g/dp/2088247

author: ovnr
author_rank: Frequent Contributor
timestamp: June 04, 2014, 09:02:40 pm
content: Quote from: M. András on June 04, 2014, 04:47:20 pmCustoms: As I said, try to get it shipped DDP. That's short for "Delivered Duty Paid", which means you're only liable for any VAT that would be applicable - no actual customs fees. I don't know if Digikey offers this to Hungary or not, though; you should ask them. I have to order in NOK (local currency) or EUR to get it shipped DDP; if I pay in dollars (which is usually a bit cheaper), I have to cover all customs fees myself. It'sNOTworth it - UPS, for instance, wants to charge me around $10 per order line above 6 lines, which ends up being a completely ridiculous amount of money.Mold release: Get some spray-on mold release. I think most are wax-based, and they should be fine. I bought some liquid mold release (pretty much just wax dissolved in white spirits), which is a pain in the ass.You may want to consider making a silicone mold; you will likely not need any mold release in that case, plus you can get just the right size you want - just make a master model out of just about anything, and create a cast of it. Great fun to experiment with too.Also, have you considered moving your MCU into the display portion of your project, then controlling the firing over your cable? I imagine you only need a few wires for it - Vcc, GND, MOSFET drive, MOSFET enable, current sense, battery sense?Alternatively, you may want to consider something like the cheap I2C OLED modules - they're pretty cheap ($7-ish). If your application is for outdoors use, they'll probably not work due to being too dim. In that case, I'd strongly suggest finding a reflective/transflective LCD solution, as LED modules have to be driven pretty hard to be easily readable outdoors too.

author: M. András
author_rank: Super Contributor
timestamp: June 05, 2014, 11:04:32 am
content: well the display is bit of an aftertought, the oled display wont work due to ambient light and it would be mounted somewhere on the back of the rifle, if needed, thought before for silicon master mold i will check if i can get locally neutrally curing silicone compund i know i can get rtv silicone potting compunds, afterall if i cant get neutral curing for decent price i just carve out a piece of wood for the size of the pcb and pour that around a few times, yeah a few wires only for the st bridge 2 output 2 input for status flags, 1 adc channel for current sense, 1 for battery voltage, (afterall the st chip can be used without any mcu, use the trigger wiring to change the input pin state the other pin should be tied to 5v or gnd) the infineon half bridge chip needs only 1 input the other is just an enable/sleep input.i will check if they have that option for hungary or not, and look trough the customs section of the curiers, or i just catch the ups guy when he comes next time with a package and ask him about it

author: ovnr
author_rank: Frequent Contributor
timestamp: June 05, 2014, 05:05:19 pm
content: If you want to make a "tight" mold for your board (as opposed to drop it into a box and fill with potting compound), I'd suggest taking your board, with all components on it, and coat it in something - think plaster, etc. Fine-tune the end result, then make your master mold from that.Alternatively, you can consider just masking off any areas you want left alone, and dipping your boards in the potting compound. There are additives to control viscosity too, if you get a too thin layer.And your delivery guy won't know anything.

author: M. András
author_rank: Super Contributor
timestamp: June 05, 2014, 07:02:03 pm
content: Quote from: ovnr on June 05, 2014, 05:05:19 pmthanks for the advice once again

author: M. András
author_rank: Super Contributor
timestamp: June 17, 2014, 07:00:21 pm
content: where to connect the unused mcu pins including the crystal pins as i plan to use its internal oscillator, should i use starground for the signal return paths, bypass caps to the regulator and everything else whats not needs high current or its fine as it is connected now to the gnd plane on the bottom side of the board?

author: rob77
author_rank: Super Contributor
timestamp: June 18, 2014, 03:25:36 am
content: Quote from: M. András on June 17, 2014, 07:00:21 pmif you're not concerned about EMI, then just let them float (most of the micros got internal pull-ups anyways).

author: ovnr
author_rank: Frequent Contributor
timestamp: June 19, 2014, 05:50:34 pm
content: Quote from: M. András on June 17, 2014, 07:00:21 pmUnused pins: As rob77 said, leave them floating. Consider routing some out to test points in case you need them for something unforeseen.Doesn't matter if they're clock inputs or not.Ground: I'd post a picture of your board layout if I were you, but generally it's fine to just use a single large ground plane. Do pay some attention to the return paths, but if your power stuff is largely separate from your control stuff it should not matter too much.

author: M. András
author_rank: Super Contributor
timestamp: June 21, 2014, 10:03:08 pm
content: i will solder on some desolder braid to the high current paths over the existing pcb tracks to maximize the current carrying, or just some solid copper wires, connectors to the motor control ic, its easly done with the btn series infineon half bridge drivers, not so much with the st bridges, layouts is still work in progress but i think i will eventually upload a picture or the gerber whichever is better to look at.appnotes for both of the chips suggest series resistors to the mcu pins which i did using their 1k for the ST part, and 10k for the infineon part, had to go down to 0603 sizes which will be a pain to hand place to fit into the space between the mcu and the control ic. wondering if using resistor networks for this task would be better option.0.15mm spacing and 0.2mm tracks is used to route the spi/i2c and swd pins to the 1.27mm pitch smt idc header, dear cheap chinese pcb manufacters listed 0.15/0.15 track and spacing, or 6/6mil minimum will see if its good for them when they get the gerbers later.i find it intresting to put spi clock pins on the far side of the chip from the datalines, same for the swd, atleast the jtag pins are alltogether.i finalized the board sizes at for 68x44mm for both versions for the 2 distinct control chip, gave me some thinking time to place the parts the most effective way by me.

author: ScubaShan
author_rank: Contributor
timestamp: June 22, 2014, 12:18:22 am
content: Could you use something ready made like thishttp://www.hobbyking.com/hobbyking/store/__32025__HobbyKing_X_Car_45A_Brushed_Car_ESC.html?

author: M. András
author_rank: Super Contributor
timestamp: June 22, 2014, 02:00:32 pm
content: Quote from: ScubaShan on June 22, 2014, 12:18:22 am1.if i know it right the rc motor control modules require sine or square wave input, a mechanical switch wont provide that, and that was is only 2 cell lithium capable,2.there is no learning experience buying a ready made stuff

author: M. András
author_rank: Super Contributor
timestamp: June 26, 2014, 08:03:17 pm
content: above mentioned discrete route, which contain a gate driver ic, what protection circuits needed to keep the mosfets happy when switching on and off the load at DC operation, either full on or full off, measured a few days ago 1 of the rifles with a turnigy watt meter i know its not a good solution and not so accurate.I dont have a clamp meter nor a scope and a current probe for it, in burts it measured 26Amps peak, interrupting that could do a nice voltage spike as the wiring isnt short and the motor has inductance too, is a simple TVS diode would do the protection for the fets and which is better for this bidirection or unidirectional? or should i look for more robust schemes?, if anyone come accross a good appnote or similar regarding these subjects i would gladly take a look at them.

author: jlmoon
author_rank: Unknown
timestamp: June 26, 2014, 08:24:03 pm
content: Quote from: M. András on June 03, 2014, 05:03:33 pm2.8v shifted to say 3.5V.. voltage follower (op amp with a bit of gain) since no pwm is needed?other question.. does that H-Bridge emply dynamic braking behavior (shorting motor + to motor - through mosfets?

author: M. András
author_rank: Super Contributor
timestamp: June 26, 2014, 08:53:07 pm
content: yep, it does either to vcc or to gnd, thought of the opamp initially as a rail of lm324 is sitting on my component drawer unused in so-14 package, but this no longer concerns me as i went with the vnh5019 cos i could managed to find a carrier board from polulu with the chip so i can play with it and cheaper then the vnh2sp30, it has more detailes on the power bridge and directly interfaces with 3.3V mcu-s, as im playing with multiple ideas which would be the best,the current sense output is wonderful, the carrier board is set to around 140mV/A output the small motor i was playing with peaked at start around 8xx mV roughly 5.xxA on the output according to the fluke 289 peak detection, and idles around 1A, this was from a 3cell high discharge li-po pack. next purchase will be a scope thats for sure.... (come on lottery ticket be the one that wins)

author: JFA
author_rank: Regular Contributor
timestamp: June 27, 2014, 01:05:59 am
content: Have you considered reprogramming a cheap model aircraft ESC for your application? Most of them run on Atmel Atmega 16x or 32x family.I know some people have reprogrammed one such ESC from three phase (as regularly used in "brushless DC" (what a misnomer) motors) into a variable DC drive with reversible polarity.You can get a 40V (10s) 200A ESC for about 40$ (HobbyKing RedBrick) or you can get lower current units for pretty cheap, like 10$. All you need is an USB Atmel programmer (5$) and lots of patience... :-)Those ESC use three half-H bridges. My guess is, you could probably use a very cheap very tiny one, say, 10A and reprogram the three half-H bridges to work together (for grounding the motor as an electromanetic brake, and having a 30A capacity.).Look on either HobbyKing.com or on RCGroups.com forums, I recall there is a post on the topic. (I might even have saved the link...)Check alsohttps://launchpad.net/brushed

author: JFA
author_rank: Regular Contributor
timestamp: June 27, 2014, 01:25:49 am
content: Homemade Brushed ESC for crawlers and tanks.conversion of a three phase ESC (brushless DC) to a DC (reversible polarity) ESC by reprogrammation of the atmel microcontroller

author: M. András
author_rank: Super Contributor
timestamp: June 27, 2014, 08:13:24 pm
content: i didnt look at an brushless esc before for this purpose, and i have no desire to learn to program the 8/16bit micros in them, for mcu programming just grasping the edge of the things while learning C from no previous programming knowledge which is pretty hard and time consuming beside working in 2 shift.My choice for the arm cpu was driven by that i have other ideas in my head for them, while leaving an insane amount of headroom for crappy code to work, i have a pretty good plan for the dual core lpc4357 in my head however may change that to the 4370 which is 3 core 1 dedicated to peripherials but im not sure i can ever archive it