On Tuesday I had a funny thing happen. I was testing an analogue to digital converter (ADC) chip – the MCP3008 – to see how well it worked on the RasPiO® Pro Hat. I had it all wired up, and powered up the Pi, typed a few lines of GPIO Zero code, and…
It worked, but not quite how I thought it should. Instead of giving a value of 1.0 for 3V3 and 0 for 0V it was giving 0.67 for 3V3. I left it running and went for lunch. During lunch the ‘lights went on’ in my head…
“If you powered the chip with 5V, 3V3 would give you a reading of 0.67”
…oops! That’s what I’d done. And normally you’d expect that to damage the Pi’s SPI ports. But the Pro Hat protected the ports and they worked fine for quite some time plugged into 5V and they still work now. RESULT!
Anyone can make a silly wiring mistake. It’s nice if it doesn’t cost you a new Pi. :) (In a future blog post I’ll explain what this protection is and how it works.)
GPIO Zero Experimenter’s Kit
I was playing with the MCP3008 because I wanted to make sure it worked well with the RasPiO® Pro Hat in “port protected” mode. I wanted to include this rather nice 8-channel analogue to digital converter in my new GPIO Zero Experimenter’s Kit…
The GPIO Zero Experimenter’s Kit Includes…
- Five 10mm LEDs
- MCP3008 eight-channel analogue to digital converter (ADC) chip
- TMP-36 analogue temperature sensor (use with ADC)
- 1-channel relay
- PIR motion sensor
- 10k potentiometer (use with ADC)
- 40-way male header
- 20 M-M jumper leads
- 20 M-F jumper leads
- Piezo buzzer
- Large button
- 10k resistor
In this kit you will find pretty much everything you could need or want to get the most out of GPIO Zero and your RasPiO® Pro Hat. Oddly enough, the “best bits” are the smallest. The small chip at the bottom right of the photo (between the PIR motion sensor and the buzzer) is the MCP3008. This 8-channel analog to digital converter allows you to read analog sensors like the TMP-36 immediately above it. The relay module lets you switch things that need more power than the Pi can give (but it’s not for mains use).
Other than that you have all the wires and parts you need to give GPIO Zero a thorough workout and learn its exciting new features.