Solar and Wind Hybrid Power Generation Using Arduino

CIRCUIT DIAGRAM

PROGRAM

Correct program for solar and wind hybrid power generation

#include <LiquidCrystal.h>

LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

#include<Wire.h>

int input;

float volt;

int val;

#define CURRENT_SENSOR A3

float amplitude_current;

int eff_value;

int P=0;

void volt1()

{

float vtemp;

input=analogRead(A0);

vtemp=input/4.200;

volt=(vtemp/10.2);

volt = volt ;

lcd.setCursor(0, 0);

lcd.print("V:");

lcd.print(volt);

Serial.print("volt");

Serial.println(volt);

delay(500);

}

void current()

{

int sensor_max;

eff_value=analogRead(CURRENT_SENSOR);

eff_value = eff_value - 400;

lcd.setCursor(8, 0);

lcd.print("I:");

lcd.print(eff_value);

lcd.print("mA");

delay(1000);

}

void setup()

{

Serial.begin(9600);

lcd.begin(16, 2);

lcd.setCursor(0, 0);

lcd.print("SOLAR AND WIND ENERGY");

lcd.setCursor(0, 1);

lcd.print("POWER GENERATION.");

delay(1000);

lcd.clear();

}

void loop()

{

volt1();

current();

delay(1000);

lcd.clear();

}