PCB Design help for powering Prop controlling 12V motors
eagletalontim
Posts: 1,399
I am fairly new at designing a custom PCB and am going to need some advise on this design. I have done several others and they have worked great but this one project has had issues I can't seem to fix. This is a revamp to my Solar panel sun tracker. The original design is a hacked and modded older project that was not really designed for this application. The attached image is the beginning steps to the design. Placement is not a big issue except for the CAT5 connector in the bottom left.
What I need help with is the main power and "noise" reduction. The board is powered by a 12V battery bank that is 18ft away. The maximum draw with both motors running is 3A @ 12V. No PWM is being used. Since the power supply is so far away, I need to ensure the Prop stays on when a motor kicks on and the low voltage side stays as constant as possible as I plan on adding an XBee Wifi module to this as well. I will also be using a 4 channel ADC for the sun position sensor. This is where my current design is failing. When a motor kicks on, the current 555 timer setup I am using picks up the noise from the motors even with several ceramic caps connected right at the motor's leads as recommended in a previous thread.
As I am designing this PCB, I am creating an order on Digikey for any needed components. If any are needed or should be changed, please let me know!
Another question I have is trace width and amperage. Online calculators confuse me and I don't see how recommended trace widths will fit with the lead spacing of some components......Specifically the component I have selected for the H-Bridges.
What I need help with is the main power and "noise" reduction. The board is powered by a 12V battery bank that is 18ft away. The maximum draw with both motors running is 3A @ 12V. No PWM is being used. Since the power supply is so far away, I need to ensure the Prop stays on when a motor kicks on and the low voltage side stays as constant as possible as I plan on adding an XBee Wifi module to this as well. I will also be using a 4 channel ADC for the sun position sensor. This is where my current design is failing. When a motor kicks on, the current 555 timer setup I am using picks up the noise from the motors even with several ceramic caps connected right at the motor's leads as recommended in a previous thread.
As I am designing this PCB, I am creating an order on Digikey for any needed components. If any are needed or should be changed, please let me know!
Another question I have is trace width and amperage. Online calculators confuse me and I don't see how recommended trace widths will fit with the lead spacing of some components......Specifically the component I have selected for the H-Bridges.
Comments
18' wire size? Total resistance/ drop per foot.
Does it get noisy with the battery 1 foot away?
3A may be an average draw. When the motor turns on resistance may drop to less than 1 ohm. Measure resistance with a meter across the leads as you slowly turn the motor shaft.
Add a separate +12V wire for the Propeller & logic Vreg all the way from the battery; it could be a 20/22 small gauge that comes from the battery and keeps the motor and noise on its own +12V circuit.
The ground at pin 19 should be the zero V reference. A 50 mil trace should go directly from P19 to Vreg. The big fat trace at P19 goes to the motor circuit only. The key is keeping one reference point for ground-zero (P19) and ground current low for the logic. You need heavy bypassing between the Vreg input and ground and the Vreg output (5V) and ground. This should isolate your heavy current motor ground from you light current logic ground.
By keeping the high current ground returns separate from the logic ground upto P19 the high current stays our of your logic. The extra 12V wire (that's isolated from the motor circuit) insures a constant supply to the Vreg and input/output caps. = quiet logic.
With a 12V X 2 wire cable the motor noise is dropped across the 18' supply wire. Half dropped on the 12V supply, half on the ground wire.
A fair amount of magnetism is created by the current through the traces supplying the motors: keep this away from your logic. It acts like a transformer.
The ground on the ADC is important to keep current flow as low as possible. Tiny drops caused by shared grounding can throw off your readings.
In general the Vreg, bypass cap, low voltage logic should be on the left side of the PCB and high current motor stuff on right side
The motor current from 12V batteries which I assume are lead-acid is neither here nor there in terms of voltage drop unless of course you are using underrated cable. However the old diode+ cap trick from 12V into the switching 5V regulator will do the trick. Never try to put this after the 5V regulator for a whole heap of reasons. The cap value may vary but you can get by with a couple of thousand microfarads especially if your software cuts back power consumption during motor start and stall. If you can run separate power from the 12V battery just for the logic then all the better.
If I have traces for heavy power or motor loads I prefer to expose the solder mask on these tracks so that I can "tin them up" and many times I specify 2oz copper and try to keep them short.
If you would like to get hold of a PCB that will do your job including ADCs and H-bridges then I have an old design a did a few years ago that should come in handy. It's designed to drop into a nice little DIN rail case as well but have a look at this old thread and go to post #6 and you will notice the short tinned tracks going from the driver modules to the connectors. They certainly handle quite a few amps easily.
http://forums.parallax.com/showthread.php/111173-Industrial-control-my-way?p=791643#post791643
Since the wire is buried underground in a PVC pipe, I don't have the ability to add an additional wire to separate the 12V for the motor and 12V for the Prop power supply.
I am not understanding what you are referencing on P19 as that is shown as pin 24 on the Prop which is a general purpose I/O.
You will have to bear with me as far as electronics terms you may use. I know enough to be dangerous To me, if it gets hot, reduce power or add a resistor. If it dies when switching something on, it probably needs a capacitor. If it gets a strange output, put a filtering capacitor in. I could not tell you what value to put in, but with enough testing, I can get it to work eventually.
EDIT*
The 555 timers are basically set up as a vibrator. The pulse width changes based on the resistance of LED's that are exposed to the sun in an Up, Down, Left, Right pattern. The pulse width is calculated in the Prop and it puts the difference into a running average formula. Once the average reaches a specified number, the panels move till the difference is even or very close to even. Then it resets the average and starts all over.
Jack's link goes to an awesome looking product he did. Haven't tried one but the design looks excellent.
I will offer one off-the-PCB suggestion to start. Twist the pairs of wires that go to a particular motor. The 18 feet of wire will have distributed inductance and sudden changes in current (0 to 3A or 0.5A to 0) will introduce voltage spike and possibly induce noise on other wires nearby. Twisting the wires (a few turns per foot, roughly) will go a long way towards cancelling out the inductance and reducing voltage spikes (noise).
Otherwise, Peter & Domanik are offering good suggestions, so I won't confuse the issue by saying the same things in a different way.
The other thing I am not quite understanding is how create 2 ground with only 1 ground coming in. One needs to be "quiet" and the other is for the motors. Running 2 separate traces still joins at 1 common place. Is there a way to ensure one trace will stay "quieter" than the other?
Your diode, ~20-100uf electrolytic cap, Vreg, ADC, computer all go inside dotted line. This keeps the motor current out of the logic area.
There is no quiet anywhere, there is no zero. All noise is relative to some arbitrary point in the circuit. I picked pin 19 as zero. Since there is very little current flow through the ground trace from your LV logic it will appear there is ~no noise. On the VDD side, using a Vreg of 12V to 5V gives you 7V of head room. Therefore the input can drop from 12V to 6V (the Vreg pulling stored current out of the input cap) and still keep your LV VDD at 5V with no glitches. Any noise that makes it through the Vreg should be filtered on the VDD side with a large cap. The inline diode on the 12V is essential to making this work. Good Luck.
I do plan on using 0.1uF bypass caps but was also wondering about that as well. Do I simply run a trace (Positive and a Negative) from each pin to the next and put 1 bypass cap across each those 2 sets of power pins?
Here's the prototype that was just assembled today:
I expect to have these in our inventory by February 1st.
Ken Gracey
I am at work right now and don't have access to my computer to modify the current design. When I get home, I can make the changes and post the new picture of the design.
Anxiously awaiting a pic of your solar panel too!
Here is a pic of the current solar panel setup :
Nice panel setup, is the solar tracker the little box on top?
The sensor is in that box at the top. It is actually a metal case for a halogen light I bought from home depot. I used a dremel to cut the opening for the CAT5 jack and secured it into place really well. With this redesign, I hope to work out all the flaws in my current design.
What do you recommend to use as a buffer into the PROP pins? A simple resistor?
Interesting about the facing east when you wake up. I assume once they park for the night, they don't move again, so it shouldn't be the motors causing a false reading. I mean, you need a light level first before you move the panels, right? So what could cause that? Moonlight? Any other stray lights nearby? Have you considered taking a number of samples before acting on the light level, so a lightning flash doesn't trigger the system to wakeup in the middle of the night?
I like the way you've kept the supply current traces and connectors to the motors in the lower right side of the board. Do not make a connection between these power/ground traces and the left side of the board. Right now it's nicely separated, just a little light on the copper in the logic area.
A design consideration might be to use high efficiency switching Vregs instead of LDO/linears. Some have idle currents in the micro amps. With an LDO 7V drop (from 12V to 5V), all that excess must be dissipated as heat.. The max efficiency can only be 42% versus 90% with a switcher.
http://en.wikipedia.org/wiki/DipTrace
As for ground planes.... I am not very good at those since mine tend to act as an antenna and cause all sorts of problems. I can give it a shot and maybe it will work this time? The copper pour / ground plane does not usually cost more from the PCB manufacture I use.
I am not sure what trace with that is but I think it is 0.013" which is default on DipTrace.
I have DipTrace Non-Profit which is what I use now instead of ExpressPCB.
Go For It!