ANALOG ZERO
Get to grips with analog electronic control
Les Pounder “cranks that dial” to relive his youth of soldering irons and 1980s electronics, when a ‘bit’ was a relatively unknown concept.
OUR EXPERT
Les Pounder is associate editor at Tom’s Hardware and a freelance maker for hire. He blogs about his adventures and projects at bigl.es.
YOU NEED
›Any model of Raspberry Pi
›Raspberry Pi OS
›RasPiO Analog Zero
›A breadboard
›An LED
›10K Ohm potentiometer
›330 Ohm resistor
›(orange-orange-orange-gold)
›3x F2M jumper wires
›1x M2M jumper wire
›Code https://github.com/ lesp/LXF-Analog-Zero/ archive/refs/heads/main.zip
Electronics are all digital, right? Nope – some electronics components work with analog signals. These signals are continuously running and are typically a variable voltage. Such components include thermistors (a variable resistor whose resistance varies depending on temperature) and photosensors (a variable resistor whose resistance changes depending on light levels).
The most common analog electronic component is the potentiometer. This is a variable resistor that changes resistance based on the user turning a knob. A common potentiometer has a value of 10 Kiloohm (10K) and it can be found in many electronics kits. However, you can’t directly wire a potentiometer to a Raspberry Pi. The Pi’s GPIO has many pins for digital electronics (and protocols such as I2C, SPI, PWM and I2S), but none of the GPIO pins can be used with analog electronic components. Digital GPIO pins have two states: on and off. Analog components have a variable signal, which could cause issues. So how do we use analog components with a Raspberry Pi? For that we need an ADC, an Analog to Digital Converter.