Current Measurement AmMeter Circuit PIC16F84 ACS712

| September 7, 2024 Updated
Current Measurement AmMeter Circuit PIC16F84 ACS712

Usually the microcontroller with current measurement circuits, opamp, and the shunt resistance measurement and current information is made via this application, ACS712 (Hall Effect-Based Linear Current Sensor) voltage sensor used, there is no similar sensors the sensor were probably there aren’t but a good example for the use of micro-controller with

current-sensor-project-16f84a-akim-olcumu-ampermetre

digital-amp-meter-akim-olcum-devresi-pic-display

Ammeter circuit (PIC16F84) can measure currents up to 30 amps of current information is displayed on a three digit 7-segment display.

3 Digit Digital Ammeter

Here is a digital Ammeter based on PIC16F684 and ACS712 current sensor. The measured DC or AC current will be displayed as 3-digit 7-segment with 100 mA resolution. The current sensor in this project is ACS712ELCTR-30A-T from Allegro (I got it from Amazon). It can measure AC or DC current up to 30A with 66 mV/A output sensitivity.

The microcontroller PIC16F684 reads the analog value from ACS712 current sensor output and converts it to current to display in 7 segments. All 7 segments are of common anode type and are driven by PNP transistors. In fact, this is a suitable circuit for measuring DC current, for example from solar panel to battery, from battery to load.

Calculating Volts to Amps for Vcc 5V

From the ACS712 datasheet we know that:

0 A = Vcc/2 = 2.5V or 512 analog counts or 0x200.
For the 30A version the sensitivity is 66mV/A.

So
Volts at 30A = 2.5V + (66mV/A x 30A) = 4.48V or 917,504 analog counts
-Volts at 30A = 2.5v – (66mV/A x 30A) = 0.52V or 106.5 analog counts

With the basic linear equation of mathematics:
y = mx + b ———– Equ. 1
m = (y2 – y1) / (x2-x1) ————-Equ.2

Thus we get m = (30-0) / (917 – 512) = 0.074 .

Substitute m into the equation. We will get 1, b at 0A output

0 = 0.074*512 + b
b = -37.888

Therefore, the final equation used in the software is:

A = 0.074*(analog_counts) – 37.888

Example:
if analog count = 512 we get 0 A,
if analog count = 917 we get approximately +30A
, if analog count = 106 we get approximately -30A

For all your questions regarding the ACS712, please see the ACS712 FAQ page.

Simulate with input ADC value in 6.2, 25.2 ,29.9 firmware. I use 0.3 3.3V and 10 ohm/10w resistor.

The PCB track and cable of the input current in this project are used to measure small current (for learning). If you want to measure up to 30A, the PCB track and cable of the input current should be thick enough

Source: http://coolcircuit.com/project/digital_amp_meter/picmicro_digital_amp_meter.html alternative link: <

Current Measurement AmMeter Circuit PIC16F84 ACS712

Password: 320volt.com

Published: 2011/03/31 Tags: , ,



1 Comment “Current Measurement AmMeter Circuit PIC16F84 ACS712

  1. Electronics CircuitsElectronics Circuits

    5+1 Audio Control Circuit TDA7448 RC5 Remote Control 16f873 16f876

    TDA7448 6 channel audio control integrated circuit with PIC Microcontroller is a very good example of the use of the application Circuit potanslar both on the lcd screen sound information, 2 × 16 volume control potentiometer and remote control can be done with both. Control for the control of the RC5 protocol used. Can be used in addition to micro controller controlled CDROM player in lieu of Pic16f876 hex files there are also source C software.

    REPLY

Leave a Reply

Your email address will not be published. Required fields are marked *