Noise
I have an electric motor (model train locomotive)·that I am intending to control with PWM from an SX.· The chip uses a serin statement from a UM232R USB to serial module.· When I switch that motor on, the data in the SX gets messed up and the UM232R stops responding.· Nothing but that motor introduces noise.· I have tried capacitors, short wire lengths, etc·and nothing works.·· However·the wires that attach to the lm338 regulator and rectifiers are long·aligator clips, could this cause it?· The logic is powered by a 7805·off the same rectifier as the motor.· I tried an independent rectifier for the logic·that helped a little but did not stop the problem.
thanks a bunch [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
thanks a bunch [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Comments
For sure, that motor will be a noisy beast, not only from its brushes but from the connection at the rails, too. Drawing from the same source that feeds your electronics, it may also draw the voltage down enough to cause the chip to reset. You speak of two regulators; do you have a schematic?
I'd suggest powering the electronics with a completely separate, well filtered power supply. Make sure the negatives of both supplies are tied together, though. You'll probably also have to use the capacitiors as well.
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Lightfoot) : 3/25/2007 4:19:36 AM GMT
Intuitively, the brush noise, etc is of relatively high frequency. Therefore, it will take a much smaller cap value ( 0.1 down to 0.01 uF) to make much of a difference. Put those caps on the outputs of each regulator and also as close to the power terminals of the chips as you can get. Also review the reset pin on the chip to see if it should be pulled high or low.
Again, from experience, separated supplies may still be needed.
Regards,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
Even better, one of those hobby fibre-optic kits (with the plastic light "fibre"), you could get several feet of separation.
Post Edited (PJ Allen) : 3/22/2007 3:28:09 AM GMT
http://cache.national.com/ds/LM/LMD18200.pdf.·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Lightfoot) : 3/25/2007 12:10:51 AM GMT
Post Edited (TChapman) : 3/25/2007 1:13:20 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Lightfoot) : 3/25/2007 6:18:03 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
In your schematic, the photodiodes in the optocouplers are wired backwards. Also, the 100K resistors on the phototransistors probably ought to be a lot smaller. Even then, though, I doubt you're going to be happy with the PWM performance. The reason is that phototransistors, when used in voltage mode as you're doing, switch very slowly. I don't know what your PWM frequency is, but if it's over a few hundred Hertz, you won't see a clean squarewave on the output of OC1 — especially at the duty cycle extremes. You might take a look at a different kind of optocoupler. The H11L1, for example, has a built-in Schmitt trigger and switching times in the microsecond range.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Lightfoot) : 3/25/2007 6:17:36 PM GMT
In other applications I used this code to PWM.· My model train locomotives respond well to it.· Is this optocoupler fast enough?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Lightfoot) : 3/26/2007 5:59:20 AM GMT
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Phil
The fastest detector at this site is 155mbps, shown in the link. Scan around the site for the transmitter LED to match it.
www.i-fiberoptics.com/leds/IFD98.pdf