My slightly small workbench, with the beginnings of my motor controller on it.
Items of note:
My brand-spanking-new DSO oscilloscope - Rigol DS1052E
Weller WD 1 Soldering station - my baby! (top left)
Atmel STK500 dev kit with an AtMega8 (centre, green)
Breadboard with LCD screen and rotary encoder (centre bottom)
Breadboard with small ~2A motor and PWM control MOSFETs (bottom left)
Kit 'o' Parts (right)
Copper Buss Bar (large, centre middle)
Every motor controller has to start somewhere; I decided to try and start mine with... a motor!
Okay that's *partially* a lie... a year ago I experimented with PWM control of LED brightness. Coincidentally, the breadboard in the middle was that project, I kinda just stole the PWM output, hehe.
The motor is slightly hidden, from the bottom left heading right, you see two oscilloscope probes reading the PWM input and motor RPM, the third object is an old-school clamp, holding the shiny motor to the table.
In typical motor controller style, I'm using an N-channel mosfet as a low-side controller of the motor. The motor has flyback diodes attached in antiparallel to allow the inductive currents to continue flowing.
Even with such a small motor, the flyback diode is quite useful. With the PWM duty cycle set low (motor has about 3V across it, rated 12VDC), we get a voltage spike at the transistor of about 10V. Adding the diodes drops the spike to a volt or two - unsurprising, because these are 1n4148s - small signal diodes, not really intended for this purpose. I picked them because they're the only fast recovery diodes I had lying around. (I used 3 in parallel because they are rated for only 200mA)
My mosfet driving circuitry is pretty garbage right now. The problem is that the power mosfets I have in my kit are standard (i.e. not logic level) so I need >10V to turn them on fully, which the microcontroller won't do. Since I am not comfortable with BJTs, I'm using one NMOS as the driver for another. The uC drives the gate of the NMOS, its drain is pulled up strongly (500ohms) to 12V, and is used as the gate input of the second NMOS. This allows Rds_on to be low enough for the transistor to survive, though it still heats up enough to burn you even after I added the TO-220 heatsink (see first o-scope probe, above)
This is my new o-scope (yay!) showing
a) The motor speed on the top (1 pulse per rotation)
b) The PWM signal (the input to the main NMOS low-side driver) on the bottom.
The measurements indicate that at 1.6% pwm duty, the motor is spinning at ~39Hz.
Below is part of the next phase of the controller project. I am going to move up from a small 2A brushed DC motor to a car starter motor! Out of a Sunfire I believe. $35 at the auto wreckers, can't complain too loudly. These babies can pull hundreds of amps when loaded with a car engine, but under no-load (i.e. on the floor) they should pull 30 to 50A. I know this because I've watched a video of another guy making a motor controller, goes by the screen name of JackBauer. Thanks Jack :)
In my hand you see some fairly beefy cable, it's 6AWG (6 gauge). Should be about 4 times the area (per conductor) as household wiring. It will do nicely for the starter motor connections. It may be a bit overkill, but I'd rather not have to worry about shoddy wiring catching fire. For the real deal I'll need to get a hold of some 0AWG or even 00.
The last random object in the photo is a piece of copper water pipe. I'm going to use it to make connectors for my 6AWG wire by cutting, flattening soldering and drilling. Sure I could buy them for $5 or so apiece but who has money for that?
On the right you see my entire work area. Yes, it is messy. Yes, that is bad. Is it going to change? Unlikely. Such is life. Also, besides the 6 full outlets on the wall, one of those is actually a power bar going to more equipment! Kids, don't try this at home. I know that the devices plugged in will draw less than 15A so I'm not at a risk of overload. If I had 8 hair driers instead, it would be a different story.
Lastly, I have my Digikey order that is going out tomorrow, with what I think I will need to pull this controller off. On it, there is $50 of capacitors (*faints*) $23 for 4 transistors, and $27 for 3 diodes.
Of course that seems ridiculous, but when you realize that 3 of these mosfets in parallel can sink 390A, and 3 of these diodes in parallel can do 360A, you realize why they cost what they do.
As a piece of trivia, the electrical 'service' for your entire house is guaranteed to be 200A or less. Yeah, 3 little transistors, switching twice the maximum current draw of an entire house. Of course this motor controller is switching DC while your house is AC and thus the comparison is moot, but I'm just trying to communicate this is a lot of current!
The real motor I plan on controlling is rated for 350A intermittent at 48V - 22 electrical horsepower (which has more kick than a gas engine horsepower)
Once you start building/testing this second stage motor, how do you intend to power it for testing purposes? Also, this is awesome!! (00 GAUSE?! lolz *smacks head*)
ReplyDeleteI'm going to bench test the starter motor for right now. Assuming the controller doesn't burst into flames, I'm going to go ahead and buy the $600USD motor, and bench test that. If I'm still alive (hehe) I am going to build a frame for it, and drive it! :D
ReplyDeletePerhaps I misread your comment, I am going to power it with lead-acid batteries. I'm hoping to get my hands on some gel-cell batteries for the real kart, but a flooded battery will do just nicely for testing. 12V for the starter motor, 12V for the real motor, ramping up to the final 48V (or so the plan goes)
ReplyDelete