This is an old revision of the document!
Table of Contents
Raspi-PD Control Hat
The Raspi-PD Control Hat is a extension board for the Raspberry Pi. It extend the GPIOs with 8 analog inputs, 4 push buttons and 3 indicator LEDs. It is based on the 10 bit analog to digital converter MCP3008. Two potentiometers are build in the board the other 6 inputs are free to use.
The Raspi-PD Control Hat was designed to use under Pure Data but could be controlled with the wiring library in C or python, too.
Here one finds a manual for installing the PD wiring object on a Raspberry P 4:
Wiring Pi for Pure Data
Wiring for the Raspberry Pi was written by Gordon Henderson.
WiringPi for Pure Data was written by Miller Puckette, Jaime Oliver La Rosa and Jeremiah Rose.
The Raspi-PD Control Hat was used together with an Audio Injector. The manual for the installation one can find here:
Audio Injector Installation
Paper PCB
Parts
- Resistors:
- 3x 1 kOhm
- 5x 10 kOhm
- Capacitors:
- 2x 10 nF
- 1x 100 nF
- 1x 100 µF
- Diodes:
- 3x LED
- Semiconductors
- 1x ADC MCP3008
- Mechanical:
- 1x IC socket, 16pins
- 1x pin strip 1×8
- 1x pin strip 1×2
- 5x push button
- Potentiometers:
- 2x 100 k
Connecting Sensors
To get a smooth measurement one could put one capacitor between the ground and the measuring point as well as one between the power and the measuring point. For example two 1µF capacitors in a simple LDR resistor divider:
GND---||---CH2---||----5V | GND---50k--------LDR---5V
Install the Shutdown Button and the Run LED
For the Shutdown Button and Run LED installation follow the manual of the Raspberry Basic Hat.
In the two scripts change the pins for the shutdown button to GPIO 27 and the pin of the blink LED to GPIO 04.
Pin Assignment
For the buttons and the LEDs the following pins are used:
Button/LED GPIO Wiring/PD 01 23 04 02 25 06 03 16 27 04 24 05 LED1 26 25 LED2 22 03
The MCP 3008 use these pins:
MCP3008 Raspberry Pi CLK SCLK (GPIO 11) DOUT MISO (GPIO 09) DIN MOSI (GPIO 10) CS/SHDN CE0 (GPIO 08)
Links
MCP3008:
http://ww1.microchip.com/downloads/en/devicedoc/21295c.pdf
https://learn.adafruit.com/raspberry-pi-analog-to-digital-converters/mcp3008
GPIO:
https://www.raspberrypi.org/documentation/usage/gpio/
License
The Raspi-PD Control Hat was designed by Wolfgang Spahn 2020.
It is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.