Current Converter: Battery Charging Current to 0–10 V for PLC
A microcontroller-based board that measures the charging current of a battery with an ACS712 sensor and converts it into a linear 0 to 10 V output for a PLC input; showing the current on an LCD is optional.
Overview
The Current Converter is a microcontroller-based board designed in 2018. It measures the charging current of a battery and converts it into a 0 to 10 V voltage, so that a PLC can read the current. The output changes completely linearly with the input current. The board has a header for a 2×16 LCD; if the display is connected, it shows the current live.
How it works
The positive wire of the battery charger goes to the C_IN input and the positive wire of the battery goes to C_OUT, so the charging current passes through the current sensor (ACS712). After the power and the current wires are connected, the circuit reads the current value from the sensor and gives it to the microcontroller (PIC16F877A). Using the calculations in its program, the microcontroller works out the output needed for the input current.
This value is turned into a voltage by a digital-to-analog converter (MCP4921), and an LM358 amplifier stage powered from 12 V raises it up to 10 V. That voltage goes to the PLC. The diagram below shows the signal path.
Specifications
Input supply: 12 to 24 V
Input current: 0 to 8 A; the range can be changed up to 0 to 30 A by swapping the ACS712 sensor
0 to 10 V output, completely linear with the input current and optimized for PLC
Connection for a 2×16 LCD to show the input current live (optional; the header is on the board)
Microcontroller based
Connection guide
Terminal | Function |
|---|---|
P2 | 12 to 24 V supply |
P4 (C_IN) | Positive wire of the battery charger |
P4 (C_OUT) | Positive wire of the battery |
P3 | DC output to the PLC |
Hardware design
I designed the board, and it mounts on a DIN rail. A DC-DC module (MIW2026) makes ±12 V from the 12 to 24 V supply, and a 7805 regulator makes 5 V. The current terminal (P4) is a large screw terminal, so the charging current passes through it comfortably.
The pictures below show the built board, the schematic, the PCB layout, its 3D view and the connection guide.
Result
A small board that turns the charging current of a battery into a linear 0 to 10 V voltage, so a PLC can read the current.
Gallery
BLOG
Related posts
Questions about this project?
If you have questions about this project, or a similar one in mind, I would be glad to hear from you.