
ACS712 Current Sensor Library for Proteus Simulation

Hello friends, I hope you all are doing great. Today, I am going to share the new ACS712 Current Sensor Library for Proteus Simulation. The ACS712 is the classic way to measure current with an Arduino: the current flows through a thick copper strip inside the chip, a Hall sensor feels its magnetic field, and the output is a voltage you read with analogRead - with the current path isolated from your Arduino. With this library you can run a full Proteus simulation of it, and the current it measures is the real current of your simulated circuit.
ACS712 Current Sensor Library for Proteus
Latest version: V1.0 (November 2026, this tutorial)
Helping Tools
- Serial Monitor Advance: a serial terminal window for the UART of your board
- Serial Monitor Expert: the serial monitor with extra debugging tools
- LCD Library for Proteus V3.0: 16x2, 20x4 and I2C LCDs to show your readings
The module is drawn at its real size and comes alive at run time: its PWR LED works, its copper path glows and little dots run along it in the direction of the current, and the Hall element lights up. The demo is a 12 V load monitor: an Arduino switches a 5 W and a 21 W bulb and shows the current, the power, the switch-on peak and the energy on an OLED.
NOTICE: Our team has put a lot of effort into these small parts: the bodies, the animation and the pop-ups are all our own design, and you get them free. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the current measurement board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the ACS712 Current Sensor Library for Proteus Simulation:
What is the ACS712?
The ACS712 from Allegro is a current sensor in a small SOIC-8 package. Pins 1 and 2 (IP+) and pins 3 and 4 (IP-) are joined by a copper conductor of only 1.2 mOhm, so it hardly disturbs the circuit it measures. A current through that copper makes a magnetic field, and a Hall-effect IC right next to it - but electrically isolated from it - turns the field into a voltage. The result: you can measure the current of a 12 V motor, a battery or even a mains appliance with a 5 V Arduino, and nothing on the current path touches the Arduino.
| ACS712 | |
|---|---|
| Principle | Hall effect: the copper carries the current, the Hall IC feels its field (isolated, 2.1 kV RMS) |
| Chips | 05B: +-5 A, 185 mV/A; 20A: +-20 A, 100 mV/A; 30A: +-30 A, 66 mV/A |
| Output | VCC / 2 with no current, plus the sensitivity x the current - AC and DC, both directions |
| Conductor | 1.2 mOhm between IP+ and IP- |
| Speed | 80 kHz bandwidth, 5 us rise time |
| Supply | 5 V (4.5 - 5.5 V), about 10 mA |
| The module | 31 x 13 mm: a screw terminal for the current, the chip, a filter capacitor, a PWR LED, VCC / OUT / GND |
A Ratiometric Output
The output does not start at 0 V. With no current it sits at half the supply - 2.5 V on 5 V - so that it can go up for current one way and down for current the other way. And the sensitivity scales with the supply too: 185 mV per A at 5 V is 37 mV per A for each volt of VCC. That is called ratiometric, and it is good news for an Arduino: its ADC also measures against its 5 V, so a supply that is a little high or low cancels out.
| Chip | Range | Sensitivity | Noise (p-p) | One UNO ADC step |
|---|---|---|---|---|
| ACS712ELCTR-05B | +-5 A | 185 mV/A | about 21 mV | about 26 mA |
| ACS712ELCTR-20A | +-20 A | 100 mV/A | about 11 mV | about 49 mA |
| ACS712ELCTR-30A | +-30 A | 66 mV/A | about 7 mV | about 74 mA |
Features of the ACS712 Current Sensor Library for Proteus Simulation
- A real-looking module: the red board at its real size, 31 x 13 mm, with the blue screw terminal, the copper path into the chip, the filter capacitor, the header and our small TEP mark.
- Animated: a PWR LED, a copper path that glows with the current, dots that run along it in the current's direction, and a Hall element that lights orange - or blue for reversed current.
- A real current path: IP+ to IP- is a 1.2 mOhm conductor in your circuit, so the sensor measures the current your simulation really drives through it - steady, switching, inrush or reversed.
- The real output: ratiometric, VCC / 2 plus 185, 100 or 66 mV per A, limited inside the rails, with a zero offset and noise like a real part.
- A pop-up: the inside of the chip with the copper, the field and the Hall element, the current and OUT over the run, eight live tiles, the three chip versions, graphs, an event log and a check page.
- A complete package: about 2.5 MB with the library, our OLED, filament bulb, N-MOSFET and resistor libraries, our Arduino UNO V4.0 and the demo, without the source code of the model.
The ACS712 in Proteus
The device is CURRENTACS712TEP in TEPACS712.LIB, under Sensors > Current, with the prefix U and the model TEPACS712.DLL. Search ACS712 or current in Pick Devices. It has two pins on the left, at the screw terminal - IP+ and IP- - and three on the right, at the header: VCC, OUT and GND. Its properties: RANGE (5A, 20A or 30A) and OFFSET (this part's zero error, 8 mV by default).
Download ACS712 Current Sensor Library for Proteus Simulation
Click the button below to download ACS712-Current-Sensor-Library-for-Proteus-v1.0.zip (about 2.5 MB, without the source code of the models):
ACS712 Current Sensor Library for Proteus V1.0- README.txt: installation, the demo, the wiring, troubleshooting and the limits of the simulation.
- Proteus Library Files:
TEPACS712.LIB,TEPOLED12864.LIB,TEPBULB.LIB,TEPNMOS.LIB,TEPRESISTOR.LIBandArduinoV4TEP.LIB. - Proteus Model Files:
TEPACS712.DLL,TEPOLED.DLL,TEPBULB.DLL,TEPNMOS.DLL,TEPRESISTOR.DLLandTEPARDUINO.DLL. - Arduino Code: the demo sketch (no extra library).
- Proteus Simulation: the demo project, its HEX file and copies of the DLLs.
No Proteus yet? Read How to Download and Install Proteus 7 and 8. New to libraries? Follow How to Install a New Library in Proteus.
How to Install ACS712 Current Sensor Library for Proteus Simulation
- Close Proteus and extract the whole zip file, for example to your Desktop.
- Copy the files from Proteus Library Files into the LIBRARY folder of Proteus.
- Copy the files from Proteus Model Files into the MODELS folder.
- Delete
TEPACS712.IDXfrom the LIBRARY folder if it is there. - Start Proteus, press P and search for ACS712.
Proteus Simulation of a 12 V Load Monitor
Our demo watches a 12 V supply. U1 is the ACS712 with the 5 A chip: its IP+ is on a +12V terminal and its IP- feeds the loads. The loads are two bulbs from our Filament Bulb Library for Proteus - a W5W of 5 W and a P21W of 21 W - each switched on its low side by an IRLZ44N from our N-MOSFET Library for Proteus, on D9 and D10 of our Arduino UNO Library for Proteus V4.0. The sensor's OUT goes to A0. Our OLED SSD1306 Library for Proteus shows the readings, and the Arduino's built-in monitor is the same window as our TEP Serial Monitor Advance for Proteus. Open ACS712-Current-ArduinoUnoV4.pdsprj.
The Sketch
The sketch needs no library for the sensor - it is one analog input. First, with both loads off, it measures the zero, because every ACS712 sits a few millivolts away from exactly VCC / 2:
zero = readCounts(1000);
After that every reading becomes amps with the sensitivity of the 5 A chip:
float toAmps(float counts) { return (counts - zero) * (5.0 / 1023.0) / SENS; }
One ADC step is about 26 mA on this chip and the output carries about 21 mV of noise, so the sketch averages 100 readings for the value it shows. In between it takes short averages of 4 readings and keeps the highest - that catches the moment a cold bulb switches on:
const float a = abs(toAmps(readCounts(4)));
The power is the supply voltage times the current, and the energy adds up from it:
wattHours += amps * SUPPLY * (now - lastMs) / 3600000.0;
The loads change every three seconds - none, LOAD 1, LOAD 2, both - and the OLED shows the loads in its yellow band, the current in double-size digits, the power, the peak and the energy, with a bar for the current against the 5 A range.
ACS712 Simulation Results
Open the project and press Run. The demo runs 13.5 simulated seconds and took 165 seconds on our PC with the pop-up open and the pictures being taken. Click the module for its pop-up. Every number below comes from one simulation run, the demo exactly as it ships.
The Zero
At start, with both bulbs off, the sketch averages 1000 readings: 513.6 counts, 2.510 V - the module's zero, a little above 2.5 V because this part has an offset of +8 mV. From then on, with nothing switched on, the monitor reads 0.000 A.
LOAD 1: the 5 W Bulb
At about 3.4 seconds the sketch switches on the 5 W bulb. A cold filament has a fraction of its hot resistance, so for an instant the current jumps: the pop-up's peak is 5.75 A - already beyond the 5 A chip's range, and the model logs it - and the sketch's short readings catch 3.79 A of it. Within a few tens of milliseconds the filament is hot and the current settles at 0.416 A: 5 W at 12 V. OUT sits at 2.585 V, 77 mV above the zero, and on the sheet the copper path glows with dots running from IP+ to IP-. The monitor says 0.410 A and 4.9 W: the difference is less than one ADC step.
LOAD 2 and Both
At about 6.4 seconds the 21 W bulb takes over. Its cold filament draws 24.8 A for an instant - five times the chip's range: OUT runs into its limit at 4.75 V, the model warns that the output cannot show more, and the sketch sees 12.15 A, all a 5 A chip can tell it. Then the current settles at 1.75 A - the monitor says 1.756 A and 21.1 W - sliding down a little as the filament warms up. At about 9.5 seconds both bulbs are on: 2.166 A and 26.0 W, OUT at 2.908 V - 43 % of the chip's range. Switching the small bulb on next to the hot big one gives a peak of about 7 A.
Off Again
At about 12.5 seconds both go off and the current falls straight back to 0.000 A, OUT to the zero at 2.508 V; the energy counter keeps what the run used, about 0.035 Wh.
The Graphs, the Event Log and the Check Page
The Graphs page plots the current, OUT, the signal OUT - VCC/2 and VCC. The Event log keeps every change of the current once it has settled, with the peak on the way. The Check page sums up the run: VCC 5.00 V and 10 mA, the 5 A chip at 185 mV/A, a peak of 24.77 A at 6.406 s (the cold 21 W filament), the zero at 2.508 V (VCC/2 plus this part's 8 mV), and 3.68 mAh through the copper over the run.
The monitor shows the sketch's side: the zero, then a line for each load once it has settled.
Hall Sensor or Shunt Resistor?
The other way to measure current is a small shunt resistor and an amplifier for the few millivolts across it - an instrumentation amplifier like the one in our INA128 Instrumentation Amplifier Library for Proteus. A shunt is precise and cheap, but it shares its ground with the measured circuit, and on the high side of a supply its voltage floats. The ACS712 gives isolation for free and measures both directions, at the price of more noise and a zero that must be calibrated. For a 12 V motor, a battery pack or a mains load with an Arduino, the ACS712 is the easy choice.
Try It Yourself
- Swap the wires on IP+ and IP-: the readings go negative, and the pop-up's Hall element turns blue.
- Click the 20 A chip in the pop-up: OUT changes less for the same current, and the sketch - still dividing by 0.185 - reads too low. Change SENS to 0.100 to match.
- Set OFFSET to 30 mV and take the zero calibration out of the sketch: see how far off the readings go with no load.
- Drive LOAD 2 with analogWrite instead of digitalWrite: the bulb dims, and the average current follows the duty cycle.
- Average fewer readings and watch the noise on the OLED's last digit.
Ideas to Extend the Demo
- Cut a load off when its current passes a limit - an electronic fuse.
- Log the energy of a 12 V fridge or a solar battery through the day.
- Measure an AC load: sample fast and compute the RMS current.
Your Own Sketches
The demo sketch is in the zip file, and you can change it in the Arduino IDE. New to Arduino? Start with our Arduino Tutorial for Beginners. Export the compiled binary, and set the UNO's PROGRAM property to the new file. Our guide on How to get the HEX file from Arduino shows you where the file ends up.
Things to Know Before Using a Real ACS712
- High voltage: the chip isolates the current path, but the screw terminal and the wires carry the load's voltage - wire mains loads only with proper care.
- Resolution: one UNO ADC step is 26 mA on the 5 A chip - average readings, or use an amplifier or a better ADC for small currents.
- The zero: measure it with no current, and again if the temperature changes much.
- Magnets: keep magnets and heavy wires away from the chip - it feels any field, not only the current's.
- The right chip: pick the smallest range that covers your current; a 30 A chip on a 1 A load wastes resolution.
Troubleshooting
- The current reads negative: IP+ and IP- are swapped - the current must go in at IP+.
- A small current with nothing on: the zero is not VCC / 2 exactly - measure it at start.
- The readings jump: average more readings.
- Wrong by a factor: the sketch's sensitivity does not match the chip - 185, 100 or 66 mV per A.
- The part is not simulated:
TEPACS712.DLLis missing from MODELS and from the project folder.
Limitations of the Simulation
- The conductor, the ratiometric output, the three chips' sensitivities and the output limits follow the maker's datasheet; the module is our own drawing of an ACS712 board.
- Our own choices: the zero offset (OFFSET), the noise as a gaussian of a sixth of the datasheet's peak-to-peak figure, a 2 us output filter and a 10 ohm output.
- Not modelled: the temperature drift of the zero and the sensitivity, the nonlinearity, stray magnetic fields, the isolation's limits and the FILTER pin.
- Arduino is a name of Arduino and ACS712 a part of Allegro MicroSystems; this library is not made or endorsed by Arduino, Labcenter or Allegro.
- Tested in Proteus 8.5 in November 2026 (the demo as shipped). Proteus 7 is not supported.
So, that was all about the ACS712 Current Sensor Library for Proteus Simulation. I hope it helps you build your power meter, your battery monitor or your electronic fuse before the real board arrives - and shows that measuring current is a simple thing at heart: a strip of copper, the field around it, and half the supply plus a few millivolts per amp. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!






















Comments
0