June Birth Magoncia

user Electronics Engineer

city Innovuze Solutions, Inc.


  • ATmega328P-PU + MCP3201 Based Ammeter

  • Created: Feb 12, 2017

    • view3006
    • comment0
    • bookmark2
    • fork0

Description

No description available.

Summary

This reference design features a simple ammeter that can be used for measuring AC and DC current. This ammeter is based on an ATmega328P-PU microcontroller and an MCP3201 analog-to-digital converter. The MCP3201 is a successive approximation 12-bit analog-to-digital converter with an integrated sample and hold circuitry. It operates from 2.7V up to 5.5V with 210uA up to 400uA current consumption in an unloaded condition. The device provides a single pseudo-differential input and a simple serial interface output compatible with SPI protocol.


The circuit of this ammeter is mainly composed of an AD8615 operational amplifier, MCP3201 analog-to-digital converter, ATmega328P-PU microcontroller, and a 128x32 I2C OLED graphic display. The ammeter operates by connecting the screw terminal (ST1) in series with the power supply and the load. As current passes R3 through ST1, voltage drops across the terminals of R3. This voltage is amplified by the AD8615 op-amp with a gain of 10. The amplified signal is sent to the non-inverting input of the MCP3201. The MCP3201 converts the analog voltage from the AD8615 op-amp into digital. The ATmega328P-PU microcontroller pulls the /CS/SHDN pin of the MCP3201 to low and starts sending a clock signal to the CLK pin. The MCP3201 will begin to sample the analog input on the first rising edge after /CS/SHDN goes low. The sample period will end in the falling edge of the second clock, at which time the device will output a low null bit. The next 12 clocks will output the result of the conversion with MSB first. The MCP3201 transmits its 12 data bits to the microcontroller through its DOUT pin. After transmitting, the ATmega328P-PU microcontroller displays the current measured on the OLED display.


The ammeter operates with a 5V power supply. A 9V battery can be used as a power source since the circuit has a V7805-2000R 5V switching regulator. The maximum safe voltage range for the current measured is 48V. This ammeter can be used to measure DC current between 1mA and 1A. AC current can also be measured by deriving the value from peak to peak measurements.

Details


Components:

  • No components added

Tags:

Application:

Type:

Document Support:

- None