Sistem de monitorizare consum energie electrica(bransament trifazat) realizat cu Arduino Uno
#include<LiquidCrystal.h>
#include<Ethernet.h>
#include<SPI.h>
#include<avr/wdt.h>
#include<OneWire.h>
#include<DallasTemperature.h>
//Datawireispluggedintoport6ontheArduino
#defineONE_WIRE_BUS6
#defineTEMPERATURE_PRECISION9
intDS18S20_Pin=6;//DS18S20Signalpinondigital6
//SetupaoneWireinstancetocommunicatewithanyOneWiredevices(notjustMaxim/DallastemperatureICs)
OneWireoneWire(ONE_WIRE_BUS);
//PassouroneWirereferencetoDallasTemperature.
DallasTemperaturesensors(&oneWire);
//Networkconstants
bytemac[]={0x00,0x23,0xdf,0x82,0xd4,0x01};
IPAddressip(192,168,0,177);
IPAddressserver(212,146,85,89);//free-energy-monitor.com
intport=80;
LiquidCrystallcd(9,8,5,4,3,2);
EthernetClientclient;
//Clientclient(server,port);
//intlightPin=0;//defineapinforPhotoresistor
floatIf=0,Ie=0,U=0;
intsequence;
floattemp_bat=0,temp_mediu=0;
intblocaj=0,sensorValue;
booleanflag_setat=false;
intreciever=0;
voidsetup(){
pinMode(2,OUTPUT);
sensors.begin();
Serial.begin(9600);
lcd.begin(16,2);
lcd.print("StartMonitor!");
sequence=0;
Ethernet.begin(mac,ip);
delay(1000);
if(blocaj==1){
//resethardware
blocaj=0;
digitalWrite(7,LOW);//pinuldigital3conectatprinfirlapinuldeRESET
}
wdt_enable(WDTO_8S);
}
voidloop(){
wdt_reset();
if(!flag_setat){
blocaj=1;
flag_setat=true;
}
sensorValue=analogRead(A5);//readanaloginputpin0
U=(float)((sensorValue)*25)/1023;
U=(float)U*4.00;
sensorValue=(analogRead(A4)-507);
if(sensorValue==1orsensorValue==-1)sensorValue=0;
If=(float)sensorValue*0.215;
sensorValue=(analogRead(A3)-507);
if(sensorValue==1orsensorValue==-1)sensorValue=0;
Ie=(float)sensorValue*0.215;
sensors.requestTemperatures();
temp_bat=sensors.getTempCByIndex(0);
temp_mediu=sensors.getTempCByIndex(1);
httpPut("http://free-energy-monitor.com/quickstart.php?lumina=");
Serial.println(sequence);
sequence++;
lcd.setCursor(0,0);
reciever=digitalRead(2);
delay(1000);
lcd.clear();
//Serial.flush();
}
voidhttpPut(char*url){
if(!client.connect(server,port)){
Serial.println("EXCEPTION:duringHTTPPUT.Couldnotconnect");
lcd.setCursor(0,0);
lcd.print("EXCEPTION:HTTPPUT.");
lcd.setCursor(0,1);
lcd.print("Couldnotconnect");
//delay(5000);
delay(2000);
return;
}
client.print("POST");
client.print("");
client.print(url);
client.print(If);
client.print("&tensiune=");
client.print(U);
client.print("&curent=");
client.print(Ie);
client.print("&temp_bat=");
client.print(temp_bat);
client.print("&temp_mediu=");
client.print(temp_mediu);
client.print("&tabela=data_log_securiceni");
client.println("HTTP/1.0");
client.println();
lcd.setCursor(0,0);
//lcd.print("U=");
lcd.print(U,1);
lcd.setCursor(4,0);
lcd.print("If=");
lcd.print(If,1);
lcd.setCursor(10,0);
lcd.print("Ie=");
lcd.print(Ie,1);
lcd.setCursor(0,1);
lcd.print("Tb=");
lcd.print(temp_bat,1);
lcd.setCursor(8,1);
lcd.print("Tm=");
lcd.print(temp_mediu,1);
while(!client.available()){
//Serial.read();
delay(500);
}
while(client.available()){
charc=client.read();
Serial.print(c);
}
while(client.connected()){
Serial.println("Waitingforservertodisconnect");
lcd.setCursor(0,0);
lcd.print("Waitingforserver");
lcd.setCursor(0,1);
lcd.print("todisconnect");
client.stop();
delay(500);
}
client.stop();
//Serial.end();
delay(500);
return;
}
Denumire componenta | Denumire comerciala (ebay) | Pret (ebay) |
---|---|---|
Placa Arduino Uno | 2013 Version ATmega32U2 ATmega328P UNO R3 Board & Free USB Cable for Arduino DIY | 10$ |
Modul ethernet | Ethernet Shield W5100 Network Expansion Board For Arduino UNO R3 Mega 2560 | 7.12.$ |
Senzor curent noninvaziv 100A | Hall Effect Current Sensor For Hobbyist, Arduino Compatible, AC 75A DC 100A | 9$ |
Senzor de tensiune 80V | Octopus Voltage Divider Module Electronic Bricks for Arduino | 4.69$ |
Senzor de temperatura | DS18B20 Waterproof Temperature Sensors Thermistor Temperature Control hv2n | 2.06$ |
Live data
- Acceseaza date productie energie
verde in timp real
Tensiune baterii(V):
Putere fotovoltaice(W):
Putere eoliana(W):
Putere consumatori(W):
Putere utilitati/retea(W):
Temp. baterii(C):
Temp. mediu(C):
Proiecte
- Actionarea si controlul unui sistem de la distanta, prin internet cu Arduino
- Monitorizare panou solar cu tuburi vidate, nepresurizat
- Monitorizare panou solar cu tuburi vidate, presurizat
- Consum energie electrica: modul monitorizare consum energie electrica
- Energy monitor: modul monitorizare productie energie verde in timp real
- Turbina eoliana HomeMade
- Panouri fotovoltaice
- Turbina hidro
- Legislatie
Evenimente
- Renexpo South-East Europe
Renexpo South-East Europe, cel mai mare si important targ pentru energie regenerabila si eficienta energetica din Romania, va reveni in 2014 cu cea de-a VII-a editie, intre 19-21 noiembrie 2014, la Sala Palatului din Bucuresti. - Targ International Bucuresti 6-7-8 Mai 2015
Targul RoEnergy este astfel conceput incat sa ofere solutii energetice incepand de la activitatea de producere a energiei, transport, stocare energie, pana la activitatea de utilizare a energiei, in conditii de eficienta maxima.