Solar Tracker with Live Data Feed – Windows IoT

About this project

About

This project is a Solar Tracker with live data feed powered by the Windows IoT Core running on the Raspberry Pi 2. It is built up of 2 main parts; The Raspberry Pi running as the main controller and an Arduino which takes care of moving the servos and taking the light measurements. The Raspberry Pi has a prototyping board attached to the top to make the connections neater. On that board is a MCP3008 ADC Chip and a Logic Level Converter. The MCP3008 connects to 2 Voltage dividers (One for solar (Max 30 Volts) and one for Battery (Max 15V)) and the ACS715 Current Board. The Logic Level converter connects to the I2C lines and then to the Arduino. The Arduino has 4 Light Dependant Resistors and 2 Servos.solar tracker with live data feed windows iot

The Raspberry Pi side components can be mounted on a prototyping board such as the PiBreak Plus from Freetronics. On this board the Logic Level converter and MCP3008 ADC chip are mounted. There are terminals and headers for connecting to the other components of the project.

To construct the board refer to the schematic above. The components on the left side of the schematic are the parts for the Raspberry Pi (Minus the servos). Start by soldering the 16 Pin IC socket and Logic Level converter (Refer to images) then the headers and terminals. After that solder the wired connections. The PiBreak Plus makes wiring the connections easier by providing a breakout of all the pins.

The Build

Schematicschematic solar tracker with live data feed windows iot

The Arduino is responsible for controlling the drive gear (2 Servos in this case). It receives commands from the raspberry pi via I2C then translates that information into drive commands for the servos. In this example there are two servos (horizontal and vertical) that move the panel and Light Sensor Board. In a permanent setup, servos may not be practical. A more practical option may to use a bigger motor or a worm drive system. However dependant of the drive system the Arduino side code can be easily changed to suit your setup.

Upon looking in the code you will find several voids towards the bottom. The voids begin with killAll().

killAll() simply disengages the servos so that they are free moving.

systemResume() reengages the servos so that they are ready to receive commands.

homeServos() positions the servos in there neutral position. This occurs before killing the servos.

runTracker() position the servos dependant on the light position.

forceServo() forces the servos into a certainty position (Note: Max input is 180. This can be changed in the Raspberry Pi side code.

Commands Received by Arduino:

  • Kill System – 0x00
  • Resume System – 0x01
  • Home Servos – 0x02
  • Force Servo (Any) – 0x0A
  • H Servo – 0x0B
  • V Servo – 0x0C
  • Pos to Send – DEC (variable)
  • Run Tracking System – 0x0F

For more detail: Solar Tracker with Live Data Feed – Windows IoT

Scroll to Top