Single Battery with PSC and 10amp motor driver
I have bot that works well generally, but I have some noise problems that I'm trying to resolve.
The bot runs off a single 12V 100AH lead-acid battery. The motors are controlled with an MD22 10A motor driver; the servos by a PSC; the electronics are a BS2p40, some Pings, ADCs, IR detectors, etc.
I think in addition to general noise from the motors (which I have been reducing slowly-but-surely system wide), I think I may have ground loop/supply issues.
Here is how I've currently got the battery hooked up to the driver, the PSC, the regulators etc. The hookup for the motor driver was recommended by the driver manufacturer (Devantech) but with the PSC also, I'm not sure about the mix.
The Motor -Vin and logic Vss of the motor driver and the PSC are connected via ground plane. The suggestion to tie the logic regulator GND to the logic GND of the Motor Driver (which is connected via ground plane across the driver board to -Vin from the battery) was made by the manufacturer. The idea to NOT tie the logic gnd of the PSC to anything (just like the motor driver) was my own. And it works OK. But not always -- under duress the PSC and/or the driver will fail occasionally. Is there a better way to wire this all up with a single battery.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
The bot runs off a single 12V 100AH lead-acid battery. The motors are controlled with an MD22 10A motor driver; the servos by a PSC; the electronics are a BS2p40, some Pings, ADCs, IR detectors, etc.
I think in addition to general noise from the motors (which I have been reducing slowly-but-surely system wide), I think I may have ground loop/supply issues.
Here is how I've currently got the battery hooked up to the driver, the PSC, the regulators etc. The hookup for the motor driver was recommended by the driver manufacturer (Devantech) but with the PSC also, I'm not sure about the mix.
(battery+) ---> +Vin filtered 6V 3A regulator ---> PSC +V servo power (battery-) ---> -Vin filtered 6V 3A regulator ---> PSC -V servo power (battery+) ---> Motor Driver +Vin (battery-) ---> Motor Driver -Vin (battery+) ---> +Vin 5V 3A regulator ---> Vdd PSC, Vdd Motor Driver, Vdd Electronics (logic gnd from logic side of motor driver) ---> -Vin 5V 3A regulator ---> Vss Electronics (NOT connected to Vss of PSC or Driver)
The Motor -Vin and logic Vss of the motor driver and the PSC are connected via ground plane. The suggestion to tie the logic regulator GND to the logic GND of the Motor Driver (which is connected via ground plane across the driver board to -Vin from the battery) was made by the manufacturer. The idea to NOT tie the logic gnd of the PSC to anything (just like the motor driver) was my own. And it works OK. But not always -- under duress the PSC and/or the driver will fail occasionally. Is there a better way to wire this all up with a single battery.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
Comments
I've got it that way now.
OK. Right now the logic grounds go to the logic ground of the motor driver, which connects via PCB ground plane to motor -Vin.
Are you asking? Yes the PSC has it's logic and -Vin connected via ground plane on the PCB.
You lost me here -- you mean connect the PSC logic ground right back to the battery? The PSC -Vin is connected back to battery via thick wire now. I left logic gnd on the PSC disconnected.
Also would I then run the logic gnd terminal of the motor driver back to the battery also? The folks at Devantech said NOT to do this....
Lastly, I will stress again that it basically works -- but it sounds like I may have just gotten lucky?
I will sketch up a diagram tonight or in the morning if I'm still not being clear. Thank you so much!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
Perhaps there is a way you could run everything off of a single battery, but there must be a reason why Parallax does not mention it. Just beware that it may not be possible to do this, but if you do, I'm sure that at least I among others would be interested to see how you got it working.
In the setup I've got now, I don't get failures on my PSC actually, what I get is that very occasionally the motor driver will lock up (probably from noise and/or loops in the power and i2c lines). The PSC doesn't lock up at all. What prompted me to revisit my power supply setup is that as I've added more sensors to the bot, noise has gotten to be a bigger problem.
In any case, the single battery setup I tried out was based on suggestions from the motor controller's manufacturer -- which is to not tie the logic ground of the driver (either the PSC or the MD22) to my logic supply. I'm also using a heavily filtered and regulated 6V power supply circuit for servo power. The only raw battery power in my system is for the motors (straight 12v from my battery).
In mulling this over last night, I'm pretty sure some of my minor problems are due to the fact that I ran all the positive power from the battery through a single power switch, then split the switched power into 3 lines for +5V logic, +6v servo, +12v raw motor power. My first step in rewiring will be to tie the + power of all 3 subsystems through their own power switches back to + battery terminal. My only hesitation is if I should tie the logic gnds of the two drives to the logic supply ground, or right back to the - battery terminal, or leave disconnected. Mike suggested one of the first two setups. It seems like if I do, I've got a ground loop across the ground planes of the drivers, but with the current difference, it may be OK (I am NO expert here -- which is why I asked at the forums).
If I had to guess -- and I'm sure someone from Parallax can elaborate -- it is possible to use single power source, but I think it's tricky and can lead to a lot of hair-pulling. So it seems like ALL the manufacturers just say use two power sources since that's a guaranteed way to get newbies (like me!) up and running without trouble.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
#1 shows basically how I have things set up now. The dotted lines in the MD22 and the PSC show where the motor and logic grounds of those boards are tied together on the PCBs themselves. For what it's worth, a few times I switched where the MD22 and/or the PSC were getting Vdd from -- for the PSC it only works when I tie Vdd to my external 5v regulators (not if I use the Vdd on the demo board). The MD22 it works fine no matter where I tie Vdd to, though the power on the demo board is the least noisy. The PSC only works when tied to Vdd of the external regulators. Regardless, my biggest error here I'm sure is routing all the power through a single power switch. This setup WORKS though, it's just a bit unstable when everything is running at once. The MD22 and/or the PSC will lock, but come back online a few cycles later (my code pings both cards to see that they are online and tries to brings them back up if they go down -- I wrote this code as a safety measure, and boy it turned out to be handy). The MD22 developer specifically recommended running logic ground through the MD22, so I followed that same model for the PSC. I should add that my sensors and Stamp *never* crash or reset, but I do get noise all over the place.
#2 shows what I think Mike is talking about it -- running separate feeds for all 3 systems back to the battery (and separate power switches). It seems like I would have 2 ground loops across the PSC and MD22 though? Also see above regarding manufacturer rec. on the MD22 -- tying both GND and -Vin to the battery was discouraged -- I know it's not a Parallax product but I think I've got the same issues with both controllers, and being able to run a whole project from a single battery seems to be an issue that comes up a lot with motor drivers, servo controllers, etc.
#3 shows another possible suggestion from Mike -- running logic GND for both boards straight back to battery (-) terminal. Again, wouldn't I have a ground loop here? Consider me totally ignorant.
Any suggestions, corrections, advice is appreciated in advance.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
Post Edited (Zoot) : 10/19/2006 5:26:28 PM GMT
With that in mind, it seems like my best bet is to take my basic setup from diagram #1 (I'm using 10 guage wire for motor V; 16 guage for servo V; 18 guage for logic V) but still split up all the + power into separate switches and run all + and - back to the battery with separate wiring (diagram #1 is pretty accurate showing where I tied various +/- power together for distribution, mostly because I was keeping things as simple as possible).
So....the attached figure #4 shows my current setup altered for better +V distribution, and it shows my actual current hookups to Vdd for my PSC and MD22 (the thing I find strange is that the MD22 will run using Vdd from anywhere, but the PSC will only run using the same Vdd that is running the Stamp, but if it works I'm cool with that )
I would *love* to hear from somebody at Parallax about this... since the PSC docs require (recommend?) separate power supplies for servos/logic when using that board. But obviously it can be done -- I just don't want anybody smoking a board just because I got lucky.....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
In this particular case I think I'll just add the extra power switch for servos -- having a "motor kill" switch has been invaluable during code debugging, and having a servo kill switch would actually be nice (the power switch on the PSC is generally inaccessible as that card is down in the guts of the bot). I've already got the two power switches set up, so adding the third is actually easier than sequencing as you suggest. I'm using illuminated rocker switches already and they are positioned like "taillights" on the back of the bot so it looks cool and you can always tell what's on and what's not.
P.S. -- for those that are interested -- there are logically controlled power supplies available over at crustcrawler.com. I'm not using them myself, and they wouldn't handle the current of my motors, but it could be a really nice solution for some, and for not too much money.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
Post Edited (Zoot) : 10/19/2006 8:35:02 PM GMT
·
·· I’m not sure what you’re getting at.· Technically in this case you are running from separate supplies.· Your power to the PSC for the servos and logic is coming from two different regulators which are well below the 12V battery sourcing them.· What we’re trying to avoid is that if you have a 7.2V battery going directly into the servo power connectors of the PSC and it is also going into the BASIC Stamp board then the servos are drawing from the 7.2V directly.· What happens is during peak currents the battery will drop down low enough sometimes where the BASIC Stamp will brownout and reset.
·
·· In your case you have 12V feeding separate regulated supplies for logic and servo and the supply voltage is double the servo voltage so unless the battery is almost dead anyway you wouldn’t run into the typical same source/supply situation.· I hope that is what you were looking for.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
While brownouts/resets haven't been a problem at all (the 12V motors die long before the logic and servos), ground loops would have been. I've read that a bad ground loop with high current loads could go wrong the way through your boards and smoke them (maybe that's untrue but it sounded unpleasant). I actually tested it once -- hooking up logic GND on the PSC and MD22 -- and nothing bad happened but nothing worked either. I only avoided a potential ground loop from the getgo because I spent a lot of time at the forums learning from my betters I certainly wasn't complaining about the documentation, which like these forums, is "unparallellalaxed").
I think bulkhead was referring to the PSC docs quoted below. For what it's worth, while I've had good results with a single battery, it has *not* been as easy I thought it would be, and a few times I was ready to just plug a few 9v batteries into my boards and be done with it....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
In my tests I used 3.3Ah nimh batteries with my Javelin stamp and tested it with multiple and single servos. My problem wasn't that my stamp was resetting. The problem was that the PSC interfered with my Javelin stamp's ability to read data coming from a PS2 controller. I am pretty sure because I insert a "starting up" print line at the beginning of all of my programs, so I would know if it were resetting. Overall, it would cause my robot (controlled by a PS2 controller) to behave erratically when I used a single 6.0V battery for both stamp and servo power. It's really weird because it just completely interferes with the javelin stamp's pin states (and perhaps more). Ever since I have used two separate 3.3Ah 6.0 batteries and everything has worked fine.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST