Altenergy

Greetings to all visitors around the world! Here is this month's cumulative statistic for where you come from. 2,001 United States 143 Canada 121 United Kingdom 69 Australia 53 Germany 38 Indonesia 37 Portugal 30 Italy 25 South Africa 23 India 21 France 21 Brazil 20 Slovakia 18 Turkey 18 Philippines 18 Netherlands 16 Sweden 15 Pakistan 14 Poland 13 Hungary 13 Spain 11 Israel 10 China 9 Singapore 9 Belgium 9 Argentina 8 Taiwan 8 New Zealand 8 Nigeria 8 Jordan 8 Ireland 7 Ukraine 7 Denmark 7 Chile 7 Bulgaria 6 Lithuania 6 Croatia 6 Costa Rica 5 Thailand 5 Romania 5 Greece 5 Dominican Republic 4 Puerto Rico 4 Namibia 4 Mexico 4 Latvia 4 Korea 4 Hong Kong 4 Czech Republic 4 Satellite Provider 3 Saudi Arabia 3 Norway 3 Malaysia 3 Sri Lanka 3 Finland 3 Switzerland 3 Bangladesh 3 Azerbaijan 2 Tunisia 2 Senegal 2 Russian Federation 2 Panama 2 Northern Mariana Islands 2 Moldova 2 Lebanon 2 Jamaica 2 Iran 2 Faroe Islands 2 Egypt 2 Barbados 2 Aruba 2 Austria 2 Antigua and Barbuda 1 Vietnam 1 Venezuela 1 Uganda 1 Trinidad and Tobago 1 Slovenia 1 Serbia 1 Paraguay 1 Mozambique 1 Mauritius 1 Macedonia 1 Japan 1 Iraq 1 Haiti 1 Guatemala 1 Estonia 1 Cyprus 1 Cote D'Ivoire 1 Anonymous Proxy. Scroll down to visit Altenergyweb.com

Grid Powered Charger

posted Sunday, 12 February 2006
A Switch to Connect a Renewable Energy Battery Bank
 
to a Grid Powered Battery Charger

Tom Woods

You get a really good feeling when you plug in some lights and appliances and power them with your own electricity from the sun or wind. You get a really bad feeling when you run those items and the clouds come for days or weeks or months on end. The batteries get lower and lower. Capitulation comes when you have to unplug those appliances and hook them back up to the public utility power. This circuit lets you keep the appliances plugged into your inverter. It won't make the wind blow or the clouds go away, but it will keep your batteries safely charged even if you have a generation shortfall. I call it the Grid Charger Voltage Switch.

The circuit utilizes a PIC microcontroller to monitor battery voltage and control a solid state relay, turning it ON for a time period when battery voltage falls below an adjustable low voltage setpoint and OFF if it exceeds an adjustable high voltage setpoint.

PIC 16F676 Microcontroller Grid Charger Voltage Switch Schematic Diagram




The circuit is extremely useful in alternative energy applications such as wind or solar, which experience long periods of calm or clouds when no power is generated to feed the battery array. The switch works in tandem with your charge controller. You charge your batteries using your wind or solar generation capacity just like you always do, but if the batteries get low because your wind or solar stops, this device will automatically turn on a grid powered battery charger to protect the batteries from chronic undercharging. It will permit you to run continual loads even when the sun doesn't shine or the wind doesn't blow.

I like to think of this switch as creating a sort of reverse grid-tie arrangement. The alternative energy system is connected to the grid, but instead of sending excess power out onto the grid, this arrangement uses grid power when it is needed to meet electric demand and keep the batteries charged when conditions are not good for energy production. Unlike a true grid-tie, this system will not make your electric meter run backwards, but you don't need the expensive equipment and your electric power will not stop when the public utility grid goes down. To see how this switch would fit into a typical solar electric system, click here .

Construction (Please Note: Revised March 4, 2006)
Build the circuit on a breadboard, PIC prototype board, or printed circuit board. You will also need to program the PIC 16F676 chip with the program downloaded from the link to the left. If you purchase a circuit board or kit below, you will find more detailed assembly instructions in the assembly guide link at left. The parts list gives all necessary components. You will need to size the battery charger according to the size of your battery bank. Likewise, the solid state relay must be able to handle the current draw of the charger you select. Minimum control voltage of the relay is 3vdc. Connect the relay in series with the hot leg of a 120vac line such that when the relay is turned ON, a connection is made between a 120 volt wall outlet and your battery charger. Connect wires between the battery inputs on the board and the battery bank's positive and negative and negative terminals.


PIC 16F676 Software
Programming your own PIC chips requires additional equipment and skills. If you  just want to get operating, I suggest you purchase a preprogrammed chip. Kits and ordering information is found below. For the adventurous pic programmers, a DOWNLOADS bookmark on the left side of the Altenergy web log will give you access to the Grid Charger Hex file and/or asm file. Click on the links to load the files directly into your browser. Use the SAVE AS function in your FILE menu to save these files to their destination in your computer. These files contain the programming instructions for the PIC 16F676 microcontroller chip. The hex file is ready to be loaded into a PIC programmer. The asm file is intended for programmers who wish to modify the program or understand how it works. Configuration bits are shown below.

PIC 16F676 Configuration Bits       
Oscillator:             LP
Watchdog Timer:         Disabled
Power-up Timer:         Disabled
Brown-out Reset:        Disabled
MCLR Pin Function:      Reset
Code:                   Not protected
Data EEPROM:            Not Protected




Grid-Charger Voltage Switch Materials

Switches
PB1           1        reset switch (momentary, normally open)
SW1,SW2       1        ON time select switches or jumpers    

Capacitors
C1            1        .1uf    electrolytic    
C2            1        10uf    electrolytic capacitors    
C3, C4        2        18pf    ceramic capacitors

Resistors
R1            1        2k    1/4 watt resistor    
R2, R5, R6    3        10k    1/2 watt resistor    
R3, R4        2        50k    10 turn potentiometer    
R7            1        100k    1/4 watt resistor

Semiconductors
LED1          1        LED    5mm T1
U1            1        78L05    5v 3 terminal voltage regulator
U2            1        PIC 16F676

Miscellaneous
XT1           1        32.768khz crystal    
DIP14         1        14 pin DIP socket
              1        Printed Circuit Board or breadboard
              1        120vac Solid State Relay
              1        120vac Battery Charger


Precautions
Be careful not to accidentally reverse the polarity of the 12 volt dc supply, or you will destroy the 78L05 voltage regulator. When connecting the LED, the flattened side should face away from pin 9 of the PIC. Observe caution and electrical codes when working with 120vac. Protect the PIC from static discharges.

Adjustments
After building the circuit you need to adjust the low and high voltage setpoints. You will need a voltmeter and an adjustable power supply capable of delivering from 10 to 15 vdc. Follow these steps:

1. To begin, turn the low voltage adjust pot, R3, fully counterclockwise.
2. Turn the overvoltage adjust pot, R4, fully clockwise.
3. Adjust the power supply to the maximum acceptable voltage for your battery bank. I chose 14.95 volts for my minimum battery voltage. This is just below the over voltage cut-off of my inverter.
4. Connect the power to the board. Be very careful not to accidentally reverse the polarity of the supply. At this point, the LED should blink ON, then OFF.
Troubleshooting… If the LED does not turn ON when power is supplied, press the reset button to see if that turns it on. If it still does not blink, there is something wrong with your assembly and you will need to troubleshoot the cause. Inspect it closely with a magnifying glass for bad solder joints. Check if the PIC or LED is placed backwards or if pins are not properly seated. Test the supply voltage between pins 1 and 14 on the PIC to insure it is 5v. If you did not use the supplied printed circuit board,  double-check all your connections against the schematic.

5. Turn R3 clockwise until voltage at pin 8 of the 16F676 measures 2.5 volts.
6. Adjust the power supply to the minimum acceptable voltage for the battery bank. I chose 11.95 volts in my system.
7. Turn R4 counter clockwise until the LED turns ON. If you overshoot, back off 1/2 turn on R4 and press the reset button to turn off the LED. Then slowly turn R4 counter clockwise until the LED turns ON.

The switch is now set to turn ON at the low voltage setting and run for a period determined by the two jumpers, from 1 to 4 hours.  If the battery voltage exceeds the high voltage setting, the unit will shut off. The reset button toggles the relay ON and OFF, and the LED will blink to indicate the number of times the unit turned on since the last reset. To adjust the length of time the switch stays ON, change the jumpers on the board:
                                                                         SW1   SW2   Duration
                                                                            y         y         1 hour
                                                                            n         y        2 hours
                                                                            y         n        3 hours
                                                                            n         n       4 hours

Connections
Once the adjustments are made you can connect the Grid Charger Voltage Switch to your system. Use small gauge wires to connect your battery bank to the battery terminals shown in the schematic. Use similar size wire to connect between the solid state relay control terminals and the pads labeled "relay" in the schematic. Make a power cable using #12 or #14 wire. Connect the hot (black) wire of this cord in line with the 120vac connections on the relay. Put a plug on one end of the cable and a receptacle on the other end. The relay, thus, becomes a switch allowing household current to pass or not, depending on the state of the relay. Plug the cable into a wall outlet. The other end will receive the chord for the battery charger. The photos below suggest one possible way you might choose to make the connections.

A Plug for a Really Good Battery Charger
My battery system consists of 10 12 volt batteries , 125 AmpHrs each. I chose the DLS55 charger made by Iota Engineering
These are excellent chargers, not the cheapest you'll find on the market, but they deliver precisely controlled current to your batteries. Mine has run flawlessly since I got it.

  A finished assembly might look like this. Here, you see the orange power cord that plugs into a wall outlet. Harder to see, but coming out with the orange cord are two 18 awg cables that will go to the battery bank terminals. The outlet on the front of the box is the receptacle for the battery charger The red switch is the reset button and the white wall switch is an optional SPST switch  to disconnect the battery power from the circuit board.


The metal box houses the circuit board, left, and solid state relay, right. Fastened to the cover plate are the switches and receptacle.
This is the grid charger voltage switch circuit built on a printed circuit board (available below).

Modify the Circuit to Monitor an External Voltage Source
Refer to the photo of the Grid Charger Voltage Switch circuit board below:


The circuit is designed to monitor the battery voltage normally. You can easily change this to make the circuit read other dc voltage sources such as resistance networks that convert temperature, pressure, ambient light and other passive sensor output into an analog voltages. To do this, locate the trace on the left side of the board that runs up from the component labeled C1. Note the "X" printed over the trace about midway up. Use a sharp utility knife to cut through the trace at this point. You want to cut through the green solder mask and the copper trace underneath to break the connection. Now solder leads from the points on the right side of the board labeled "A" and "B."

"B" is the negative or ground connection of the external voltage source you wish to monitor. "A" is the positive connection. A few precautions are in order. The PIC chip is not designed to read any voltage greater than its supply voltage, which is +5 volts. You can adjust R3 to trim the voltage. Before connecting the voltage source, turn R3 fully clockwise. After you have connected the external voltage source, turn R3 counter clockwise while measuring the voltage at pin 8 of the PIC. You will want to adjust the voltage to measure approximately 2.5 volts at pin 8 when the external source is at its highest voltage.

Modifications for Operation with 24 Volt Battery Systems (Added March 23, 2006)

A customer asked if the Grid Charger Voltage Switch could be calibrated to operate with 24 volt battery banks. A couple minor parts changes are all that's needed. Follow these steps:
1 Make sure the capacitors C1 and C2 can handle at least 24 volts.
2. Change R7 to 300Kohms.
3. (optional) change the voltage regulator to a MIC2950. This is a newer more efficient regulator chip. It is pin compatible with the 78L05. The MIC2950 will operate better at the higher input voltage. It has the added advantage of being virtually blowout-proof. It has built-in over current, temperature, and reverse-polarity protection. It would be a good choice (although a slightly more expensive one) even for 12 volt operation.

Follow the same adjustment procedures as for 12 volt systems. Your turn-on voltage will likely be somewhere in the neighborhood of 21.5 volts and the turn-off voltage will be about 28 volts.


Parts, Kits, Completed Units

For those who wish to purchase components parts kits, or completed units, the following are available.

Grid Charger Voltage Switch
printed circuit board, solder masked, plated through holes for easy soldering                            
Grid Charger Voltage Switch BARE BOARD (see photo above) solder masked, plated through holes for easy soldering. For delivery within the US. $12.00
Bare Board as above, but includes airmail postage for international delivery $16.50
 
 
Board and all parts except the solid state relay and battery charger. FOR 12 VOLT SYSTEMS. For delivery within the US.  $30.00
Board and 12v parts kit as above. Includes airmail postage for international delivery. $34.50
 
 
Board and parts FOR 24 VOLT SYSTEMS For delivery within the US. $35.00
Board and 24v parts kit as above. Includes airmail postage for international delivery. $39.50
 
 
Preprogrammed PIC 16F676 chip $11.00 Price includes domestic and international postage
 
 
 
Complete switch, assembled and tested.  Does not include relay or charger.  Please specify desired battery voltage, turn-on and turn-off voltages. For delivery to the US. $65.00 (photo is seen below)
Fully assembled and tested as above. Includes airmail postage for international delivery $69.50.
 

Shipping is free in the US. Please pay $4.50 postage international. Please email me and request a Paypal invoice, or send a check or money order to

Tom Woods
P.O. Box 64
Jefferson, NH 03583 USA

tags:                

links: digg this    del.icio.us    technorati    reddit




1. Jason left...
Monday, 6 March 2006 6:56 am

A couple of questions for you. First if ones battery voltage drops below our set threshold then the unit will allow a charger to charge the batteries from grid supply but because most chargers are not capable of supplying the current needed to run ones inverter then the house itself is now without power? Do you suppose then that the relay that connects grid power to ones battery bank be used to switch the house breakers from grid to inverter? Finally could not this whole operation be done with a single relay where in the coil in energized from the inverter? Most inverters have a low voltage shutdown so when the inverter senses a low DC voltage it shuts down and power that was normally routed from our inverter to our house breaker via the NO contact would switch to the NC position connected to grid voltage. If one desired they could then charge the battery bank from the grid source. Looking forward to your reply Regards Jason


2. Tom Woods left...
Monday, 6 March 2006 11:05 am

Jason, you pose some interesting thoughts. If you use a small charger, you would need to be careful about your load. In my setup, my Iota charger is capable of running my load and charging the batteries. The load consists of refrigerator, blowers and ignition for two gas heaters, the same for a gas water heater, and two lights in my living room.

The objective of the grid switch is to top off the batteries as they become low and there is insufficient current from wind or solar to charge them. Your proposal of using the relay to switch from inverter power to grid power would work, however you would need more than a SPST relay and that could affect cost. If you were to try to simplify the circuit down to a single relay triggered by the inverter's under voltage threshold, I think you would run into troubles because there is nothing to switch the relay back to inverter power after it has switched to grid. The inverters I've seen (admittedly, I've only seen the inexpensive ones) require the user to press a reset switch to get them running again once the under voltage shutdown occurred. In the context of your proposal, the grid switch accomplishes three things. It makes the inverter's under voltage cut-off completely automatic; it switches the power source rather than shut it down, and it gives you some flexibility as to the threshold voltage rather than force you to live with 10 volts, which I think might be rather low. Thanks for your comments. --Tom


3. Tom Woods left...
Tuesday, 7 March 2006 1:04 am

After thinking about Jason's question some more, I want to give my thoughts about choosing the right size battery charger to work with the grid backup switch. Please understand that you will only be able to continuously draw whatever the stated capacity of the charger is. You do have ability to handle larger intermittent peak loads because the batteries can give the extra juice when you need it. A small charger will take longer to charge your batteries.

Perhaps a rule of thumb to use when deciding on the right equipment is to choose a charger with a capacity as close to the maximum output of your solar or wind generating equipment as your pocketbook will allow. This will insure rapid charging and the ability to maintain the normal loads you place on your inverter. --Tom


4. Cameron left...
Tuesday, 21 March 2006 7:33 am :: http://www.artfv.com/education/language_

do you have a 240v version of this kit? in new zealand and australia the grid is 240 volt.


5. Tom Woods left...
Tuesday, 21 March 2006 10:18 am

Hi Cameron, It does not matter what the voltage of your local grid may be. The grid charger voltage switch will run ok. All you need is a solid state relay that is capable of operating at your local grid voltage. Since the switch uses a TTL level signal to operate the solid state relay, make sure that whatever relay you choose has a dc control voltage of 3-5 volts. Many relays have a 3-32 vdc range and thse are just fine for the grid charger voltage switch.


6. lfrey left...
Sunday, 14 May 2006 8:49 am

Is there a set-up for 48 volt systems. I'm using 8 Rolls 6V batterys on my system here in Bayfield, Colorado. Thanks for any help. Also not grid tied only generator back-up! Larry Frey


7. Tom Woods left...
Sunday, 14 May 2006 10:52 am

Larry, there is no 48v system available at this time. If you send me an email with some information about your system, I might be able to make some modifications to the switch so it would work for you. Do you use an inverter? What voltage feeds it? What is your generator's charge voltage? What kind of charge controller do you use? --tom


8. mr_onmyway left...
Thursday, 20 July 2006 11:11 am

are there any issues with connecting this in conjunction with the a solar charger? for example a trace C40 is tied to solar panels and does the charging of a bank of batteries If I read the description correctly using the kit would then hook up a second charger to the same battery bank. So the potential exhists that there could be 2 chargers charging the bank at the same time? --chris


9. Tom Woods left...
Thursday, 20 July 2006 8:05 pm

Chris, Your understanding is correct. The grid charger switch is designed to control a second grid powered charger that runs in conjunction with a solar charge controller such as your C40. It's ok to run two chargers on the battery bank at the same time. Each charger sees the other as if it were the battery bank itself. Thus the chargers reduce their charging current somewhat until the batteries are fully charged. The grid charger switch will turn on for a preset amount of time and then turn off The charger that is connected to it will handle the control of the charge current.

In practice, the grid charger switch will only turn on when the batteries become low due to a constant load, but no sun due to poor weather. If you use a large enough charger to handle your load (the Iota 55 amp charger I use has been terrific for me), it will make your system brown-out proof. Your batteries will never go low even during extended periods of cloudy weather, you will be able to keep your normal loads connected, and your solar panels will provide power when the sun is available. It's really the best of all worlds. --tom


10. James left...
Wednesday, 27 September 2006 5:54 pm

Hi. I’m interested in buying the battery charger part of your device. The one on your site that cost $12 bucks, is that the charger? The one that comes in the metal box? I want to try to build the circuit on my own but I just don't know if I can build the battery charger, so I just want it ready so all I have to do is tie them together. Please let me know, and also I want to get the preprogrammed PIC. Another question, How do I do the paypal invoice?


11. Tom Woods left...
Wednesday, 27 September 2006 7:02 pm :: http://altenergy.blog-city.com/

Hi. Just to make it clear, this is not a charger. It is a switch to turn a charger off and on automatically. The bare printed circuit board is what costs $12. You can buy the board with components, including the preprogrammed PIC chip (you assemble it!) for $30. Or you can buy the unit assembled and tested for $60. To the completed unit you would need to also supply a battery charger, an enclosure, a properly sized solid state relay, and connecting wires. To use paypal, you need to set up a paypal account. You will receive info on setting up an account if you ask me to send you a paypal invoice. If you choose not to use paypal, that's ok. You can just do it the old fashoned way and mail me a check. Thanks, Tom


12. James left...
Friday, 29 September 2006 2:31 pm

Can you please Post your contact information like a phone number where we can call you.


13. Tom Woods left...
Friday, 29 September 2006 10:42 pm :: http://altenergy.blog-city.com/

I hope you won't mind, but I'd prefer that contacts be kept to emails. I sell stuff, but it's not really a business. It's more of a hobby. And I'm out at work all day anyway. Thanks, Tom