0% found this document useful (0 votes)
10 views

Embedded Programming and Robotics: Lesson 4 Sensors

This document discusses different types of digital and analog sensors that can be used for robotics projects, including passive infrared motion sensors and infrared reflective sensors. It provides instructions on how to connect and code a passive infrared motion sensor to detect motion and trigger an LED, as well as how to connect and read values from an infrared reflective sensor to enable a robot to follow edges or paths. The document contains diagrams and code examples to help explain using these sensors.

Uploaded by

Darwin Vargas
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Embedded Programming and Robotics: Lesson 4 Sensors

This document discusses different types of digital and analog sensors that can be used for robotics projects, including passive infrared motion sensors and infrared reflective sensors. It provides instructions on how to connect and code a passive infrared motion sensor to detect motion and trigger an LED, as well as how to connect and read values from an infrared reflective sensor to enable a robot to follow edges or paths. The document contains diagrams and code examples to help explain using these sensors.

Uploaded by

Darwin Vargas
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Embedded Programming and

Robotics
Lesson 4
Sensors

Sensors 1
Digital Sensors
As we discussed before, many sensors are digital: on or off
This includes things like switches, motion sensors, etc.
Passive sensors, ones that dont take power, or usually wired up the
way you were shown in Lesson 3
Active sensors, such as motion detection, are wired as shown on the
next slide. Its called passive IR because it doesnt emit anything, just
detects it.

Sensors 2
Motion Sensor
Connect jumpers to the three pins of the PIR (Passive Infrared)
motion sensor
Connect the vcc pin to the +5 on the prototype board
Connect gnd to ground on the prototype board
Connect out to pin 3 of your Arduino

Sensors 3
Motion Sensor
Back of the IR
motion sensor
The middle
pin, Digital
Out, connect
to an Arduino
digital input
pin

Sensors 4
Motion Sensor
Write code to read the sensor:
If the sensor reads 1, write HIGH to
the LED pin
If it reads 0, write LOW to the LED pin

Sensors 5
Infrared Reflective Sensor
TCRT5000 Infrared Reflective
Photoelectric Sensor used to detect
lines
Can be used to make your robot
follow a specific path
Used in the edge-follower robot

Sensors 6
Infrared Reflective Sensor
Connect vcc and gnd to +5 and ground, respectively
Connect A0 on the TCRT5000 to an analog input pin on the Arduino
Use analogRead to read from the sensor.
The larger the number, the further away

Sensors 7
Edge-Follower Program

Sensors 8

You might also like