Project tutorial
Solar Tracker with Live Data Feed - Windows IoT

Solar Tracker with Live Data Feed - Windows IoT © GPL3+

Tracks the sun to provide more power for longer - With Live Data Feed

  • 1 comment
  • 24 respects

Components and supplies

R8326274 01
Raspberry Pi 2 Model B
Raspberry Pi 2 Proto Board
ACS715 Current Sensor
Analog to Digital converter over SPI
Light Dependant Resistor
5K6 Resistor 1% Metal 1/2 W
Usually comes in 8 pack
2K Resistor 1% Metal 1/2 W
Usually comes in 8 pack
1K Resistor 1% Metal 1/2 W
Usually comes in 8 pack
200R Resistor 1% Metal 1/2 W
Usually comes in 8 pack
1N5404 3A 400V Diode
Or choose an appropriate value depending on amount of current passing through
Hookup wire
For wiring up the board
Red & Black Binding Posts
Optional - For output connection
16 Pin IC Socket
For MCP3008
A000066 iso both
Arduino UNO & Genuino UNO
Or compatible board. Used for controlling servos.* See Notes
HiTec Servo Standard
*See Note about motion hardware
ServoBlock Kit - HiTec Standard (Hub connection)
*See Note about motion hardware
Mounting Hardware for Servos and Panel
*See Notes. For mounting Servos (or type of motor) to panels.

Necessary tools and machines

09507 01
Soldering iron (generic)
And required items for soldering

Apps and online services

About this project


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.

Overview video

Quick overview. Sorry about the glare on the screen.

The Build 


The Raspberry Pi 'HAT'

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. To make the connections refer to the schematics and images above.

The Arduino and Movement System

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

The Voltage dividers and LDRs

Voltage Sensor Board

The Light Sensor Board has 4 Light LDRs with a separator (to block the light) in between them. This is so that a shadow is cast over the LDRs when a light source is not exactly above them. The board once assembled is then attached to the same mount as the solar panel then connect each of the 4 channels (LDRs) to there corresponding pins as follows:





Putting it All together

Typical Hookup with solar regulator

Close up on the voltage board and ACS715.

Now its time to wire it up. Start by wiring the solar panel to a regulator and wire the rest as shown in the above image. Remember the battery input has a limit of 15 volts, so if you need higher change the voltage divider (and some code). Have the voltage monitors in parallel to the incoming voltage and have the ACS715 in series to the load. Also remember the ACS715 has a limit of 30 Amps and 30 Volts.

Once power connections have been made connect each input to the channel on the raspberry pi (see schematic) and connect the servos and LDRs to the Arduino then wire the I2C lines in.

You may also want to power the Arduino and Pi by the solar panel so add the correct voltage regulator. Now plug in a monitor to HDMI and connect a mouse and move on to programming.


First things First

Install the required IDEs. You will need a version of Visual Studio 2015 take a look at this guide for that. Then install the Arduino IDE. Now download the GitHub repository and extract.

Now you will need to flash your memory card with Windows 10 IoT core. Take a look at this guide. It might be a good idea to try the blinky example first to make sure you setup is correct.

Find and open the Arduino software then upload to your Arduino (or compatible) board.

Then find and open the Raspberry Pi software. Open the WindowsIOT_SolarTracker.sln file. Change the platform to ARM and select your remote device (refer to here for help) then press F5 or Deploy to upload the code.

If all is well you may want to set the app to automatically launch on start up. Refer to here for more information on that.


Now your all finished. Enjoy!



Breadboard Connection Guide
Iot%20tracker bb
Hook up Guide. IC on left is MCP3008
Iot%20tracker bb


Similar projects you might like

Windows 10 IoT Core: UltraSonic Distance Mapper

Project showcase by Anurag S. Vasanwala

  • 138 respects

Windows IOT - Automate your power outlets

Project tutorial by Syed Sanoor

  • 48 respects

Home Automation Using Raspberry Pi 2 And Windows 10 IoT

Project tutorial by Anurag S. Vasanwala

  • 706 respects

Windows 10 IoT Core : Hydroflyer

Project showcase by Anurag S. Vasanwala

  • 54 respects

GPS Datalogger, Spatial Analysis, and Azure IoT Hub.

Project tutorial by Shawn Cruise

  • 73 respects

OH HAI! on Windows 10 IoT Core

Project in progress by BuddyC

  • 48 respects
Add projectSign up / Login