ExpertSensors & Measurement

Eight-Channel Analog Sensor Scanner

Select one of eight low-voltage analog inputs with an SN74HC4051 and read it using the Pico ADC.

Estimated time: 2โ€“3 hours ยท Skills: Analog multiplexing, address pins, ADC scanning

Parts from the database

Other supplies

Amazon links may be affiliate links. As an Amazon Associate, Electronics Hobby Hub earns from qualifying purchases.

Connections

  1. TI DIP-16: VCC pin 16 to 3.3 V, VEE pin 7 and GND pin 8 to ground, enable pin 6 low; bypass pin 16 to ground.
  2. Common Z pin 3 to Pico ADC0 GP26. Select S0/S1/S2 pins 11/10/9 to Pico GP2/GP3/GP4.
  3. Channels Y0โ€“Y7 are pins 13,14,15,12,1,5,2,4. Keep every signal between ground and 3.3 V.

Build steps

  1. Run the scan loop and watch eight ADC counts.
  2. Turn one channel potentiometer and confirm its corresponding count changes.
  3. Add sensors only after verifying their analog range.
  4. Wait after switching and average samples for steadier readings.

Software and firmware setup

from machine import ADC, Pin
from time import sleep_ms
s0, s1, s2 = Pin(2, Pin.OUT), Pin(3, Pin.OUT), Pin(4, Pin.OUT)
adc = ADC(26)
select = (s0, s1, s2)
while True:
    readings = []
    for channel in range(8):
        for bit, pin in enumerate(select):
            pin.value((channel >> bit) & 1)
        sleep_ms(2)
        readings.append(adc.read_u16())
    print(readings)
    sleep_ms(250)

Review the pin assignments in the sketch against the wiring table before uploading.

Test your build

One changed potentiometer should affect only its corresponding value in the eight-count list.

Troubleshooting

  • All same: verify S0/S1/S2 and channel pin order.
  • Out of range: disconnect; no analog input may exceed 3.3 V.
  • Spikes: allow longer settling and average samples.

Safety and limitations

Low-voltage prototype only. Never route mains or signals above 3.3 V through the mux/Pico.

Manufacturer and platform documentation

Community Notes for This Project

These are unverified visitor contributions, separate from the build guide and manufacturer specifications. Verify technical advice against the linked datasheets before relying on it.

Set up the comments service to load community notes.

Share a tip or question about this build

โ† Browse all projects