16 February 2010
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
- what's a switch? Two pieces of metal touching!
- switch types
- momentary vs toggle switches
- poles and throws
- electronically operated switches (relays):
a logic signal from a microcontroller controls a physical switch
allows you to control a large voltage/current (like a light or a blender) with a little
signal from a puny microcontroller.
- 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.
- digital (data) sensors
many complex sensors, like compasses, GPS units, ultrasound distance sensors, etc.,
output their status 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. We'll cover
serial data sensors in a later class.
- analog (variable) sensors
digital switches can only be on or off (+5v or ground), while analog sensors can have values
in between. Many analog sensors are variable resistors, like the ones we used
when we built the simple hex inverter-based oscillators. Audio is another common source of
analog input.
- potentiometers
- photo/light sensors
- pressure sensors
- temperature sensors