PopularFX
Home Help Search Login Register
Welcome,Guest. Please login or register.
2024-12-04, 00:16:05
News: Check out the Benches; a place for people to moderate their own thread and document their builds and data.
If you would like your own Bench, please PM an Admin.
Most Benches are visible only to members.

Pages: [1]
Author Topic: PWM PMDC Motor controller  (Read 42701 times)

Group: Experimentalist
Hero Member
*****

Posts: 568
Since there has been a bit of interest in my e-bike controller for PMDC motors I am posting a new schematic of my revised 1000 Watt motor controller.  The circuit has been modified and improved and I have corrected schematic errors on the one in the ******/Brandt thread.  I designed this circuit for my 2nd 1000 Watt e-bike using a treadmill motor, It is also very usable as just a Pulse Width Modulator for fairly high power testing or use of any kind.

I must say though this is not a beginner project !!!  If you don't know what you are doing I do not recommend attempting to build your own!
There is a dangerous level of power being controlled here, so do so at your own risk!

I am just sharing this circuit that I designed and built for my own purposes, and It works great.

I improved the full throttle adjust, bumped output to 1000 watts, added over temperature switch, changed the circuit a little to use a TO-247 dual diode and fixed pin numbering on the 7815 and STW52NK25Z's.

I dropped any battery indicator circuitry (if you have high and low battery indicators just tap out from the batteries a 36 volt line or hook to 24 volt line, depending on what you have).

I have also designed into this circuit a low battery shutdown using the left over LM358 op amp but that is a different schematic I may post later.
I have also designed a 3 X 5 inch single sided PC board for it which I may also post.

(Modified 4-29-2014 to fix a small descrepancy between the schematic and the PC board at J1.)

« Last Edit: 2014-04-30, 00:06:08 by Room3327 »


---------------------------
"Whatever our resources of primary energy may be in the future, we must, to be rational, obtain it without consumption of any material"  Nicola Tesla

"When bad men combine, the good must associate; else they will fall one by one, an unpitied sacrifice in a contemptible struggle."  Edmund Burke
   

Group: Tinkerer
Hero Member
*****

Posts: 3055
You've made something very interesting here!

The 3524 is a versatile chip.  Could you give us
a scope shot of the Gate Drive waveform which
is applied to the three MOSFETs?

What pulsing frequency did you find to be most
effective for controlling your motor?


---------------------------
For there is nothing hidden that will not be disclosed, and nothing concealed that will not be known or brought out into the open.
   

Group: Experimentalist
Hero Member
*****

Posts: 568
@Dumped
The gate drive wave form is a beautiful 12 Volt square wave and it is square.
As stated on the schematic 300 Hz is what I found to work very well, but it is adjustable.


---------------------------
"Whatever our resources of primary energy may be in the future, we must, to be rational, obtain it without consumption of any material"  Nicola Tesla

"When bad men combine, the good must associate; else they will fall one by one, an unpitied sacrifice in a contemptible struggle."  Edmund Burke
   

Group: Administrator
Hero Member
*****

Posts: 3964


Buy me some coffee
Hi Room
Good design  O0

Here's the place i buy my stuff from.
http://www.goldenmotor.com/

I'm currently drawling over one of those buggy's  ;D

Although one of these could be fun

   
Group: Elite
Hero Member
******

Posts: 3537
It's turtles all the way down
I have a few questions.

1) what is the function of the STPS80170CW  diode between points 1 and 2

2) what is the function of D1 and D2

Thanks


---------------------------
"Secrecy, secret societies and secret groups have always been repugnant to a free and open society"......John F Kennedy
   

Group: Experimentalist
Hero Member
*****

Posts: 568
Thanks Peterae, Thats a really nice site there.

Ion,
The diode between D8 1 and 2 is a blocking diode so the motor doesn't try and recharge the batteries when you let off the throttle, I have not shown any regenerative battery charging circuitry and without the diode you could ruin your batteries, and be prepared to come to a rapid stop when you let off the throttle.

The two diodes D1 and D2 are there to prevent the controller from having any output when the throttle is not activated.  The hall effect throttles on the market are rated 0 to 5 Volts but the actual output of them vares slightly but is in the range of .8 volt to 4.3 volts.  I used the LM358 op amp to be able to sense very close to ground so that .8 volts minimum will activate the controller very slightly, the diodes prevent this.  The internal opamp of the SG3524 does not sense close enough to ground to work with the throttles or I would not need the LM358.  This controller goes from full off to full on with the hall effect throttle, the full throttle adj. determines the output when the throttle is at full, normally it is adjusted so the motor is just at full on, but it can be dialed back so you can adjust the max speed available at full throttle.
« Last Edit: 2014-04-24, 22:21:42 by Room3327 »


---------------------------
"Whatever our resources of primary energy may be in the future, we must, to be rational, obtain it without consumption of any material"  Nicola Tesla

"When bad men combine, the good must associate; else they will fall one by one, an unpitied sacrifice in a contemptible struggle."  Edmund Burke
   

Group: Experimentalist
Hero Member
*****

Posts: 568
Here is the circuit board I designed for this circuit and parts placement drawing.

You are looking at the top, component side of the board, so remember the circuit traces are reversed from what you are viewing on the back.

The components Q1 thru Q3, D8 and U3 are mounted on the heatsink with their leads bent upwards to enter the board from below, Q1-Q3 and D8 must be isolated with thermal pads.  J1 can be a 3 or 4 pin connector I had 4 pins available so I used them.

A bead of solder should be run all the way along the fat traces to help beef them up, I run a 20 ga. bare wire down them and soldered it all the way.

A heat sink with between 150 and 200 square inches of surface area should be used with this, many different heatsinks will work as long as there is enough aluminum and surface area, the one I used is 5.5 inches long by 2.6 inches wide by 1.5 inch high with 8 fins which is about 125 sq. in. and it is attached with heatsink grease to my top cover on my motor drive which is 5 X 5.5 so 54 more sq. in. giving me a total of about 180 square inches of surface area.  I hope this is clear for everyone.

« Last Edit: 2014-04-24, 21:59:24 by Room3327 »


---------------------------
"Whatever our resources of primary energy may be in the future, we must, to be rational, obtain it without consumption of any material"  Nicola Tesla

"When bad men combine, the good must associate; else they will fall one by one, an unpitied sacrifice in a contemptible struggle."  Edmund Burke
   
Group: Elite
Hero Member
******

Posts: 3537
It's turtles all the way down
Thanks Peterae, Thats a really nice site there.

Ion,
The diode between D8 1 and 2 is a blocking diode so the motor doesn't try and recharge the batteries when you let off the throttle, I have not shown any regenerative battery charging circuitry and without the diode you could ruin your batteries, and be prepared to come to a rapid stop when you let off the throttle.

The two diodes D1 and D2 are there to prevent the controller from having any output when the throttle is not activated.  The hall effect throttles on the market are rated 0 to 5 Volts but the actual output of them vares slightly but is in the range of .8 volt to 4.3 volts.  I used the LM358 op amp to be able to sense very close to ground so that .8 volts minimum will activate the controller very slightly, the diodes prevent this.  The internal opamp of the SG3524 does not sense close enough to ground to work with the throttles or I would not need the LM358.  This controller goes from full off to full on with the hall effect throttle, the full throttle adj. determines the output when the throttle is at full, norrmally it is adjusted so the motor is just at full on, but it can be dialed back so you can adjust the max speed available at full throttle.

Okay that confirmed my suspicions about the diodes usage.

The series "freewheel" diode will waste a  bit of power. There is a way with a relay to switch the throttle into a progressive "brake" and regenerate the batteries using the similar switchmode setup. Now an inductor is used with a diode as a flyback converter to recharge using progressive braking energy. See attachment. I haven't worked out all the details,such as the need to limit the flyback to 50% duty max, and sizing of the inductor, it was just an idea from my electric bike experiment days.

The diodes in the throttle (1n1458's) will drift a bit with temperature, I would have opted to suppress the start point with a little bias on the negative input of the 358. But the drift may compensate the drift in the feedback caused by the other two clamping diodes, 1n4007's, D5, D6.

Other than that, looks fine.
« Last Edit: 2014-04-24, 22:35:31 by ION »


---------------------------
"Secrecy, secret societies and secret groups have always been repugnant to a free and open society"......John F Kennedy
   

Group: Experimentalist
Hero Member
*****

Posts: 568
Ion,
 Thanks for the vote of confidence.  :)

Yes the "freewheel" diode will waste some power and I haven't had time to play with regeneration yet, maybe someday.

The small amount of drift from D1 and D2 will only make a small change in the position of the throttle at the low end, hardly noticible, and I don't believe anything to worry about, I would like to have only used 1 diode but it didn't quite work and I still had a very small spike on output, it took 2 to stop it.  I like your idea of using a little bias on the negative input I may look into that, as electrical designers we all tend to do things a little different.

Your regen circuit could be built into this, I personally am not fond of contactors and relays so I would prefer to do regeneration using solid state components, but it is viable.
« Last Edit: 2014-04-24, 22:54:31 by Room3327 »


---------------------------
"Whatever our resources of primary energy may be in the future, we must, to be rational, obtain it without consumption of any material"  Nicola Tesla

"When bad men combine, the good must associate; else they will fall one by one, an unpitied sacrifice in a contemptible struggle."  Edmund Burke
   
Group: Elite
Hero Member
******

Posts: 3537
It's turtles all the way down

Room3327 said:

Quote
Your regen circuit could be built into this, I personally am not fond of contactors and relays so I would prefer to do regeneration using solid state components, but it is viable.

The relay only clicks in from a switch on the normal mechanical brake when it is first lightly  applied, then the throttle becomes the progressive brake. Turning the throttle up brakes harder and harder. I imagine it would take a little getting used to i.e. how much of each, mechanical and electrical regen braking to use. At any rate the relay should last a long time as it has low duty.


---------------------------
"Secrecy, secret societies and secret groups have always been repugnant to a free and open society"......John F Kennedy
   

Group: Experimentalist
Hero Member
*****

Posts: 568
Ion, I would think it would take a bit of getting used to, basically your running the motor backwards to stop and using BEMF from the motor to charge the batteries.
I'm not sure how much charging would actually take place, but an interesting idea.

Here are some pics of my build of this circuit so everyone can see what I am talking about with construction.  :)

Pic 1 is the top with the key switch, kill switch, LED and charge input connector.
Pic 2 is the top side of the board showing connection for the above parts.
Pic 3 shows the power transistors and voltage regulator, and the fiber washers I used between the transistors and the PC board, the thermal pads and HS grease under the LM7815.


---------------------------
"Whatever our resources of primary energy may be in the future, we must, to be rational, obtain it without consumption of any material"  Nicola Tesla

"When bad men combine, the good must associate; else they will fall one by one, an unpitied sacrifice in a contemptible struggle."  Edmund Burke
   

Group: Experimentalist
Hero Member
*****

Posts: 568
Just a few specs on this circuit:

It is 96% efficient. (95.78 by calculation)

Over temp. protection of the motor is by it's own OT switch.
Over temp. protection of the circuit and power transistors is by the 7815 mounted directly to the main heat sink.

It will easily take a 2.4KW surge but the 30 amp fuse should blow before the controller is damaged under extreme conditions.

All 0-5V hall effect throttles will work with it. (So far every one I've bought from china has been defective and I've had to repair them.)

Will operate from 24 Volts to 96 volts. (I like higher voltage and less current, smaller wires can then be used. I used 12 ga. on my 72 volt bike.)
30 Amps max output (Double that in a surge but fuse should blow first.)

Maximum heat dissipation 40 Watts (by heat sink at 1000W output)

If anyone wants to know anything else just ask.


---------------------------
"Whatever our resources of primary energy may be in the future, we must, to be rational, obtain it without consumption of any material"  Nicola Tesla

"When bad men combine, the good must associate; else they will fall one by one, an unpitied sacrifice in a contemptible struggle."  Edmund Burke
   

Group: Experimentalist
Hero Member
*****

Posts: 568
To turn this into a potentiometer controlled pulse width modulator all that needs to be done is remove the throttle and connect the top of R2 to pin 16.

Then use R2 to adjust the pulse width.

In this case (only) the value of R2 can be made 10K ohms. The 2K ohm value is for the proper loading of the throttles.


---------------------------
"Whatever our resources of primary energy may be in the future, we must, to be rational, obtain it without consumption of any material"  Nicola Tesla

"When bad men combine, the good must associate; else they will fall one by one, an unpitied sacrifice in a contemptible struggle."  Edmund Burke
   

Group: Experimentalist
Hero Member
*****

Posts: 568
Q. Is the diode D8 between pins 1 and 2 necessary?

A. It depends, if your motor ONLY rotates when you are giving it power then the answer is no you do not need it, but if your motor is rotated by the bike then yes you do need it.  If you want to freewheel without sending power back to the batteries it is needed.  I included it because it was easier to put it in and let it work for all bikes rather then trying to explain things.  Efficiency was good at 96% and it simplified things for me.  (If you are using this as a PWM for some bench project rather then an e-bike D8 1-2 is not needed.)

If your motor never turns except when you are giving it power you can short D8 1-2 out, and by doing so it will raise the efficiency of this circuit to 98%.  It cuts the heat dissipation about in half.   D8 1-2 is one of the limiting factors with the power output (1000W).  With enough heat sink this circuit will easily handle 3KW loads at 98% efficiency without D8 1-2.  Without it total heat dissipation at 3 KW is approx. 60W maximum. D8 1 and 3 can be tied together to make a 80 amp diode across the motor if the circuit board is changed but be careful.

The diode D8 between 2 and 3, across the motor, is needed for a couple of reasons, mainly it protects the power transistors and you may consider it to recycle the BEMF back through the motor.

Remember if you try to run 3 Kw through this, some parts will need to be upgraded to do so.  The kill switch, F1 fuse, wire gauges etc..
« Last Edit: 2014-11-19, 06:12:42 by Room3327 »


---------------------------
"Whatever our resources of primary energy may be in the future, we must, to be rational, obtain it without consumption of any material"  Nicola Tesla

"When bad men combine, the good must associate; else they will fall one by one, an unpitied sacrifice in a contemptible struggle."  Edmund Burke
   

Group: Experimentalist
Hero Member
*****

Posts: 568
Hi All, I thought I would update this a little.

After 2 years of running and using this controller on my e-bike I have not had a single problem with it, it works very well.  I did blow several 30 amp fuses with it though, trying to take off at full throttle from a dead stop, I have since put in a 35 amp fuse and get moving a little before giving it full throttle.  With the heat sink I used it barely even gets warm to the touch after riding (no fan used with this).

The bike will cruise nicely at 18 to 22 mph and top speed is 28 mph by motor only, my output gearing from the motor to the rear wheel is 6.12:1 through the transmission.  Using the HR batteries I called out on the schematic I get 8 to 12 miles on a charge in normal riding, all out riding like a motorcycle, as fast as I can go, I get about 5 miles per charge (I weigh 200 lbs.).  Charging takes 6 to 8 hours.

My motor never turns by the bike, only when being given power, so I don't use D8 1-2 and my controller hits about 99% eff. with normal riding.  The entire package, batteries, motor framing and controller and all associated parts add 42 pounds, to the Huffy mountain bike I built it on, for a total bike weight of about 65 lbs.  The batteries alone weigh 24 lbs.. So overall a little hefty but not bad and it rides and feels very good.  All parts are built into the center frame with chain drive to the rear wheel, it looks like a small motorcycle and I get groups of people standing around looking at it everywhere I go, and some asking to take it for a ride.

I love my e-bike!
Room



---------------------------
"Whatever our resources of primary energy may be in the future, we must, to be rational, obtain it without consumption of any material"  Nicola Tesla

"When bad men combine, the good must associate; else they will fall one by one, an unpitied sacrifice in a contemptible struggle."  Edmund Burke
   
Group: Elite
Hero Member
******

Posts: 3537
It's turtles all the way down
Thanks for the follow up on this, Room. if you get some time to snap  pictures , I'd love to see the completed bike and maybe a closeup of how you worked out the gearing chain drive, motor location etc.

Thanks for all your hard work on this and sharing, it is appreciated.

Regards, ION


---------------------------
"Secrecy, secret societies and secret groups have always been repugnant to a free and open society"......John F Kennedy
   

Group: Experimentalist
Hero Member
*****

Posts: 568
Thanks for the follow up on this, Room. if you get some time to snap  pictures , I'd love to see the completed bike and maybe a closeup of how you worked out the gearing chain drive, motor location etc.

Thanks for all your hard work on this and sharing, it is appreciated.

Regards, ION

Thank you for the interest Ion, when the sun comes back out again I'll take some pictures.  The transmission is a little tricky, but I'll try and get a shot of it, the motor runs front to rear, I used a set of 22 tooth stainless steel miter gears on it to change the drive orientation. By doing that it is fairly easy to change the motor and gearing, adjust the primary and secondary chains and keeps the bike very narrow, widest spot across is only 4.5 inches, and I have great clearance on everything for the pedals.  The motor I used is a 2.25 Hp max. and I figure I am getting about 1Hp out of it at 72 volts, I tried to keep everything within the electric assisted bike laws and I guess succeeded, I've had the police look at it twice already. So far no license, no registration and no insurance is needed here.

Room


---------------------------
"Whatever our resources of primary energy may be in the future, we must, to be rational, obtain it without consumption of any material"  Nicola Tesla

"When bad men combine, the good must associate; else they will fall one by one, an unpitied sacrifice in a contemptible struggle."  Edmund Burke
   

Group: Experimentalist
Hero Member
*****

Posts: 568
Here are some pictures.



---------------------------
"Whatever our resources of primary energy may be in the future, we must, to be rational, obtain it without consumption of any material"  Nicola Tesla

"When bad men combine, the good must associate; else they will fall one by one, an unpitied sacrifice in a contemptible struggle."  Edmund Burke
   

Group: Tinkerer
Hero Member
*****

Posts: 3055
Excellent photos Room!  Workmanship is quite excellent as
well.  Yep, as the old saying goes:  "a picture is worth 1000
words.

Your battery compartment is smaller than I'd imagined.


---------------------------
For there is nothing hidden that will not be disclosed, and nothing concealed that will not be known or brought out into the open.
   
Group: Elite
Hero Member
******

Posts: 3537
It's turtles all the way down

Excellent job Room. I've got some wheelchair PM DC motors and the right angle drives, so could build something like this.

Did you machine all of the housing for the right angle drive?

One low friction approach I was also considering was a spring loaded friction drive to the rim of the tire directly from a rubber capstan on the motor shaft. The motor would be on the spring loaded pivot assembly. A free-wheeling lever would be required, so maybe not as good as going through the existing transmission.

Thanks for the photos, I'm impressed.


---------------------------
"Secrecy, secret societies and secret groups have always been repugnant to a free and open society"......John F Kennedy
   

Group: Experimentalist
Hero Member
*****

Posts: 568
Thanks guys for the encouragement, I appreciate that.
I designed this bike on paper first, every part of it, then made templates for everything and hung them on the bike before constructing it.  Yes I did all the machining myself, the only parts I did not make are things like miter gears, sprockets, bearings, chains  things like that.  I know some of the spacing around things looks a little too close but it is only the photos, everything has quite adequate clearances.

Ion,
 I have designed a friction drive electric bike already and all I can say is it sucked, and it was a very nice design.  I rode it twice, about 5 miles worth, and it worked so bad and made so much noise it was embarrassing so I tore it apart and built the bike you see, it cost me a year but well worth it for the new bike.  There are so many problems with a friction drive I don't have time to talk about it, chain drive I have found is the best way to go other then hub motors.  I call this my second e-bike but it is really my third e-bike, 2 no longer exists, one learns a lot building these things. Anyway I do not recommend a friction drive for many and varied reasons.

 Each side of the transmission can be removed to get at things inside bearings, gears, sprockets etc. It has primary chain adjustment by 2 means, a delrin shoe inside and adjustment of the rear bearing, there is a secondary chain tensioner in there as well, all built by me.  The tires are 65 psi Kevlar knobbies for good traction, it has speedometer, odometer etc..  All the wiring is in-cased in pvc coated fiberglass tubing, all the messy wiring connections are done inside the controller box, which I ended up swapping location of the LED and kill switch on, to get the kill switch in a better location.  I made the road pegs at the rear wheel as well as all the other metal work you see. All I need now are a couple eagle decals for the sides of the battery covers and a day with some semi-crome polish.
 ;D


---------------------------
"Whatever our resources of primary energy may be in the future, we must, to be rational, obtain it without consumption of any material"  Nicola Tesla

"When bad men combine, the good must associate; else they will fall one by one, an unpitied sacrifice in a contemptible struggle."  Edmund Burke
   
Pages: [1]
« previous next »


 

Home Help Search Login Register
Theme © PopularFX | Based on PFX Ideas! | Scripts from iScript4u 2024-12-04, 00:16:05