Author Topic: Auto laptop 12V/mains switchover design  (Read 16811 times)

0 Members and 1 Guest are viewing this topic.

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Auto laptop 12V/mains switchover design
« on: June 28, 2007, 05:20:04 PM »
Hi,


I know this is kinda the wrong way round, but given that I have a plan to run my Web/mail/DNS/whatever servers off solar PV as much as possible, but they have to continue to work unattended if the battery happens to get low when I'm not around (especially in winter when light levels are low), I knocked up this little design:


http://www.earth.org.uk/laptop-12V-mains-fallback-schema-1-full.gif


The Solar PV system runs at 12V DC, the laptop requires 20V DC (at up to 3.25A), and UK mains is 240V AC.


Anyone see any obvious bloopers?


One feature is to use NO mains power at all while solar is available.


I may modify this not just to rely on the solar controller's LVD (Low Voltage Disconnect), but to switch mack to mains earlier to save some juice in the batteries for lighting, etc.  Note that in this case, if mains is not available then the system will continue to run off 12V DC until the controller's LVD drops the load, which I think is pretty neat.


Rgds


Damon

« Last Edit: June 28, 2007, 05:20:04 PM by (unknown) »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

fungus

  • Sr. Member
  • ****
  • Posts: 448
Re: Auto laptop 12V/mains switchover design
« Reply #1 on: June 28, 2007, 11:35:31 AM »
A few thoughts...

I'm guessing this is using the LV disconnect on the solar controller as a voltage sensing part?

I'm not sure on the controller you have but I would adjust it high(~12.0v) if possible..

One thing I would be worried about is that this would keep the battery level pretty low, not giving it a chance to recharge before it would be used again as the LVD would switch in at a low voltage, depending on your controller. You could build a 'dump regulator' with very high hysterisis, such as switch off, 12v and switch on, 14v etc to allow the batteries to recharge.

Have you measured the actual current draw of the laptop in operation?
« Last Edit: June 28, 2007, 11:35:31 AM by fungus »

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #2 on: June 28, 2007, 12:34:10 PM »
Hi,


My controller's LVD is 11.5V and won't turn the load on again until 12.6V, which does give the battery a chance to recover I think.


The sensing at the moment is simply done by the coil of the first relay across the 12V supply: if the 12V supply is on then the mains power is shut off.


You're right that if I make my voltage sensor more sophisticated then something like 12V off and 13V on (ie with decent hysteresis) might be good, and I could even bypass the controller and connect straight to the battery if I wanted.  The relay I've specified only uses ~140mW, ie 12mA or ~0.25Ah per day!


Steady power draw should be about 25W or less (I hope); I get the laptop next week with luck.


Rgds


Damon

« Last Edit: June 28, 2007, 12:34:10 PM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

RP

  • Hero Member
  • *****
  • Posts: 722
  • A dog with novelty teeth. What could go wrong?
Re: Auto laptop 12V/mains switchover design
« Reply #3 on: June 28, 2007, 01:02:05 PM »
Most 12 volt relays will continue to "Hold" once on down to 9 volts or so.  Even if it did turn off at 11.5v for instance, as soon as the load is removed, the voltage will rise and turn it on again.


I suspect you'll need a comparitor circuit with adjustable on and off points to prevent this.


Also, I think you'll only need 1 double pole single throw relay to do the switching.  Use one pole to switch the positive side of the input to the DC-DC convertor.  The negative can stay connected.  The other pole can switch the "hot" side of the AC input to the computer charger.  The 3rd relay you show at the output of the DC-DC convertor can be replaced by using 2 diodes (one from each charging source) to prevent backfeeding.

« Last Edit: June 28, 2007, 01:02:05 PM by RP »

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #4 on: June 28, 2007, 01:35:27 PM »
Hi,


Even if I use Schottky diodes, I think that I'd be wasting ~1W (0.5V forward voltage times a couple of Amps) out of a total power budget of ~25W or less.  I did think about diodes, but I'm trying to be very energy efficient here.


And you're probably right that I could avoid DP relays, but I get a warm feeling inside totally isolating the unwanted supply, and the DPDT relays didn't seem (more) expensive...  B^>


But, yes, thanks for the observations: they're spot on!


Rgds


Damon

« Last Edit: June 28, 2007, 01:35:27 PM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #5 on: June 28, 2007, 01:38:29 PM »
BTW, I may well see the oscillation problem that you suggest: I'm just going to have to find out.  I believe that my controller has a delay on LVD shutdown, and I hope they've chosen the upper LVD switch-on limit so that shedding the load doesn't immediately cancel the LVD as you suggest that it might.


Here is the fun of DIY... B^>


Rgds


Damon

« Last Edit: June 28, 2007, 01:38:29 PM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

rossw

  • Hero Member
  • *****
  • Posts: 834
  • Country: au
Re: Auto laptop 12V/mains switchover design
« Reply #6 on: June 28, 2007, 04:26:22 PM »
If you're aiming for maximum efficiency, lose the relays. I think you'll find most of the mains rated ones will take a surprising amount of current for the coil.


Given (as others have said), I think you will need some hysteresis and in all probability at least a comparator for the "mains switch", I would use a solid-state relay to switch the mains side, as its "coil" will only require 1-2mA


The DC switching for your up-converter, using two relays seems unnecessarily wasteful too. You could do away with one relay for a start, by using one pole (as indicated by others) only, leave the (say) ground side connected on input and output and switch + through the relay contacts.


Check your up-converter - some (but not all) draw negligable current when they have no output load. If yours is one of them, you can probably leave the input connected permanently.


Again, not universal, but some supplies have internal output isolation so applying power to the OUTPUT doesn't actually draw any power or cause any harm. IF your supplies (both the PC supply, and the 12->20V converter) come into this category, you can dump the output switching relay entirely and just hard-wire the outputs in parallel


The other option might be to use FETs to switch your DC side. At the fairly modest currents you are indicating, the FETs will have very low resistance and waste very little power. Downside is that their "very little waste" will be for the whole time the system is running on DC.... so do your maths carefully - if the system will be running on mains for say 0.1% of the time, even 0.1 watts wasted in the fets may be more than the coil would take for the 0.1% of the time it is running...

« Last Edit: June 28, 2007, 04:26:22 PM by rossw »

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #7 on: June 28, 2007, 04:34:29 PM »
Hi,


The mains relay I've selected is 140mW (ie about 12mA) to drive the coil, and the main advantage here is that when there is NO power on the DC side it switches the mains on.


A agree that if the inverter and the mains adaptor both are protected against back EMF then I could hardwire them in parallel, but they are both black boxes that I can't open and don't wish to break!


Your FETs idea is a good one; I'll certainly think about it again before actually placing the order for the relays.


Do you have any particular parts in mind or an example circuit?  I'm not sure that I have ever actually used a stand-alone power FET though I've drooled over the data books enough, sad git that I am!  B^>


Rgds


Damon

« Last Edit: June 28, 2007, 04:34:29 PM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #8 on: June 29, 2007, 04:30:06 PM »
I've knocked up a simple little comparator circuit diagram with hysteresis as you suggested...  Off at 12V and not back on again until 13V.  I'll post the scan tomorrow.


Thanks for the prompting!


Rgds


Damon

« Last Edit: June 29, 2007, 04:30:06 PM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #9 on: June 30, 2007, 02:53:25 AM »
OK, here's the improved voltage detector/comparator circuit:<p>
http://www.earth.org.uk/battery-voltage-monitor-12V-13V-thresholds-1-full.gif<p>
This should switch the laptop to mains power at 12V and back to battery at 13V.<p>
Rgds<p>
Damon
« Last Edit: January 05, 2011, 10:34:59 AM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

Nando

  • Hero Member
  • *****
  • Posts: 1058
Re: Auto laptop 12V/mains switchover design
« Reply #10 on: June 30, 2007, 07:01:47 PM »
Damon:


The DC/DC converter can be tied directly to the AC power supplied without any diodes, they are already in them.


Set up the DC/DC to put out 20.3 volts or so and the AC supply the 20 volts.


If the DC drops the AC comes in automatically, and if not AC the DC takes over until cut-off time.


The trick is the 0.3 volts difference to do the switching.


No relays not special switching just ON-OFF switches


Nando

« Last Edit: June 30, 2007, 07:01:47 PM by Nando »

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #11 on: July 01, 2007, 03:40:33 AM »
Hi Nando,


Thanks for the comments!


How can I be sure that I won't damage the power supplies by directly wiring the DC outputs together?  I don't want to make smoke signals!


And note that I have this special feature that I don't want to draw any mains power at all while battery power is available, so I do need the 240V relay.


Rgds


Damon

« Last Edit: July 01, 2007, 03:40:33 AM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

Nando

  • Hero Member
  • *****
  • Posts: 1058
Re: Auto laptop 12V/mains switchover design
« Reply #12 on: July 01, 2007, 07:07:31 PM »
Normally the supplies put out the voltage via diodes and a storage capacitor.


The DC/DC or the AC switching power converter if above its reference stop producing energy and in this case the DC/DC is the master and the AC is the slave,


The slave as a PWM supply will stop producing energy and goes dormant with a few milliwatts of power.


We have several PC connected this way for many years, in a close set up almost like yours.


Nando

« Last Edit: July 01, 2007, 07:07:31 PM by Nando »

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #13 on: July 01, 2007, 11:15:02 PM »
Well, I'm simplifying my design an dropping one of the relays, thanks!  I'll post a link to the updated design sometime today, I hope.


Rgds


Damon

« Last Edit: July 01, 2007, 11:15:02 PM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #14 on: July 02, 2007, 05:49:13 AM »
Updated and sort-of-simplified design:


http://www.earth.org.uk/laptop-12V-mains-fallback-schema-2-full.gif


Also available as XCircuit PostScript file:


http://www.earth.org.uk/laptop-12V-mains-fallback-schema-2.ps


Note that I still don't want to risk yoking the supply outputs together completely, and I want to draw no mains power when there is battery, and essentially no battery current (microamps at most) when running off mains.


Thanks for all the suggestions: I'll let you know how it pans out...


Rgds


Damon

« Last Edit: July 02, 2007, 05:49:13 AM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

rippersoftware

  • Newbie
  • *
  • Posts: 19
Re: Auto laptop 12V/mains switchover design
« Reply #15 on: July 02, 2007, 11:15:12 AM »
Here is a design I found that is PIC based and senses that your battery voltage is below a set level and switches on a solid state relay, then switches it off when the voltage of the batteries has reached the upper level.  The solid state relay controls AC mains to your battery charger.


http://www.yourgreendream.com/diy_gp_bat_charger.php


Includes schematics and PIC code.

« Last Edit: July 02, 2007, 11:15:12 AM by rippersoftware »

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #16 on: July 02, 2007, 11:17:54 AM »
Can't get to it at the moment to check it out, but thanks, good to have something to check against...


Rgds


Damon

« Last Edit: July 02, 2007, 11:17:54 AM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #17 on: July 08, 2007, 12:19:43 PM »
Hi,


Well I have the laptop and it's running at well under 30W (from mains).


I have the remaining hardware to make up this switchover unit on order and should be delivered tomorrow, including the DC/DC converter.


And I got a new solar panel (62W) powerful enough to power the laptop at least while the sun is out for experimental purposes: I'll need a bigger battery and some more power (solar or wind) to be able to run it full-time even at this time of the year.


Rgds


Damon

« Last Edit: July 08, 2007, 12:19:43 PM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #18 on: July 11, 2007, 01:13:30 PM »
Whoops!


OK, I'm getting my act together slowly, and I can run the laptop via the DC/DC converter and it draws ~21W from the 12V battery, nice!


Problem is, the start-up current of the converter is so high that it immediately triggers the load short-circuit protection on the solar controller.  So I can't just treat it as a normal load from the controller.


Therefore I'm going to have to modify my circuit be its own low-voltage drop-out with power drawn direct from the battery, and I think I'll have to use FETs as you suggest.


Can I simply put a P-channel FET in the positive line from the battery, with the gate pulled up to the battery positive voltage with a resistor, and 'let go' to cut the current to the load (and pull down with an open-collector output to allow current to the load)?  Or will that move the gate voltage too slowly and cause it to overheat?


My DC/DC converter has a peak load of 150W (though I shall never go over about 60W) and an input fuse of 15A, so allowing healthy margins all round I've picked out an Infineon SPU30P06P 30A (60V max), and would pull up its gate with something like a 10K resistor.  I'd pull it down via an open-collector 'voltage OK' output in series with an LED for a small 'current on' indicator.


I propose to set the drop-out voltage at 12V and the reconnect voltage at 12.8V to 13V for some decent hysteresis.


Does that sound sane?


Never used a bare p-channel power FET before...  Your guidance would be much appreciated.


Rgds


Damon

« Last Edit: July 11, 2007, 01:13:30 PM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #19 on: July 19, 2007, 07:35:27 AM »
I've made enough progress on this system to have been able to turn off the first of my power-hungry servers; I hope that the rest of them will be off in the next few days...


(Any help on the p-channel FET question above would still be welcome...)


Rgds


Damon

« Last Edit: July 19, 2007, 07:35:27 AM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #20 on: July 22, 2007, 04:32:03 PM »
Well, I have now turned off my old server bank for what I hope is more-or-less the last time (other than to get a few files for archiving for example).


Total saving ~640W, a lot of noise, and several degrees Celsius in my study. And a little bit of global warming!


Rgds


Damon

« Last Edit: July 22, 2007, 04:32:03 PM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #21 on: July 22, 2007, 04:41:53 PM »
Hi Nando,


The laptop mains adaptor is very good, and draws undetectably low power (I think << 2W) when it has no load.


Thus I am simplifying my design as you suggest and removing the mains transformer on the input side.


I am also connecting the OVs of the mains adaptor and 20V DC/DC converter supply together directly.


I am however still planning on switching between the mains adaptor and the DC/DC converter in the positive line with the relay.  More details when I've built and tested...


Rgds


Damon

« Last Edit: July 22, 2007, 04:41:53 PM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #22 on: August 05, 2007, 01:41:32 PM »
As reported in my diary, I just about have the off-grid power for my laptop working, and it has been going for well over an hour so far and we're at disk here.


If I've finally banished the oscillations/instability from my design then I'll draw it up nicely and post links here and/or in my diary.


Rgds


Damon

« Last Edit: August 05, 2007, 01:41:32 PM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

TomW

  • Super Hero Member Plus
  • *******
  • Posts: 5130
  • Country: us
Re: Auto laptop 12V/mains switchover design
« Reply #23 on: August 05, 2007, 02:00:08 PM »
DamonHD;


You forgot one other buzz phrase.



Carbon Footprint.


Cant be perfect all the time, I guess.


Just poking you.


Cheers.


TomW

« Last Edit: August 05, 2007, 02:00:08 PM by TomW »

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #24 on: August 05, 2007, 03:05:07 PM »
Oh Tom,


I'm sure leaving big black sooty footprints everywhere I go, but at least I have started to polish one small turd.  B^>


Rgds


Damon

« Last Edit: August 05, 2007, 03:05:07 PM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #25 on: August 08, 2007, 06:13:14 PM »
Right, here is the design as currently working.

I have taken many of your suggestions on board: thank you all!

http://www.earth.org.uk/laptop-12V-mains-fallback-schema-3-full.gif

And remember that you can check it in action at:

http://www.earth.org.uk/off-grid-stats.html

Rgds

Damon
« Last Edit: January 05, 2011, 10:36:51 AM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social

DamonHD

  • Administrator
  • Super Hero Member Plus
  • *****
  • Posts: 4125
  • Country: gb
    • Earth Notes
Re: Auto laptop 12V/mains switchover design
« Reply #26 on: August 11, 2007, 01:07:14 PM »
Diary updated with links to pictures of my handiwork!


Rgds


Damon

« Last Edit: August 11, 2007, 01:07:14 PM by DamonHD »
Podcast: https://www.earth.org.uk/SECTION_podcast.html

@DamonHD@mastodon.social