mosfet trouble
dang
Posts: 14
Trying to controll 16 5vdc motors using one pin each. Right now I have the gates of 16 RFP12n10L mosfets connected through 750 ohm resistors to each of the pins. Some of the time they work fine but on pin 0-4 I periodically get only a little blip of motor movement when the stamp tells the motor to turn on.
22k pullup between 5v and gate = no effect
22k pulldown between Gd and gate = no effect
Replacement mosfet = no effect
LED in parallel between IO pin and gate indicates that when mosfet fails the signal from the pin is effected somehow; I just get a little blip of light same as the little blip of motor. Without the motor attached the LED signal operates fine. Any ideas?
www.dangilsdorf.com
22k pullup between 5v and gate = no effect
22k pulldown between Gd and gate = no effect
Replacement mosfet = no effect
LED in parallel between IO pin and gate indicates that when mosfet fails the signal from the pin is effected somehow; I just get a little blip of light same as the little blip of motor. Without the motor attached the LED signal operates fine. Any ideas?
www.dangilsdorf.com
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
This is just the code I am using to test the circuit board, the final code will me more complicated but will be the same principle; 16 bit binary outputs with pauses in between for timing. This is recited from memory but you'll get the idea:
OUTS = %0000000000000000
DIRS = %1111111111111111
DO
PAUSE 5000
OUTS = %1111111111111111
PAUSE 5000
OUTS = %0000000000000000
LOOP
END
You might have to switch to a different MOSFET or perhaps use a Darlington or high gain single transistor.
http://www.fairchildsemi.com/ds/RF/RFP12N10L.pdf
I initially had it hooked it up that way andhad the same result. I added the resistors in hopes of solving the problem.
-Phil
Stamp runs on a 9V battery, motors on a benchtop power supply. Grounds are tied together.
RFP12N10L has a protection diode in the package. Am I right that this allows me to avoid one across the motor?
Where, and how, are the grounds tied together?
-Phil
Anyhow, I added the diode to the motor terminals and it seems to have done the trick. There must have been some sort of kickback at motor on that was causing the stamp to fail intermittantly. The final product will have very long leads to the motors (up to 20 feet) so we'll see what happens when I hook that up. Likely a host of NEW problems.
Many thanks.
Assuming that your motors will only be moving in one direction... i.e. you are not driving them with an H-Bridge configuration, place your diodes as close to the motor (across the motor terminals if applicable) as possible.· As an extra precaution, either select a MOSFET with a reverse diode built in, or add one across the D/S connection.
If your motors are strickty ON/OFF i.e. no PWM, then as yet an even a further precaution, place a .o1uF Capacitor across the motor terminals (this will also help save the motor brushes)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 10/17/2007 6:07:16 AM GMT
http://www.kronosrobotics.com/an142/GAN142.htm
The code says:
OUTS=%0000000000000000
DIRS=%1111111111111111
DO
PAUSE 2000
OUTS=%0100000000000000
PAUSE 2000
OUTS=%0010000000000000
PAUSW 2000
OUTS=%0101000000000000
PAUSE 2000
OUTS=%0111000000000000
PAUSE 2000
OUTS=%0000000000000000
LOOP
Everything goes fine at the first OUTS. At the second; when one or more additional motors are turned on the first motor doesn't turn off. Then all the motors turn on or off higgledy piggledy whenever another is added. Generally they refuse to turn off but not always. At the last OUTS when all outputs go low all the motors turn off just fine and stay that way until step one again at which time any number of them might turn on. Maybe all of them at once. Eventually all the outputs will have one motor each (except pin 15 which will be an input) but for now I am just trying to get a few to work.
I have added Pull-downs to the gates and series diodes between pins and gates. I have also tried series resistors and parallel capacitors between pins and gates with little difference in performance every time. I can use the stamp or a jumper from 5v to gate to turn any one motor on and off with no problem but when the code adds second or third motor to one already on I get erratic behavior. All motor terminals have protection diodes and .01uF caps across them.
Any ideas?
What kind of current are these motors drawing, and what type of motors are they?
Are these motors hooked up directly to Stamp pin ports (NOT a good idea) or is there something between the Stamp pin port and the motor?
Next time you try the program, add the following line at the beginning, and see if the message appears more than once in any given power-on, power-off iteration:
DEBUG "Starting"
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Can you make more than one motor go by jumper to fet gate, can you turn off one motor by disconnecting the jumper from a gate while the other motor is going?
Connect an LED to the gates of all the fets using a 2k resistor to ground for the leds. That will show you if the gate is being held high or low.
Put a probe on the gate and measure the voltage during testing.
Check the amperage being used from the supply, does the supply have enough amps to run all motors including startup amperage?
It would be helpful to know the current requirement of the motors and the power supply rating. Some of those little buggers pull 20 amps.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
Motors are small hobby type gearmotors. They draw about .1 A at run and about .6 A at full stall. I have a 20 A power supply for the motors and have had all motors on many times with no troubles. It's just when I have a few going on and off that causes difficulty.
Bruce, motors are run by RFP12N20L mosfets, the gates of which are connected to pins.
I'll try the jumper and LED experiments and get back.
Did you put the led's on the gates or measure the gate voltage? If you jumper the gate to ground on motor 1 when motor 1 and 2 are on will motor 1 stop?
Your not driving the motors with fets are you? You have the fet on the negative side of the motor and it switches the motor on and off by cunducting current from the drain to source (ground) correct?
Are you sure your gate/source and drain pins are what you think they are?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
I had a wiring problem off the board in the wires on their way to the motors. This was providing an intermittant path to ground causing the motors to stay on when they were supposed to turn off. It seems like there was also some sort of cross talk between the wires (some of them were running parallel for quite a ways) and maybe some induced currents were flowing where they were not supposed to. Is this really possible with only five volts at less than half an amp?? I don't know.
Anyway I cleared that up and the stamp was still resetting owing to voltage dip at Vin so I added a 220uF cap across Vin and Vss and that did it.
Thanks for all the help and input. Talk to you all next time.