Motor noise and optoisolators
BobLowry
Posts: 12
I am having some trouble with what seems to be noise and voltage spikes in the circuit I am experimenting with, and I want to reduce or elimiate it.
I have a 12V 4A motor being driven from a mosfet, and the mosfet is being switched on/off from the Stamp(with a 2K2 series resistor in place between stamp and mosfet gate). I have a diode over the motor terminals to prevent reverse EMF, but I still seem to be getting some noise and/or voltage spikes in the BS2 when the motor is powered.
I thought perhaps using an optocoupler might help remedy the problem. My question is: if I were to use an optocoupler between the stamp and the mosfet, but the optocoupler(both LED and phototransistor sides), stamp and motor all shared a common power supply and ground, would that defeat the purpose of the optocoupler(ie negate any isolation between Stamp and MOSFET/motor)?
My research so far seems to suggest that only seperate power supplies(or DC-DC converters?) for the Stamp and MOSFET/motor would give complete isolation(ie galvanic isolation). But I would really prefer to avoid having more than one power supply.
It seems to me that optocoupler would at least provide isolation between the stamp output pin and the mosfet - because the LED in the opto can activate the phototransistor, but not vice versa.
Are there any other relatively simple methods to reduce noise? I thought perhaps increasing the series resistor value between the stamp and the MOSFET gate might help too.
I have a 12V 4A motor being driven from a mosfet, and the mosfet is being switched on/off from the Stamp(with a 2K2 series resistor in place between stamp and mosfet gate). I have a diode over the motor terminals to prevent reverse EMF, but I still seem to be getting some noise and/or voltage spikes in the BS2 when the motor is powered.
I thought perhaps using an optocoupler might help remedy the problem. My question is: if I were to use an optocoupler between the stamp and the mosfet, but the optocoupler(both LED and phototransistor sides), stamp and motor all shared a common power supply and ground, would that defeat the purpose of the optocoupler(ie negate any isolation between Stamp and MOSFET/motor)?
My research so far seems to suggest that only seperate power supplies(or DC-DC converters?) for the Stamp and MOSFET/motor would give complete isolation(ie galvanic isolation). But I would really prefer to avoid having more than one power supply.
It seems to me that optocoupler would at least provide isolation between the stamp output pin and the mosfet - because the LED in the opto can activate the phototransistor, but not vice versa.
Are there any other relatively simple methods to reduce noise? I thought perhaps increasing the series resistor value between the stamp and the MOSFET gate might help too.
Comments
It's funny how you almost answered your own question when you said:
"But I would really prefer to avoid having more than one power supply."
since the implication there is that the noise is coming from a common power supply. Yet. you seem to want toisolate the "signal" lead to the MOSFET, rather than isolating the motor from the Stamp. You might consider isolating either the Stamp or the Motor (either one) such that noise from one won't reach the other.
If that fails to solve the problem you then might consider that your power supply is inadequate to supply power to both the Stamp and the motor at the same time, and either stiffen the power supply by use of a capacitor between the motor and the power supply to take the edge off of starting the motor, or use a larger power supply.
Finally, you don't mention what kind of power supply you're using - batteries, wall wart, etc.
Regards,
Bruce bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
I thought it was possible that noise might go from the motor, through the mosfet, then back out of the mosfet gate to the Stamp through the signal lead. So I guessed that by isolating the signal lead, I *was* isolating the motor from the stamp, at least from one potential route of noise.
I was under the assumption that there were at least two paths that the noise/spikes might travel from the motor/mosfet back to the stamp. Because the motor/mosfet is linked to the stamp at two points: the stamp output pin, and also at common ground. The stamp is powered by its own regulator so the positive voltage supply to the stamp would, I'm assuming, be somewhat protected from noise or voltage spikes.
Would optocouplers only be worthwhile if the stamp and the motor/mosfet have seperate power supplies and also don't share a common ground? Would an optocoupler add no increased resistance to noise or voltage spikes otherwise?
As for the power supply, I am using a mains powered regulated linear power supply capable of 15A continous at 12V currently, but I am intending to move to battery power once the design is complete.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
This may or may not be easy to do. You might try powering the Stamp from a battery temporarily and utilize a common ground. In theory then there is very little way (short of RFI or EMI) that noise from the motor will be coupled back to the Stamp.
The point of this is to see if that solves the problem. If not, there is something else amiss here.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
Incidentally, unlike with a bipolar transistor, you typically don't need a series gate resistor on a MOSFET — unless it's to reduce gate charge inrush current when you turn it on. This is because MOSFETs are voltage-controlled devices, not current-controlled devices. Sometimes, though, for really large MOSFETs with high gate capacitance, a "MOSFET driver" IC can be added to reduce the instantaneous current requirements on the micro output and turn the MOSFET on more quickly.
-Phil
Just to be clear about this - you mean the stamp would be powered from a battery, and the motor and mosfet would be powered from my benchtop powersupply, and then the benchtop supply and battery would have a common ground?
I did try a similar setup to this already, but I used another mains-powered power supply in place of the battery. There was a common ground between both power supplies, but that setup actually seemed to create worse noise.
Forgive my ignorance, but isn't DC ground just a reference level, and so the grounds from seperate powersupplies (e.g. battery and mains connected powersupply) could actually be at different potentials? Could that lead to a ground loop or something??
Yeah I also thought RFI or EMI might be a possible problem, I'm not using shielding anywhere, and the wiring around the motor and mosfet is spahgetti-style with no attempt to keep such interference down.
So what you're saying is that I should keep the common grounds seperated for as long as possible, and only join them together right at the output of the power supply/cap?
You mean the stamp regulator? I'm running the power supply directly to the stamp with no cap. What type and value of cap should I add, and how/where should it be connected(across Vin and Gnd on the stamp or right at the main power supply output?)? What would that cap do?
Hi, Beau. Here are two schematics, the first one shows the current noisy circuit which is just a mosfet and motor, the second one shows the circuit I intended to create with the added optocoupler to help eliminate noise.
You have enough voltage overhead, you could place a small RC filter into the power supply of the Stamp without much of a problem.
I suspect your noise is being introduced from the supply lines as surge currents from the motor.· An opto might help, but your still
connected to the same power supply.
·Just about any Si diode would work.
In your configuration, is the programming cable still connected to the PC and Stamp?· If so, you might consider placing a 1K "pull-down" resistor
across the ATN (Stamp Pin3)·and VSS (Stamp Pin 4 or 23).· The reason for this, sometimes if you have a long cable connected it can act like an
antenna... If your environment is noisy, it can reset the Stamp.· Placing a 1K resistor across the ATN and Vss can help·attenuate the noise.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 1/14/2007 3:31:30 AM GMT
I wasnt aware of that, thanks for the info. The resistor was originally added as a precaution, to prevent the stamp output pin from sinking too much current. The MOSFET I am using is an STP60N06-14, which is listed as having an Input Capacitance of 4800pF at 25V Drain-Source voltage. I'm not sure if that is considered a high gate capacitance, or even if I've quoted the relevant specs.
Post Edited (BobLowry) : 1/14/2007 3:50:00 AM GMT
Yes.
For the current your motor is drawing, I'd go with a large electrolytic (2200uF or more) from +12V to Gnd at the point where+12V comes into your circuit board. The cap will help to hold the Vin supply voltage above the dropout voltage of the Stamp's regulator during high-current transients from the motor. Since your supply voltage is so high, you could easily get by with adding a resistor (22 ohms to start) between the 12V supply and the Stamp's Vin terminal for additional filtering. Then, add a 10uF tantalum from Vin to Gnd (at the Stamp) for good measure.
-Phil
Update: As I was editing this, Beau's response came in. The diode with a larger Vin cap is actually a better idea. The diode will keep the cap from discharging back to the supply during low-voltage transients. It would also relax the requirement for the huge electrolytic I was proposing.
Post Edited (Phil Pilgrim (PhiPi)) : 1/14/2007 3:50:46 AM GMT
Being an RC circuit is there a resistor in there(you have to be very explicit with us newbs )? I did two schematics did I get either one right? Does the powersupply ground go to that side of the cap or the other? And is it the one *with* the resistor or *without* the resistor? If there is a resistor what would be a suitable value?
Yes the programming cable is still connected, I will add this to the circuit too. Thanks for all your help.
Post Edited (BobLowry) : 1/14/2007 7:49:02 AM GMT