12v motor noise resetting the prop even with flyback diodes
eagletalontim
Posts: 1,399
I have just about finished my solar tracker which uses 2 12V motors to move the base to face the sun. This is working great so far. The problem I am having is noise from the motors is either resetting the prop or causing the frequency readings to go crazy from the 556 timers that adjust frequency based on light into 4 LED's. The light sensor is connected via a standard Cat5 cable and is about 4 feet long. That circuit is run from 5V and has a 4 each 10K pull down resistor close to the prop for each frequency signal back to the prop. There is a 10K resistor on the light sensor board that reduces current back to the prop. When the motors are both off, the signal is clean and works great. When either motor kicks on, the frequency on any of the 4 sensors can jump dramatically while the motor is running. This happens while the motor is running, not right when the motor kicks on.
I am using 2ea relay h-bridge's with flyback diodes on the coils, and from the motor output. There are also diodes between the prop and base of the NPN transistor which switches the relays.
Everything is running from 1ea 7ah sealed battery right now and will be converted to run from the battery bank when installed. To stop this noise, I need help on what to do. Should I add an inductor? If so, how would I determine what size I need? Should I separate the motor power and the prop power including ground and just use a capacitor to join the grounds so the transistors will work? Any help is appreciated!
EDIT * The motors are either on or off. No PWM is used.
I am using 2ea relay h-bridge's with flyback diodes on the coils, and from the motor output. There are also diodes between the prop and base of the NPN transistor which switches the relays.
Everything is running from 1ea 7ah sealed battery right now and will be converted to run from the battery bank when installed. To stop this noise, I need help on what to do. Should I add an inductor? If so, how would I determine what size I need? Should I separate the motor power and the prop power including ground and just use a capacitor to join the grounds so the transistors will work? Any help is appreciated!
EDIT * The motors are either on or off. No PWM is used.
Comments
Think of ground as river, once it reach the ocean (battery terminal) it's not likely to splash current up a another river next to it (the separate ground wire)
Show us pics and schematic of the layout and what LDO you use etc.
The power circuitry for the prop is a switching regulator all in one package for the 5V (Fits right in place of a 7805) and a 3.3V linear regulator. There is a diode on the positive side from the battery to the 5V regulator. After the diode there is a 100uf capacitor rated at 35V. There are also filtering caps between each regulator to help smooth the power before going to the prop. The board is one that I have made for another project that has worked for years with no issues but it was not designed to control 12v motors. I can't really change the circuitry on the board so if I can filter the power before going to the circuit board. I am at work right now and can't draw up or take a picture of the schematic.
The H-bridges are not on the same board as the Prop are are just connected through wires to the main board. Here is a picture of my current setup except the hbridge's are now relay's instead of transistors and I have removed the 74HC165 since I only need 3 switches. The h-bridges are on the side of the box.
Use three 0.1uF caps.
One cap directly across the motor terminals
One cap from one motor terminal to GND
One cap from the other motor terminal to GND
A ferrite core around the motor-cable at the motor end, would also help stopping the radiation of the RF. The RF`s source is almost always from the sparks at the brushes in the motor. I assume that this is not a brushless motor. Hope you figure out this and get it working. I really like your project. Its cool.
Please ignore the mess I have most of my shed filled up with car parts from my car being in 100,000 pieces!
pulse noise / crosstalk.
Don't share a ground wire in a cable run between a motor and a sensor, in fact don't run sensor and motor cables close together
if at all possible.
There may be some RF in there, but the reset problem is most likely inductive kickback from the motor.
Take the motor out of the circuit and see if there is still a reset problem?
If there is, then pull the relays, because that can do that as well.
This is at a MUCH lower frequency problem, bigger caps.
Separate grounds, power leads, chokes and caps - ALL!
I am making a few changes to the sensor board and I changed all the pull down resistors on the prop's circuit board to 1K's to see if that will help anything. I am also going to try to use a toroidal inductor, diode, and large capacitor on the before the prop's circuit board to see if that will protect it from noise from the motors.
The strange thing is the motors turn on and off just fine with no noise issue at the time they switch between the states. The strange readings happen while the motors are on for at least 2 to 3 seconds.
Each motor draws around 500ma @ 12V if that helps any.
In this case you shouldn't need separate power for the motors. Just have to toughen up the power rails at the relay board with a large capacitor and make sure the 3 volt circuit is entirely off the main current path. Maybe even use a diode+cap in front of the 3 volt regulator just to be sure.
If I can use a capacitor and diode on the main 12V coming into the "brain" board, would I put the diode on the ground side and not on the positive side?
@LA6WNA, I am pretty sure that is a good possibility since everything is hand done on this project and I am sure it is not perfectly aligned to give the motor's a smooth rotation.
I have only glanced at this thread a few times but this is one of the basics you need, the other is to have a separate power ground, that is the ground for the motors (via the relays/drivers etc) should go back to the supply and the logic should have it's own ground. Commutator noise can be a big deal while running, especially since you don't have any shielding then the noise is also injected on the signal grounds, not so good. Try the suggestion with the caps across it etc.
I will also be adding the ceramic capacitors if I can figure out a way to do it. Since the motors are being controlled in either direction, I guess I will have to run a separate ground wire to them to solder the "delta" configuration for the ceramic capacitors? That ground would need to come straight from the batteries and not be connected to the ground of the h-bridge?
Protect the logic power from AC noise from the motors (coils too).
Re: running separate ground wires:
What is really being suggested is that it needs to have a single point ground system.
Think "Star" topology.
http://www.eetimes.com/document.asp?doc_id=1274098
http://www.mikeholt.com/mojonewsarchive/GB-HTML/HTML/Single-Point-Ground~20040427.php
As opposed to a multi-point ground - or "grid"
http://en.wikipedia.org/wiki/Multipoint_ground
http://www.pololu.com/docs/0J15/9
...You might be able to get away without a dedicated ground to the motor case, but the Ground to the H-Bridge driving the motor should be sufficient.
As for the resetting, I may have fixed that? I used 1ea diode from the positive side of the battery to a 35V 1000uF electrolytic cap then to a random inductor I found inside a computer power supply. It seems to have stopped the prop from resetting so far. I may add another cap since the wires that will be running the circuitry will be quite long.
Should I add more caps to the junction inside the electrical box across the motor leads instead of at the motor? Maybe the long leads going to the motor is causing noise that the light sensor is picking up?
I have ceramic capacitors everywhere recommended, flyback diodes everywhere, and it is still glitching! I even tried to disconnect the light sensor and run one motor for a complete movement range and the circuit still picked up noise.... I am using 1K pull down resistors on that circuit now and nothing seems to help.
Come to think about this issue and when it started.... It seemed to start happening right after I switched from a transistor based H-bridge to a relay H-Bridge. When I was using the transistor h-bridge, it seemed to work just fine. Any reason why? I am tempted to get a premade motor controller that the prop can hook directly to....
EDIT * I just tried a transistor H-Bridge and it did the same thing still..... Noise is going to be a HUGE problem for me.
I have tried the delta capacitor design with no luck.
I have tried using 2 different batteries : one to run the prop, and one to run just the motor. Noise still transfers some how.
I have added a "power buffer" to the 12V input to the board the prop is on. This seems to have helped, but not eliminated the serial terminal from crashing. (USB light stops flashing on prop stick) This does not happen when using 2 different batteries with the grounds separate.
I have tried changing the pull down resistors on the prop's circuit board for the light sensor from 10K to 1K and this made no change.
Anything else I should try?
Have a look at my mock up schematic. It's important to have the zero ohm links to separate low current paths from high current paths. This is the separate power that everyone has mentioned.
The control cable can be at various points in the circuit, starting from where I've placed the links in my schematic. In this case I've chosen, connector P3, just after the diode+cap. You can see how I've supplied power to the relay coils after the links but before the diode. This allows the relays to draw their power from the battery but not be affected by motor/charging currents all while the Propeller is safely buffered by the 4700uF capacitor.
PS: There is one concern I have with the relays - I presume you are using relays in this fashion. This cheap method of using changeover relays for switching the motor windings is prone to welding the contacts. And the related arcing causes much RF noise. I'd be a little wary of recommending it long term.
I have gotten out my hand held O-Scope and have tested several inputs and outputs on the prop while one of the motors was running. There is very little noise on the 3.3V and the 5.5V rails, but there is noise on the output of whichever pin is powering the NPN transistor that turns on the relay. Maybe this is what is causing all my problems? Feedback from the transistor on the h-bridge circuit? Both of the transistors are connected by the same ground that connects directly to the motor.
Stick with the relays for now. I don't think they are the problem.
It's very important that the relay coils are commoned to the Propeller, not the motors. You must not allow the motor currents to flow through the Propeller. Have a good hard look at my previous schematic. The relay coils are separated from the relay contacts, and therefore so is the driving transistors.
Do you have a schematic that corresponds 1 to 1 with your current setup that you care to share?
EDIT:
evanh, I don't see any back EMF diode protection for the motors in your schematic.
Doh! I'll sort that when I get home.
EDIT: Done now. I've also added the schematic source file I made it with. This is a DipTrace file.
RadioShack has them but their web site sucks. You have to search by part number to find them.
Sparkfun has populated breakout boards for le$$.
This one is a two-channel part that has transistors on the outputs to invert the output polarity to match the input polarity.
https://www.sparkfun.com/products/9118
I thought Parallax used to have stuff like that, but couldn't find it if its still there.
But the suppression diodes... Beau caught that one.
Gotta get that counter-EMF kickback under control.