Arduino Motion Tracker





Introduction: Arduino Motion Tracker

About: Hi, i'm a guy who is like to build stuff if i need something or i like something i want to make it, and if it's need some new skills i learn them while i'm making:)

Hi everyone!

This is my first arduino based instructable i hope you will like it:) I'm a big fan of the first Alien movie and the "old-sci-fi" gadgets, so I decided to make a fully operational portable motion-tracker. In this tutorial I will show you every step how I made it so you can make your own one. Plus at the end I will give you some advice according to my experiences so you can make an even better one. This was the first time I used a tft-lcd monitor and some faild attempt I was so happy when I realised how can I use it:)(Of course i will show you how can you use it properly)

I hope you are gonna enjoy this instructable and maybe some of you will make his/her own one. So let's start the making:)

Step 1: What You Need:

Materials and parts:

  • Arduino Mega (because of the pins )
  • 2.4" TFT display (I used one from mcufriend)
  • 3 pcs PIR sensor (HC-SR501)
  • 1pcs ultrasonic distance sensor (HC-SR04)
  • 1pcs piezo buzzer
  • 1pcs 100ohm resistor
  • some male-male jumper cable
  • many male-female jumper cable (for the display and the sensors)
  • 1pcs 11*11 cm junction box
  • 1pcs 15*11*7 cm junction box
  • 1pcs toggle switch
  • plastic sheet(I used some oddments)
  • a few screw with the screw nuts
  • 1 paif of bicycle handlebar grip
  • warning tape (for the good looking )
  • 1pcs 9v battery
  • 1pcs 9v battery clip
  • 1pcs Male Power Jack Plug 5.5 x 2.1mm
  • 2.1*5.5 male plug
  • some shrink tube
  • electrical tape
  • mini breadboard
  • pvc tube


  • paint spary (coloring the junction boxes)
  • soldering iron
  • rotary tool
  • glue gun
  • Jig saw
  • Hole saw cutter
  • rasp
  • forceps

Step 2: The Circuit

The plan was a device what can sensing motion in three different way, so I needed three PIR motion sensors on the three different sides of the device. And an ultrasonic distance module on the front. For the sensors I used a part of the mini breadboard for the common 5V and common GND. And one of the 9V clip's cable soldered to the toggle switch so i can turn it ON/OFF. I soldered a 100Ohm resisitor to the piezo buzzer it protect the arduino board. I had to use an arduino MEGA because of the display it needs a lot of pins and an UNO doesn't have enough for the display and the sensors. Good to know the ultrasonic sensor maximum range is about 4 meter and the PIR motion sensor's maximum range is about 7 meter. But you can modify The PIR sensor's range and the delay time with 2 tiny potentiometer on the sensor. In the first picture you can see there is a lot of jumper wire so i mad a schematic picture with fritzing. It makes easier to connect correctly the sensors:)

Step 3: The Code

This part was a bit tricky, because when I tried to use the tft lcd screen always got a white screen. After some reading I realized it's not a rare problem if you use clone arduino board with not adafruit displays .I needed some hour to find the solution. (I find it in someone's instructable:) ). To save you some time you can download the modified libraries and the code what I used. After I learned how to avoid the whitescreen problem it was really fun to learn how to draw on the tft display. I'm sure i will do some other project with this type of displayshield. When I read about these sensors I noticed that they need some time to calibrate themself so to fill this time I write a "boot display" in the setup part. In the code you can check how to code a PIR sensor and the ultrasound module. I learned to use them from otherone's instructables and some great website:) I write a code that calculate the distance in cm so you need to rewrite it if you want to see it in inch. If you have any suggestion about to improve the code pls leave a comment:)

I put here 2 videos to show you the device in progress.

(Here the URLs so you can check it from phone too)

Boot monitor

Motion tracking

I tried to leave a comment for every important line or function, but if you have anny question about a code pls ask i will answer as soon as i can.

!IMPORTANT:This code is only working on arduino mega if you want to use it on an uno board you need to modify the SWTFT library uncomment uno_line and comment the mega_line!

(I want say a big thank you for these people who amended these libriaries)

Step 4: The Shell

For the shell of the device i used 2 junction boxes. The bigger one contains the arduino mega and the batteries. The other one contains the tft display. I painted the boxes with a paintspray. Good to know the plastic is becoming dry in a few hours, but on the rubber caps the paint can't be completly dry. It seems I shouldn't use this paint for rubber. After the painting I cutted 2 parts from an old unsed plastic sheet. With this 2 parts i fixed the 2 junction boxes with some screws and screw nuts. For the handle I used a piece of PVC tube. I cutted the surplusage. And I had to cut a line for the wires from the display and the distance module. I also cutted a rectangle shape hole on the top of the little junction boxe for the display. After the cutting with the jig saw I drilled the holes for the handle. Then i painted the parts. For the toggle switch i used the junction box's cutted part. After everything is dried i put the rubber caps back to their places.

Step 5: Assembling

The first step was the cabling. That was a bit meticulous work. Because there wasn't soo much place and i needed to put every jumper cable into the proper hole. After that i putted the buzzer and the left and right PIR sensor into the junction box, connect to the arduino. Good to know these sensors really sensitive so i had to overshadow them somehow. For that i used the rubber caps. I cutted a little hole on them as you see on the pictures. I fixed the sensors with some electric tape. I also used electric tape to fix the utrasonic module and the front PIR sensor. I cutted in half and vertical the bicycle grips for the handler. I don't like wasting so i used the unused grip part as a spacer for the display in the smaller junction box. I hided the orange edges of the display with some black electric tape. I glued one of the unused rubber cap to the bottom of the device so it can hide the end of the green pvc tube. For the good look i put some yellow/black warning tape on the device. Last step was to unplug the usb connector and plug the male power jack plug. Switch it ON and start Tracking motion:)

I bought the snesors and the arduino from ebay the other materials from local home improvement store. The final cost of the device is about 15-20 USD.

The final conclusion of the project is you can make literally everything what you want with the proper arduino board and some sensor and module. You can make a better looking shell if you have a 3D printer and your device could have a longer working time if you replace the 9v battery with a rechargeable or Lipo battery. And with a bigger display it looks better. Or if you use more distance mesure module you can mesure the distance in multiple way.

Now you now how to make a Motion Tracker if one of you make his/her own please leave a "I made it" comment and share with me the result. I would love to see your own gadgets.

Maybe this device will help you avoid Xenomorphs.

If you have any question please feel free asking me!

Happy making:)



    • Creative Misuse Contest

      Creative Misuse Contest
    • Oil Contest

      Oil Contest
    • Water Contest

      Water Contest

    36 Discussions


    Question 2 months ago

    Hey, how well does it actually work? if It's still put together, could you post a video of you actually showing off if "tracking" something?

    Only realized this AFTER ordering the mega lol

    2 more answers

    Hey. There is video where it's tracking my leg:D But you are right i could make some better video, but i built it almost 2 years ago so now it's in pieces because i needed the MEGA for my 3D printer. But when i used this tracker it worked preatty well in a 4-5 meter range, with a little sensor noise, maybe a better code can solve this problem.

    Thanks man, will post pics when the damn mega arives ;-;

    I tried this and am getting a white flashing screen. You said something about this, could you tell me more how to fix. I am using your code. An Arduino mega((elegoo) and an 2.6/2.8" ttf LCD shield(adafruit TP28017). Thanks for any help, I am rather new to this.

    white screen.JPG
    1 more answer

    Hi! Happy to see someone try to make it:) To be honest i made this almost 2 years ago so i can't remember every details, but as i know i had to search for another library because i used clone devices. So i had to try it with couple of libraries until i got a working one. I hope you will find a working one for your tft soon:)

    Would it be possible to incorporate the Lidar-lite 3 system into this? It costs $151.99, and supposedly has a range of 40 meters or 131 Feet.

    1 reply

    Hy! I'm not an arduino expert , but i saw some example for arduino-lidar prjoects , so i guess it could work. however if you spend 150$ for the lidar it isn't a wast to buy an arduino for a few bucks. here is a link about this kind of project:

    how much did it cost to make? would ever build one to sell? and if so how much.

    1 reply

    Sorry for the slow response, but i had a pretty busy period in my life. So it's cost about 15$, but i really believe the spirit of DIY, so i gave you every information to make one for yourself, if you scroll down a bit you can see someone is already started to build one. Happy making!

    I need this!!

    I've downloaded everything but it proper scares me now I've looked at it. This will be my first project with Arduino

    8 replies

    If you never ever used an arduino i guess you need some practice. But i'm sure you can easily make it:) If you have any question pls feel free to ask it i will answer as soon as i can.

    hint: i think the best training if you try to use the different sensors separatedly. I think i left enough comment in the cod, but you can find tons of tutorials for the arduino sensors. Good luck for the making.

    P.S. pls send me a picture if ready.

    Thank you v much, that would be a great help. If you don't mind, when im ready to order my components, if you could just check my list to make sure im ordering the right bits and pieces that would be a great help! I dont want to spend a ton on my first project just in case i mess up ;) and the world of Arduino boards is still a minefield to me.


    Of coourse. I also used and lcd/touch screen. The only difference is the size. My screen is only 2,4, but its not a problem with a bigger screen it will look much cooler. And yes i used the same arduino board, but you stell need 3pcss inrared sensor and 1pcs ulrasound distance sensor.

    Hey Dylan,

    Just to update you on my progress. Its taken a while but I've got the screen working and i have all the sensors hooked up but these still need fine tuning. Getting some random readings which i want to try and sort out and am going to start on constructing the body very soon. Im basing it on the tracker from the film Aliens, been doing my research ;)


    It's look pretty awesome:D More similar to the one from Aliens, than mine. I hope the body just as awesome as this monitor.

    Awesome, many thanks. Will take a while to arrive from hong kong but i cant wait to get started :)

    This is an amazing ible. Can't wait to get started. One question; is it possible I'll be able to draw a different image onto thetft but still have the same concept(same function etc)

    1 reply

    Thank you! Of course you can draw almost anything, if you can program it. My design try to copy the design of the motion tracker from Alien: Isolation:) Pls leave a picture if you finished your one. Happy making!