Hi, I need some help with part of my project. It’s a 700W Solar panel sun tracking bed.
This project.has been up and running for 6 months but with problems, random off line events, random OTA update not responding.
I think the mathematical model tracking the sun has some unknown error and I have had enough looking for it. So I have found a workaround. Using webhooks and an API response from a website. https://app.ipgeolocation.io/
(The bit I need help with)
I need to save two results in two variables to use to compare the the panels actual angle.
The sun_altitude response and sun_azimuth response.
The API response is:
{“location”:{“latitude”:50.31962,“longitude”:-4.90284},“date”:“2020-09-30”,“current_time”:“08:23:34.557”,“sunrise”:“07:18”,“sunset”:“18:59”,“sun_status”:"-",“solar_noon”:“13:09”,“day_length”:“11:41”,“sun_altitude”:9.319119668392078,“sun_distance”:1.4981037116339523E8,“sun_azimuth”:106.34114510574415,“moonrise”:“19:02”,“moonset”:“05:23”,“moon_status”:"-",“moon_altitude”:-26.902708303098045,“moon_distance”:400770.9905656442,“moon_azimuth”:290.6823542744472,“moon_parallactic_angle”:30.750670872240985}
Hardware:
Custom tilting frame
Two 350W solar panels
Two linear actuators
Esp32
4 channel relay shield (opto isolated)
Two lm2596 DC to DC buck converter (one powers ESP32 the other the relays)
Triple-axis Accelerometer LSM303
Concept:
The LSM303 measures the tilt on the panels,
Using a Blynk local server.
A mathematical model calculated the sun’s path giving elevation and azimuth. (Not 100% reliable changing to a API response)
Compare the two and move the linear actuators accordingly.
Store power in 20x 110Ah batteries
Additional power source 8x fixed angle 350w solar panels.
1.5kw custom made wind turbine and blynk controled dump load.
8kw 24v to 240v inverter.