Arduino uno, solar power project, making it web based?

I sort of hijacked another thread, with this, so I thought I would give this idea its own thread...

I have a project idea that can use something like this and i am looking which way to go. What i have is this. A solar power setup, that has panels, a battery bank, and a standalone inverter, and it is wired into a changeover relay, into my house's main swtchboard. A uhf remote controlled reciever is cammanding it when to turn on or off. So at this stage, i have to look at the battery bank voltmeter to see if its charged enough to run for a while. When the sun is shining it can charge at 25amps, whn the voltage gets to 14v, its full. I can then press the remote on button, the inverter powers up, and the relay changes over, the house is then running on the inverter. When the battery voltage gets down to 11volts, the inverter drops out, and the changeover relay drops out, reverting the house back to standard mins power, without my help.

What i would like is a web based system, that shows its system voltage (12volts, so i can see the state of charge of the battery bank being charged by the solar panels) without being home ( using iphone or other pc) and even program the arduino to power up the inverter when the batteries are full. A nice web page showing a full list of history, charge state, current flow etc, would be nice. So two way data flow.....

Even a history graph of current flow in and out? So I would connect the arduino uno analog pins to a voltage divider to sense battery voltage, and another pin to a current shunt to sense power being used etc And voltage history?

Any ideas? So to get started should I buy a ethernet sheild for my uno or something else? It needs to be web based so its accessable outside of home ( not wifi only)

Theres just so much arduino ethernet and wireless stuff on the net now, im just confused, dont know what way to persue. Does anyone have the expertise and experience in this to show me which way to go?

Cheers!!!

So to get started should I buy a ethernet sheild for my uno or something else?

How else are you going to get the Arduino to talk to the internet? Maybe use the library PerformSomeImpossibleTask.h?

that shows its system voltage (12volts, so i can see the state of charge of the battery bank being charged by the solar panels) without being home

You want some system that shows "12 volts" on a web page? Wouldn't it be better if it showed the actual voltage?

Are you measuring the voltage with the Arduino now? Are you displaying the measured value somewhere?

A nice web page showing a full list of history, charge state, current flow etc, would be nice. So two way data flow.....

Pretty hard to have a client/server relationship without two way communications.

It needs to be web based so its accessable outside of home

Do you have a static IP address now? 192.168.0.n is not going to be accessible outside your network.

Search the forums (especially Home Automation) for posts by draythomp. There's a link to Draythomp's web site which incorporates power measurement and some display of it using pachube. Therer's some good reading there to get ideas.

Don't mind Paul. You don't need an ethernet shield if you use XBee's near a PC with Pachube. This is much simpler to implement.

Get a w5100 based ethernet shield.

Yeah… I guess Paul just felt like chewing someones head off…

anyway im a complete novice to arduinos, i only discovered them about 6 WEEKS ago.
So far ive biult on breadboard a high speed tacho, temp probe, got two LCD’s working, which all started when I realised I needed something smarter than simple relay logic to control my DIY gas turbine engine im building. But thats sort of a longer term project, as I am still waiting for my lathe to be repaired so its kinda on hold.
ANyway, im side tracked because ive got a spare UNO and want to implement something clever into this solar power setup ive got.
The reason i asked if i should use a ethernet sheild is yes, ive heard there are other ways to communicate to ardruino to the web, but I have no idea how. I just wanted to check before i buy something.

So buying a W5100 ethernet sheild?

I can get a voltage reading and even current reading (shunted input) quite easily myself, but doing the software side of it, communicating to a web page…i have no idea.
will i need a pc nearby runnign all the time? or will it talk thru my router to a webserver outside ?

Complete novice in this area.

Thanks…

I can get a voltage reading and even current reading (shunted input) quite easily myself, but doing the software side of it, communicating to a web page…i have no idea.
will i need a pc nearby runnign all the time? or will it talk thru my router to a webserver outside ?

The arduino with ethernet shield can be free standing (with external power supply) connected to a router. You use a dynamic ip service like no-ip for access from the outside. The below simple meta refresh code is a self reloading web page with a counter that displays the arduino analog input values every two seconds. I’ve been testing it the last couple of days and it has updated 81,000+ times so far with out an issue. The arduino memory is limited, so there are limits as to what can be served.

// for W5100 ethernet shield
// the IP address will be dependent on your local network/router
// port 80 is default for HTTP, but can be changed as needed
// use IP address like http://192.168.1.102:84/ in your brouser
// or http://zoomkat.no-ip.com:84 with dynamic IP service
// use the \ slash to escape the " in the html

#include <SPI.h>
#include <Ethernet.h>

int x=0;
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 1, 102 };
Server server(84);

void setup()
{
  // start the server
  Ethernet.begin(mac, ip);
  server.begin();
}

void loop()
{
  // listen for incoming clients
  Client client = server.available();
  if (client) {
     while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        // see if HTTP request has ended with blank line
        if (c == '\n') {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();
          
          //meta-refresh page every 2 seconds
          x=x+1;
          client.println("<HTML>");
          client.print("<HEAD>");
          client.print("<meta http-equiv=\"refresh\" content=\"2\">");
          client.print("<TITLE />Zoomkat's meta-refresh test</title>");
          client.print("</head>");
          client.println("<BODY>");
          client.print("Zoomkat's meta-refresh test");
          client.println("
");
                    
          client.print("page refresh number ");
          client.println(x);
          client.println("
");
          client.println("
");
          
          client.print("Zoomkat's arduino analog input values:");
          client.println("
");
          client.println("
");
          
          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            client.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(analogRead(analogChannel));
            client.println("
");
            }
           break;
          client.println("</BODY>");
          client.println("</HTML>");
         }
        }
    }
    // give the web browser time to receive the data
    delay(1);
    // close the connection:
    client.stop();
  }
}

cool thanks!~ Ordered my ethernet sheild today.......Will post my success soon:) Will I be able to add a simple feature on the page to turn on or off an output pin on the arduino ? This way I can fire up the inverter when im not at home, using my iphone!?:)