Raspberry Pi ADC: MCP3008 Analog to Digital Converter

Описание к видео Raspberry Pi ADC: MCP3008 Analog to Digital Converter

In this video I setup a Raspberry Pi ADC or also known as an analog to digital converter. I make use of a chip called the MCP3008 which connects to the SPI (serial peripheral pins) on the Raspberry Pi.

Full Tutorial: https://pimylifeup.com/raspberry-pi-adc/

As you may or may not know the Raspberry Pi doesn’t actually have any analog pins. This makes connecting some sensors and other devices a bit more difficult. There are quite a few different solutions out there such as the one I mentioned in the light sensor tutorial which involved using a capacitor. However, you will likely find using something like the MCP3008 or similar the best solution.

The code for this is pretty straight forward however some devices will require a bit of math to work out the true value. In this example we just want to detect changes in light so we don’t need to tinker with the value we get.

In the video I also cover how to setup the chip and a LDR with myDevices cayenne. This is much easier than doing it by code but there are a few more limits to what you can do. You also miss out on learning how to code. However, it is a great way to build a smart application super-fast.

As I mention in the video microchips such as the MCP3008 typically have a notch on them to indicate which end is where pin 1 is located. On some pin 1 is also marked by a small bump next to it. This is extremely important to remember when wiring these up as you can easily break these by wiring it wrong.

I hope this tutorial helps you out in setting up the Raspberry Pi ADC (Analog to digital converter). If you come across any problems, have feedback, I missed something important or anything else then please feel free to leave a comment below or over at pimylifeup.com

Комментарии

Информация по комментариям в разработке