Fairly large DC motor control, high amps, pcb design, notes, etc... - Page 1
Forum section: electronics / projects

author: Skimask
author_rank: Super Contributor
timestamp: June 23, 2016, 03:33:05 am
content: Project for end of July with a couple of friends...going to electrify a John Deere 317 mower (I throw a connecting rod last weekend...right thru the side of the block...should've got pictures, but I was kinda pissed off enough as it was). One motor for the hydrostatic drive transmission (variable drive to maintain a constant PSI in the hydraulic system), the other motor for the PTO drive (constant speed drive to maintain a constant RPM on the mower deck, snowthrower attachment, etc).Got our hands on a couple of identical DC motors originally installed in electric fork lifts (either drive motors or pump motors, not sure which), series wound as far as I can figure out, freebies. Good bearings, tore them down, cleaned them up, inspected everything, looks good enough for us for the price. Got a set of jumper cables, clamped down the motors, hooked them up, spun over well enough. Obviously we pulled the cables before they spun themselves into oblivion...which would've been relatively cool to get on video...but I digress.Question about whipping up a PCB to handle PWM'ing the motor...The motors are smaller-ish 6.7" types, can handle 'up to' 48VDC (although I've seen them modified for 96V use on various sites in EV cars). We won't be running them that hard without getting experience first.PCBs...what method does a guy use to attach battery cables to a circuit board? I'm talking about decent 2ga (and larger) stranded cable.Best thing I can come up with is just a hole in the PCB surrounded by bare copper, where you'd terminate the battery cable with a big ol' ring terminal, clamp it down with a bolt/nut/washer, and call it good.As far as PWM control...MOSFETs or IGBTs?None of us have experience with IGBTs, but we've got bins upon bins of TO220 style N channel MOSFETs. Neither motor will have to be run 'backwards', so simple On/Off is all we need, half H-bridge.The hydrostatic drive feedback is going to be a simple pressure switch setup. Low pressure, motor on. High pressure, motor off.And the PTO drive feedback will be either a hall effect or optical sensor with some simple-ish P/I/D running on a PIC to maintain RPM.

author: MagicSmoker
author_rank: Super Contributor
timestamp: June 23, 2016, 11:33:05 am
content: Quote from: Skimask on June 23, 2016, 03:33:05 amGah... don't do that! The PC board will crush over time from the clamping force. Use a proper soldered-in terminal stud (fair) or a pigtail to a bulkhead terminal (better). Check out marine supply stores for bulkhead terminals that are ideal for the job.Quote from: Skimask on June 23, 2016, 03:33:05 amMOSFETs definitely at this voltage level; IGBTs aren't even worth considering. I wouldn't go too high on the PWM frequency - 10kHz will be more than sufficient. Also, you don't need a half-bridge for unidirectional drive, you just need a chopper (literally, a buck converter, where the motor acts as the output inductor and there is no need for an output capacitor).As for regulating RPM, you can look at the induced voltage from the motor (aka "BEMF") during the switch off time to get an estimate of RPM; no encoder required. It's not "servo" accurate, but should be more than sufficient for a hydrostatic drive.

author: ajb
author_rank: Super Contributor
timestamp: June 23, 2016, 11:41:02 am
content: What sort of current? If you're in >2AWG territory, that's what, ~200A? That's not the kind of current you generally run through a PCB unless you're willing to pay forextra heavy copper.Terminating a 2AWG wire into a PCB presents significant mechanical concerns. Proper crimp terminals and something like Wurth'sPower Elementswould be a good bet.Maybe you could get clever and do something with copper bus bars that bolt onto the PCB and avoid the need for heavy copper on the PCB. Mechanical design gets trickier that way. The easiest solution is probably to look for switching bricks that meet your specs and only do the control stuff on the PCB.

author: Fungus
author_rank: Super Contributor
timestamp: June 23, 2016, 12:00:44 pm
content: Use the MOSFETs. Put as many in parallel as you need.If you're going to PWM them then make sure your gate driver has plenty of current. Connecting multiple MOSFETs to an I/O pin on a microcontroller won't be good enough. Maybe use another MOSFET as a gate driver.It would be areallygood idea to find out how much current the motor will draw under your load before doing anything.Make sure you have plenty of clamping diodes across the motor. You can expect big voltage spikes when you switch it off.

author: LaserSteve
author_rank: Super Contributor
timestamp: June 23, 2016, 06:04:00 pm
content: Find golf cart controls from a company called 4QD, awesome stuff...http://www.4qd.co.uk/Has a hobby side too...http://www.4qdtec.com/Steve

author: Skimask
author_rank: Super Contributor
timestamp: June 23, 2016, 07:56:32 pm
content: PC board crush / bulkhead terminals -Got any good Digikey links for one? Generic search on Digikey only brings up a couple hundred thousand types, give or take 3.MOSFETs vs IGBT's -I was under the impression it was more about current than voltage (eg. MOSFETs = lower current, IGBT = stupid high current). Did some reading. Now I know a bit better.PWM freq -Just high enough to workRPM -The motors themselves have hall effect sensors built into one end as well as a bit of a cooling fan...therefore, either/or will be a piece of cake to implement.Current-From what I've been reading about the motors, when driven from good 48V batteries under a good load, startup surges of over 200A are not uncommon. No idea what the sustained current would be. Haven't got my clamp meter yet either (it's on the list o'stuff'to'buy)Heavy copper-Ya, that's another piece of the puzzle to figure out. TO-220 MOSFETs on thick PCBs, stacked up to handle 200A? Me thinks not.Unless I can find decent MOSFETs in a bolt-on type package, like an IGBT...Switching bricks-I suppose DC SSRs are out of the question? Yes/No?

author: Kleinstein
author_rank: Super Contributor
timestamp: June 23, 2016, 08:20:25 pm
content: The main reason for using MOSFETs instead of IGBTs is the voltage drop of the IGBTs: there you loose at least about 1-1.5 V. This is not a big deal at more than 300 V, but not good at 50 V or less. There are also MOSFETs larger than TO220.With a slow starting ramp, there will be no switch on surges, like hard switched on. So it's more about the operational current at the maximum torque needed.

author: MagicSmoker
author_rank: Super Contributor
timestamp: June 23, 2016, 11:16:25 pm
content: Quote from: Skimask on June 23, 2016, 07:56:32 pmHere is the relevant section on Digikey:http://www.digikey.com/product-search/en/connectors-interconnects/terminals-screw-connectors/1442846?k=&pkeyword=&FV=fff40016%2Cfff8041e&mnonly=0&newproducts=0&ColumnSort=0&page=1&stock=1&quantity=0&ptm=0&fid=0&pageSize=25Look at, for example, Wurth 7460719.Quote from: Skimask on June 23, 2016, 07:56:32 pmYour impression isn't entirely incorrect in that IGBTs are bipolar devices so can handle a much higher current for a given die area, but they also have a higher voltage drop which acts like a diode in series with a very small, but non-zero resistor. They are also much slower to turn off due to minority carrier recombination, so switching frequency is limited (however, they tend to have much lower parasitic capacitances... kind of wasted at the enforced lower switching frequency, though). At <100V, however, there is no contest between MOSFETs and IGBTs: MOSFETs are clearly superior (even when higher switching frequency isn't a factor).Quote from: Skimask on June 23, 2016, 07:56:32 pmDon't go too low or else the peak to peak variation in ripple current will be too high. I design power electronics, including drive systems for all sorts of motors, and I know from experience that 6-15kHz is a good range of PWM frequency for a motor this size.Quote from: Skimask on June 23, 2016, 07:56:32 pmFamous last words! You will have endless nightmares sorting out noise issues from those puny Hall effect sensors inside the motor (unless they use differential signalling - then, yes, a piece of cake). I'm not going to do an exhaustive google search for you, but here's one website that explains how easy it is to use BEMF to monitor speed:https://www.precisionmicrodrives.com/application-notes/ab-021-measuring-rpm-from-back-emfQuote from: Skimask on June 23, 2016, 07:56:32 pmOne of the purposes of a PWM motor controller is limiting the start up surge...That said, yes, you can assume that you will need to safely handle at least 200A, though a continuous current rating of 100-150A will likely suffice. The size of the original internal combustion engine will be helpful here; you can roughly estimate the controller's power rating in kW by cutting the original engine's hp rating in half. E.g. - if a 12hp engine then plan on needing about a 6kW controller.Quote from: Skimask on June 23, 2016, 07:56:32 pmRule of thumb: a TO-220 package is good for about 20-25A continuous, regardless of what the datasheet might say; a TO-247 (or TO-3P) is good for about 50-60A. For heavy copper PCBs I have had good experiences with Saturn, Epectec and K&F. If you go higher than about 4oz (0.14mm thick Cu for our metric friends) you'll want to put the control electronics on a separate PCB (due to the difficulty in making fine features - ie, thin traces with small spaces).Quote from: Skimask on June 23, 2016, 07:56:32 pmErf... Definitely out of the question unless you just want on-off control.That said, a hydrostatic drive basically requires a fixed RPM, so a shunt wound or PM field DC motor would be a better choice than a series wound type.

author: Skimask
author_rank: Super Contributor
timestamp: June 24, 2016, 05:10:35 am
content: All duly noted, copied onto sticky notes, and I'll see what burns up firstQuoteI've never really thought about too LOW of a freq for PWM, but that makes enough sense.QuoteNo differential signalling here as far as I can tell. However, with that being said, I'm handy when it comes to micro's and programming. May or may not be "easy enough" to filter out spikes in software. I'm going to head back and see if I can find a burned up speed controller from the place I got the motors (a local forklift/pallet jack/tele-lifter supply/rental company) and see what the feedback input looks like on the PCB.BEMF - Yep, know about it. Never done anything with it though.QuoteAnd I'd be limiting that as far as I can and still keep it all usable.QuoteOriginal engine(s) in this tractor (depending on specific mode) varied from 12HP gas to 24HP diesel. (early 80's John Deere 300 lawn tractor to mid 90's John Deere 332 w/ a diesel).When in normal operation, the majority of the load is on the PTO (mower deck, snow thrower, etc), not a lot on the hydrostatic side unless going up a steepish hill.QuoteI kinda figured the power and control would be completely separated, at the very least optoisolated with the power PCB having a daughterboard on it feeding the PWM/etc to it.QuoteAye, but the motors I got were freeAnd I can get more, maybe not today, maybe not tomorrow, but over time, the guy at the shop says he chucks them out once in awhile. I hook him up with some PCB fixes on various things, he hooks me up with motors. I call it win/win.I'm obviously in the early stages. I still have to pull the original motor out to figure out how many batteries I can spread out along the frame rails. Might be the case I'd have to completely abandon the project due to not having enough room for batteries to let the thing run for more than 10 minutes.But wait, won't the Batterizer fix EVERYTHING for me?

author: cs.dk
author_rank: Unknown
timestamp: June 25, 2016, 11:55:52 am
content: Quote from: Skimask on June 23, 2016, 07:56:32 pmI've got a 48V Clark forklift. I can take some measurements, if you are courious about start current and drive current. The traction motors are 2x 4,5 kW if i remember correctly. Don't know the size of the pumpmotors though.

author: Donziboy2
author_rank: Contributor
timestamp: June 27, 2016, 10:47:17 am
content: Ah, this is a fun oneWorking on an electric gocart with similar requirements.First thing I will say is that you can find controllers for golfcart/forklifts in the $300-500 range pretty easy. The reason I built my own controller is because I wanted access to all the data and fine control and since where I work we build controllers for a living I figured it would be interesting.(granted our stuff moves trains not gocarts)[it was however not a cheap project and I spent alotof time working on it]Most of the controllers I have seen have support software to allow you to setup parameters based on your motor/system needs, im not sure about speed feedback you would have to look into it.Designing a controller is a lot of work. You can put all the bells and whistles into it with all the appropriate safety or go bare bones and prey nothing happens.I only plan on switching at a slow 500Hz, I will be measuring ADC's at 4KHz. I can go faster but so far it does not appear I need to go faster. Once I spin the wheels I will know for sure and can make adjustments. I plan to send data using serial to another micro that will eventually be running a dash, either mechanical in nature or a Raspberry PI 3 running a large touch LCD.Schematics subject to change as I find errors or make changes. (im in the process of adding e-stops to the bypass)The PCB's have been testing on a setup using a small 200W scooter motor(not posting sw since its still a mess of notes lol). I will do final testing on the cart with the wheels hanging.Motor is an ME0708.Still in process of wiring it up.

author: Skimask
author_rank: Super Contributor
timestamp: June 27, 2016, 05:46:17 pm
content: Quote from: cs.dk on June 25, 2016, 11:55:52 amRe: the motors I've got, both of them are physically the same internally, the drive and pump motor that is.The differences between the two are totally external. The drive motor has a brake on one end and a threaded shaft on the other. The pump motor has nothing on one end and a slotted tang on the other.

author: MagicSmoker
author_rank: Super Contributor
timestamp: June 27, 2016, 06:42:32 pm
content: Quote from: Skimask on June 27, 2016, 05:46:17 pmA couple things to watch out for: pump motors tend to have a much lower power rating and often will be hardwired internally for one direction. It's easy enough to tell about reversibility - if it has 4 terminals, marked S1, S2, A1, A2, then it is a reversible series field motor, if no S terminals then it is hardwired for one direction, and if for some strange reason it has terminals marked F1 and F2 instead of S1 and S2 then it has a field intended to be driven separately from the armature (usually at the same max voltage as the armature, but requiring much less current).

author: Donziboy2
author_rank: Contributor
timestamp: June 29, 2016, 01:15:36 pm
content: Battery space sounds like it will be the deciding factor. Also cost.Traditional lead acid battery's don't like to be discharge really fast so you will loose a good percentage of capacity from internal resistance you will also want to stop before you go below 30ish % of the battery's remaining capacity. Any lower and you would risk reducing the life of the batteries. From the description you will probably need 6 batteries.Preferably golf cart batteries, they have really high capacity and can handle rapid discharge better then deep discharge marine/rv stuff. Drawback is they weigh 90ish lb's a piece. You may get lucky and get some used in decent condition batteries for free/cheap from a shop or golf course.The other battery that works well is the big prismatic lithium batteries >150A. Sadly they are cost prohibitive, they do weigh watt for watt about 1/3 of lead acids. And they take up less room.The 3 single most expensive items in a project like this are the controller, motor and batteries.You have motors.You can probably build your controllers relatively cheap depending on what your needs are. One simple speed control and another with some kind of pressure control loop.Brand new golf cart batteries will run you around $200 a piece. Same number of Lithium's to match lead acid will easily cost you double that.