Infrared Tracking Camera Mount




About: I like to make everything and anything! from electronics to food! and i'll be showing you all the things i come up with here! Twitter: @ERILtech

This Instructable shows you how to make a camera mount that will track a 200Hz pulsing infrared (IR) light source. Tracking this 200Hz pulsing source and not simply the brightest IR light, makes this system more resilient to background IR noise.

Although in this build i used my phone (Samsung S3) as my camera, the concept shown could be used to make devices that fit any camera.

As this is just the first prototype, the mount itself is made of 6mm MDF, though later versions could be 3D printed which would reduce weight and increase the precision of movements.

The total cost for this build was about $45 and i had to make a few ad hoc adustments to the origional design as i went.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Materials and Equipment

Equipment needed

  1. Hot glue gun
  2. Rotary tool
  3. Soldering iron
  4. Wire cutters


The Camera Mount

  1. MDF board 1200x600x60mm cut to size (all pieces with measurements shown above)
  2. 2 Tower Pro Micro 9g servos
  3. Glue sticks (for hot glue gun)

The Tracking System

  1. 4 standard infrared phototransistors
  2. 4 10K ohm resistors
  3. 1 small prototyping PCB
  4. 8 400mm long, light hookup wire (red)
  5. 2 150mm long, light hookup wire (one red and one black)
  6. 4 100mm long, light hookup wire (black)
  7. 1 Arduino Uno R3
  8. 1 Adafruit Motor shield (v1, but there is a v2)

The Infrared Signal Source

  1. 9 Standard infrared LEDs
  2. 1 prototyping PCB board for LEDs - cut to size (25x30mm)
  3. 1 prototyping PCB board for mini amp - cut to size (25x40mm)
  4. 1 40mm heat shrink tubing (cut in half, length ways)
  5. 1 Small safety pin
  6. 2 750mm long, light hookup wire
  7. 1 4 pin terminal header
  8. 2 BC547 transistors
  9. 1 400ohm resistor
  10. 2 30mm wire links (one red one black)
  11. 1 Arduino Uno R3
  12. 1 6xAA battery holder
  13. 6 AA batteries

Step 2: Building the Mount

This camera mount is made of 6mm MDF which was light weight, though a thinner board might have been better.


  1. Mark and cut out all the pieces from the board of MDF (The measurements are shown above)
  2. Once you have all the pieces start by building the base
  3. Glue the side pieces (C and D) to the bottom plate (A) and then glue front plate (E) on.
  4. Cut out a servo hole (using the rotary tool) from piece B - see picture for measurements
  5. Glue in servo 1 into hole (B), screw holes will be on the inside
  6. Glue top on the base
  7. Glue together the rotating plate, pieces F,G,H (the notch seen in piece H is not seen in the picture as it was added later to let more light in on the right phototransistor ) make sure you cut out the servo hole (using the rotary tool) from piece H.
  8. Glue servo 2 into the hole cut into H.
  9. Glue together the camera holder (phone holder), pieces I,J,K,L,M,N,O. Pieces N and O go on the back of M and I to hold the phone in place (seen in picture).
  10. Glue the arrow shaped rotor guides in place, on piece B and piece H. The point of the arrow should be 40mm from the end of piece B and 60mm from the bottom of piece H (seen in picture).
  11. Screw a servo arm onto each servo. Make sure that length ways, they are in the middle of their full range of motion.
  12. Glue servo 1's arm onto plate G and servo 2's arm onto piece I

Camera mount Finished!

Step 3: The Tracking System

The electronics for the tracking system are pretty straight forward as most of the work is done by the Arduino module and the Adafruit Motor shield.


1. Mark out the spots from the phototransistors (PT) on piece K. On the top and bottom arms the (PT) will be glued 20mm from the ends and 10mm from each side, on the side arms they will be 10mm from the ends and 15mm from the sides.
2. Bend the leads of the PT into shape. The leads of the top and left PT will be bent over the edge, the bottom and right PT leads will be bent outwards.
3. Solder one of the 400mm wires onto each of the PT leads
4. Glue each of the PT in place on K. Make sure the leads of the PTs on the side arms are both facing left and the leads of the PTs on the top and bottom arms are facing up
5. Next solder together the PCB (refer to schematic).
6. Solder R1-4 (10k Ohm resistors) connecting one end of all 4 to a common node (this will be GND)
7. Solder the PTs T1-4. The layout of the PT's are; T1 = bottom PT, T2 = top PT, T3 = right PT, T4 = left PT. when soldering the PTs make sure you connect the emitter side (the short lead) to the resistor and the collector (the long lead) to a common node with all the other PTs (this will be the 5v rail).
8. At the emitter pin of all the PTs solder a 100mm wire, this will be connected to the Adafruit Motor shield.
9. At the 5v rail (red) and GND (black) solder a 150mm wire this will also be connected to Adafruit Motor shield.
10. Solder the 100mm wires (analog read in from PTs - voltage across resistor will be proportional to light intensity) to the prototyping analog pin space on the Adafruit Motor shield, make sure they are in the right order (T1=A0 etc).
11. Solder the 5v and GND wires to the Adafruit Motor shield (there is a prototyping rail for both of these).
12. Hot glue all wires to their respective PCB boards, this will prevent them from being ripped out.
13. Connect the servos to the Adafruit Motor shield's servo terminal pins, servo 2 to pin 1 servo 1 to pin 2.
14. Cable tie the PT wires to prevent tangling when the mount moves, first cable tie pairs then all wires together.
15. Put all the electronics into the base, secure with hot glue.

Tracking system finished!

Step 4: Tracking System Code

The code is what really makes this device work. It reads in an array of 100 values from each PT and determines whether or not the 200Hz pulsing signal is there. It then moves the two servos to follow the pulsing IR light source.

For more information on the signal detection code, visit my other Instructable Arduino IR signal detector

The tracking code IR_flash_director is available below.

The IR_reader code just prints out the raw values from each PT, which I found useful when testing

Step 5: Infrared Signal Source

This device produces a strong 200Hz pulsing IR signal with the use of an Arduino Uno, though you could produce it with a 555 timer.


LED board

1. Cut out a small PCB board from a larger prototyping board (25x30mm).
2. solder the array of 9 LEDs onto the smaller PCB board, following the layout shown in the picture, making sure to solder the two positives and two negatives together with hookup wire.
3. Solder two 750mm long hookup wires to the LED board, one for positive, one for negative (I used double stranded AV wire ). Hot Glue wires in place.
4. Hot glue the 40mm long heat shrink tubing (cut length ways) onto the back of the LED board. This will stop the safety pin from shorting out the LEDs.
5. Hot glue a safety pin on the opposite side to where you soldered the 750mm positive and negative wires. the safety pin is what you will use to secure the LEDs to yourself.
6. Now the LED board in finished test it through a camera, you should see the LEDs emit a purple light.

Mini Amp

This amplifier is needed because the output of the I/O pins is not enough to power all 9 of the LEDs.

1. Cut out a small PCB board from a larger prototyping board (25mmx40mm).
2. Following the schematic, solder the parts together on the PCB, starting with 4 pin terminal. This amplifier board is designed to connect directly to the Arduino Uno, the first pin will connect to the GND on the digital pin side.
3. Next solder both BC547 transistors together, the emitter of T1 to the collector of T2. These cascaded transistors will amplify the pulsing signal considerably.
4. Solder the 400Ohm resistor between the collector and base of T1
5. Solder the positive wire from the LED board to the emitter of T2 and the negative to the GND terminal pin
6. Use a link to join the base of T2 to the 3rd terminal pin (the 2nd and 4th terminal pins are only there for support).
7. Solder another link from the collector of T1, leave it floating, this will connect into the Arduino's 5v pin.
8. Turn the board upside down and connect it to the Arduino Uno, remembering to connect the GND pin to the Arduino's GND pin and the 5v wire to the Arduino's 5v pin.
9. Solder a 2.5mm DC power jack to a 6x1.5 AA battery pack, this will provide the 9v power for the Arduino (and will last a whole lot longer than a 9v battery).

Signal Source Complete!

Step 6: IR Signal Code

This code simply pulses the pin 12 for 250uS every 5mS producing the 200Hz signal, the code, "flashing_ir" is available below.

Once uploaded onto the Arduino Uno you can test that the singal is being produced by using the "Flash_det" code and your tacking system, the Flash_det code will simply print out negative values if the signal is detected.

Step 7: Final Testing

As seen in the videos (view 1 and view 2) the device is a bit slow and clunky, but as this is just the first prototype, i was pretty happy with that! It was able to detect the IR signal from up to about 3-4 meters away and ignored other light sources as designed (the light in my room for example).

I put most of the clunky/slow movement down to the small servos which will have to be upgraded in the next design (especially if a larger camera is used).

This device is just one application of the signal tracking system which was initially designed (but never implemented) to guide a quadcopter in for landing, though i see many applications for it.

I entered this Instructable in the "Epilog Challenge VI" as I believe the Epilog Zing 16 Laser will help me create lighter weight and more precise parts for future projects (some parts in this project had to be made larger and less precise due to limitations in what i could cut out) so if you liked this Instructable / were inspired by it to create your own device by using the same concept, please vote for me!

Thanks for reading


Epilog Challenge VI

Participated in the
Epilog Challenge VI

Home Technology Contest

Participated in the
Home Technology Contest

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    33 Discussions


    2 years ago

    I downloaded the flash dect. code but it will not open, in fact the only code that opened is the ir detect. Any suggestions?


    2 years ago

    In the IR_FLASH_DETECTOR code I cant see where you have incorporated the photo transistors like in the Flash_det code (e.g. you have used Tr1, Tr2... for the transistors in the flash_det code) would I have to add these to the flash detector code?

    Søren StigA

    4 years ago

    So cool. It is just what I am looking for:-)

    I will go back home and built this. Wauw

    3 replies

    Reply 2 years ago

    I have meant to do an update on this but also haven't had the time. Except for using stepper motors instead of servos I haven't really thought about many improvements so far

    Søren StigAMrSirLRD

    Reply 2 years ago

    :-/ One year passed, and I did not find the time to build the tracking camera. I hope it will be possible soon.
    Did you had any learnings that I should know of?


    Reply 3 years ago

    For the delay between samples you might be able to get away with the same value, for the distance between pulses you'll have to do some testing, look at the instructable for more information


    3 years ago

    hello , i would like to use 50Hz and 100Hz too , what values should use the code

    1 reply

    Reply 3 years ago

    For the emitter you would want to pulse the leds once every 10ms for 100 Hz and once every 20ms for 50Hz


    3 years ago

    I like the concept, what kind of range is it possible to get during the day outdoors?

    1 reply

    Reply 3 years ago

    I'm not sure, i've never tested it outside


    Reply 4 years ago

    They main function of the code is the flashing IR detection. The code take 100 readings from each photo transistor and for each set of readings determined whether the pulsing signal is present by working out the period of the dominant signal. Each of the four sets of signals is then compared to see which one is the strongest, the servo moves the camera accordingly


    Reply 4 years ago on Introduction

    Ah k makes sence. what is ment by


    What is the 30 for?




    What in the 48 for?


    Reply 4 years ago on Introduction

    for more information on the signal detection see


    Reply 4 years ago

    Yeah i have a general idea of what its doing but the teating and comparing part is quite comfusing. I was just wondering if you have an earlier version thats easier to understand and still works for this project. I like the idea of the tracking but really want to understand each line of code too. Which makes it abit hard for me i guess lol


    Reply 4 years ago

    I don't have any earlier version of the code, the position function either compares the top and bottom photo transistor or the left and right and it just tests whether the difference is greater than a certain precision


    Reply 4 years ago on Introduction

    ah k jup i kind of get the idea of why it needs to be done but when looking at the code i get abit lost on what each part is actually doing.