DIY Color Detection Robot Using Smartphone

About This Project

This project will show you how to make a Smartphone-controlled robot that plays different sounds on detecting different colors.

Project Info




There are robots that can detect colors and there are those that can play music. But robots that detect colors AND play different sounds depending on different colors? Now that’s something really cool and fun! And that is exactly what we’re going to make today. You’ll need evive and some components from the evive Starter Kit to make the robot, PictoBlox, our Scratch 3.0-based programming interface to program it, and Dabble, our ‘Smarter-than-the-phone’ app, to control it, and lots of DIYing to have lots of fun!

Download PictoBlox from HERE.

Get Dabble on Google Play.

Beginning musical color detection in 3, 2, 1… now!

Components Required

Building Guide

Step 1: Making

Let’s start by making the basic 2-Wheel Drive Robot:

  • Take a robot chassis or a base plate.chassis_base
  • Mount 2 motor brackets on it using M3 bolts and nuts.motor mounts
  • Fasten the DC motors to the motor bracket using M3 bolts and nuts.mount motors
  • Attach wheels on the motor shaft of each motor.attaching_wheels
  • For a robot to be stable, it needs to have three contact points with the surface. For that, we will use a caster wheel.
  • Fasten the caster wheel to the robot chassis using M3 nuts and bolts.mount castor wheel
  • Now, fasten 2 male-to-female standoffs on the top of the chassis using M3 bolts.
  • The space between the evive and the robot chassis is to place your Smartphone.
  • Once you are done with the assembly, make the connections as shown in the next step.


Now let’s make the color track/xylophone.

Take papers of different colors. Take one of them and glue to another. Once done, to make it look like a xylophone, glue small circles of black chart paper at ends of each color paper.Colour-detection-robot-using-smartphone_v

Step 2: Connection

Make the connection as given: 

  • Connect the motor on the left to motor channel M1.
  • Connect the motor on right to motor channel M2.
  • Lastly, connect the HC-05 Bluetooth module to the evive.SmartphoneControlled

Step 3: Logic

  • Open Dabble.
  • Open the Camera module.
  • Then, choose the Color Detector.

Now, turn on the robot and slide the slideswitch1 UP. This will make the robot move forward.

As robot moves, it will detect different color strips below it and will produce different notes depending upon the color it detects. The robot will stop moving forward when it detects the same color twice.

Step 4: Code

You need to make your robot move forward and stop when the color is detected. Write the following script for the same.Move Robot Forward Stop Robot

We need our Smartphone should detect the color and play the tune accordingly.defining map detect color detect red and yellow color detect bluw and green color detect pink and purple color playing buzzer

Finally, upload the main block to evive:

main code

Step 5: Conclusion

With this, your color detection robot is now ready to play colorful music for you!

P.S LAST FOUR DAYS REMAINING! Go check our awesome campaign on Indiegogo and take advantage of the never-like-before opportunity of completely transforming DIYing for you and your loved ones!

Circuit Diagram

DescriptionCircuit Diagram
  • Connect Left motor on M1 Motor Channel
  • Connect Right motor on M2 Motor Channel
  • Lastly, connect the HC-05 Bluetooth module onto the evive.


DescriptionDownload Code
PictoBlox ScriptDownload
Share this Project
Share on facebook
Share on twitter
Share on pinterest
Share on reddit
Share on print
Featured Projects