Color Sorter Robot Using Lego EV3

I built a Color Sorter Robot using Lego EV3 brick. I would like to share my program with you to try incase you are interested in making robots. You can review video and code of my Robot below. Don't forget to leave me a comment!



This program has 4 key parts:

  1. Building the Robot
  2. Record the colors of the pods shown and record it in a array
  3. Move color sorter to the appropriate bin based on the values saved in the array
  4. Drop pod to the correct color bin

1. Building the Robot

For this step, I used instructions provided by lego. Building this took me few hours and I had to make some minor modifications to make this work. Dropper needed adjustments to set the correct starting position to work properly. I did entire coding part myself. You can find building instructions using Ev3 Core set here.

2. Identify the colors of the pods shown and record it in a array

The following code block explains how I am identifying colors using color sensor. After identifying color, EV3 says the color name to ensure it identified color accurately. Then I store identified color in array to let me drop these in the bins in the correct order later on.




3. Move color sorter to the appropriate bin based on the values saved in the array 

In this block, I read the values stored in the array in the first section. After reading the value, program says the name of the color for audio/visual validation. Then the robot will move to the bin associated with the identified color.

4. Drop pod to the correct color bin

This looks like an easy part of the program where it drops the pod to the bin. I added it in my block as I needed it multiple times. Initially, pods were getting stuck or dropping 2 pods at a time. I needed to adjust motor position, speed and time to make it work perfectly. If you would like to adjust initial position of the motor then disconnect it from EV3 and manually adjust it. Don't forget to connect it back to motor again. 

I am learning myself and excited to share what I have achieved. If you like it then please share your feedback and leave your comments.



Comments

Post a Comment