Connect a MCP3421 18-Bit
Analog-to-Digital Converter to an Arduino Board

IMG_3067web


Compared to our LTC2400 analog to digital converter project the microchip MCP 4321 is cheaper, easy to get, and more simple to connect. With a resolution of up to 18 bits and a build in amplifier we yield a sensitivity of 2 µV which makes it well suited for instrumentation, weight cells, thermocouples and so on.

 

Soldered on a SMD breadboard we get an tiny unit with an excellent accuracy.

 


Functions of the MCP3421 Library

 

init(address,sr,pga);

 

address = 0×68;  // MCP3421 device address

sr= Sample Rate Selection
sr=0 ; 00 = 240 SPS (12 bits)
sr=1 ; 01 = 60 SPS (14 bits)

sr=2 ; 10 = 15 SPS (16 bits)
sr=3 ; 11 = 3.75 SPS (18 bits)

 

pga= PGA Gain Selector
0 = 1 V/V
1 = 2 V/V 
2 = 4 V/V
3 = 8V/V

 

int ready()
returns 1 when conversion is ready

 

long getLong()
returns conversion result as long number

 

double getDouble()
returns  voltage as double/float number


Schematic




Library download

MCP3421


Contact

Martin Nawrath, nawrath@khm.de