Product successfully added to your shopping cart
10.00JD Add to cart
10.00 JD Add to cart
Sensing current flow in certain path of your circuit is a requirment for many application such as power mesurment and monitoring, over current protection, battery charging level and more.
the simplest way to mesure a current in certain load is to place a small resistor paralle to the load, most case between the load and ground, and depending on the voltage across this resistor we could tell the flowing current.
ACS712 chip providesprecise way of sensing AC and DC currents based on Hall-effect. The pin diagram of ACS712 device and its typical application circuit is shown below. ACS712 provides low power loss and eliminates the risk of damaging the current monitoring circuit due to the high voltage on the conduction side. The electrical isolation between the conduction current and the sensor circuit also minimizes the safety concerns while dealing with high voltage systems.
The ACS712 device comes in three ranges, the range of±5A (ACS712-05B), ±20A (ACS712-20B), and ±30A (ACS712-30A). The ACS712-05B can measure current up to ±5A (means two ways current flow mesuring) and has output sensitivity of 185mV/A (at +5V power supply), this means for every 1A increase in the current through the sensor , the sensor output voltage rises by 185 mV.The plot below shows Voltage vs Input Current characteristics of the ACS712-05B sensor powered with a 5.0V. Note that when there no current thrugh the sensor, the output is Vcc/2 = 2.5V.
For your current sensor, if you got reversed polarity readings, reverse the load connction or change the code belwo frome
current = (AnalogValue - 512) *264;
current = (512 - AnalogValue) *264;
This code is for 5A range, consider the calculations for other ranges.
In the digital scale , with 10 bits ADC resoulution and 5 Volts refrence the calculation described in the code are based on the following info:
(0.185V / 5 V) x 1023 = 37.888, this mean w have 1 Amps every 37.888 digital count from the ADC output.