Table of Contents

DIY Color Detection Robot Using Smartphone

Color-Detection-Robot-Using-Smartphone
Project Description

Introduction

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!



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



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



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.



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



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!



Project Downloads - Code and Files

Circuit Diagram

Circuit Diagram DescriptionCircuit Diagram Fritzing 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.



Explore Related Projects by STEMpedia

Level up your robot control skills by learning how to control a 2-Wheel Drive Robot with hand gestures using PictoBlox AI's Machine Learning extension. Get ready to channel your inner Jean Grey!
Learn how to make a two-wheel-drive robot and code on the go with PictoBlox's mobile app. Control your robot in real-time with your smartphone!
Learn how to make an automatic chocolate dispenser to delight Santa this Christmas. All components can be found in the evive Starter Kit. Let's begin!

Explore Community Projects