Project update 3 of 10
The key component of the ANAVI Gardening uHAT is the Microchip MCP3002. This is a 10-bit Analog-to-Digital Converter (ADC) which helps us read data from the capacitive soil moisture sensors. Recently, we published a video that explains in detail how to use the MCP3002 with a Raspberry Pi.
The Microchip MCP3002 ADC has two channels. This means we can simultaneously attach two analog devices; in the case of ANAVI Gardening uHAT, these are two capacitive soil moisture sensors.
The MCP3002 operates at 5 V. It is connected to the Raspberry Pi via a Serial Peripheral Interface (SPI) using the dedicated MISO, MOSI, SCL and SS pins on the 40-pin header (which the Raspberry Pi has included since the release of Model B+ in July 2014). Programming and using the SPI are easy, thanks to existing open source implementations. For example, Python developers can employ spidev, which provides bindings for Linux SPI access through spidev. We have already published a Python 3 example for ANAVI Gardening uHATin GitHub.
Instead of using a breadboard and a bunch of wires, as in the early prototype in the photo above, the ANAVI Gardening uHAT incorporates the MCP3002 and extra connectors on a single compact printed circuit board that follows the Raspberry Pi Foundation requirements for Hardware Attached on Top (HAT).
Microchip offers the MCP3002 in 8-pin MSOP, PDIP, TSSOP and 150 mm SOIC packages. The ANAVI Gardening uHAT uses the MCP3002-I/SN model with a SOIC8 package. Due to the global chip shortage, sourcing MCP3002 has been a challenge, but don’t worry because we have already secured a considerable amount of stock and we can move on with the initial production.
Thank you for supporting ANAVI Gardening uHAT!
Best regards, Leon