A quick tutorial to using MiniPiio AIN4 4-ch Analog Board

March 28, 2014

The latest version of raspi-config allows you to enable the SPI drivers without having to edit raspi-blacklist.conf file yourself.

In LXTerminal start raspi-config by type:

raspi-config

Select the advance menu option and chose enable SPI devices. Exit the menu and reboot your Pi.

We’ll program our example in Python, so we’ll start by downloading the SPIdev driver library.

We can use Python Installer to get install it:

sudo pip install spidev

A quick python example is shown below:

#!/usr/bin/python

import spidev
import time

# ADC Channel
ADCCHAN = 1

# Open SPI, use Chip Select 0
spi = spidev.SpiDev()
spi.open(0,0)

while True:

    adc = spi.xfer2([1,(8+ADCCHAN)<<4,0])
    data = ((adc[1]&3) << 8) + adc[2]

    print ('ADC CH1 =', data)

The MiniPIIO Uses a Microchip MCP3004 (or MCP3204) which are from the same ADC familily as the MCP3008

You can find the MiniPIIO AIN4 at our Tindie store:

MiniPiio_Expander2_DIO16_AIN4_small

 


New board – MiniPIIO Breakout!

March 21, 2014

MiniPIIO Breakout! is our newest add-on board for the Raspberry Pi.

It breaks out (hence its name) all the Pi’s expansion I/O into four neat little groups.

UART is broken out into a 6-Way and 4-way pin header. The 6-Way is FTDI USB Cable compatable.

SPI is broken out into two 6-way headers, each with it’s own SPI chip select.

I2C is borken out into two 4-way headers.

GPIO is broken out into two 10-way headers. GPIO4/17/18/22/23/24/25/27 and 3.3V and 0V.

RPi-_MiniPiio_Breakout!_top_small

You can buy it at our Tindie store here


RPi-X ELab101 – mini electronics lab

March 7, 2014

RPi-X ELab101 is the second of my RPi-eXperimeter boards.

RPi-X_Elab101_small
RPi-X ELab101 is a mini electronics lab for the Pi.

It is dominated by a 170-pin bread boarding area for prototyping and construction your circuits on. Next to this, there are 3x tactile switches, 3x LED’s, 2x potentiometers and a buzzer circuit which make up the input and output devices. These are connected to female headers allowing them to be quickly interfaced with the Pi’s GPIO’s using simple male-male jumper wires.

For analogue measurements, a 4-channel 0V to 10V, 10-bit ADC is included and it’s inputs are also available via a female header connector.

Finally, all the signals from the Pi’s expansion header are brought out to female headers, giving access to all the Pi’s expansion signals, including the GPIO’s, SPI, I2C, UART and PWM.

RPi_and_RPi-X_Elab101_small
More to come….