PDA

View Full Version : [Question(s)] DPDT 3-Position Switch On-Off-Charge Wiring



_ADAM_
06-02-2016, 05:38 PM
Hi,

I want to use a DPDT 3-position switch to do On-Off-Charge wiring. In the diagram below, Main would go to the robot electronics and Charge would go to a dangling female power cable so that the battery could be charged without disconnecting anything. Just flip the switch and charge.

I'm not an expert on electronics... it would be great if someone can tell me whether this wiring is correct or not. I don't want to smoke something or start a fire! :(


http://forums.trossenrobotics.com/gallery/files/1/4/1/9/6/dpdt_3-position_switch_on-off-charge_wiring.jpg

Brooks
06-02-2016, 06:05 PM
There's no need to switch both positive and negative. I would tie the negatives together, separately from the switch, and switch just the +'s. So a single-pole switch would be adequate. If you end up with a double-pole switch, bridge each pole of the switch so the current is shared across the poles of the switch.

Keep in mind that if you want to use a balance changer you'll want to provide access to the battery's balance connector.

Also keep in mind that you REALLY don't want to charge the battery while it's in your machine. Firstly you can't see the battery if it develops problems, and secondly if it catches fire it will damage your machine. RC enthusiasts typically remove the battery and charge it while in a ceramic flower pot or something that you can readily pick up and run out the front door with...

KevinO
06-02-2016, 08:01 PM
Also keep in mind that you REALLY don't want to charge the battery while it's in your machine. Firstly you can't see the battery if it develops problems, and secondly if it catches fire it will damage your machine. RC enthusiasts typically remove the battery and charge it while in a ceramic flower pot or something that you can readily pick up and run out the front door with...

In the beginning of lipo being used in the hobby I did this religiously. (Especially since not all chargers had a balance connector in the early days.) Now that I'm exclusively in robotics and these batteries don't get knocked around like in quadcopters and cars plus we have voltage reporters out there I tend to leave mine in.



Keep in mind that if you want to use a balance changer you'll want to provide access to the battery's balance connector.


Which I strongly suggest as well. Even the highest quality lipo cells drift in voltage on discharge. (Now that I think about it that could easily cause bad things to happen if you overcharge a cell since another cell could be bad or dead.)

_ADAM_
06-02-2016, 08:41 PM
Thanks for the replies. FYI I have more than a decade of experience with lipos in RC and robotics.

I really wanted to know if my understanding of how the switch works is correct. If I wired it how I have it shown in the diagram, would it work as I expect?

KevinO
06-02-2016, 10:22 PM
Since you are doing something more than a simple Arduino project. Take a look at this. http://www.mini-box.com/OpenUPS I'm integrating it into the Golem MKII project in the next week or so. It might be something you would be interested in.

_ADAM_
06-02-2016, 11:13 PM
Thanks. Not sure it fits my project, but I'll add it to my ever-growing list of cool parts to consider.


Golem MKII project

Oooh, that sounds interesting... :)

jwatte
06-02-2016, 11:41 PM
First: Most DPDT switches are only rated for a few dozen milliamps, not the up to the dozen amps you'll need to pull through the battery wires.

Second: There's no rule that the bot can't be powered while charging. The way I solve this problem is simply have a "charge input" connector in parallel with the battery. This means that I can power the bot itself from a power supply, and I can charge the battery, and I can run untethered (by disconnecting the wire.) The one danger is if I keep the power at "max charge" voltage for long after the battery is fully charged, I'll reduce the life of the battery.

Now, this is convenient for other reasons, too. For example, maybe my power supply can only supply a few amps. When paralleled with the battery, the battery will provide more current during times of high draw, yet will stay charged on average because the power supply.
I tend to "float" the batteries like this at 3.95 Volts per cell, which I believe is low enough to not wear out (really, metalize) the batteries, yet is high enough that the battery has a decent charge when disconnecting. If I need to go unwired for long, I raise the voltage to 4.2V per cell, and wait until the power draw on the power supply is a few dozen milliamps, and then unplug -- this is the CC/CV charge that LiPos are supposed to get to get to top charge. And once in a while, I do a "balance charge" using an actual charger with the balance connector attached.

So, anyway -- most DPDT switches are not rated for nearly the current you need, which means they might burn up from contact resistance.
Parallel battery and "charge in" without switch, and you have the most flexibility.

As I posted in another thread, I then also use a software controlled power switch (power MOSFET) which lets me disconnect the battery when it runs out of juice, to avoid killing it. But that's gravy -- if you use a LiPo Guard "beeper" type device, you'll probably do fine manually.


you REALLY don't want to charge the battery while it's in your machine

Yet, laptops, cell phones, and cameras, do this all the time. I mount my batteries with reasonable protection, and I treat them well, and I haven't had a problem with batteries burning up in many years. So, your mileage may vary, and what's good for me may not be good for you, but I think that rule comes from times when hobbyists didn't use the right kind of chargers, and from when batteries would be knocked around in cars and such and thus take damage.

_ADAM_
06-03-2016, 12:00 AM
Thanks for the info. There are heavy duty switches that can handle the current if I decide to go that route. I wouldn't use a wimpy switch.

I still would like to be sure if I understand how the switch's terminals are connected. Based on my diagram, if the switch is in the "up" direction, the Battery and Charge terminals would be connected, and if the switch is in the "down" direction, the Battery and Main terminals would be connected. Please let me know if that's right or wrong, the schematic is like hieroglyphics.

Brooks
06-03-2016, 03:07 AM
The answer to your question is yes. Please keep in mind everyone's comments!

tician
06-03-2016, 01:45 PM
Do you have a manufacturer name and model number for the switch(es) you are looking at? The image is not exactly informative.

Probably easier - and maybe safer? - to just have one switch controlling power to the bot and a second connecting the battery/charger to bot power (can keep the bot powered while charging by keeping the external supply connected and flipping only the battery switch to isolate it from the bot). Run the risk of an accidental power-off if forget to flip the battery switch and reconnect the battery when unplugging the external supply.

I've been working on a far more complicated solution by implementing several components of the standard I2C 'Smart Battery' specifications partly because the battery in my netbook is kaput, but mostly because it would be very nice for swappable robot/moped batteries. A couple arduino libraries for talking to smart batteries with the software I2C library already exist.

_ADAM_
06-03-2016, 01:55 PM
Hey tician. I'm looking at this one - 30 amp 12VDC DPT 3-Position On-Off-On:

http://www.gamainc.com/site/epage/130301_941.htm

My plan is to connect a male/male deans-style on a short wire to each "row" of the DPDT. Then connect one male deans to the battery, one to the charge cable, and one to main output (a Y harness where one goes to a BEC and RPi, other straight to Dynamixel power bus).

I like this setup because it's clean and modular, can easily take things apart and change them out if I want.

I want easy acces for charging without disconnecting anything, and I don't want the charge cable on the same circuit as main power. Balance connector will also be easily accessible.

I understanding everyone looks at this kind of stuff a little differently, and this setup makes sense to me.

tician
06-03-2016, 02:07 PM
Should work fine although there may be hiccups/reboots during switching if supplying external power to the BEC and RPi upstream of the battery switch. Definitely verify the terminals of the switch before powering everything up. Center pair should be the 'common' lines and be connected to battery, but the switch drawing does not state that explicitly.

_ADAM_
06-03-2016, 02:33 PM
I would not switch it off unless I shutdown linux first, if that's what you mean.

If you're saying it might not boot cleanly from cold, then that's something I'd need to look at. I'm also looking at maybe using the MoPi power board... not sure though, will prototype without it first.

There will be a momentary button that executes a shutdown sequence. Or I can do it from putty when I'm at my desk.

jwatte
06-03-2016, 03:12 PM
You want the connection to the charger and to the bot to be female, just like a battery connector, and you want the connector to the battery to be male, to mate with the battery.
The reason for this will become obvious once you start playing around with hooking up diferent pieces.
Specifically, you'll want to be able to plug the battery straight into the bot without the switch, as well as with the switch.
You also want to be able to plug the charger into the switch, as well as straight into the battery.

_ADAM_
06-03-2016, 03:52 PM
Agree J on M/F comments, that's exactly how I have it drawn up (pen and paper, how I design everything). :wink:

Waiting on some parts, but I'll start a bot-specific thread and post pics of everything when it's ready.