Hello friends, I hope you all are doing great. Today, I am going to share the new 12V to 230V Pure Sine Wave Inverter Library for Proteus Simulation, the next library of our renewable energy series. If you have searched for a Proteus simulation of an inverter, the box that turns the 12 V of a battery into the 230 V of a wall socket, this library brings a 300 W pure sine wave inverter into Proteus, with its efficiency, its low-battery alarm and its protections.

Figure: The library at work: 230 V for the lamp while the battery runs down, the alarm, then the shutdown.
Updates

12V to 230V Pure Sine Wave Inverter Library for Proteus Simulation

Latest version: V1.0 (November 2026, this tutorial)

Other power libraries: LiPo Battery · Single Cell Battery · CR2032 Coin Cell · Solar Panel · MC34063 Buck · MC34064 Boost · 12V Solar Panel · 6V Mini Solar Panel · 3-Phase PM Generator · Vertical-Axis Wind Turbine · Micro Hydro Generator · Thermoelectric Generator · PEM Hydrogen Fuel Cell · Piezoelectric Energy Harvester · Hand Crank Generator · 12V LiFePO4 Battery · 12V Lead-Acid Battery · 18650 Li-ion Battery · PWM Solar Charge Controller · MPPT Solar Charge Controller · TP4056 Li-ion Charger Module · Wind Turbine Charge Controller

Helping Tools

The inverter is drawn at its true size, and at run time its two lamps work on your sheet, while its label plate shows its state and both sides of the conversion: the volts and amps taken from the battery, and the volts, amps and watts given to the load. The simulation model makes a real 50 Hz sine wave on its output, takes the matching current from the battery, warns when the battery runs low and shuts down before the battery is harmed. The demo runs a mains lamp from our lead-acid battery, with an Arduino as the battery monitor.

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 Motor Driver board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the 12V to 230V Pure Sine Wave Inverter Library for Proteus Simulation:

Figure: The 12V to 230V Pure Sine Wave Inverter Library for Proteus Simulation.

What is a Pure Sine Wave Inverter?

A battery gives direct current, DC: a steady voltage, 12 V in a small solar or wind system. The appliances in a house want alternating current, AC: 230 V that swings from plus to minus and back fifty times a second, in the smooth shape of a sine wave. An inverter is the bridge between the two. It chops the battery's DC at a high frequency, steps the voltage up, and shapes the result into a 50 Hz wave.

Cheap inverters make a stepped wave, called a modified sine wave. It is good enough for a lamp or a heater, but motors hum on it, some chargers run hot and audio gear buzzes. A pure sine wave inverter makes the same smooth wave as the mains, so anything that runs from a wall socket runs from it. The inverter of this library is a compact 300 W one, the size used in a camper van, a boat or a small off-grid cabin.

The pure sine wave inverter at a glance
Pure sine wave inverter, 300 W (makers' manuals)
Input12 V battery, 10 to 15 V
Output230 V AC, 50 Hz, pure sine wave, distortion up to 4 %
Power300 W continuous, 600 W for a moment
Efficiencyover 90 % at full load, about 95 % at a third
With no loadunder 4 W
Battery-low alarm10.5 V
Battery-low shutdown10 V
Other protectionsbattery over 15 V, overload, short circuit, over 55 °C
Coolinga fan that runs by temperature
Size and weight205 x 91 x 65 mm, about 1 kg

What an Inverter Asks of the Battery

An inverter does not make energy. Every watt that leaves it on the 230 V side has to come in on the 12 V side, plus a little more for its own losses. Because the battery's voltage is about twenty times lower than the output's, the battery's current is about twenty times higher. A 25 W lamp takes only 0.11 A at 230 V, but the inverter takes more than 2 A from the battery to feed it. At the full 300 W the battery has to give about 28 A.

This is the first thing to learn about inverters, and the simulation shows it in numbers: the battery, not the inverter, sets how long the lights stay on. It is also why the leads to the battery must be short and thick, and why an inverter watches the battery's voltage. When the battery falls to 10.5 V a buzzer warns that it is nearly empty. At 10 V the inverter switches itself off, because a lead-acid battery that is drained further is damaged.

The efficiency is not the same at every load. Even with nothing connected the inverter takes about 3 W to keep itself running, so a very small load is fed at a poor efficiency. The best point is at about a third of the rated power, and at full load the losses grow again. The pop-up of this library shows the efficiency and the losses live.

Features of the 12V to 230V Pure Sine Wave Inverter Library for Proteus Simulation

  • The inverter at true scale: the finned aluminium case, 205 x 91 mm, seen from above, with its label plate, two lamps, the battery posts and the mains lead; at run time the lamps work and the plate shows the state and both sides of the conversion.
  • A real sine wave: 230 V rms at 50 Hz (60 Hz by a property), with the small distortion of a real inverter, isolated from the battery side.
  • The battery's current: it follows the load's real power and the efficiency: 94 % at 100 W, 90 % at 300 W, 3 W with no load.
  • The battery watch: the alarm at 10.5 V, the shutdown at 10 V, and a shutdown over 15 V.
  • Overload and short circuit: 300 W for good, 600 W for a moment; beyond that the output is cut, tried again three times, then locked until the switch.
  • Heat and a fan: the case warms with the losses, the fan starts at 40 °C, and over 55 °C the inverter rests.
  • A pop-up: the power flow with the efficiency, one cycle of the output's voltage and current as on a scope, with the power factor, eight live values, graphs, an event log and a check page.
  • A complete package: about 1.6 MB with the library, our lead-acid battery, our Arduino UNO V4.0 and the demo, without the source code of the model.

The Pure Sine Wave Inverter in Proteus

The device is INVERTER12V230VTEP in TEPINVERTER.LIB, under Electromechanical > Inverters, with the prefix INV and the analog model TEPINVERTER.DLL. Search INVERTER in Pick Devices. It has four pins: DC+ and DC- on the left for the battery, and L and N on the right for the mains side. The mains side is isolated from the battery side, as in the real inverter. The properties are SWITCH (ON or OFF at the start), FREQ (50 or 60), TEMP (the air temperature around the inverter) and SPEED (the inverter's clock for the heat and the energy counters, 1 to 7200, to be set like the SPEED of our battery libraries).

Figure: The inverter, drawn at its true size, with its lamps at run time.

Download 12V to 230V Pure Sine Wave Inverter Library for Proteus Simulation

Click the button below to download 12V-to-230V-Pure-Sine-Wave-Inverter-Library-for-Proteus-v1.0.zip (about 1.6 MB, without the source code of the models):

12V to 230V Pure Sine Wave Inverter Library for Proteus V1.0
  • README.txt: installation, the demo, the wiring, troubleshooting and the limits of the simulation.
  • Proteus Library Files: TEPINVERTER.LIB, TEPLEADACID.LIB and ArduinoV4TEP.LIB.
  • Proteus Model Files: TEPINVERTER.DLL, TEPLEADACID.DLL and TEPARDUINO.DLL.
  • Arduino Code: the demo sketch.
  • 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 12V to 230V Pure Sine Wave Inverter Library for Proteus Simulation

  1. Close Proteus and extract the whole zip file, for example to your Desktop.
  2. Copy the files from Proteus Library Files into the LIBRARY folder of Proteus.
  3. Copy the files from Proteus Model Files into the MODELS folder.
  4. Delete TEPINVERTER.IDX from the LIBRARY folder if it is there.
  5. The demo also uses our INA219 Current Sensor Library for Proteus: install it from its own package (it is not in this zip).
  6. Start Proteus, press P and search for INVERTER.

Proteus Simulation of an Inverter with Arduino

The demo is a small battery backup, the kind that keeps a lamp alight when the mains fails. The battery, BAT1, is the 12 V 7.2 Ah battery of our 12V Lead-Acid Battery Library for Proteus Simulation, starting at 60 percent. The inverter, INV1, takes its DC from the battery, and R1, 2.1 k, stands for a 25 W mains lamp on its L and N. Our Arduino UNO Library for Proteus V4.0 is the battery monitor: its built-in monitor is the same window as our TEP Serial Monitor Advance for Proteus, and it reads our INA219 (U1, its pop-up version) in the lead between the battery and the inverter. The SPEED of the battery and of the inverter is 3600, so one simulated second is an hour. Open Pure-Sine-Wave-Inverter-Battery-INA219-ArduinoUnoV4.pdsprj.

Figure: The whole simulation on an A3 sheet.

A word on safety before the first run: in the simulation the 230 V of the output is only a number. In real life it is as dangerous as the mains. The Arduino in this demo touches only the 12 V side.

The Sketch

The sketch never sees the 230 V side. It measures the battery with the INA219 and works out the rest. The shunt sits in the battery's positive lead with its VIN- end at the battery, so a current that flows out of the battery gives a negative shunt voltage; the sketch turns the sign round:

    sumI -= readReg(0x01) * 0.00001 / SHUNT_OHM;                 // 10 uV a step: + out of the battery, into the inverter

From the voltage and the current the sketch can tell what the inverter is doing. An inverter that draws current from a battery under 10.5 V has its alarm on; one that draws nothing from a low battery has shut down:

  if (amps > 0.10) return volts < LOW_ALARM ? F("LOW BATTERY: the alarm sounds") : F("running");
  if (volts < 11.5) return F("shut down: the battery is low");

It also counts what the lamp has cost the battery, in amp-hours and in watt-hours:

    wattHours += (watts + lastWatts) / 2 * hours;                  // the energy taken from the battery

The constant CLOCK is 3600, the same as the SPEED of the battery and the inverter; in real life it would be 1. The LED on pin 13 lights when the battery is under 10.5 V. You can type reset to set the counters back to 0 or rate 1000 to report once a second.

Pure Sine Wave Inverter Simulation Results

Open the project and press Run. The demo runs about 2 simulated seconds, which are two hours for the battery; with the pop-ups open and the pictures being taken it took about two minutes on our PC. Click the inverter for its pop-up. Every number below comes from one simulation run, the demo exactly as it ships.

A Sine Wave from a Battery

The inverter starts softly and the Event log writes ON. The pop-up at 0.5 s shows both sides of the conversion. On the mains side the lamp gets 230 V at 50 Hz and takes 0.109 A, which is 25.1 W. On the battery side the same power arrives as 2.40 A at 11.80 V, 28.3 W: the current is about twenty times higher, because the voltage is about twenty times lower. The difference, 3.2 W, is the inverter's own loss, so the efficiency with this small load is 89 %. The scope picture on the right draws one cycle of the output, the voltage in blue and the current in orange; the lamp is a resistor, so both rise and fall together and the power factor is 1.00.

Figure: The inverter at work: 230 V for the lamp, the matching current from the battery.

On the sheet the POWER lamp is green, and the plate shows the state and both sides: the battery's volts and amps, and the output's volts, amps and watts.

Figure: The inverter on the sheet, with the lamp alight.

The other pop-ups show the 12 V side. The battery gives 2.40 A at 12.05 V and has 42 % of its charge left. The INA219 in the lead reads 12.032 V on the bus, -239.99 mV across its shunt and -2.400 A; the minus sign means that the current flows out of the battery, and the sketch turns it round. Notice that the inverter gets a quarter of a volt less than the battery has: that is the drop across the 0.1 ohm shunt, and a thin battery lead does the same.

Figure: The battery feeds the inverter.
Figure: The INA219 measures the current into the inverter.
Figure: The simulation in the workspace.

The Battery Runs Down

The lamp needs the same power all the time, but the battery's voltage falls as it empties. An inverter answers a lower voltage with a higher current. At 1.0 s the battery is down to 11.48 V and the inverter takes 2.47 A; the output has not changed, still 230 V and 25.1 W. A lamp on an inverter does not grow dim as the battery empties. It simply goes out at the end.

Figure: An hour later: a lower battery voltage, a higher battery current, the same output.

The Alarm and the Shutdown

At 1.40 s the battery falls under 10.5 V. The Event log writes BATTERY LOW ALARM with 10.32 V, the POWER lamp on the sheet begins to flash, and in the real inverter a buzzer sounds. The pop-up catches this short moment: 10.32 V and 2.75 A, the lamp still alight. It does not last. At 1.42 s the battery is under 10 V and the inverter writes SHUT DOWN: the output is cut, the red FAULT lamp lights, and the inverter takes only 20 mA.

Figure: The battery-low alarm: under 10.5 V, the output still on.
Figure: Shut down: the battery fell under 10 V.

The inverter now waits for 12.5 V, and only a charger can bring that. At 1.8 s the battery stands at 9.69 V. Its own pop-up shows what the run has cost: 0 % of its charge is left after 3.24 Ah, the terminals are at 9.71 V, and it warns of a deep discharge. The lamp was alight for 1 h 24 min.

Figure: The battery after the shutdown: flat.

This is the lesson of the run. The alarm at 10.5 V is the last call, not an early warning: by then a small battery is as good as empty, and the shutdown at 10 V only prevents the worst. For a long battery life, stop much earlier; half the charge is a good rule for a lead-acid battery. And switch the inverter off afterwards, because even shut down it still takes 20 mA from a flat battery.

A Short Circuit on the Output

For a second simulation run we changed R1 to 1 ohm, a short circuit on the 230 V side. The inverter cuts its output in the first moment, at 6 A, before the battery feels anything. It tries again twice, and after the third cut it gives up: the Event log says that the output stays off until the inverter is switched off and on. In the pop-up that is the Switch chip.

Figure: A second run with a short circuit on the output.
Figure: The Event log of the second run.

The Graphs, the Event Log and the Check Page

Back to the first run. The Graphs page plots the output voltage, the output power, the battery voltage and the battery current over the last 2, 6 or 15 simulated seconds. The Event log keeps every change of the state and every warning. The Check page sums up the run: 37.5 Wh taken from the battery and 33.0 Wh given to the lamp, the battery between 9.35 V and 12.42 V, the case at 31 °C at most.

Figure: The Graphs page.
Figure: The Event log.
Figure: The Check page.

The monitor tells the same story from the Arduino's side: the battery falling from 12.21 V to 10.60 V while the current rises from 2.36 A to 2.67 A, and then the words that the inverter has shut down. Its counters end at 3.08 Ah and 36.1 Wh.

Figure: The monitor: the battery's volts, amps and watts, the state and the counters.

Try It Yourself

  • Click Switch in the inverter's pop-up: off, the output is dead and nothing is taken from the battery; on, the inverter starts softly again.
  • Set the battery's SOC to 100: the lamp stays alight much longer before the alarm.
  • Change R1 to 4k2, a lamp of half the power: the battery lasts about twice as long, but the efficiency falls, because the inverter's own 3 W now weigh more.
  • Set FREQ to 60 for the 60 Hz of an American inverter and look at the scope picture.
  • Put a capacitor of 1 uF in series with R1: the current now leads the voltage, and the power factor falls below 1.

Ideas to Extend the Demo

  • Charge the battery from our solar panel and a charge controller: a complete off-grid system, from the sun to the socket.
  • Let the Arduino switch the inverter on only when the mains fails: a small uninterruptible power supply.
  • Show the battery's voltage and the time left on an LCD.

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 Inverter

  • The output can kill: 230 V from an inverter is as dangerous as 230 V from the wall. Never open the case, and never touch the output.
  • Short, thick battery leads: at 300 W the battery gives about 28 A. Thin or long leads lose voltage and get hot.
  • A fuse in the battery lead: close to the battery's positive terminal, for the day the lead is shorted.
  • Never connect the output to the mains: an inverter of this kind cannot run in parallel with the grid.
  • Size the battery: the watt-hours of the load, divided by the efficiency, are the watt-hours the battery has to hold. And do not use the last of them: a lead-acid battery lives longest when it is not drained below half.

Troubleshooting

  • No output, the lamps are dark: the SWITCH property is OFF, or under 10 V is on DC+ and DC-.
  • SHUT DOWN at the start: the battery is under 10 V or over 15 V. After a low battery the inverter waits for 12.5 V.
  • SHUT DOWN - overload: the load takes more than 300 W for good or 600 W for a moment. A motor takes several times its power as it starts.
  • The output stays off after three tries: click the Switch chip off and on, or set the fault right and run again.
  • The battery never runs down: the clock runs in real time. Set SPEED like the battery's, 60 or 3600.
  • The part is not simulated: TEPINVERTER.DLL is missing from MODELS and from the project folder.

Limitations of the Simulation

  • The voltages, the powers, the alarm and shutdown levels, the efficiency figures and the size are from two makers' manuals of 300 W pure sine wave inverters.
  • Our own figures: the shape of the loss (3 W with no load, growing with the square of the power), the two seconds before a shutdown, the three tries ten seconds apart, the warming of the case and the fan's temperatures.
  • The model works with the mean power of each cycle: the battery sees a steady current, not the ripple at twice the output frequency that a real inverter draws.
  • Not modelled: the high-frequency switching inside, the fuse, a reversed battery, the USB socket some inverters have.
  • Arduino is a name of Arduino; this library is not made or endorsed by Arduino, Labcenter or any maker of inverters.
  • Tested in Proteus 8.5 in November 2026 (the demo as shipped). Proteus 7 is not supported.

So, that was all about the 12V to 230V Pure Sine Wave Inverter Library for Proteus Simulation. I hope it helps you see what an inverter really does: it does not make power, it trades the battery's amps for the volts of a wall socket, and it stops before the battery is ruined. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!