• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1] 2
Author Topic: A Kick-Butt Replacement Power Supply  (Read 9639 times)
mookiedog
Newbie
*

Karma: 5
Posts: 25


View Profile
« on: March 20, 2011, 02:51:42 PM »

I decided to replace my SheevaPlug power supply before it did something bad.  In the process, I decided to make some improvements.  In particular, I wanted a kick-butt battery backup.  The power can be kind of spotty in the winter months where I live, so I wanted something that I just don't have to worry about.  What I did was combine a cheap AC adaptor from eBay with a 35 AmpHour battery through a pair of "perfect diodes".  The AC adapter output voltage (19 VDC) was chosen to supply all the power if AC was present, even if the battery was being charged (~14VDC).  When the AC goes away, the battery naturally takes over the load.  The battery is sized so that the system can run continuously for nearly 3 days at full load.  Try that with one of those cheap battery backup boxes!

The combined output of the AC adapter and the battery feed into a DC-DC converter.  The converter takes anything from approx 10 VDC to 24 VDC and puts out 5VDC.  The wide input tolerance for the DC-DC converter takes care of all the changes in input voltage as AC comes and goes, and as the battery discharges.

I feed the 5V output of the DC-DC converter to the sheevaplug, the USB hub, and my USB hard drive.  The converter is good for something like 15 Watts, so it easily handles all of that.

The overall system works great.  We had a power failure last night (big rain, big winds), and the Sheevaplug didn't even notice. 

I am thinking that a couple of possible enhancements would be:
  • Add another diode input (not necessarily a perfect diode, but maybe just a Schottky) for use as a solar input.  A solar panel of the right output voltage would supply the power when the sun shines, and the AC adaptor would take over otherwise.
  • Add another DC-DC converter to give me 12VDC as well as 5VDC.  That would let me power up my network devices (router, access point, DSL modem) so I could have internet during a power failure.

Anything else you can think of?  Let me know.  I sort of feel like adding an Arduino to it as well, just so that the Arduino can track what is going on to the power inputs and make it available to the Sheevaplug.

For a more complete write-up, see:

http://www.randomexploits.com/projects/sheevaplug/power-supply.htm
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #1 on: March 20, 2011, 04:22:12 PM »

not going to help much here but just wanted to say..

Grrrr...why is it that some people always managed to make me feel inadequate Cheesy

This kind of project is exactly what I would love to do with my Guruplug.

I shall be following your blog and this thread
Logged

mookiedog
Newbie
*

Karma: 5
Posts: 25


View Profile
« Reply #2 on: April 17, 2011, 06:42:07 PM »

I just sent out the new V2.0 version to fab.  The improvements:

  • Added a dedicated input for a solar panel to feed the DC-DC converters
  • Adds a +12V output to provide backup power to a network router, switch, and DSL modem
  • Added an Arduino CPU for local intellegence; it connects to Sheevaplug via USB
  • 4-line LCD display connected to the Arduino
  • Ability for the Arduino to measure the voltage on all 3 power inputs plus the input to the DC-DC converter.  That's what the LCD is for, or the Arduino can report the voltages to the SheevaPlug)
  • Ability of the Sheevaplug/Arduino to switch the AC mains input on/off and force the system to run off battery/solar
  • Hmmm.  The sheevaplug could send messages to the Arduino to be displayed on the LCD, too.  That might be handy...
Anyway, the parts are ordered.  With luck, it should be up 2-3 weekends from now...
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #3 on: April 17, 2011, 06:55:32 PM »

When you say you send it to fab. DO you mean that you use an company to create the PCB?

Do you have recommendation? what is the cost for that card ?

I am connecting so many things to my guruplug that it might be usefull to start thinking about a better power

Logged

mookiedog
Newbie
*

Karma: 5
Posts: 25


View Profile
« Reply #4 on: April 17, 2011, 09:02:24 PM »

Making PC boards is easy these days.  I use Cadsoft Eagle to design the circuit schematic, and then to lay out the actual circuit board itself.  Eagle works really well, and they even have a free version.  When you are done with the design, you double check it with a program like Viewmate, and then you send the appropriate files electronically to a PCB fab house.  Depending on the fabricator, they Fedex you back circuit boards 1-5 days later.  Totally awesome -- there is no excuse anymore for doing an electronic project any other way.

I use Alberta Printed Circuits www.apcircuits.com.  They are cheap, fast and seem to produce really high-quality boards.

For really small quantities (like this new board: I only made 2 for testing until I know the design is good), it ends up around $60 per board, including fedex charges.  If you make more, the price goes down pretty fast.
Logged

mookiedog
Newbie
*

Karma: 5
Posts: 25


View Profile
« Reply #5 on: April 28, 2011, 09:18:03 PM »

Latest update: the new boards are back, mostly built up, and seem to work fine.  Here is a picture:


The most obvious feature is the LCD display.  It tells me the voltage of the various power inputs, as well as the voltage that is going to the DC-DC converters.  The DC-DC converter always takes its power from the highest voltage input source, so it is easy to tell which input is supplying the power.

I still have to write some software for the SheevaPower CPU.  I want the SheevaPower board to be able to respond to queries from the SheevaPlug over the USB connection so that the SheevaPlug can find out where it's power is coming from.  From that, the SheevaPlug can decide if there is a power failure in progress or not, or if the sun is out, or other things like that.

More details at: http://www.randomexploits.com/projects/sheevaplug/power-supply-v2.htm
Logged

mookiedog
Newbie
*

Karma: 5
Posts: 25


View Profile
« Reply #6 on: June 06, 2011, 10:39:31 PM »

The new power supply is working down under the house.  Software written (http://www.randomexploits.com/projects/sheevaplug/power-supply-v2-page2.htm), parts mounted on plywood and screwed to the wall. 

The next step is to get the Sheevaplug to serve a webpage that replicates the info on the LCD, and lets me control something.  Not sure what yet, but something needs to be controlled, I'm sure. 

Here is a pic of the new unit in action:


The full story is here:
http://www.randomexploits.com/projects/sheevaplug/power-supply-v2-page1.htm
Logged

mookiedog
Newbie
*

Karma: 5
Posts: 25


View Profile
« Reply #7 on: June 11, 2011, 10:48:27 PM »

Victory!

The SheevaPlug power supply interface is now web-enabled, courtesy of the SheevaPlug itself:

http://mookiedog.dyndns.org/power.php

The webpage is served by the SheevaPlug.

I also figured out how to do CGI scripts so that webpage forms can be used to issue commands to the power supply through the SheevaPlug.  At the moment, the only thing I have hooked up is the ability to turn an LED on or off (and a beautiful emerald green one, at that), but even that simple thing proves that I can get my Sheevaplug to control peripherals remotely via the web.
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #8 on: June 12, 2011, 07:18:34 AM »

Congratulation on your work. This is quite amazing what you have done

Did you do a cost estimate of the all project? I am really interested to have one of these board for myself Smiley
Logged

mookiedog
Newbie
*

Karma: 5
Posts: 25


View Profile
« Reply #9 on: June 12, 2011, 04:27:35 PM »

OK, I figured it out.  Short story is about $260, assuming that you had to buy absolutely every single part, quantity 1.  Also assumes you can assemble it yourself.

Details are here:  http://www.randomexploits.com/projects/sheevaplug/power-supply-v2-page5.htm

But never put a price tag on a hobby.  The whole point of a hobby is to allow you to justify spending money on whatever you feel like. Grin
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #10 on: June 12, 2011, 05:25:29 PM »

Thanks a lot for taking the time to price it all.

As you say a hobby was invented by men to avoid avoid having money in their pockets which causes damages to the pockets and eventually
upset the Mrs. So really it is for the good cause Cheesy
Logged

mookiedog
Newbie
*

Karma: 5
Posts: 25


View Profile
« Reply #11 on: July 04, 2011, 07:40:50 AM »

A holiday weekend means time for a major firmware upgrade.  The biggest new feature is virtual LCD displays. 

The virtual display mechanism implements a frame buffer for each virtual display, and the real hardware LCD serves to display the 'active' frame buffer.  It is simple, but it effectively gives me tons more LCD real estate. Pressing the front panel button button cycles through the available displays.  Right now, I have 3 virtual displays: the main one for the power supply status, another for a digital clock (all embedded projects get a clock), and one for use by the sheevaplug.  The last one is the one I have wanted for a long time.  It means that the sheevaplug can send messages that it would like to display on the LCD.  I mean, I like the headless design and all, but sometimes it's just nice to have an output mechanism.  It's trivial to add new virtual displays, so if I think of anything new it's easy to just do it.

Control of the virtual displays are also built into the command processing language.  That means that the sheevaplug can write messages to its frame buffer, but if something important happens, it can send its own display to the 'front' of the LCD.

The digital clock uses the 'big digit' firmware for readability across the room.  It implements a simple command language to allow the sheevaplug to read and set the time.

Next up is to figure out what I want the sheevaplug to display.
Logged

mookiedog
Newbie
*

Karma: 5
Posts: 25


View Profile
« Reply #12 on: July 05, 2011, 04:20:25 PM »

I wrote a simple cron script that does two things: updates the LCD display with current info about disk usage and uptime, and sets the clock.  I have the cron job run once a minute.  Setting the clock that often is overkill, but what do I care?  If the SheevaPower clock ever goes wrong (like when it switches to/from daylight savings), it will be right again within a minute.  The other argument is that the power supply processor is clocked from a ceramic resonator, not a crystal, meaning the clock is not as accurately calibrated as it might be over a long period.  Over a minute, I will never notice.

Here is the display as driven by the SheevaPlug:


The complete story is at http://www.randomexploits.com/projects/sheevaplug/power-supply-v2-page6.htm

I have a couple friends bugging me for copies of the board.  I was thinking that it might we worth swapping out the CPU for a slightly larger one with a few more IO lines.  I read about an ATMEGA32U where the USB is built-in.  That would let me dump the FT232 USB chip and simplify the board a little bit.  Maybe I'll do that some day.
Logged

ppmt
Full Member
***

Karma: 1
Posts: 129


View Profile
« Reply #13 on: July 05, 2011, 05:50:54 PM »

I would not mind being added to the list of people bugging for a copy of the board Smiley

At the moment Canadian Tire is selling a solar panel to charge battery at around $15 for 12v/1W
I guess that is enough to make sure that the battery will stay charged for when you need it Smiley
Logged

UnaClocker
Full Member
***

Karma: 0
Posts: 131



View Profile WWW
« Reply #14 on: August 21, 2011, 09:11:50 AM »

Very cool unit. As for a CPU to use, look into the "Teensy++", it's an Atmega that has native USB, mounted on a DIP40 sized PCB for easy connecting. Has oodles of IO. And it's really cheap.
I haven't read through your blog to see the fine details yet, but definitely will later. Are there enough details there to create one of these myself? I've got my Sheeva/External HDD/Cable Modem/Router all hooked to a small UPS with a large battery (well, 18ah), and I've always wanted to take the DC-AC part out of the loop, and just do a DC-DC like you've done. Do you have battery voltage feedback into the Sheeva so that you can do a controlled powerdown when the battery finally runs down?
Logged

SheevaPlug - 8gb class 4 SDHC primary drive, 4tb 3.5" media drive, Debian Wheezy, nginx, Samba, Shorewall

Pages: [1] 2
Print
Jump to: