25 amp motor controller help

SgtWookie

Joined Jul 17, 2007
22,230
C6 is actually redundant; as C1 already performs that function. However, it's not a bad idea to have a few of those low-value caps sprinkled around a board to keep things fairly quiet.

R2 should really be around 270 to 300 Ohms. I have the PWM source impedance set to 100 Ohms, which is a good bit high. R2 should be on the PIC board, and then use a twisted pair of wires (PWM and digital ground) to get the PWM signal to the driver board.

I see you've been using perfboard - do you have the capability to make your own boards?
 

Thread Starter

RobbJohnson

Joined Dec 15, 2009
76
do you have the capability to make your own boards?
Its been a long time, but yes, I can get the stuff and make them. I would like to settle on a circiut first, I have a pile of boards, Drivers, H- bridges ,etc, i have tried, and failed prior to your help.

I will order the new parts, I notice you changed from the MBR40250 to the MBRB 2545, Is this important or can I use the 40250 that I ordered?
 

SgtWookie

Joined Jul 17, 2007
22,230
You can absolutely use the 40250 that you ordered. I simply used the MBRB2545 as that was the biggest diode in the simulator!

Note that there are actually two diodes in the simulation; I had to add the 2nd one right at the driver due to the inductance of the wiring between the motor and the driver board.

I've spent a few days already tracking down where the problems are; I think they're pretty well nailed down at the moment.

I had to make an assumption about the supply, which I mentioned before but you didn't say whether I was right or wrong - does the power from the battery go to the uC board, then to the driver board, and then to the motor? Or how exactly do you have the supply
to the uC connected?

Right now, I have the simulation as the battery is near the uC board, and the AWG14 wire first supplies power to the uC board, then the AWG14 wires go to the motor. Is that right?

It's kind of tough trying to do this remotely, because there is so much information that is needed. I can look at the photos, but I can't really tell what's connected to what.
 

SgtWookie

Joined Jul 17, 2007
22,230
Oh, boy - a ground loop!

I see you have the battery power going to the distribution point, and one ground goes from there over to the uC board via the 7805, then back to the driver board.

Then another ground goes from the distribution point directly to the driver board.

So, you basically have a high-current ground path (to the motor, that's getting "pulled" towards +12v) and another ground path (from dist. point, past the 7805, to the uC board and back to the driver board) that will be at some voltage potential between the dist. point and the driver board.

This is assuming that both grounds are joined at both the dist. point, and the driver board. Is that correct?

Going to the optoisolator driver will eliminate the problem, as there will no longer be a need to have an actual electrical connection to the ground of the driver board from the uC board.

If you want to stay with the current setup, you'll either have to reference the uC board ground to the driver board - probably not a good idea, because all of your motor drivers will have to be located on a single board, with a large (thick) ground plane.
 

Thread Starter

RobbJohnson

Joined Dec 15, 2009
76
I was woried about that. I have been looking at the 4n36's. I have a lot of them.

I noticed the turn off of the 4n36's is a little slow and affected the duty cycle of the PWM (made it longer). but I will work on this also.

I am ready to do anything it takes (short of buying a controller), the would defeat the purpose of the project.
 

SgtWookie

Joined Jul 17, 2007
22,230
I'm ahead of you on that. I started looking at various optocouplers/optoisolators, and spent the better part of a day fiddling around with just the optos, but I couldn't get the turn-off waveforms to my liking. I was about ready to add a Schmitt trigger to the mix when I remembered about the HCPL-3120's and similar opto gate drivers; it has a Schmitt trigger built in.

The transistorized driver I posted earlier that you're using now certainly has a lot more "snap" than what you started off with, but at best it might source or sink around 150mA current to/from the MOSFET gate.

The HCPL-3120 can turn the gates on/off about 17 times faster than the transistorized version, get rid of the ground loop problem, and it's just one part - of course, you'll still need a couple resistors on the gate (one to reduce ringing, one as a safety) and associated caps, but you'd need the caps whatever solution you went to.
 

SgtWookie

Joined Jul 17, 2007
22,230
I've been fiddling with that optocoupler version some more (several hours actually...)

Discovered that some of the ringing was being caused by the Schottky diode D1; but a cap across it fixed that. Also found that a cap between the emitter and base of the 4N25 I was using in the sim helped to get rid of the majority of the rest of the problems. Sorry, don't have a 4N36 model. I'm a bit concerned because the 4N36 has a much higher CTR than the 4N25 does; the output transistor could wind up being heavily saturated and take a long time to come out of it.

The spec sheet say 2uS (typ) for turn on/turn off for the whole family of optos, but the sim is showing much longer times than that; around 65uS before the emitter output drops below Q1's cutoff - and at that point, the decay rate is quite slow (right after 26.06mS, blue trace). You can see the emitter was turned off right at 26mS (green trace).

However, at least the gate is discharging reasonably well. That "stair step" you see for gateM1 is the "Miller charge" which is typical of MOSFETs; both when charging and discharging the gate. They get to their threshold level, and it's a bear to charge/discharge them further.

If you want to try this version with the 4N36's - well, you have 'em; might as well give it a shot. ;)
 

Attachments

Thread Starter

RobbJohnson

Joined Dec 15, 2009
76
Sgt. Wookie:
The HCPL-3120 spec


• Wide Operating V
CC Range:

15 to 30 Volts



Recommended Operating Conditions



Parameter Symbol Min. Max. Units


Power Supply Voltage (VCC - VEE) 15 30 Volts


Is this still your choice at 12V?
 

Thread Starter

RobbJohnson

Joined Dec 15, 2009
76
I am finializing the schematic and working out the details of how to mount the components, etc. I will post my finial drawings so you can see what I propose.
 

SgtWookie

Joined Jul 17, 2007
22,230
(slams head on desk)

I can't believe I missed that.

No, it's not going to work at 12v. Oddly enough, it does simulate and work at 12.6v - however, it does not work at 12v.
 

SgtWookie

Joined Jul 17, 2007
22,230
OK.

I just stumbled across some TI 4N37's that I'd salvaged from something a few years ago. They should be very similar to the 4N36's you have, only a lower breakdown voltage (1.05kv vs 1.75kv). I suppose I could build a driver here and see how it works like - thing is, I'd have a difficult time replicating your wiring scheme, and I don't have a motor similar to what you're using (I just threw out an old auto A/C blower motor that would've been a good candidate...)
 

Thread Starter

RobbJohnson

Joined Dec 15, 2009
76
Attached is the schematic of robb3 which removes the inductors and the second diode on the motor end.

OPPS. Just noticed the lm34 is reference the 12V gnd. I may have to use the 5V supply for this.
 

Attachments

Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Hi Robb,
You have R5 shown as 4K7, which means 4.7K; it should be 4R7, or 4.7 Ohms.

I see you're using a 2N5089 NPN for the DPDT relay; and I can't tell for certain, but it looks like you've specified the relay coil current using 1xxmA.

This will not work well, as the 2N5089 transistor has an absolute maximum Ic of 100mA. You should use a transistor that has at least twice the Ic rating of the desired Ic.

2N6426 and MPSA14 are both TO-92 Darlington transistors that can sink 500mA with only 200uA base current. Fairchild's 2N6426 and MPSA14 are rated for 1.2A max; Mouser stocks the 2N6426 for $0.10/ea, they stock the MPSA14 for $0.09/ea.

You will need to limit the base current to around 400uA; a 27K resistor between the opto and the base will do that nicely. Use a 75k resistor from the base to emitter to ensure it turns off completely.

You can't ground the LM34 to the driver board. You'll need to use the uC board's ground, and use it's supply as well.
 

Thread Starter

RobbJohnson

Joined Dec 15, 2009
76
OK. Missed the current thing on the transistor. I will use a 2N5306 very close to an MPSA14, because I have those. I figure I can compensate for the 4n36 delay with the software. Going to build one more stripboard prototype, It looks like we are getting close. I may try to find a dual form C relay to simplify things.
 

SgtWookie

Joined Jul 17, 2007
22,230
OK. Keep in mind that the 2N5306 is apparently obsolete; Fairchild doesn't make them anymore. You might just stick the MPSA14 in your schematic for future reference.

You'd already started building one prototype - can't you simply add the 4N36 portion to it?

As far as the power runs on the board - I'd been doing some fiddling in Cadsoft Eagle with a layout, and then did some calcs on trace widths vs thickness using PCBtemp, a utility I found on Roman Black's page:
http://www.romanblack.com/pcbtemp.htm

I suggest that you download it, and try it out. Note that you'll get a heck of a thermal rise unless you're adding some pretty fat chunks of copper to the traces. I figure some 20 mil copper sheet cut into 150 mil widths should be OK for a short run; from the MOSFET and diode to the terminal connections.

This is the basic layout I came up with:



Board is 1.9" x 2.5". The large thing on the right is a Molex Beau 97 terminal block rated for 600V, 60A. I happened across a deal on a bunch of those things. If you'd like to have some, PM your address to me.

I'm not satisfied with the layout yet, as the MOSFET drain connection is not as beefy as it needs to be. I used a different diode than you have, just because I happen to have a few of those kicking around here.
 

Attachments

Thread Starter

RobbJohnson

Joined Dec 15, 2009
76
The two main track motors are going to be about 8" Apart, so two drivers on a board would be great. The other two motors azimth and elevation can also share a a board.

Looking at the design, is there enough room between the diode and the mosfet to machanically connect the heat sinks?

Would you like me to send you a couple of mosfets, diodes, lm34's etc? I can have a package out to you tomarrow.

Oh, by the way, I see a lot of new methods of printing boards now, What process do you use? I may invest in something other than the old ink pen and acid method.

Going to try to get the proto done today.
 

SgtWookie

Joined Jul 17, 2007
22,230
The two main track motors are going to be about 8" Apart, so two drivers on a board would be great. The other two motors azimth and elevation can also share a a board.
OK, that works. :)

Looking at the design, is there enough room between the diode and the mosfet to machanically connect the heat sinks?
That's the idea; but ... now that I'm looking at it again, the MOSFET would have to be insulated from the sink, or the diode would short it out.

Would you like me to send you a couple of mosfets, diodes, lm34's etc? I can have a package out to you tomarrow.
Let me look at this a bit longer. I've modified the board again, but still need to incorporate the LM34/LM35 temp sensing (BTW, the LM35's are much less expensive than the LM34's, and you don't need super-precise temp measurements anyway...)

Oh, by the way, I see a lot of new methods of printing boards now, What process do you use? I may invest in something other than the old ink pen and acid method.
I've been using the toner transfer method on photopaper with decidedly mixed results; it's because my HP4050TN laser printer is a bit too thrifty with the toner. I'm looking at this press-n-peel stuff:
http://www.techniks.com/


Going to try to get the proto done today.
Try modding your existing driver board first.

I still want to work on the layout a bit, and incorporate your temp sensor.
 
Top