Gertboard ADC - Analog to Digital Converter: MCP3002

Raspberry Pi Analog to Digital Converter: MCP3002

The MCP3002 is a two-channel analogue-to-digital converter (ADC) chip with a 10-bit resolution, marked as U6 on the Gertboard. This chip receives analogue input through either of the channel pins AD1 or AD0, and converts it to digital data. This data is then sent to the Raspberry Pi through the serial peripheral interface (SPI) consisting of SCLK, MOSI, MISO, and CSnA pins.

The IC accept an analogue signal in one or both channels, and the inputs AD1 and AD0 accepts pseudo-differential or single-ended configurations. Beginners usually start using them as single ended inputs.


Configuring ADC Jumpers

Configuring ADC Jumpers

Simply insert jumper links between the following pairs of pins.

  • GP11 to SCLK
  • GP10 to MOSI
  • GP9 to MISO
  • GP8 to CSnA

The Raspberry PI GPIO allows GP11, GP10, GP9, GP8 pins to have alternate functions for SPI communication.

Circuit Diagram

Circuit Diagram

The internal multiplexer receives the signals from the AD1 and AD0 channels. The multiplexer allows the two channels to share a single DAC. This IC has a maximum sampling rate of 200,000 samples per second when the supply voltage is 5 V, and 75,000 samples per second when the supply voltage is 2.7 V.

The diagram above shows an analogue signal fed through AD1 and converted into a digital value, which travels through pin 6 to the MISO pin on the (SPI).

This Article Continues...

Gertboard Raspberry Pi Expansion
Gertboard Buffered I/O: SN74AC244
Gertboard Open Collector Drivers: ULN2803APG
Gertboard Motor Controller: L6203
Gertboard ATMega Chip: ATMega168A/PA, and ATMega328/P
Gertboard ADC - Analog to Digital Converter: MCP3002
Gertboard DAC - Digital to Analog Converter: MCP4802
Gertboard GPIO Pins