24 February 2011
Electronics: sensing the world
Today we'll focus on using the Arduino to sense events, quantities, and qualities in
the physical world.
- digital (on/off) sensors
- physical switches
- logic switches:
microcontrollers or other logic circuits can be connected together and use different values
on their output pins (typically +5v and ground) to send signals to one another.
- analog (variable) sensors:
digital switches can only be on or off (+5v or ground), while analog sensors can have values
in between (3.7v). Many analog sensors are variable resistors, like the potentiometers we used
when we built the simple hex inverter-based oscillators. Other analog sensors put out digital pulses
with lengths proportional to the quantity being measured.
- potentiometers: used as a voltage divider or variable resistor
*
- photo/light sensors
*
- force/pressure sensors
*
- temperature sensors
*
*
- gas sensors
*
- motion sensors
*
- DIY variable resistors: anything that conducts can be used as a sensor!
- digital (data) sensors:
many complex sensors, like
compasses,
GPS units,
distance sensors, cameras, etc., output info as bytes of serial data. That means that to read their values you
hook them up to a serial port on the Arduino and receive messages from them.