How to Build PHIL - a Light Tracking Robot




Introduction: How to Build PHIL - a Light Tracking Robot

About: I'm a 16 year old robotics enthusiast from South Africa. I've created a logo and name to represent my projects, Dynagon Robotics. Along with a friend I build robotic creations using Arduino and 3D printing.

In this Instructable I will be showing you how I made this dual axis light tracking robot using an Arduino Uno. All the CAD and code will be included so you can build it yourself without needing any programming or designing skills. All you will need is a 3D printer, an Arduino Uno and a few other basic parts!


Tools you will need:

> A PC (duh)

> A 3D printer

> Soldering iron (and solder wire)

> Screw driver


> 3D printing filament (PLA recommended)

> Proto board

> Self-adhering rubber or foam strip (optional)

> Some thin solid core wire

> Heat shrink tubing

Off-the-shelf components:

> Arduino Uno (Or compatible board)

> 2 x 100 µF capacitors rated for 5V

> 2 Micro servo motors

> 4 Light dependant resistors (LDR's)

> 1 x 5mm LED

> 1 x 220 Ohm resistor

> 4 x 10 kOhm resistors

> 11 x M3 self tapping screws

> 8 x M2 self tapping screws

> 4 x M3 machine screws with nuts

Step 1: Printing All the Parts

The first step is to 3D print all the parts using the STL files I've provided. I painted mine to my liking, but you can leave it as it is or use different filament colours. That's up to you!

Step 2: Electronics & Gimble Assembly

For this step you can install the LDR's and servo motors, as well as mount the Arduino to the base plate. Keep in mind that we still have to make the power distrubution board, so don't assemble any 3D printed parts in advance.

Installing the LDR's:

The robot tracks light by comparing the values returned by 4 photoresistors. There values will differ from each other if the light source is not perpendicular to the tracking head, as the light shade will cast a shadow on some of the LDR's. The arduino code will then move the head in an X and Y axis accordingly in order to stay on point with the light source. Mounting the LDR's is very simple: they have special pockets designed into the tracking head. Simply poke the legs through the holes, apply super glue and push it in until it sits flush with the surface.

Installing the servos:

Slot the servos into place and secure them with M2 self tapping screws as shown. You can now complete the mechanical assembly by mouting the servo horns to the designated brackets. After this you can attach the tracking head to the top of the assembly using 4 M3 machine screws & nuts. The pivot of the X axis can be attached using anything that can work as a 3mm shaft. I used a piece of BBQ skewer. This completes the dual axis gimble.

Mounting the Arduino Uno:

Align the screw holes on the arduino with the holes in the base plate, and secure it with 3 M3 self tapping screws.

Step 3: Power Distrubution

A key component of this robot is the power distrubution board, as it ensures that the correct power gets transmitted to the right component. This board will also help reduce voltage fluctuations caused by the servos being powered directly from the Arduino.

Making the board:

Cut out a piece of proto board, roughly 45 x 35mm in size. This should give you enough room to solder all the components. Refer to the circuit diagram provided, and solder the components accordingly. The servo motors both have 100 µF capacitors over their power and ground wires to prevent votage drops. The 4 LDR's have 10 kOhm resistors as voltage deviders wired to ground (refer to circuit diagram). The power LED fits in a hole on the electronics housing, and has a 220 Ohm resistor connected to lower the power in order to prevent it from burning out. Alternatively to using proto board, you can simply solder everything together in mid air, although that would be pretty messy.

Step 4: Full Assembly

Now that the power distrubution board is made its time to put it all together!

Connecting the wires:

First solder the appropriate wires from the power distrubution board to the various designated components. (Be sure to route them through the hole in the electronics housig from the bottom, otherwise you will have a problem!) IMPORTANT: Make sure you wire up the LDR's in the right sequence as show in the picture. These numbers correspond to the numbers in the circuit diagram. Same with the servos - the bottom one is marked "Y" and the top one "X". You can use heat shrinkable tubing to clean things up a little. Now, plug the remaining wires into the appropriate pins on the Arduino. The Power LED can be push-fitted into the hole above the USB port after some super glue had been applied.

Assembling the 3D printed parts:

The gimble assembly can now be attached to the top of the electronics housing with 4 M3 self tapping screws. Next, gently fit the Arduino (which is already attached to the bottom plate) along with the power distrubution board into the electronics housing, pushing until the plate is flush with the bottom and the screw holes are aligned. Now, using 4 M3 self tapping screws, attach the bottom plate to the electronics housing. Some rubber/foam feet can be added over the screws, to give it stability and prevent the screws from scratching your tables.

Step 5: Coding

The time has come to give this robot some life! Find the code I wrote attached to this step, and upload it to the Arduino via the Arduino IDE (Can be downloaded here). The robot is USB powered, so you can use any standard USB power source to power it up. (e.g. Power banks, phone charegers, laptops etc.)


Step 6: Final Notes

You can now power Phil up and have him speak for himself! Use a flashlight (Or any other bright light source) and try moving it around. It should follow the light wherever it goes. If it works, congrats, you built it correctly!

This was my first ever robotics project and I think it turned out pretty well. Please note that "Dynagon Robotics" is not a company, it is simply a name I came up with to represent my robotic projects.

Happy making :)

Robots Contest

Second Prize in the
Robots Contest

Be the First to Share


    • Toys & Games Contest

      Toys & Games Contest
    • Home Decor Challenge

      Home Decor Challenge
    • Furniture Contest

      Furniture Contest



    2 months ago

    Yay, had built a similar one from popsicle sticks and some scrap plastics. The poor wretch coulsb`t even carry solar panels. :D But I disliked the servo twitch, intend to try the sme with steppers ... which will presumably also give me more angle range.


    5 months ago on Step 1

    hey! could you please guide me more about the prototype? I mean briefly just tell us about which software you have used to make these STL files that you have attached and how?


    Reply 5 months ago

    Hello! I used Autodesk Fusion 360 for all the CAD design and then exported all the models as STL for 3D printing. I used Cura to slice all the files and prepare them for printing. Cura is my personal preference when it comes to slicing software as it is reliable and free to use.


    9 months ago

    This would be great to put a solar panel onto and the solar panel angles at the sun all day long.


    Reply 9 months ago

    Yes, that's the concept. This is a little mockup to show how the sensors can send data and how it translates into motion, for fun!