How to design a solar detector using tilt sensors
Source: InternetPublisher:清宁时光 Keywords: detector tilt sensor Updated: 2023/12/25
The detector evaluates the likely magnitude of solar energy through the intensity of light in a given direction to efficiently charge the battery.
background
In order to use solar panels to charge batteries to run some devices in my home office, I placed the solar panels in the best possible locations based on my predictions without collecting reliable data. So I thought of a cheap and easy-to-use mechanism to determine the ideal location for charging a solar panel based on the intensity of light in a given direction. Since the energy produced by solar panels is closely related to the amount of solar radiation, I am able to use this device to charge my batteries more efficiently and sustainably. Therefore, I use the light intensity value as a proxy to approximate the magnitude of the solar energy. You can see the formula I used to calculate solar energy below.
After running the code to calculate the solar energy from the light intensity values collected by the 10 mm photoresistor, I conducted experiments with the battery and solar panel to determine the thresholds for solar charging performance levels: low, medium, and high. Also, to show the performance level, I used different LED colors for each direction - red (low), yellow (medium), green (high).
Not surprisingly, it is crucial to position the device vertically to accurately detect light intensity, so I used a tilt sensor (mercury sensor) to check if the device moved to a tilted position. And, to notify the user when the device moves to a tilted position, I added a buzzer to the device.
After completing the design on a breadboard and testing the code, I designed a PCB with a unique circular shape (light intensity and solar detector with tilt sensor) to create a flexible and easy-to-use device that supports four orientations.
Step 1: Design and Solder Light Intensity and Solar Detectors with Tilt Sensor PCB
First, by using a soldering iron, I connected the headers, 220Ω resistor, 1K resistor, 10mm photoresistor, power jack, 5mm red LED, 5mm yellow LED, 5mm green LED, buzzer and tilt sensor (mercury sensor).
Component list on PCB:
A1 (Arduino Nano connector)
P1, P2, P3, P4 (10mm photoresistor)
buzzer (buzzer)
Tilt sensor (tilt sensor)
R (5mm red LED)
Y (5mm yellow LED)
G (5mm green LED)
R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13 (220Ω resistor)
R14, R15, R16, R17, R18 (1K resistor)
J1 (power jack)
Step 2: Calculate approximate solar energy
[ E = A * r * H * PR ] is the formula I use to approximate solar energy levels, where:
A is the area of the solar panel,
r is efficiency,
H is the average solar radiation,
PR is the performance ratio or coefficient (generally 0.75).
// Define the solar panel (SP) specifications which differ amid different brands. So, change these variables with that of your solar panel.
#define SP_area 0.0088
#define SP_efficiency 6.2
#define SP_coefficient 0.75
float Solar_Panel_Energy(float Area, float Efficiency, int Radiation, float Coefficient) {
// Calculate the possible magnitude of solar energy by using the light intensity values as a substitute for radiation.
float Energy = Area * Efficiency * Radiation * Coefficient;
return Energy;
}
Don’t forget to change the solar panel specifications – area, efficiency and performance ratio – which can vary depending on the solar panel brand.
To calculate the possible magnitude of solar energy, I use light intensity values instead of solar radiation in the formula.
Of course, this method does not provide an accurate solar value, but an indicator that determines the threshold (low, medium, high) used to detect solar charging performance in a given direction.
Note: I determined the thresholds for each level by testing with my solar panel: I observed the time elapsed to fully charge a 3.7V lithium polymer battery at a given light intensity and estimated solar value.
Step 3: Program the Arduino Nano
Define indicators for each direction (red, yellow, green).
Define LDR pins for each direction to collect light intensity values.
Define the buzzer pin and tilt sensor pin.
Define solar panel (SP) specifications of different brands. So, change these variables with your solar panels.
Define thresholds experimentally.
In the get_Light_Intensity() function, light intensity data is collected from the photoresistor.
In the Tilt() function, you will be notified if the device moves to a tilted position.
Enable threshold detection (low, medium, high) for each direction.
In the Indicate_Thresholds() function:
Prints the selected direction and its solar value.
Adjust threshold indicators (LEDs) based on solar energy values in each direction.
Connect and adjust
// Connections
//Arduino Nano:
// direction_1_LOW
// D4 ---------------------------
// direction_1_MODERATE
// D3 ---------------------------
// direction_1_HIGH
// D2 ---------------------------
// direction_2_LOW
// D7 ---------------------------
// direction_2_MODERATE
// D6 ---------------------------
// direction_2_HIGH
// D5 ---------------------------
// direction_3_LOW
// D8 ---------------------------
// direction_3_MODERATE
// D9 ---------------------------
// direction_3_HIGH
// D10 ---------------------------
// direction_4_LOW
// D13 ---------------------------
// direction_4_MODERATE
// A4 ---------------------------
// direction_4_HIGH
// A5 ---------------------------
// Buzzer
// D11 ---------------------------
// Tilt Sensor
// D12 ---------------------------
// direction_1_LDR
// A0 ---------------------------
// direction_2_LDR
// A1 ---------------------------
// direction_3_LDR
// A2 ---------------------------
// direction_4_LDR
// A3 ---------------------------
Once you've finished and uploaded the code to the Arduino Nano, connect it to the board.
feature
1) Display estimated solar energy in each direction on serial monitor
2) For each direction, observe the performance of solar charging via metrics adjusted according to the solar threshold (level):
Red - low
Yellow - medium
green - high
3) Finally you will be notified if the device is moved to a tilted position to use the vertical beam to charge the battery more efficiently.
- How about the boost converter TPS61299?
- 5 Converter Topologies for Integrated Solar and Storage Systems
- How to Make a Soft Latch Circuit
- Lithium battery overcharge, over discharge, short circuit protection circuit design
- MT3608 constitutes a 3.7V to 12V boost circuit diagram
- The constant current source composed of two transistors can drive high power
- Miniature polarity reversal power supply using MAX1721
- Practical constant current charger-----Constant current charger
- Homemade Electric Bike Fast Charger
- Solar Lead Acid Battery Charger
- Excellent performance household inverter power supply circuit
- DC 12V to AC 100V inverter power supply circuit design
- Power circuit b composed of intelligent thyristor modules
- Typical Reference Voltage and Power Supply Circuits
- EPSON PHOTO 830U printer power circuit
- 4-phase CPU power circuit using HIP6301 and HIP6602 chips
- CF1 (CF2) DC power supply circuit
- Power on mobile phone detector circuit
- Power circuit for home appliance repair
- Common power circuits and applications 08