Wednesday, September 30, 2015

Resistor Ladder

I learned about an interesting thing today: the resistor ladder.  There's a simple version used in the design for the adafruit home alarm.

This can be used to encode the state of n switches into a single resistance.  In a microcontroller context, one can use an analog to digital converter (ADC) to read a voltage and derive the state of several switches.  All this while using a single pin!

I've been kicking around the idea of building an IoT alarm clock.  The resistor ladder concept could prove useful here for the buttons.  It's an expected case that more than one button will be pressed at the same time (e.g., TIME SET and HOUR).

No comments:

Post a Comment