Arduino Tracking Robot

I. What’s it made of

  1. CPU — Arduino Lenoard board    (https://www.arduino.cc/en/Main/ArduinoBoardLeonardo)

         The Arduino Leonardo is a microcontroller board. It has 20 digital input/output pins (of which 7 can be used as PWM outputs and 12 as analog inputs), a 16 MHz crystal oscillator, a micro USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a  computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.

         What I am using –> https://www.dfrobot.com/index.php?route=product/product&product_id=1159

         Provide Library, IDE.

     2. Camera — Pixy Cam (http://charmedlabs.com/default/pixy-cmucam5/)

   Pixy is a fast vision sensor for DIY robotics and similar applications. You can teach Pixy an object just by pressing a button. Use Pixy for lots of different applications!  It’s capable of tracking hundreds of objects simultaneously and only provides the data you are interested in.

        Provide Library, Example codes.

     3. Pan tilt  (https://shop.pimoroni.com/products/adafruit-mini-pan-tilt-kit-assembled-with-micro-servos)

  • Can rotate 180° from side-to-side
  • Can tilt up & down 150°
  • Comes fully assembled with two Micro Servos included and a 38mm x 36mm space to mount a camera or sensor or whatever you like
  • Since the motors are plain, every-day analog servos, you can use any microcontroller or driver

     The pan-tilt is an easy way to give whatever you’re making both left-right and up-down motion.

         Example codes Provided by Pixy Cam

     4. Tank base — Zumo robot (https://www.pololu.com/product/2506)

        Provide Library.

II. Assemble…

III. Configure the tracking object.

Method 1 (Manually):  — not precious

First, apply power to Pixy via battery or USB cable if you haven’t already. When you power up Pixy, it will go through a series of LED flashes. Wait for the LED to turn off before teaching Pixy an object. Now, hold down the button on top of Pixy. After about 1 second, the LED will turn on – first white, then red, then other colors – but when it turns red, release the button.

When you release the button, Pixy will enter what’s called “light pipe” mode, where the LED color is the color of the object that Pixy has “locked” onto. Pixy will lock onto objects in the center of its video frame, so hold the object directly in front of Pixy, between 6 and 20 inches from the lens.

Method 2 (Via PixyMon): — ideal

IV. Coding

  1. Library installation;
  2. compile;
  3. * API: https://www.arduino.cc/en/Reference/HomePage

V. Upload -> Have Fun

 


VI. Future COOL Feature

  1. IoT of the thing.

  2. Foosball Robot. (two tracking objects, ball and goal)

PS. Arduino community

There is no limitation: https://create.arduino.cc/projecthub

A particular evil Project:  https://create.arduino.cc/projecthub/bravoechonovember/control-a-cockroach-with-arduino-for-under-30-d3d019?ref=search&ref_id=pet&offset=6

I am also trying Lego Mindstorms, I will write an article about it when I get some time.

 

Leave a Reply