Home Hardware Look at the RasPiO Analog Zero

Look at the RasPiO Analog Zero

by shedboy71

The RasPiO Analog Zero is an add on ‘hat’  that can be used with any 40 pin Raspberry Pi. This board adds analog input capability to your Raspberry Pi.

The main part of the RasPiO Analog Zero is an MCP3008 8 analog to digital converter. This board allows you add various sensors and devices that you could not normally use such as LDRs, potentiometers, voltages and many sensors that output their value as an analog value

Here is a picture of the board after it has been assembled.


The MCP3008 analog to digital converter chip is connected to the SPI ports MOSI, MISO, SCLK and CE of your Raspberry PI , you can see that all other pins are made available via an unpopulated single row header.  There is also a small prototyping area with 5v, 3v3 and GND
The lack of analog input / output has always been a bug bear of mine with regards the RAspberry Pi, this low cost board (£11) will add on analog input capability


Save this with a python .py extension

from gpiozero import MCP3008
from time import sleep
while True:
    for x in range(0, 8):
        with MCP3008(channel=x) as reading:
            print(x,": ", reading.value)


If you want to display a voltage of a channel you would do something like this

from gpiozero import MCP3008 
adc = MCP3008(channel=0)
voltage = 3.3 * adc.value
print("channel 0 voltage is: ", voltage)





You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More