Task 4
Take the car model you build in Task 3. Now add IR Proximity and Color Detection Sensor.
This sensor comprises of two parts IR-LED and Photo Diode. IR-LED (Infrared Transmitter)
emits light of Infrared range 700 nanometers (nm) to 1 mm. This is not visible by human naked
eyes but visible by the camera. The other part is Photo Diode, which detects light that comes
back to this Photo Diode after getting reflected by an object. Depending on the distance between
IR-LED and object, this reflection and reception by Photo Diode varied which gives change in
input voltage. This voltage is used to get Proximity of the object. Now, let’s look at this a little
dierently, as you already know, each color has a dierent refractor index so the amount of light
being reflected is dierent for each color. For example, black is the perfect absorber whereas
white is the perfect reflector. This makes this sensor a color detector as well.
IR Receiver
Light Reflected by White Surface Light Reflected by Black Surface
IR Transmitter
IR Receive
r
IR Transmitter
White Surface Black Surface White Surface Black Surface
Based on this, extend the functionality of this car model to identify colors of the objects it
is going to face while in motion. You may use an LED screen or text to speak sensor to notify the
color of the detected object.
Practice Task 2: Building up a Robot Buggy by using
Raspberry PI
Task 1: Setting up the Hardware
Building up a robot buggy from a Raspberry Pi is very easy. First, you need to prepare your motor
setup for the buggy. To do this, you need to connect your wire motors to the separate male to
female wires. After this, you will connect the wires to the H-bridge on the sides. This step might
require a little bit of force and skills with a screwdriver. Once you have connected the wires, you
will need to add the female wires on the pins. Later these wires will be connected to the GPIO pins.
Now it is time to add a power source to the project, connect a battery to the H-bridge.
Task 2: Connecting the Project with Code
Now it’s time to bring the power of code and digital computation to the robot buggy. You will
need to connect the breadboard to the Pi to begin coding. In the coding part, you will only give
the buggy basic mobility (i.e., moving forward and backward). We can program a specific path
in which the buggy will move. Once, everything’s set, the robot should be moving on your
programmed path. However, if we want to add better control over its mobility, then we need to
follow the next project.
Chapter 13 Hands-On Examples of IoT Experiments 339
Internet_of_Things_CH13_pp327-348.indd 339 9/3/2019 10:17:04 AM
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.119.199