DIY Hacks & How To’s: Motion Tracking Skull

DIY Hacks & How To's: Motion Tracking Skull

Hi, this is Wayne again with a topic “DIY Hacks & How To’s: Motion Tracking Skull”.
Today, i’m going to show you how you can make a skull that will turn to look at you and follow your movements as you walk by to accomplish this, i used light sensors to detect a person’s shadow. An arduino then calculates where the person is standing and activates a servo that turns the skull to face them when they move the skull turns to follow them. The first thing that you need to do is find a lightweight skull and a servo that you can easily mount to it. I attached my servo to the bottom of the skull with a generous amount of hot glue, then to mount them.

I attached the rotor of the servo to a small piece of cardboard with more hot glue. The light sensors are made by wiring a 10k resistor in series with a photo resistor. The 10k resistor is connected to ground and the photo resistor is connected to 5 volts. This makes a light, sensitive voltage divider as the light levels change, so does the voltage at the center pin. This voltage is then measured by the arduino’s analog input pins.

DIY Hacks & How To's: Motion Tracking Skull

The arduino monitors the voltages from each pin and calculates which sensor is experiencing the greatest drop in voltage. The arduino then sends a signal to the servo that turns the skull to face the sensor and the person standing in front of it. First, i assembled the sensors on a breadboard and connected them to the arduino with jumper wires. Then i used another set of jumper wires to connect the servo to the arduino’s power lines and a digital output pin now it’s time to load some code onto the arduino. So plug it into your computer and open up the arduino environment. There’S a link in the description box, where you can find a copy of the code that i wrote for this project copy and paste it into your sketch and upload it to the arduino. Now, whenever you cover up one of the sensors, the servo should turn to the corresponding location. If everything is working properly, then you’re ready to set it all up. I put mine on a bookshelf with some other random halloween props. I used some loose fabric to cover up the base and the servo. This also helped to cover up the wires to space out the photo resistors. I added an extension wire to each lead. Then i insulated the contacts with heat shrink tubing the best place to mount the sensors is on the bottom side of the shelf along the edge. You can just stick them in place with tape to power the system.

You can run a usb cable to a nearby computer or you can use a 5 volt dc adapter, that’s plugged into a wall outlet or an extension cord after testing that a few times you may need to adjust some of the variables in the code to make It work well with your lighting. Now you have a halloween prop that will turn to look at people as they walk by try it out and have fun thanks for watching and check back next week for more diy hacks and how to’s .