PDA

View Full Version : PWM Motor controller


kibble
03-17-2009, 05:31 PM
Well, since I can't do much with my LawnBoy until I get a new clutch and jackshaft, I started working on this project. I'm going to attempt to make a high power DC motor controller out of a cheap Chinese scooter controller, an old Radishack 50W amp enclosure and sixteen IRFZ46 N type MOSFET's. I was playing around with the motor controller today just to get an idea of how it works. It's actually a controller I found so I didn't know if it worked or not, turns out it does. The circuitry is very simple and I'm going to make a schematic of it for those of you who may be interested. Here's some pics of what I'm working with and a pic of the waveforms going into the gates of the MOSFET's at half throttle with the scope set to 1V/div.

stephenm2682
03-17-2009, 05:54 PM
good find, i would be interested in this.:thumbsup:

ed1380
03-17-2009, 06:16 PM
HOW the hell does a cat with a mellon hat afford an O-scope?

kibble
03-17-2009, 06:23 PM
I got it for like $200 on ebay 4Ch, 300Mhz. :thumbsup:

kibble
03-17-2009, 10:45 PM
Well, I drew up a schematic. This is the basic controller, nothing beefed up yet and all components set for 24V. I'm hoping I got everything right.

From what I can tell on the schematic and from experimenting with it, I think the first section with OP amp #4 is a low voltage cut-off circuit that prevents the circuit from working if the voltage gets low enough, to prevent damage to the batteries.

The second section with amp #3, I think is a current monitor which cuts off the controller if there's a short or too much current being drawn. It measures the difference across the "resistors" I labeled J1 and J2 to check the current. From poking around with my multimeter, I think the threshold is 63mv, I stalled the motor and managed to reach 54mv at the negative input of amp 3, but because I wasn't using a full 24V, I wasn't able to trip it.

Amp #1 is the clock generator and makes a triangle waveform.

Amp #2 is the pulse width modulator and produces a square wave from the output of amp 1 and the throttle voltage. It then feeds into Q3 and Q4 transistors which drive the MOSFETs.

Q3 is 2N5551 and Q4 is 2N5401
Q1 and 2 are both BUK7520
MBR20100 is an AKA Diode in a TO220 package which prevents voltage spikes from the motor from damaging the circuit.

S1 is the ON/OFF switch.

The momentary switch labeled "Brake" is activated when you push on the brakes to prevent the throttle from working at the same time.

"Hall" is the throttle. It is a magnetic sensor that puts out 0-5V. 0V being closed and 5V being wide open.

All resistors are 1/4 watt, but can be 1/8 except for the 50Ohm, 1/2 watt after S1. The diode (D1) next to the brake switch is a generic diode like 1N4004 or whatever.

The 5.2V zener diode regulates the voltage to power the actual controller circuitry.

What I will be doing is basically adding more MOSFETS to the power section and change some things here and there to make it so it handles 36 volts. Well, I was thinking of maybe putting a switch on it which will let me select the input voltage and change values around accordingly.

zabac70
03-18-2009, 07:33 AM
Interesting :thumbsup: How many amps could it take (and how many it will handle, when you're done with it) ?

kibble
03-18-2009, 09:16 AM
The IRFZ46N's I'm using are rated for 50A continuous, so I'm not 100% sure if I would just multiply that by how many I'm using (16), which would say that it's 800A. I'm not sure I believe that myself, it's probably some lower amount. :confused:

zabac70
03-18-2009, 11:35 AM
:) You'll be a very rich man soon. 800 A for under 100 dollar ??? Zilla (controller manufacturer ) will put a contract on your head :) You probably looking at 45 A - 60 A continuous if you heavily modify gate and other stuff (I'm not an electronic expert , so I couldn't tell), based on what I've read on the net in a past year or so. Heat dissipation alone will fry circuit and the casing if you put even fraction of that current trough it. See this please: http://zeva.com.au/tech/controller_design/
As I wrote , I'm not an expert , but I strongly suggest before you ruin a working controller , do a bit of research (yahoo groups: OSMC) and please report of the progress.
BTW (this is off topic) I've never had a chance to thank you about car starter motor stuff (pics especially) so : THANKS!

kibble
03-18-2009, 03:01 PM
Hey, that's a nice page you posted, but that guy is also intending to use it in a car with a hardcore motor, not like something small, like I'm intending. I got some tips from that page though. Thanks!

zabac70
03-18-2009, 04:32 PM
Yeap , I know , that was a point. With 800 Amps and, say , 24 Volts you will have...wait for it...19 200 Watts (19.2 KW). Pretty darn good for a controller from a waisted electric scooter :). Strongly suggest to visit yahoo group OSMC (open source motor controller) - those gyes knows their stuff , and you can find there schematics , ask questions and find smart ideas (if you read it long and thorough enough). However, keep a good work :thumbsup:

stephenm2682
03-18-2009, 04:39 PM
what controller is needed for say a car starter like we spoke about the other day? amps or volts

kibble
03-18-2009, 05:37 PM
Well, I'm hoping my controller will be able to handle a starter motor, which needs 12V, but I'm not sure how many amps. I'm going to put a switch on it that will let me select between 12/24/36 volts. I was also going to do 48, but that's getting too close to the limits of the MOSFET so I'm not going there. The main motor I'm intending on using is a 36V 500W I got from one of the other guys on here. I will also test my modified starter motors to see how it works out. Experimentation's the name of the game and I intend to push this thing to its limits, wether it holds up or goes down in flames (literally).

Zabac70, I'll definitely check out that group.

zabac70
03-18-2009, 05:48 PM
@stephenm2682
Well , in principal , the same as I've said before - try yahoo groups/OSMC. If you think of car starter as a motor like ones in battery powered tools (brushed DC motors), you basically need a giant dimmer (in terms of current) - just like the trigger on battery operated drill. Voltage depends on your choice - would you go as it is 12 Volts , or you want to overvolt it and go with 24 Volts. In eider case , you'll need something to limit the current trough controller , cause the easyest way to have "throttle" is PWM regulated device or "pot" (potentiometer). They usually operate in range 0 - 5 V (for purposes of light Ev's). Current trough this devices is measured (usually) in milliamp , so you don't want to hook up your battery pack directly to it. Therefore you need something to limit the current to the board (controller). Device (integrated into a controller) is called "bridge". Accept the internet (which sometimes can be confusing , cause highly professional people talking about something that we don't understand or know of, which is plane and simple to them), the best way is to talk to a professionals from electrical department "in the field": car electricians , guys who maintain forklifts (electric ones) or elevators (lifts)...Well , that is my approach anyway.
To answer your question directly : you need to determine few things - how many Volts will be in your system , how heavy is the vehicle you intend to build (so we can assume how many amps theoretically can "pull" from battery pack), how complicated (expensive) you want it to be. If you not familiar with electronics , you might as well to google (or e-bay) "controllers for brushed DC motors" and find what you need (I would look for ones with 40 - 50 Amps continuous rating, if it is for light vehicle) - they aren't very expensive.
And a bit of warning - I'm NOT electric/electronic expert (I was studying for machine/mechanic engineer) , so you should check everything I say (and English isn't my language). All the things I said I found on the net or it came from the professionals I've been talking to. Hope that helps.

zabac70
03-18-2009, 06:05 PM
Well, I'm hoping my controller will be able to handle a starter motor, which needs 12V, but I'm not sure how many amps. I'm going to put a switch on it that will let me select between 12/24/36 volts. I was also going to do 48, but that's getting too close to the limits of the MOSFET so I'm not going there. The main motor I'm intending on using is a 36V 500W I got from one of the other guys on here. I will also test my modified starter motors to see how it works out. Experimentation's the name of the game and I intend to push this thing to its limits, wether it holds up or goes down in flames (literally).

Zabac70, I'll definitely check out that group.

Does that motor have Amp rating on it(I mean that 500 W motor)? It can handle the overvolting , but not very well if you put more amps than it can handle (heat will build up and melt something , unless you provide extra cooling). I mean there is no need to overkill your controller if it isn't nessesary. As for car starter motor , I've been told that it pulls 70 -80 Amps(sometimes more) for a short period of time , during start of engine (depends of engine of course).
Do experiment , by all means , but don't waste components (save the planet :) ), that is why I keep quaqing about research :) :thumbsup:

stephenm2682
03-18-2009, 06:20 PM
didn't you say a car starter has 800W? anyway thanks for the help again!

this the group
http://tech.groups.yahoo.com/group/osmc/

kibble
03-19-2009, 12:30 AM
Hey, no problem stephenm2682.

Zabac70 said in the other thread about the starter that a small starter motor was about 800W.

No, the 500W motor I have doesn't have an amp rating on it, the sticker is gone.

Oh, and BTW, I'm not going into this completely blind. I've built PWM power supplies before to use in my car and other things and just to play with. I've also built motor controllers for an R/C car I had that handled pretty well. My oscilloscope has helped me out a bunch in figuring out what's going on when things aren't working properly. I've just never built one for handling this much current before. :idea2:

I'm currently learning to program and soon, I want to be programming PIC's so I can use them in my projects. I have a couple of small learning kits and software that I've been messing with.

ed1380
03-19-2009, 06:57 AM
never been a fan of pics. ive been raised on the atmega chips. around 4 bucks a pop and you can get away with a homemade programmer. the ide is also free

zabac70
03-19-2009, 02:26 PM
@stephenm2682
I did said around 800 W for car starter (for smaller cars); cca 70 A x 12 V = 840 W (for example). With car starter , what you really want is to double voltage and lower the current (less Amps) , cause lower current is easier to control (and less expensive and the battery will last longer) and car starters are pretty torqy stuff (they can move the car in the first gear).
@kibble
Sorry , I didn't meant to say that you don't know what you're doing, I was just posting my opinion and how I approach the matter (since I don't have the "electrical" background). And my English (construction of the sentence and spelling) could be somewhat confusing. Of course , your thread (about the car starter) was the one of the main reasons for me to join this forum:thumbsup:
Regarding programming , I don't really have the time (or will) to learn it, and if problem occurs that involves programming , I'll just post it here (or somewhere similar) or by a chocolate to allure some kids that knows the stuff (seems to me that they're born with that knowledge) and get the problem solved

stephenm2682
03-19-2009, 02:42 PM
so to lower currant thats where a pwm comes in? i think i'll stay with gas, an expensive route unless someone as a link for pwm?

zabac70
03-19-2009, 03:29 PM
http://tech.groups.yahoo.com/group/osmc/files/
This page have all the stuff that you need for everything that we've talked about and you should follow links on it. Schematics and theory and parts lists and pictures . Of course , you alone must decide what you'll use of it and is it worth wile, or is it simpler (very likely cheaper) to buy something from e-bay that is already working and you just have to mount it and connect it to the battery pack and motor.
Here are some links , but you really should try to google it yourself.
http://f-cpu.seul.org/~nico/astromech/motor_control/tipntrick_motor.pdf
http://www.nxp.com/acrobat_download/applicationnotes/AN10513_1.pdf
It is not that complicated to put together a simple and cheap electric drive system for light EV. If you use modified car starter , it could be done in a matter of few days and about 200 dollar(including battery pack). The main problem and the biggest part of financial expense are the batteries: LA are cheap and heavy , lithium are very expensive and light (and last few times longer and you can use almost all capacity).
If you decide to go with gas - well , have fun with it; I did what I could to help :)

kibble
03-19-2009, 07:36 PM
never been a fan of pics. ive been raised on the atmega chips. around 4 bucks a pop and you can get away with a homemade programmer. the ide is also free

I've thought about Atmega's too, it's really difficult getting to learn stuff like this by yourself though. I don't personally know anyone else that's into electronics like this, other than one of my uncles, but he lives kinda far away and he doesn't do as much as he used to. All my friends are into other things so pretty much everything I know, I've learned by myself.

zabac70
03-22-2009, 01:53 PM
Is there any progress in hacking your controller?

ed1380
03-22-2009, 03:07 PM
http://www.societyofrobots.com/robotforum/
great userbase of atmega users

Scumm
03-22-2009, 11:47 PM
So, back to before the hijack... Kibble your project is really what i've been hunting. The closest controller Ive found is http://www.dimensionengineering.com/Sabertooth2X25.htm

but the rating is too low for my application. After finding 2 drills my landlord threw out w/ 1/4 HP motors, I've been thinking about making a kick *** radio controlled vehicle.

ed1380
03-23-2009, 02:39 PM
not worth it. for how much you spend you can buy a better pre built one

kibble
03-23-2009, 08:18 PM
I need to start designing the circuit board for the controller. So far I have been collecting some components that I will need. I still need more diodes but I went to the store to look for them and they didn't have them.

I need to get some connectors too.

kibble
03-23-2009, 11:02 PM
Here's some progress. I started designing the board.

zabac70
03-24-2009, 01:57 AM
:thumbsup: Is there enough space for heat sinks (I hope this is a correct term) on sides of the board. You should consider some kind of forced cooling for that number of mosfets.

kibble
03-24-2009, 09:18 AM
The enclosure I'm using, the amp casing, is the heatsink and, yes, I was going to use a small fan to cool the inside of the case too.

jr dragster Tyler
03-24-2009, 02:24 PM
Cool stuff Kibble! I dont understand a thing about this though.

kibble
03-25-2009, 02:11 AM
Thanks! Here's some more. The stuff in the middle is the PWM part. I removed the zener diode and 1/2W resistor along with a few other things and am using a 3A, switching voltage regulator instead as I will be powering a few other things off of the 5V supply.

I added a connector that will be going to a 6 pin DIN connector on the case. The throttle and brake will connect to that and I may have a pin or two left for other things later on.

I will be making another sub-board that will monitor current and will have an LED bar graph to show battery voltage.

I'm still tweaking things here and there on the board so this is not the final design.

zabac70
03-25-2009, 01:28 PM
:thumbsup: When you finish it and test it with some load , will you post final schematics and board print (possibly parts list)?

ZnsaneRyder
03-29-2009, 07:07 AM
That's bad azz! You are making a new PCB and everything!!!

Sure beats using the RadioShack veroboards for sure!

kibble
04-01-2009, 03:55 PM
:thumbsup: When you finish it and test it with some load , will you post final schematics and board print (possibly parts list)?

Yeah, once I make sure it works properly.

That's bad azz! You are making a new PCB and everything!!!

Sure beats using the RadioShack veroboards for sure!

LOL, I stopped using those radioshack boards forever ago. It's really not that hard to make your own boards with the photo etching method.

kibble
04-06-2009, 03:34 PM
Here's a pic of a partial collection of some of the parts I'll be using. Unfortunately, progress is slow at the moment due to lack of funds.... :(

kibble
07-15-2009, 11:40 PM
Finally made some progress today! :D

Got done etching the circuit boards that I'll be using. I will make another one that will monitor current but, that one hasn't been designed yet.

The big board is the main power board. the two smaller boards are; 5V regulator and a bar graph volt meter that I will use to monitor battery.

Here's some pics for your viewing pleasure....

truesprocket
07-18-2009, 08:03 PM
do you know how to build a controller? for a 36volt or 48volt?never been a fan of pics. ive been raised on the atmega chips. around 4 bucks a pop and you can get away with a homemade programmer. the ide is also free

ed1380
07-19-2009, 01:30 AM
me?
its all in the programming and the compiler. the code would be 90% the same

truesprocket
02-17-2010, 06:35 PM
Hi I'm looking to find scematic's to build a motor controller for a 12 volt golfcart style motor any help or site's you could point me to would be fantastic , I'm hoping to run it off 4 6volt deepcells, that'll depend on how long it lasts & I'd like to be able to switch to 24volts & push that through the 12volt motor, safe to do ? anybody ?

zabac70
02-22-2010, 12:11 PM
Cool stuff ... You can "push" doubled voltage trough your motor , but you have to be careful with power (Amps). As for schematic's , google is your friend , but I suggest Yahoo group : OSMC (open source motor controller) - you need to sign in. However , you need to do a bit of research first , to be sure what you want and need (controller wise) and have a look see on e-bay or wherever to check if something already exists that will suit you for the purpose - some of that stuff is really cheap and it is (often) not worth bothering to make one yourself (components you'll need , time and aggravation ...). Best of luck with your project !

truesprocket
02-28-2010, 07:07 AM
heres what I've been doing & it's coming along nicely this is a massive motor for this project but so are the batteries, I want to put 2 infront of the motor & 1 in a basket on the front for 18volts if I need it

Killa-X
02-28-2010, 11:11 AM
Heh..Similar thing i thought of..I planned (once i find a motor) to use IGBTs for the PWM speed control. Looks like yours is going along good :)

truesprocket
03-01-2010, 06:31 AM
Heh..Similar thing i thought of..I planned (once i find a motor) to use IGBTs for the PWM speed control. Looks like yours is going along good :) looked at some IGBTs & that looks like a good fix, I read that most of the parts for a controller are in a big photocopier so I took one apart, I have boxes of elecrical & electronic suff I'm still hunting for & those IGBTs are supose to be in microwaves, money's my biggest issue right now so what ever I come up with has to be pretty close to free, can I hook a throttle to the IGBTs or would it requier a control system to make that happen? thanks for pointing in this direction going to try that bike today if all goes well, still to go , brakes, inline kill swith beyond the on off switch, pully cover so I don't loose a pantleg or worse, a board(for now) to strap the batteries to & for my feet, I'll post some pic's if all goes well, thanks again.

truesprocket
03-01-2010, 11:52 AM
Heh..Similar thing i thought of..I planned (once i find a motor) to use IGBTs for the PWM speed control. Looks like yours is going along good :) well it moves! not fast enough & holly crap is it ever heavy! it's got to be 200 pounds, my batteries aren't very secure the on/off works but the thumb trigger works backward, turn it on & you have to hold the switch to disconnect, I'll have to chainge that, some pully dellema's but the belts tight now! more to come!

Killa-X
03-01-2010, 01:32 PM
Heh, motors weigh a lot too. I was told you can get IGBTS out of electric stoves too.

Depends on how many amps. You can get mosfets online that can do high amps at 50V or w/e your use is...

This does 60V 270A constant
http://www.newark.com/international-rectifier/irfb3006pbf/hexfet-power-mosfet/dp/27P5254

100V 290A
http://www.newark.com/international-rectifier/irfb3006pbf/hexfet-power-mosfet/dp/27P5254

But, It helps to know what it will run CONSTANT. Because a motor if started hard can draw alot of power, and fets like these, have a pulse amperage of "1120A" so...Ones like these im sure would work, the 100V 290A has the 1120A pulse, and the price really isnt bad. You just WANT TO HAVE BIG HEATSINKS!!!!!

Me being a HV junkie..Id just use a 555 timer with Pot variable frequency and 50% duty cycle. Did it for a Coil winder, Foot-pedal speed control.

truesprocket
03-03-2010, 06:58 AM
I picked up a ac control board yesterday I bought 2 at $1 each is it useable for anything of substance? like a ac furnace blower motor or similar ? .my budy works at a scrap yard & he's keeping his eye open for the igbt's for me & an electric fork lift & of course batteries , I'm pushing for A123's but I'll take what I get, thanks & here's that board I grabbed.

Qmavam
03-03-2010, 10:46 AM
Heh, motors weigh a lot too. I was told you can get IGBTS out of electric stoves too.


I think that would only be the new style induction stoves.




Me being a HV junkie..Id just use a 555 timer with Pot variable frequency and 50% duty cycle. Did it for a Coil winder, Foot-pedal speed control.


I think that's backwards, you want a fixed frequency variable
duty cycle. I did it for a coil winder too, I wound a 40" long by
8" diameter coil for tesla. One of those projects I need to finish.
Mike

truesprocket
03-04-2010, 06:13 AM
I have a couple of these 12volt motors & yesterday I found my box of electric scooter parts, I have an 18volt controller & a 24volt controller that are good & 2 others I'm not so sure about but probably work to, would there be a problem with running a massive 12volt with the 24volt scooter control & can a premade controller be enhanced to handle a bigger load & deliver a higher output, the 18volt will only give the same output with 18volts or 24 volts, no speed increase at all, can I change that ?

Killa-X
03-04-2010, 08:27 AM
I think that's backwards, you want a fixed frequency variable
duty cycle. I did it for a coil winder too, I wound a 40" long by
8" diameter coil for tesla. One of those projects I need to finish.
Mike

Well actually its not backwards. its a VFD. Voltage frequency drive. I kept duty to 50%, and adjusted the frequency, and I was able to go from a super slow speed (slower than 1 revolution in 10 mins (gear motor)) or the full 36V at maybe 200rpm. Vent systems also use VFD's, as at our school, if its really quiet, you can hear a pitch-sweep. Also, My motor was a universal AC/DC brush, if it helps to know. :)

Qmavam
03-08-2010, 09:24 AM
Well actually its not backwards. its a VFD. Voltage frequency drive. I kept duty to 50%, and adjusted the frequency, and I was able to go from a super slow speed (slower than 1 revolution in 10 mins (gear motor)) or the full 36V at maybe 200rpm. Vent systems also use VFD's, as at our school, if its really quiet, you can hear a pitch-sweep. Also, My motor was a universal AC/DC brush, if it helps to know. :)

Is it a standard AC/DC motor designed for 60 hz or is it designed
for a wide frequncy range? Any links for the motor?
Thanks, Mike