Example software for ACS712 sensor reading using Arduino platform.
The code was developed using an ATMEGA328 microcontroller, manufactured by ATMEL using Arduino interface.
The same code was tested using different microcontrollers with Arduino IDE and it worked perfectly.
The module with ACS712 sensor can be easily found in Aliexpress, Dealextreme, etc..
It has an average cost of R$6.00, according to the link below:
The sensor was used for my final graduation work, that had as main objective the modeling, control and development of a cubesat EPS.
The EPS had 2 DC-DC converters in cascade configuration and a PID controller in each converter.
The module was very efficcient and supplied the controller current monitoring issue.
The sensor must be powered in 5V and the read pin must be connected in an analogic port.
How ACS712 is a current sensor, we know that it must be connected in series with the circuit.
Attention: The parallel connection can bring on a mal functioning on the circuit and its components.
Below, we have an image of the project schematic:
The project can be reproduced with no problem.
However, I only ask you to keep credits/references to the author.
Enjoy!
Hollweg