Renewable Energy Questions/Discussion > Solar (heating or electric)

Solar to electric Water heating.

<< < (5/5)

DJ:

--- Quote from: eidolon on February 10, 2017, 03:01:38 pm ---I PWM my water heaters directly off the PV array.

--- End quote ---

Could you explain how you do that?

I saw a program for an arduino to do that but unfortunately the Wizzard that put it up expect people to be able to figure out the circuit and components for themselves which I am not anywhere near up to doing. I have a bunch of arduinos I bought but a little disillusioned.  I can't find the sort of circuits and programs I want.  I know I need to spend more time learning them which I intend to do but right now trying to pack up house and find new digs takes priority. I do have time to cobble the bits and pieces together as I have but to concentrate on learning something new is going to take a better and more relaxed state of Mind.  :0)

I will try and get the circuit below working.  At the present time I have a token battery system and would like to kick the power into the UPS at night or when the batterys get low instead of having to plug the ups in and out all the time.
This simple circuit looks like it would do the trick nicely.

I take it I would reverse the Commands?  IF > 28   SSR =0
                                                               <26    SSR=1

If you had the program and Pin out for the board I'd be very much interested to see it.

eidolon:
You are in the land of 240V. In the US they have small office type water heaters that provide water for just a sink.  These use 120V heater elements and 2,000W elements are available and cheap. Your heating elements will require a much higher array voltage than is common.   In doing PWM, a capacitor stores energy and releases at a later time. Say an array can supply 5A and the PWM duty cycle is 50%.  When the FET turns on there is 5A from the array and an extra 5A from the capacitor.  Just connecting a fixed resistor to the array would greatly drag down the voltage.  By pulsing it it can be supplied with full voltage and current.  Controlling the duty cycle keeps the panel at the optimum voltage.

How much voltage can your PV array supply?  With 240V heaters, dropping the supply voltage to half that (120V) reduced the power to 1/4. dropping it to 60V would be 1/16.  That makes standard heaters pretty useless.

Using an inverter like you do solves some of that issue. It takes a battery to stabilize it.  As said before, batteries long term will not like it if they can not be charged to well over 14V periodically.  If the charge controller can supply enough current, you can keep it at close to 29V just like a bulk charge in a car. Not ideal, but you can get 5 years out of it. The program I suggested waits till voltage is high enough and then looks every 5 seconds to see if it has dropped too much, a slow PWM.

I'm traveling right now but in a few days I will write the program and list it here.  Then we can work on building it.

DJ:

Excellent, Thank you!

eidolon:
Here is the working program.  Load it into a sketch and rename it before saving.  If it does not compile too much or too little was copied.  The  program checks the battery every 5.5 seconds. Shorting pin 12 to ground speeds up the read to calibrate voltage divider every .5 seconds.  Try to use a resistor to the the battery 47K or higher to prevent possible possible to the micro from over voltage. Use a 2K to 5K pot to adjust voltage. This is a convenient site to calculate voltage dividers.

http://www.raltron.com/cust/tools/voltage_divider.asp

  For  Vin 28V input, R1 = 47k add 2.5K for a 5K pot, so 49.5K for the calculator value.  V out is 3.3V, chosen because it is also available on board for testing.  Using the calculator R2 is 4.71K.  Subtracting 2.5K for the pot gives 2.2K for the lower resistor.
V out is 3.3V, chosen because it is also available on board for testing.  Using the calculator R2 is 4.71K.  Subtracting 2.5K for the pot gives 2.2K for the lower resistor.  Just measure a known voltage and adjust the pot till the screen in tools measures that voltage.

The programming is very basic, but using this as a boiler plate other functions can be added.  Clicking on TOOLS, select the correct board.  Selecting serial monitor will allow you to see the data coming out of the board.



// SIMP_DIVERT_24 for Heater
// relay out PIN #10
// This is a simple SSR driver that turns on at
// at a fixed voltage and off at a lower
// Samples four times and adds those values together.
// This number is in tens of mv.
// Data is sent out serially to allow calibration
// every half second due to delay.
// Typical operating voltage gives an A/D count of about 750
// Divider values to create 3.3V
// Normal delay is 5 seconds. grounding pin 12 makes that faster.
// LED lights once per loop and when relay on.
// created 02/14/17

int battery   = 0;      // calculated  voltage in mv
int SSR       = 0;      // relay output


void setup() 
{
 Serial.begin(9600);    // setup serial port speed for data in TOOLS
 pinMode(13, OUTPUT);   // sets the digital LED pin 13 as output, onboard LED
 pinMode(10, OUTPUT);   // SSR relay out
 pinMode(12, INPUT);    // ground for 1 second loop
 digitalWrite(12,1);    // enable internal pullup (early version compatable)
}

void loop() 
{                                   // this is the start of the program
 
// turn LED pin 13 ON for once per loop blink
digitalWrite(13,1);                 // blink while reading data

// A resistive voltage divider produces about 3V3 from battery
// READ ANALOG VALUE FOUR TIMES AND ADD TOGETHER
// A/D values go from 0 to 1023

battery = analogRead(2);            // get first sample
delay(20);                          // delay for 20ms
battery = battery + analogRead(2);  // get second sample
delay(20);                          // delay for 20ms
battery = battery + analogRead(2);  // get third sample
delay(20);                          // delay for 20ms
battery = battery + analogRead(2);  // get fourth sample

// turn LED pin 13 OFF 
digitalWrite(13,0);                 // turn off blink after 60ms
 
// determine battery state
if (battery > 2900)                 // is voltage high enough?
  {
    SSR = 1;                        // turn relay ON
    digitalWrite(13,1);             // turn LED ON
  }
 
if (battery < 2800)                 // has it dropped too low?
  {
    SSR = 0;                        // turn relay OFF
    digitalWrite(13,0);             // turn LED OFF
  }
 
// output state to pin 10 
digitalWrite(10,SSR); 

//print out battery data in TOOLS
Serial.print((float)battery / 100);    // battery voltage 2 decimal places           
Serial.print("V battery   ");               
Serial.print(SSR);                     // relay state           
Serial.println(" relay  ");            // go to next line

delay (500);                           //  delay for printing every half second

// ROUTINE FOR DETERMINING LOOP TIME
// look at pin 12, is is shorted to gnd?   
if (digitalRead(12) == 1) delay (5000); // if not delay another 5 seconds
 
 }                                      // end of program

Navigation

[0] Message Index

[*] Previous page

Go to full version