Introduction: Sorting the Object Using Ferb Detective Agent
Sorting of objects is used in many industries like food processing industries, toy industries, etc. This process is simplified by the use of automation. In manufacturing industries, there produce a need to sort objects. The objects may be of similar or dissimilar types. The system should detect the objects and sort them based on their properties. Objects may have different colors, shapes, weight, etc.,
Automation not only reduces manual efforts, time consumed but also prevents danger that might occur when human beings work in hazardous environments.
In this project, we’re going to show you how to design a DIY color sorter that can sort black objects and white objects using an IR sensor. The IR sensor will detect the color of the object and moves it to the corresponding side. If it is white, the servomotor will hit the object towards the right(Team white). If it is black, the servomotor will hit the object towards the left(Team Black).
Check Prabal Experiential Learning (https://www.prabal.in/). Lots of projects are available in an Experiential way.
Step 1: Materials Required
Step 2: Micro: Bit
The Micro: Bit (also referred to as BBC Micro Bit, stylized as micro: bit) is an ARM-based embedded system designed by the BBC for use in computer education in the UK.
The board has an ARM Cortex-M0 processor, accelerometer and magnetometer sensors, Bluetooth and USB connectivity, a display consisting of (5*5 grid)25 LEDs, two programmable buttons(Button A and Button B), and can be powered by either USB or an external battery pack.
The new version Micro: bit has an inbuilt touch sensor, Speaker and Microphone.
The device inputs and outputs are through five ring connectors that are part of the 23-pin edge connector.
P0, P1, P2 are General Purpose Input and Output (GPIO)pins.
Step 3: Servo Motor
A servo motor is an electrical device that can push or rotate an object with great precision. If we want to rotate an object at some specific angles or distance, then we can use a servo motor.
Orange Wire - Signal Pin
Brown Wire -GND
Red Wire - Power supply
Step 4: IR(Infrared Sensor)
IR (Infra-Red)sensor is, as the name suggests, used for sensing the infrared light. Infrared sensors are sensors that can detect infrared radiation. Infrared waves are not visible to the human eye. It has a wavelength greater than visible light. Visible light has a wavelength in the range of 0.4 to 0.7 micrometer.
IR sensor has two LEDs.
1. White LED is an IR LED that works as the IR Transmitter.
2. Black LED is a Photodiode that works as the IR receiver.
IR transmitter continuously emits the IR light and the IR receiver continuously checks for the reflected light from the IR transmitter. If the Infrared light gets reflected back by hitting any object in front of it, the IR receiver receives this Infrared light.
Potentiometer - We can control the range (from how far we want to detect the object by changing the potentiometer value).
IR sensor has two LED indications.
One LED is for the power supply ( sensor is ON).
The second LED is for signal LED which detects the Objects.
Step 5: Ultrasonic Sensor
An ultrasonic sensor is used to measure distance by ultrasonic waves. The ultrasonic sensor head emits an ultrasonic wave and receives the wave reflected back from the target object. It measures the distance to the target (object) by measuring the time between the emission(transmitter) and reception(receiver).
The Required formula:
Distance = ½ T x C
T = Time between Transmitting and receiving of the sound wave.
C = the speed of sound(340 m/s).
Step 6: Starting With Tinkercad - Servo Mini Car and Servo Arm Parts
Choose the components from the Basic shapes Library. Create a bottom part using 1 box with length 53 mm, width 17 mm, and thickness 10mm. Use Round roof shapes from the library and place it perpendicular to the other at the edge of the bottom box. The edges must be in a curvature shape. Modify the structure based on the requirements.
Take a circular shape from the basic shapes library. Make a hole in the center of the circle. Drag the center hole like a servo arm. The depth of the hole is 2 mm.
Step 7: TinkerCad : Servo Mini Car Bottom Closing Part
Just make the closing part for the servo mini car at the bottom side. Drag a rectangle box from the basic shapes library with a length of 53 mm, a width of 17 mm, and a thickness of 3mm.
Step 8: Tinkercad : Blade Parts
Choose a rectangle box with a length of 100 mm, a width of 30 mm, and a thickness of 4mm. Just make a cut and the edge of the rectangle box. Modify it like a stick at the edge of the rectangular box.
Step 9: Tinkercad : Wheel Parts for Servo Mini Car
We will choose the circular shape wheel from the TinkerCad library. The dimensions are
1. Outer Diameter = 35mm
2.Thickness of the wheel = 8mm
3.Axle hole = 3mm.
We can change the dimensions based on the servo motor size. Now duplicate the wheel as per requirement. The duplicate symbol is placed on the left side corner of the Tinkercad design page else we can use short-form ctrl + D.
Step 10: Tinkercad : Basket Parts
Step 11: Tinkercad : Infrared Sensor(IR) Cover Part
Make a plan to cover the Infrared sensor. Measure IR sensor dimensions using a vernier caliper. Cut a hole in a rectangular box for the potentiometer to adjust the range. Make space for two Indications LEDs. Using different shapes, we can design the tail, body, cap, hand, and Leg part.
Step 12: IR Sensor- Full Assembly Part
The assembly parts are...
1. Ferb body part
2. Ferb Leg part
3. Ferb hand part
4. Ferb tail
5. Ferb cap
6. Ferb nose
Step 13: Tinkercad : Ultrasonic Sensor Cover Part
Cover the Ultrasonic sensor except transmitter and receiver part using rectangle box from the basic shapes library. Make a closing part for the Ultrasonic sensor at the backside.
Step 14: Physical Building : Fixing Ultrasonic Sensor[Assistant Detective Agent] With 3D Parts
Take an Ultrasonic sensor and place it inside the 3D part box. Close the backside of the ultrasonic sensor using fevikwik gel.
Step 15: Infrared Sensor(IR)[Ferb Detective Agent]With 3D Parts
Take an IR sensor and insert it. Fix the cap at the top of the Ferb and insert the Ferb hands and legs at the corresponding places. Make a Ferb.
Step 16: Servo Motor[Object Sorter] With 3D Parts
Insert the servo motor from the top hole of the car.Fix the three blades using the circular servo arm 3D parts. Place the front and back wheels for the car using feviKwik gel.
Step 17: 3D Printing : Ultimaker Cura
Export each component as an STL file, and send them to the Ultimaker Cura 3D printing software.
I used the following settings in the Creality Ender 3D printer.
Printer Nozzle Size: 1mm
Retraction Distance: 10 mm
Retraction retract speed: 60 mm/sec
Prime speed: 30 mm/sec
Z hop when retracted: enabled
Max Z speed: 120 mm/s
Z hop height: 1 mm
Travel speed: 200 mm/s
Layer height: 0.15 mm
Print temp initial layer: 200 Temperatures
Print Bed Temperature: 60 Temperatures Main
Printing Temperature: 180 Temperature (degrees) for main
print tempOverhang: 30 degrees
Support Pattern: Grid
Support Placement: Touching build Plate
Support Overhanging angle: 45
All the other settings: default
Infill Density: 10
Initial Layer height: 0.2
- 180 centre arm.STL
- blade 1.STL
- blade 2.STL
- blade 3.STL
- connecting part servo and hitting.STL
- ferb face.STL
- ferb hand.STL
- ferb leg.STL
- ferb nose ed.STL
- ferb nose.STL
- ferb tail.STL
- goal post.STL
- goal post1.STL
- goal post2.STL
- servo big circular arm.STL
- servo big carrr.STL
- servo big wheel.STL
- servo car balancing part.STL
- servo car bottom closer.STL
- servo small car.STL
- servo small wheel.STL
Step 18: Tinkercad : Wiring Diagram - Ultrasonic Sensor
VCC - Connected to the 3.3V of the Micro: bit.
Echo - It is an output pin. This pin goes high for a period of time which will be equal to the time taken for the ultrasonic wave to return back to the sensor. Echo pin of the ultrasonic sensor is connected to the analog input pin P1 of the Micro: bit.
Trigger - It is an input pin. This pin has to be kept high for 10us to initialize measurement by sending ultrasonic waves. The trigger pin of the ultrasonic sensor is connected to the analog input pin P2 of the Micro: bit.
GND - connected to the GND of the Micro: bit.
Step 19: Tinkercad : Wiring Diagram - Infrared Sensor
VCC - Connected to the 3.3V of the Micro: bit.
OUT - Digital/Analog output pin
GND - connected to the GND of the Micro: bit.
Step 20: Tinkercad : Wiring Diagram - Servo Motor
Orange Wire - The Signal pin is the one used to feed the control signal from the Micro: bit to the servo, to get the servo to rotate a particular angle.
Brown Wire - Negative wire of servo motor is connected to the GND of Micro: bit.
Red Wire - Positive wire of servo motor is connected to the 3.3 V of Micro: bit.
Step 21: Micro: Bit Block Based Coding
Just browse makecode.microbit.org in your system. Click '+' to create a new project. Give a name to your project
Initially Set the position of the servo motor using the On start block. We download the program into the Micro Bit, the servo motor returns to its 90 degrees from whatever position it was in before downloading the program.
Read the value of the IR sensor using the analog Read function and store the value in a variable. Use the Sonar block to measure the distance from the ultrasonic sensor(settings --> extensions --> Sonar). Store the Ultrasonic sensor value in another variable.
Our idea is to sort the black and white color object using sensors. There are three conditions
No object - won't do anything
Black color - hit the black color object towards the right side
White color - hit the white color object towards the left side
Set a distance greater than some value(20) which means there is no object.
If theIR sensor value is 1 (means black object) and the distance is less than 20 (keep the object) then write the servo motor to turn at 90 degrees to 30 degrees with some delay.
If the IR sensor value is 0 (means white object) and the distance is less than 20 (keep the object) then write the servo motor to turn at 150 degrees to 90 degrees with some delay.
Create a separate function for these three conditions. Call these functions under the forever block.
Step 22: Overview Setup
Step 23: Video Demonstration
Step 24: Thank You.
Fourth Prize in the
Block Code Contest
2 years ago
Good innovative work