Control Board Between Solar and Hydropower

by akramslab in Circuits > Arduino

156 Views, 1 Favorites, 0 Comments

Control Board Between Solar and Hydropower

WhatsApp Image 2023-10-06 at 10.46.39 PM.jpeg
WhatsApp Image 2023-09-05 at 10.18.49 PM.jpeg

The project integrates an Arduino-based control board into a hybrid renewable energy system that combines solar and hydro power generation. It provides a smart and automated solution for optimizing energy production, monitoring system performance, and managing energy storage.

Supplies


  1. Solar Panels: Photovoltaic panels that convert sunlight into electricity.
  2. Turbine: A device that converts water flow into electrical power.
  3. Arduino Controller: An Arduino board equipped with sensors, relays, and a microcontroller for data processing and control.
  4. Battery Bank: A bank of batteries for energy storage.
  5. 2*Potentiometer: used for adjusting the battery capacity reading.
  6. 3*Relay: to control the connection and disconnection of power sources in response to voltage readings
  7. 2*Diode: prevent reverse current flow and protect components from damage in the system.
  8. 4 LEDs as an indicators: the blue one for PV, the yellow one for the turbine, the red one for the battery, and the green one for the load.

Schematics and Analysis

WhatsApp Image 2023-08-11 at 6.00.48 PM.jpeg
WhatsApp Image 2023-10-29 at 8.24.55 PM.jpeg
WhatsApp Image 2023-10-29 at 8.24.54 PM (1).jpeg
WhatsApp Image 2023-10-29 at 8.24.54 PM.jpeg
WhatsApp Image 2023-10-29 at 8.24.53 PM.jpeg

When working on a schematic for an electronic system, it's crucial to consider voltage compatibility with the components, especially when dealing with microcontrollers. Some microcontrollers can't handle input voltages exceeding a certain limit, often 3.3 or 5 volts. To ensure safe operation, you may need to adapt the voltage levels from higher voltage sources, such as sensors or power supplies.

One common method for voltage level shifting is to use a voltage divider. This involves strategically placing two resistors in series to divide the voltage into a lower value that is within the microcontroller's acceptable range. The voltage divider formula, Vout = Vin * (R2 / (R1 + R2)), provides a straightforward way to calculate the output voltage (Vout) based on the input voltage (Vin) and the resistance values of the two resistors (R1 and R2). By selecting appropriate resistor values, you can create a voltage divider circuit that delivers the desired voltage to the microcontroller, ensuring it operates safely and accurately in the system.

Analyzing the schematic and using the voltage divider formula are essential steps in designing and implementing electronics systems, particularly when working with components with varying voltage requirements. By correctly adjusting voltages with the voltage divider technique, you can ensure seamless integration of your microcontroller and other components in the circuit.

Reading Voltage

WhatsApp Image 2023-10-06 at 10.47.11 PM.jpeg

after determining the resistor values, I used a voltmeter to validate the calculations, and then I wrote the following code to measure and read the voltage. "picture 1"

To read the Battery voltage and print it on the serial monitor the code will be:

float readingbattery= analogRead(A2) * (5.0/1023.0);
Serial.println("Battery: " + String(readingbattery));

"picture2"



Testing PV

WhatsApp Image 2023-10-06 at 10.46.49 PM (1).jpeg

To perform a PV test, you should connect the diode's positive terminal. After that, link it to the blue LED with a resistor to control the current and connect it to analog input A0 through the diode for voltage measurement and connect to the Normally Closed (NC) contact of Relay2, and the Normally Open (NO) contact of Relay1.The code to implement this setup will be as follows:

float readingpv = analogRead(A0) * (5.0/1023.0);

Testing Hydro

When I attempt to read voltage from the turbine, the power generated by the rotor is not continuous; it's more like a series of pulses . In response, I substituted the turbine with batteries and established a voltage divider. The output from the voltage divider is connected to the Yellow LED, analog input A1, the Normally Closed (NC) contact of Relay1, and the Normally Open (NO) contact of Relay2.

  float readinghydro = analogRead(A1) *(5.0/1023.0);

Voltage-Based Relay Control

The code is designed to analyze the voltage readings and subsequently manage the relay switches in response to these voltage measurements. It leverages the voltage data to make decisions regarding the relay states, effectively controlling when and how the relays are activated or deactivated based on predefined voltage thresholds.

if ( readingpv > readingbattery && readingpv > readinghydro){

    delay(250);

  digitalWrite(BlueLed,HIGH);

  digitalWrite(relay1, LOW);

  digitalWrite(relay2,LOW);

  digitalWrite(relay3,LOW);

  }

 

  if ( readinghydro > readingbattery && readinghydro > readingpv){

    delay(250);

    digitalWrite(GreenLed,HIGH);

  digitalWrite(relay1, HIGH);

  digitalWrite(relay2,HIGH);

  digitalWrite(relay3,LOW);

  }

 

  if ( readingbattery > readingpv && readingbattery > readinghydro){

  delay(250);

  digitalWrite(OrangeLed,HIGH);

  digitalWrite(relay1, LOW);

  digitalWrite(relay2,HIGH);

  digitalWrite(relay3,HIGH);

  }

Hardware and Wiring

WhatsApp Image 2023-10-06 at 10.47.08 PM.jpeg
WhatsApp Image 2023-10-06 at 10.47.16 PM.jpeg
WhatsApp Image 2023-10-06 at 10.47.13 PM.jpeg
WhatsApp Image 2023-10-06 at 10.47.11 PM (1).jpeg

The pictures capture the physical implementation of our design, showcasing the components' placement, wiring connections, and overall layout.

Conclusion

In conclusion, this project aimed to develop a system for monitoring and controlling power sources, such as photovoltaic (PV) panels, hydroelectric generators, and batteries, by analyzing voltage readings. By implementing a voltage divider circuit, reading the voltage from various sources, and using microcontroller-based code, we were able to effectively manage and control relay switches. This allowed us to respond to fluctuations in power generation and ensure the reliable operation of connected devices. This project demonstrates how voltage monitoring and relay control play a crucial role in optimizing power systems for real-world applications

Result

In the video, you can observe the system in action as it effectively manages different power sources, including photovoltaic panels, hydroelectric generators, and battery backups. As the system reads voltage levels, it demonstrates the ability to dynamically adjust relay states, ensuring that connected devices receive consistent and stable power.