Author Topic: Control for heating with solar off grid no batteries  (Read 26428 times)

0 Members and 1 Guest are viewing this topic.

OperaHouse

  • Hero Member
  • *****
  • Posts: 1075
  • Country: us
Re: Control for heating with solar off grid no batteries
« Reply #54 on: September 13, 2016, 10:21:14 AM »
Where are you measuring from?  You should measure from the negative side.  It sounds like you measured from the positive. That is the only way all three pins could be about the same voltage.

Just take a deep breath and go away for a while.  I was working on my system last week making some major changes.   All at once almost nothing was working right but the fridge.  I plugged in the USB and my debug screens were giving weird numbers.  I do more changes.  Suddenly I realized I had plugged in YOUR proto board an downloaded software to that system instead of mine.  Then the laptop shut off from low battery.
« Last Edit: September 13, 2016, 10:42:33 AM by OperaHouse »

OperaHouse

  • Hero Member
  • *****
  • Posts: 1075
  • Country: us
Re: Control for heating with solar off grid no batteries
« Reply #55 on: September 17, 2016, 10:45:14 AM »
Arduino: 1.6.9 (Windows 7), Board: "Arduino/Genuino Uno"

I am still using 1.0.   The Board: "Arduino/Genuino Uno" bothers me for two reasons

1. That you actually bought a real UNO.  Generally I suggest people buy three clones because you never know what is going to happen.  The opto isolator will offer some protection, but there are a lot of other ways you could torch it.  People are so creative.  If you do not have a real UNO, that may be an issue with the communications driver.

2. I don't know if that is a selection or they are sensing something on the board.  Many were using FTDI chip software driver on clones made to emulate that chip.  FTDI got pissed and wrote some software to brick the boards that didn't have a genuine chip making them useless.  With the fighting that is going on at Arduino, there may come a day when Adruino software may not work on clones.

You haven't exactly been a Chatty Cathy on this project and I don't know exactly what you have done.  I had hoped that you would have documented every step of the project here.  I know  that many times what I have said has been misinterpreted.  I know that what I consider obvious may not be that way to you.  Little things like if you are using a laptop to program or a desktop can make a difference.  There can be big issues with a desktop when the desktop makes a ground connection via the the USB cable to the system common.  You have a lot of voltage and current and it is best to start with a single string of panels and not all the array that can smoke some wires.

ontfarmer

  • Full Member
  • ***
  • Posts: 124
  • Country: ca
Re: Control for heating with solar off grid no batteries
« Reply #56 on: September 18, 2016, 09:06:49 AM »
Took your advice walked away from it  worked on other things.  The first two uno I got where
$30. apiece. Then on ebay  ordered two more for $9. each delivered in our dollar. Thought
should have spare one or two on hand. That is a lot more than you guys get them for. Guess
 should of been buying the clones.

I have Windows 7 on desktop. Should I be changing to 1.0 ?  Had the polarity wrong going to the gate. Couldn't get the uno to upload it would verify but come up with that code when uploading.

Took one of the new uno that I just got, uploaded the sketch on it that is working. There is just one string that is hooked up trying to get that working first.  Know I have misinterpreted some times.  Very grateful that you have got me this far.  I will try to do more documenting and communicating.
Here are the two different uno's




ontfarmer

  • Full Member
  • ***
  • Posts: 124
  • Country: ca
Re: Control for heating with solar off grid no batteries
« Reply #57 on: September 19, 2016, 09:21:10 AM »
Here are  some details of the wiring from the panel into the house.  I mounted a box on the frame of the panels, the wires from the panels go into the box,  there are two single pole 15 amp  150 volt dc breakers in the box.  Six panels per breaker, from the box into the house I used # 4 wire. ( already had around )  Those wires go into a junction box at where the tank with the elements are.  The capacitor bank, fet are mounted on the end of the tank.

Here are some pictures

ontfarmer

  • Full Member
  • ***
  • Posts: 124
  • Country: ca
Re: Control for heating with solar off grid no batteries
« Reply #58 on: September 19, 2016, 11:47:54 AM »
Could you help me on reply # 5  for control of pwm ?  You explained that in detail and diagram.  I got  the pot, etc  put it together but  was not successful  in getting it to work.
The diagram shows to plug into a pwm pin. I don't know which one.  The blinking light on
the uno varies with the power of sun. Hope you under stand what I am trying to describe.
The load to the element is not being controlled.
Thanks

« Last Edit: September 19, 2016, 02:20:50 PM by Bruce S »

OperaHouse

  • Hero Member
  • *****
  • Posts: 1075
  • Country: us
Re: Control for heating with solar off grid no batteries
« Reply #59 on: September 19, 2016, 12:01:07 PM »
I ordered a UNO clone.  The picture showed the ugliest board ever, but it was cheap.  What came was a board identical to a genuine UNO.  I think someone got caught making identical copies and they were unloading them using this picture.  Arduino would never think this pictured board was a threat to their business.

If the outside pins of the FET were reversed, that could destroy the gate of the FET.  A very high percentage of the time this will reflect as a short between the two outside pins. 

If the D and S were reversed the FET would likely just conduct safely and be ok.  Excess current through the internal protective diode also could damage it.

I need to jump back and look.  The drive pin is on 3  .  Generally avoid using 5 & 6 as PWM as these are 980 Hz which is getting a little fast for simple drivers.   You can always look back to the code.  Just find the analogWrite statement.  The first number following it is the pin number.

I was just writing some code for the fan posts and I had copied a prior program.  The PWM analogWrite wasn't working at all.  I stared at the simple code for the longest time before I realized I was trying to send PWM data to a digitalWrite.  I had intended to edit that line and forgot in a rush.  It is also easy to to use X=1 in a logical IF statement when you intend to use the logical format of X==1.  At least my older compiler won't catch it and your mind sees it as perfectly reasonable.
« Last Edit: September 19, 2016, 12:11:32 PM by OperaHouse »

ontfarmer

  • Full Member
  • ***
  • Posts: 124
  • Country: ca
Re: Control for heating with solar off grid no batteries
« Reply #60 on: September 26, 2016, 06:56:00 AM »
I spent quite a bit of time going over the postings trying to make sure nothing was missed.
Done some updates to the sketch reply # 16  panel = panel - panel / 2;  panel = panel +
rawdata;  deleted  * 32 multiplier,   now when serial monitor is brought up all readings are
0 ?  Must done something wrong, it  verifies and uploads.
Checked the wiring the fet are correct, does it make a difference if the capacitor bank is wired in line or just joined to the side ?  The fet are powered from pin three.
You explained the RX  TX  LED  flashing,  on mine the TX gives one flash and the LED gives multiple flashes according to power level.  The RX never flashes,  maybe this tells you something I have done wrong ?
Going back to the code pin 10 is the pin for the PWM.  I wish some of these things where
obvious to me. Do you see a problem with the desktop or 1.6.9 ?
  Thanks


OperaHouse

  • Hero Member
  • *****
  • Posts: 1075
  • Country: us
Re: Control for heating with solar off grid no batteries
« Reply #61 on: September 27, 2016, 10:25:52 AM »
It is natural for everyone to want to jump to the finish line.  Forgot to bring my glasses to the library today and I can barely see anything.  The serial data screen is the window to the program.  You should have at least a number for rawdata.  If not there is an issue with the hardware.  I suggest you add this to the serial screen;

serialPrint ("V1.0      ");                 // current version

This will indicate that the latest version of the software has actually been loaded into the UNO.  For little changes edit to V1.1, V1.2, etc and major changes V2.0, V3.0 etc.   Save those versions so there is something to go back too.

This program is a system.  The rawdata is a number from 0-1023.  If it is stuck at one end, nothing will happen.  The voltage divider should be selected so that the nominal number is between 600 and 700.  That number is doubled by the routine you quoted to a value between 1200 and 1400, this will represent a voltage  between 120 and 140V.  These are generalized values.  Whatever the voltage is on the capacitors should be the same as the readout.  Adjust the voltage divider pot  connected to the capacitor bank till you get that value.  At least get half that value for the raw data,  aprox 600 - 700.  Then you can work on the math issue.

The control loop is very simple.  If the capacitor bank voltage is less than the set value, the other pot, then the PWM number counts down.  Just the opposite happens  when the capacitor bank voltage is higher.    All these values should be in the serial data screen.

The issue I see is that there is likely more current available from the panels than can be used by the heater coils.  Even if the program is working properly it will appear to do nothing with the PWM stuck at 255 and capacitor bank voltage exceeding the set voltage.  Initially using one solar panel bank may allow the program to auto adjust.  It is ok to have more panel than heaters.  My water heating system is that way.  At peak sun periods my PWM goes to 255, fully on, and the voltage rises on the heaters.

I am getting only a pinhole view of the entire system.  The code you quote seems perfectly fine.  That may be what you think you are doing, but not the same in the actual code.  You can always copy and paste the entire program or a section.  then I can run it on my test module.

« Last Edit: September 27, 2016, 12:59:40 PM by Bruce S »

ontfarmer

  • Full Member
  • ***
  • Posts: 124
  • Country: ca
Re: Control for heating with solar off grid no batteries
« Reply #62 on: September 28, 2016, 04:56:54 AM »
 Changed the code back to analog Read, put  (panel * 32); back,  now the serial screen is printing out the number value's like it had been.  I am thinking that
there was not enough added to code or maybe I didn't delete enough for it to print ?
Here is the code.
Code: [Select]
//This is a simple pwm driver to keep solar panel voltage
// at power point and prevent short pulses. A blinking LED
// gives heating status. Outputs a PWM drive to a FET.
// This project had a boost converter that boosted 12V panel voltage to 35V
// and was then PMW into water heater element for performance data.
// 4/26/15 Opera House
// 3/3/2016 Unknown version. Found with some mistakes that were corrected
// Compiles but untested. Unknown performance. Sent 7/25/16
int pot       = 0;           // raw A/D pot vpltage
int panel     = 0;           // calculated panel voltage in mv
int setpoint  = 1092;         // power point raw data count, set for power point
int blinktime = 0;           // blink loop counter
int PWMcount  = 0;           // PWM counter value
int PWM3      = 0;           // PWM3 output value
int meter     = 0;
int DAILY     = 0;     
int panelrndup = 0;
int rawdata    = 0;             // raw A/D panel value
int variablepot =0;          // veriable pot to range 0-1023. Setpoint to go higher so
                            // the variablepot will be doubled.       
// Ineter division always drops the remainder so numbers are
// consistently low.  This routine corrects that consistant
// low number.  Both divisions are basically divisions by 10.
unsigned int power32 = 0;    //output power x 32, a nice binary number
unsigned int maxpower = 0;   // potenial power of heater





//CALCULATE POWER OF HEATER
//panel integer is actually 10 times the voltage// this must be reduced first to stay within
//processor limit
// of 64K for the unsigned variables maxpower & power32
// resistance is multiplied by 10 to make a two digit number
// This is the same as another division by 10 of panel
//     maxpower = E * E/R
//     power = maxpower * PWM%
// except we multiply the PWM3 count by 32 to get a larger number
// before dividing.  Larger powers and wattages may require different
// numbers to stay within 64K limit of processor. The numbers are a
// little choppy due to integer math. This is a pseudo reflection of power.

//Ineter division always drops the remainder so numbers are consistentley
// low. This routine corrects that consistant low number. Both divisions
// are basically divisions of 10.







void setup()
{
  Serial.begin(9600);        // setup serial port speed
  pinMode(13, OUTPUT);       // sets the digital LED pin 13 as output, onboard LED
  pinMode(10, OUTPUT);       // digital pulse for timing loop OPTIONAL
  pinMode(3, OUTPUT);        // sets the digital pin 3 as PWM output to drive FET
}


void loop()  {

  // A resistive voltage divider produces about 2V-3V at pin A0
  // Typical operating voltage gives an A/D count of about 500
  // These values are for single 12V panel.  Adjust for your array.

  //  READ ANALOG VALUE AT PIN A0
  panel = analogRead(0);
  // A/D values go from 0 to 1023
 
  // MULTIPLY A/D VALUE TO OBTAIN PANEL VOLTAGE IN TENTH OF A VOLT
 
  panel = panel - panel / 2;
 
  //Sum the readings by subtracting one average reading first
  // It isn't obvious but the routine effectively multiplies the A/D reading
  // by the divisor. It can be any number, First a fraction of the total is
  // subtracted Then new rawdata is added.

  panel = panel + rawdata;  // Add latest A/D reading to panel total. This makes
  // a running average.

  // ADJUST PWM COUNT UP OR DOWN

  // FAST RECOVER from high panel voltage at startup or cloud passing
  // These first two just add/subtract an extra count each loop.  Count could be increased.

  // FAST RECOVER from high panel voltage
  if (panel > setpoint + 25) PWMcount = PWMcount + 1;

  // FAST RECOVER from low panel voltage
  if (panel < setpoint - 25) PWMcount = PWMcount - 1;


  // NORMAL UP DOWN CORRECTION 4 COUNT DEADBAND
  // NORMAL HIGH VOLTAGE RAMP UP
  if (panel > setpoint + 2) PWMcount = PWMcount + 1;
  // voltage is over setpoint

  // NORMAL LOW VOLTAGE RAMP DOWN
  if (panel < setpoint - 2) PWMcount = PWMcount - 1;
  // voltage is under setpoint


  // CHECK COUNT LIMITS This is the up down count
  // is count too high?
  if (PWMcount >= 255) PWMcount = 255;

  // is count too low?
  if (PWMcount <= 0) PWMcount = 0;

  // Set count to output.  This is the output value not to be confused with count value.
  PWM3 = PWMcount;

  // PREVENT NARROW DRIVE PULSES that cause FET heating.

  // is count too high and makes narrow pulse?
  if (PWM3 >= 255) PWM3 = 255;  // FULLY ON

  // is count too low and makes narrow pulse?
  if (PWM3 <= 5) PWM3 = 0;      // FULLY OFF

  // ROUTINE FOR DETERMINING LOOP TIME & PWM INTERACTION  Must have done this to check
  // time it takes to make program loop.
  // This section could be eliminated.
  digitalWrite(10, 1);
  delayMicroseconds(100);
  digitalWrite(10, 0);
  delayMicroseconds(500);    // delay for viewing analogWrite


  // PWM FET DRIVER OUTPUT PIN #3   Output Heater PWM
  analogWrite(3, PWM3);
  // PWM values are between 0 and 255



  //  BLINKING LED STATUS DISPLAY
  // The following is not necessary but provides useful visual information on how the program is running
  // One blink indicates program is running. Up to 8 additional blinks indicates drive level.
  // blinktime counts the number of program loops

  // FIRST BLINK - JUST TO SHOW THAT THE PROGRAM RUNNING
  if (blinktime == 2)  digitalWrite(13, 1);                 // pin #13 is the on board LED, 1 is ON
  if (blinktime == 3) digitalWrite(13, 0);                 // turn off LED = 0
  // turns the LED off so it blinks

  // PWM STATUS OF POWER LEVEL more blinks higher level
  // SECOND BLINK - IF DRIVE GREATER THAN
  if (blinktime == 6 && PWM3 >= 30) digitalWrite(13, 1);
  if (blinktime == 7) digitalWrite(13, 0);                // sets the LED off so it blinks

  // THIRD BLINK - IF DRIVE GREATER THAN 60
  if (blinktime == 9 && PWM3 >= 60) digitalWrite(13, 1);
  if (blinktime == 10) digitalWrite(13, 0);

  // FOURTH BLINK - IF DRIVE GREATER THAN 90
  if (blinktime == 12 && PWM3 >= 90) digitalWrite(13, 1);
  if (blinktime == 13) digitalWrite(13, 0);

  // FIFTH BLINK - IF DRIVE GREATER THAN 120
  if (blinktime == 15 && PWM3 >= 120) digitalWrite(13, 1);
  if (blinktime == 16) digitalWrite(13, 0);

  // SIXTH BLINK - IF DRIVE GREATER THAN 150
  if (blinktime == 18 && PWM3 >= 150) digitalWrite(13, 1);
  if (blinktime == 19) digitalWrite(13, 0);

  // SEVENTH BLINK - IF DRIVE GREATER THAN 180
  if (blinktime == 21 && PWM3 >= 180) digitalWrite(13, 1);
  if (blinktime == 22) digitalWrite(13, 0);

  // EIGHTH BLINK - IF DRIVE GREATER THAN 210
  if (blinktime == 23 && PWM3 >= 210) digitalWrite(13, 1);
  if (blinktime == 24) digitalWrite(13, 0);

  // NINTH BLINK - IF DRIVE GREATER THAN 240
  if (blinktime == 26 && PWM3 >= 240) digitalWrite(13, 1);
  if (blinktime == 27) digitalWrite(13, 0);

  // A single blink indicates processor is running but no heating



  // PROGRAM DATA SENT TO ARDUINO SERIAL SCREEN IN TOOLS
  // send calculated voltage to TOOLS debug screen. This will give a real
  // time read of voltage. A pot can be adjusted matching the computer value
  // to the digital voltmeter.
  if (blinktime == 100) {
    Serial.print((float)panel / 10);          // print actual panel voltage
    // float formats to two decimal places
    Serial.print(" voltage is ");              // identify variable
    Serial.print(panel * 32);                 // print voltage raw data X 32
    // will need to be adjusted for other panels
    Serial.print("  raw A/D is ");            // identify variable
    Serial.print(panel);                      // print raw voltage A/D variable
    Serial.print("  the count is ");          // identify variable
    Serial.print(PWMcount);                   // print PWM counter value
    Serial.print("  PWM3 is ");               // identify variable
    Serial.print(PWM3);                      // print PWM output value and do line feed
    Serial.print("  ");                       // create space between last data
    Serial.print(PWM3 * 100 / 255);          //print percentage output value
    Serial.print("% power");                 // identify variable do line feed
    Serial.print("  ");                      // create space between last data
    Serial.print(power32/32);              // print out power reduced by 32
    Serial.print(" W ");                       // identify variable do line feed
    Serial.print("  ");                       // create space between last data
    Serial.print("V1.0  ");                   // current version
    maxpower = (panel / 10) * (panel / 93);
    power32 = maxpower * (PWM3 * 32/255);
    meter = map(DAILY,0,9180,0,255);        //Maximum PWM = 255 x 6 readings a hour = 1530
   // counts, 1530 counts/hr x 6 hours = 9180 counts.
                    // Wattage at maximum set voltage = 820 W x 6 hours = 4.92KWH
   
    panelrndup = panel + 6;          //add 6 so division rounds up
    // remainders 4 and over and rounds
    // down remainders below 4
    // maxpower=(panelrndup/10)*9(panelrndup/93);

   








  }

  delay (50);                               // once per loop delay
  blinktime = blinktime + 1;                // LOOP COUNTER
  if (blinktime > 100) blinktime = 0;       // reset the counter


}                                            // end of program



OperaHouse

  • Hero Member
  • *****
  • Posts: 1075
  • Country: us
Re: Control for heating with solar off grid no batteries
« Reply #63 on: September 28, 2016, 08:20:04 AM »
I see that something was lost in translation.  it should read:

 //  READ ANALOG VALUE AT PIN A0
  rawdata = analogRead(0);
  // A/D values go from 0 to 1023

In the beginning we were just reading the A/D value and using a single reading to represent panel voltage.  That A/D reading was multiplied by 32 to get a panel voltage.  That worked in my system which was 36V. I didn't know what your system was at that time. Panel now becomes rawdata in the read statement.  Later it seemed convenient to take two readings and add them together.  This provided some averaging to make the number more stable.  The rawdata number should be in the 600-700 range.  Conveniently, doubling that becomes 1200 - 1400.  That looks like 120-140V if you then divide by 10.  In your code rawdata was always zero and nothing was ever added in.

   Serial.print(" voltage is ");             // identify variable
    Serial.print((float)panel  / 10);      // print voltage / 10 (float) will read out two decimal places
                                                       // will need to be adjusted for other panels
    Serial.print("  raw A/D is ");           // identify variable
    Serial.print(rawdata);                    // print raw voltage A/D variable

Now panel is divided by 10.  Adding (float) to the statement prints a two decimal place  number even though the last place will always be a zero because you are dividing by 10. 

I haven't looked further.  You will still need to adjust the voltage divider so you get an appropriate voltage.  The debug screen should now start giving you some data.  Sorry I went a little fast, but you don't learn anything if everything works the first time.

right now the setpoint voltage is set to 109.2 volts.   This was just an example.  Haven't calculated it but your voltage will probably be about 130V or 1300 for a setpoint.  I talked about using a second pot and reading that to have an adjustable setpoint.  For now change this number to 1300.

int setpoint  = 1092;         // power point raw data count, set for power point
« Last Edit: September 28, 2016, 08:28:37 AM by OperaHouse »

ontfarmer

  • Full Member
  • ***
  • Posts: 124
  • Country: ca
Re: Control for heating with solar off grid no batteries
« Reply #64 on: September 28, 2016, 02:57:49 PM »
  When I changed the code  the debug screen is now giving data.  Was great to see that
happen. I will go ahead and make the changes you mentioned.
   Thanks





« Last Edit: September 29, 2016, 06:36:03 AM by Bruce S »

ontfarmer

  • Full Member
  • ***
  • Posts: 124
  • Country: ca
Re: Control for heating with solar off grid no batteries
« Reply #65 on: September 29, 2016, 06:30:22 AM »
The data is now printing out on the serial screen.  I made the changes you mentioned. The
 detailed information you gave made it easier for me to follow.  I'm going to go back over the posts to try and understand and check that I have not missed things.
Thanks

OperaHouse

  • Hero Member
  • *****
  • Posts: 1075
  • Country: us
Re: Control for heating with solar off grid no batteries
« Reply #66 on: September 29, 2016, 01:01:32 PM »
Did another quick look.

// is count too high and makes narrow pulse?
  if (PWM3 >= 255) PWM3 = 255;  // FULLY ON

should be:
// is count too high and makes narrow pulse?
  if (PWM3 >= 250) PWM3 = 255;  // FULLY ON


You started adding code for a second pot to adjust setpoint and stopped.

panelrndup was just placed randomly in the program.

Take a good look at the serial data display on screen and see if that is what you want.

I have downloaded your code and will see what it does.


ontfarmer

  • Full Member
  • ***
  • Posts: 124
  • Country: ca
Re: Control for heating with solar off grid no batteries
« Reply #67 on: September 30, 2016, 06:21:24 AM »
I changed the code that you mentioned to = 250 instead of = 255.  What else needs to be added to the code for the second pot to adjust set point ?  Where should I have entered  panelrndup   in the code ?

There has been very little sun here for several days, so have not got the normal print out on the serial screen.  They are forecasting sun in a few days.

OperaHouse

  • Hero Member
  • *****
  • Posts: 1075
  • Country: us
Re: Control for heating with solar off grid no batteries
« Reply #68 on: September 30, 2016, 09:30:48 AM »
You have already declared pot as an integer.  Now you need to read the A/D converter. the process is the same as before.


//  READ ANALOG VALUE AT PIN A3, setpoint pot
pot = analogRead(3);
// A/D values go from 0 to 1023

setpoint = setpoint - setpoint / 2;
 
  //Sum the readings by subtracting one average reading first
  // It isn't obvious but the routine effectively multiplies the A/D reading
  // by the divisor. It can be any number, First a fraction of the total is
  // subtracted Then new pot data is added.

  setpoint = setpoint + pot;  // Add latest A/D reading to panel total.
                                          // This makes a running average.
                                          //  This will give a setpoint between 0 & 2,046
                                          //  or 0 & 204.60 volts.

ontfarmer

  • Full Member
  • ***
  • Posts: 124
  • Country: ca
Re: Control for heating with solar off grid no batteries
« Reply #69 on: October 02, 2016, 05:04:01 AM »
      I want to mention to the ones following this project how great it has been that 
 OperaHouse  is making this possible for me to have.

Changed the serial screen print out, it took me a few times trying before I got it figured out.
The order they are entered in Serial.print is what made the difference in printing out.

Entered    pot = analogRead(3);    setpoint = setpoint - setpoint/2;   setpoint = setpoint + pot;    to code where  rawdata = analogRead(0);   is.

OperaHouse

  • Hero Member
  • *****
  • Posts: 1075
  • Country: us
Re: Control for heating with solar off grid no batteries
« Reply #70 on: October 05, 2016, 01:17:46 PM »
Didn't have the best day yesterday.  I was updating one of my buck converters that charges batteries.  Didn't work after the install.  Blew out a LED and shorted a FET.  Put the old system back.  Later I decided to perform at lest a partial upgrade.  Managed to blow out a wall wart.  Of course I do this all with the power on and bare wires dangling.  You get away with it most of the time.

I ran your program and the serial was a long run on sentence.  You have probably corrected that by now using a serial println at the end.  There is something that you should be aware of and that is printing takes time and it can seriously disrupt how the program operates.  Got around to doing some timing the other day.  My one minute had increased to 2.6 minutes.  That is the downside of doing loop counts.  The program had grown a little, but a lot of that time was the result of printing.  Now that you are a programmer, you don't have to be wordy like "the voltage is".  Programmers don't make things so that other people understand them.  Those screens will open up so that there are more characters on a line.  I prefer to not have to make a screen wider than standard.  To keep the speed up and the number of characters down use multiple debug screens.  Think I did a post on that.  That had some screen always active.  But, you have the option of having no screen except when asked for.  That can really speed things up. Not much of a problem at this stage.  Going back and reading those posts again is a good idea.  They will have more relevance now that you have some experience.

ontfarmer

  • Full Member
  • ***
  • Posts: 124
  • Country: ca
Re: Control for heating with solar off grid no batteries
« Reply #71 on: October 10, 2016, 07:20:49 AM »
Not had much time to spend  on this, very busy on the farm.  Going back over spending time reading the  posts again has helped me.  Not having previous experience with this and terms that are used, has at times been hard for me to understand.  I have learned a bit on the
programing,  added  println at the end of serial,  changed from  "  is "  to  = ,  shortened some other ones.  That made a big difference on the space that is used on the screen.  So
 far I  bring the screen up when wanted.  Tried moving  " meter = map(Daily,0,9180.0,255);"
up  to where the other ones are but keep getting  error codes  ? so it is still below serial.print.

Have had a lot of sun lately makes a big difference to the water that is getting heated.  When
things slow down a bit,  will have more time to work on this and hook up the other string of panels.
 

OperaHouse

  • Hero Member
  • *****
  • Posts: 1075
  • Country: us
Re: Control for heating with solar off grid no batteries
« Reply #72 on: October 13, 2016, 06:47:57 AM »
I'm adding another screen command to my system, it does a power point test giving the power point voltage and maximum wattage at that moment.  It will be a good check of the condition of the panels.  Since my system doesn't track power point it will give me info as to how it changes through the season.

ontfarmer

  • Full Member
  • ***
  • Posts: 124
  • Country: ca
Re: Control for heating with solar off grid no batteries
« Reply #73 on: November 03, 2016, 04:13:24 AM »
Haven't had any time for a while to spend here.  OperaHouse how was your trip back from the camp ?  The landscape would be colour full at that time of year.  Read the post on controlling  multiple heaters with the uno.   I am going to try that when time permits.

OperaHouse

  • Hero Member
  • *****
  • Posts: 1075
  • Country: us
Re: Control for heating with solar off grid no batteries
« Reply #74 on: November 05, 2016, 11:47:46 PM »
In grade school we had to take one of these personality tests to guide us into what
our occupation should be in the future. Personally, that is pretty young to be deciding
your future and the social sciences are just hokum anyway.  But, I always liked the result.
It said my professions should be: scientist, engineer, farmer. Some of my relatives out
in Iowa were farmers. Farmers are resilient and have faith in the future.  They have to
in order to put effort into crops not knowing what the yield will be and enduring many
bad years in a row. I have faith in you.  And if I have to drive up there with a basket
of parts to get it working, I will do that.  Been a few years since I've been in London.

You are literally at the point where you are forgetting faster than learning. I don't
remember where we are in this discussion. There is always five minutes in a day that
can be used.  I understand the hesitation.  My wife wanted a newer vehicle.  Four months
ago I bought her just what she wanted, a 2014 Explorer.  Since then she has driven it
only three times, less than two miles and only one way. Not like she isn't used to something
big, this is her fourth Explorer. Just buying this vehicle is a pretty convoluted story
in itself. I had new plates on the vehicle, a clear title and the guy is walking away
saying to enjoy it. I hadn't paid a dime at that point and that wasn't the weird part.  It
is different to drive, but not that much. She is now driving my old pickup which she
would never drive before and calling it hers.  Need to work on my wife's taxes tomorrow.  Been putting that off and they keep sending these nasty letters about taking her bank account.  Was
on the phone with them an hour and a half. She said my wife made a lot of money for not paying much tax.  One thing I've learned is tax laws follow no reason.  You just follow them where they
go.  Math is my stock and trade.  Then again it could have been lack of blood giving me a brain
cloud.

Not pushing you, just never know what will happen.  The doc is pushing me to get a pacemaker
just because my heart rate is under 40.  Haven't warmed up to the idea yet. In the literature
all the people pictured are old people.

« Last Edit: November 06, 2016, 12:02:17 AM by OperaHouse »

ontfarmer

  • Full Member
  • ***
  • Posts: 124
  • Country: ca
Re: Control for heating with solar off grid no batteries
« Reply #75 on: November 10, 2016, 05:53:09 AM »
  This has been like learning to ride a bicycle,  you watch,  listen to instructions,  seems very
easy straight forward.  Then you take control and on your own,  unexpected things happen.
When you talk about tax laws and  following no reason,  some of this has been like that to me.
I am powering a baseboard heater for the present time.  Was going to try and add to code for controlling second heater.

ontfarmer

  • Full Member
  • ***
  • Posts: 124
  • Country: ca
Re: Control for heating with solar off grid no batteries
« Reply #76 on: November 11, 2016, 07:02:20 AM »
  The baseboard heater is 240 volt  750 watt so that is less than 200 watt of power.  Going to hookup a second one and try that. The days are getting shorter and the sun not very high
these days.

ontfarmer

  • Full Member
  • ***
  • Posts: 124
  • Country: ca
Re: Control for heating with solar off grid no batteries
« Reply #77 on: November 15, 2016, 08:11:46 AM »
  Have you got any interest in coming to the London ?  You mentioned being there in the past,  maybe there are things in the area you would like to see ?  It would be great to meet you, spend some time and show you some things around here.  The door would be open.

george65

  • Sr. Member
  • ****
  • Posts: 420
  • Country: au
Re: Control for heating with solar off grid no batteries
« Reply #78 on: November 15, 2016, 08:45:31 AM »

Is it at all possible to buy some sort of an external controller so one could use an old Windows laptop to do this sort of thing?

I get the power consumption would be a bit higher but all this programming stuff for these boards seems terribly critical.
I have also seen these micro windows computer boards that run windows. Forget the name now, think it starts with V and they are made in Israel.

It would seem using a PC direct would be much easier for twits like me,  but I'm not sure what you would call the part that you hooked things to for the control signals that interfaced with the laptop?



OperaHouse

  • Hero Member
  • *****
  • Posts: 1075
  • Country: us
Re: Control for heating with solar off grid no batteries
« Reply #79 on: November 15, 2016, 12:52:47 PM »
When I started out eons ago it was a major hurdle just to get a compiler to run on a PC.  A PC just draws too much power, multiple voltages and interfacing issues.  The basic concept is simple, you could even use a GHURD controller if a capacitor bank is included.  One could even be made with a wall wart if they would have standardized with one part.  If you can load the Arduino compiler (FREE)  on your computer the other issues are minor.  For a $5 investment it is a lot of power.  I use the NANO version which is half that cost and has more capability.  Loading in the communication driver is a headache for the NANO.

I don't want to minimize anything.  There are a lot of ways you can get into trouble, but a lot of
non technical people have been successful with these projects. They can solve some really complex
problems cheap.  I just ordered another three of the $2.50 ones today. My whole camp runs on one,
fridge, two water heaters, pump, and two charge controllers and I still have some space left. This
year I finally added a test program to test the maximum power of the solar panels.  That answers the
question...Are the panels still good? These debug routins use the serial read screen in the Tools
section of the compiler.  The status of the house is from two blinking LED. One blink every ten
seconds tells me it is running and everything is OK. A lot of people want a big data solution with
tons of data on a screen. To me that is just RE porn. I don't want to be writing programs for people.
I am willing to help people get started.  If you can express what you would do if sitting there
flipping switches and turning a knob, you can program.  In my younger years I loved designing
circuits with a lot of pots to adjust.  Now I do everything with one of these boards in easily
changed software and add a half dozen parts.  Next year I need to do a video on the hot water
system. It sure beats the lame videos of people making hot water on youtube.
« Last Edit: November 15, 2016, 04:07:59 PM by OperaHouse »

george65

  • Sr. Member
  • ****
  • Posts: 420
  • Country: au
Re: Control for heating with solar off grid no batteries
« Reply #80 on: November 15, 2016, 06:21:03 PM »
It sure beats the lame videos of people making hot water on youtube.

If I wasn't already in awe at your skills and appreciative of the help you give people which I greatly admire and learn from as well, You would have won me over for life with that statement alone.

What the FK is it with people and coiled copper tube??
Have they No clue at all whatsoever about surface area and heat transfer for a start and worked out that a 4" bit of pipe has so much more ability to absorb heat than the spread out bit of copper tube they throw on top of an open fire which is about 99% inefficient to start with?  Ugggh!  If I look at one more clown with coiled copper tube I'm going to throw up!

NO, that 10 Ft of 3/4 copper pipe thrown on on a fire is going to do jack all to heat your swimming pool. The losses from the inevitable above ground pool through the sides and evaporation alone are going to exceed the piddling about of heat you are putting in the thing which probably isn't even 1Kw. You'd be better off throwing an electric jug in there..... Or pumping the water through a car radiator with the electric fan going on a hot day to get a better heat rise in the water.

I have to get onto the seals I need so I can get the 200Kw heater I have converted from gas to waste oil going.  It will probably be about the 2nd heater on YT that will actually work!

Anyway.....

Perhaps you could help with a couple of other things?....

The base problem I have with these controllers is I don't even understand what they can do.  I recognise it is the same as asking what can you do with a computer but the fact is I am ignorant and really don't understand their capabilities or potential.  Do you know of any sites or white papers on  these things written for ignorant morons... IE, me, that could help me get the most fundamental and basic understanding?

Could you link to your supplier for the boards and do you have any recommendation of a startup kit that would be appropriate for the sort of use we would have for them?  I know they can control a heap of things but something relevant to this would be good and also something that could switch valves etc from temp inputs? Any other shields you could recommend for practical or training purposes?

Finally, are there any places on the web you can download simple programs to get one started with the idea and concept and could modify from there.
Forgive my ignorance if it is a stupid proposition but it would be great if there were programs written which one could basicly copy and paste and start from a known good base and work and modify from there.

Thanks for your input with these things. I rarely understand what you write about them but it makes it no less interesting.  :0)
At very least you motivate me to want to educate myself more about them.