Pages: [1]   Go Down
Author Topic: Switching two batteries with DPDT relay  (Read 1075 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey All,

I feel like a mooch to be asking, but can anyone vett my schematic and tell me if I'm about to fry anything?

It's meant to switch two 12v batteries between getting trickle charged by a PMW solar charger and running a load (and powering the Arduino itself.) A 5v DPDT relay makes the switch, which is triggered by a digital out through a 2n3904 transistor.

Will I need a capacitor to keep the Arduino going during the switch? Should there be diodes for any kind of hiccup when that happens?

Thanks hugely.


* 2batteryswitch.PNG (21.56 KB, 720x336 - viewed 84 times.)
Logged

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 47
Posts: 2177
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Perhaps you could connect the batteries together so that they are feeding in parallel during the change-over. There used to be make-before-break switchgear for this purpose, but I guess simple relays are a better solution these days.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the suggestion!

I'm having trouble working out how to wire the batteries in parallel so that they're not always bypassing the relay or without resorting to a second switch (should note that I don't know much of anything about circuits.)

I went the capacitor route, though I don't know if it's much of an improvement (ignore the farad value.)


* batteryswitchwithcapacitor.PNG (18.12 KB, 658x296 - viewed 50 times.)
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Why do you need to swap them, can't you charge and use at the same time?

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I dunno--can I?

I guess I figured that since the charger breaks 'charging' and 'load' into discrete modes, I would need to take off everything during charging.

Any chance you could mock up a very basic idea of how that works?
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know exactly about just trickle charging, but every solar power system I've encountered just charges and uses at the same time, it's the net current into the batteries that counts.

We live on solar, I have panels and a generator plus of course we are using power all the time. If the batteries are getting low and the sun is not out I turn the gennie on and pay no attention to where the current goes. Probably some goes to the load and some to the batteries.

Quote
charger breaks 'charging' and 'load' into discrete modes
Not sure what that means, you normally have bulk, absorb and float.

_____
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

London
Offline Offline
Edison Member
*
Karma: 46
Posts: 1368
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Will I need a capacitor to keep the Arduino going during the switch?
Yes. The value will depend on how fast the switchover is.
Quote
Should there be diodes for any kind of hiccup when that happens?
No, but you DO need a diode across your relay coil, to kill the back EMF when you disconnect it. Otherwise the back EMF could fry your Arduino.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Much obliged for the helpful advice, thanks.

Greynomad, looking into it, I think my needs for the system differ enough from yours to warrant the relay. The controller seems to have difficulty dropping out of absorb with much timeliness, and especially with an inductive load (I've got a bilge pump firing intermittently.)
http://www.wind-sun.com/ForumVB/showthread.php?461-Solar-Power-Charge-and-Use-at-the-same-time
I won't be able to make many tweaks once it's running, so I think the only safe bet for total automation is swapping two batteries.

Henry, I added the diode to the coil--if you have any suggestions on how to minimize losses, I'd appreciate them.

 
Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2066
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You have to add a diode (3A one) and a large enough capacitor (ie. 2200uF/25V or even bigger) in there (see below), otherwise you risk the arduino may crash during the switch-over of the batteries.. smiley-wink
The adding only the capacitor may not help you much as the capacitor may discharge itself through the "load" fast. So the diode will isolate the capacitor from discharging into the "load" and the capacitor will power the arduino for a while, hopefully smiley


* sch.bmp (42.56 KB, 123x117 - viewed 159 times.)
« Last Edit: June 01, 2013, 04:32:24 am by pito » Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2066
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You may consider to connect the 7805 reg to the batteries permanently via 2 diodes, so the switch-over of the batteries will not crash the arduino. I would add a simple filter into the arduino's power rail as the switching between the batteries with different voltages may cause pulses.
The 7805 requires two 100nF decoupling capacitors connected as close as possible to its pins.

BTW the recommended input voltage for arduino (when powered from the external power source) is 7V. How do you plan to connect the arduino to the "7805" in your schematics above? Do you want to connect the 5V from the 7805 to internal 5V rail (not to recommend..)?

Or, safer imho, would be to use a 7808 and feed the power into the standard arduino external source input (the barrel jack).
Or to use other voltage regulator which gives you 7V external power for arduino (for example a low-dropout one based on how minimal voltage the batteries can provide worst case).

Or, another variant is to feed arduino directly from the filter, into its standard external power input. I would prefer a pre-regulation with a 7V output fed into arduino's external power input (double stabilization), when you plan the system for the upcoming Mars expedition.. smiley

No warranties of any kind smiley


* sch2.jpg (13.55 KB, 616x233 - viewed 46 times.)
« Last Edit: June 01, 2013, 05:28:17 am by pito » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey Pito, sorry to be late responding--your fault for giving so many great options!

I'm probably going to go with the simpler one-diode-blocking-the-load route (your first suggestion), and switch to a 5808 (I should have looked up the Ar's operating voltage before assuming 5v) and feed it into the barrel jack (already loped off an old adaptor.) Will I still need the decoupling capacitors this way?

Haven't made any plans for Mars, but this will be inside an aquaponics system floating on something equally inhospitable to life: chlorinated pool water. smiley
Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2066
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Will I still need the decoupling capacitors this way?
Yes, you always need decoupling capacitors with 7808 voltage regulator, placed as close as possible to its pins.
Logged

Pages: [1]   Go Up
Jump to: