You are currently viewing New VSM103CT Proteus 8 Library Model | AC Current Measurement | Free Download
VSM103CT Proteus Model - AC Current Measurement

New VSM103CT Proteus 8 Library Model | AC Current Measurement | Free Download

This article presents the VSM103CT, a dedicated simulation model engineered to replicate the ZMCT103C Current Transformer within the Proteus environment. This dedicated simulation model functions as a virtual representation of the ZMCT103C Current Transformer, precisely replicating its behavior for virtual prototyping.

VSM103CT Proteus Model

The ZMCT103C’s core function is current transformation, achieved through its fixed 1000:1 turns ratio. It operates within an input current range of 0-10A, ensuring stable and accurate performance. For example, a 5A input current yields an output current of 5mA, providing a clear baseline for its secondary output.

VSM103CT Proteus Simulation Model
VSM103CT Proteus Simulation Model

When working with the VSM103CT in the properties window, you’ll encounter two important parameters: the sampling resistor and linearity error adjustment. The sampling resistor is already built into the CT model, requiring you only to set its value; common choices are 50 or 100 ohms, and the default is set to 100 ohms. Regarding linearity error, a default value of 0.1 is applied. This error introduces a slight quadratic curve to the transfer function, causing higher input values to deviate more from perfect linearity. You have the flexibility to adjust this nonlinearity scaling factor anywhere from 0 to 1 to match your simulation requirements.

Interfacing VSM103CT with Arduino

The VSM103CT’s output is scaled to 5mA for a 5A input, effectively delivering 1mA per 1A of input current. This means a 1A input results in 1mA secondary current and 0.1V output (assuming a 100-ohm resistor), while 5A yields 5mA and 0.5V, and 10A produces 10mA and 1.0V. It’s critical to note that this is an AC voltage signal, centered around 0V. To enable safe and accurate readings with most microcontrollers, such as Arduino, which cannot interpret negative voltages, the signal must be shifted above 0V. A straightforward solution for this is a simple biasing circuit, commonly implemented with two 10kΩ resistors.

VSM103CT Proteus Simulation
VSM103CT Proteus Simulation

Reading VSM103CT with Arduino

When measuring AC current with a current transformer (CT), what we get out of the CT isn’t a direct current reading, it’s a small AC voltage signal across a burden resistor. To turn that into a real, usable current value, we go through a few logical steps. Here’s the full process, along with the code that makes each step happen.

1. Start by Sampling the Voltage Signal

We constantly read the analog voltage signal coming from the CT. This signal has been biased to sit around 2.5 V so it stays in the safe 0–5 V range for the Arduino’s ADC.

const int analogPin = A0;
const float offsetVoltage = 2.5;
const float adcResolution = 5.0 / 1023.0;
const int sampleCount = 200;
float sumOfSquares = 0;

2. Remove the Offset to Center the Signal

Since the AC waveform rides on top of a 2.5 V bias, we need to digitally subtract that offset to center the signal around zero. This gives us the actual AC waveform.

for (int i = 0; i < sampleCount; i++) {
  int raw = analogRead(analogPin);         
  float voltage = raw * adcResolution;     
  float centered = voltage - offsetVoltage;

3. Square Each Centered Sample

Squaring each sample makes all values positive, so we can measure the waveform’s “strength” regardless of whether it’s above or below zero.

  sumOfSquares += centered * centered;
  delayMicroseconds(200);
}

4. Average the Squared Values

We take the average of all the squared samples we collected. This gives us the mean power of the signal (still in voltage terms).

float meanSquare = sumOfSquares / sampleCount;

5. Take the Square Root to Get the RMS Voltage

The square root of that average gives us the RMS (Root Mean Square) voltage across the burden resistor—this is the effective AC voltage we care about.

float voltageRMS = sqrt(meanSquare);

6. Apply Ohm’s Law to Find the CT’s Output Current

Now we use Ohm’s Law. Since we know the sampling resistor’s value, dividing the RMS voltage by that resistance gives us the secondary current, the current flowing through the CT’s output loop.

const float samplingResistor = 100.0;
float secondaryCurrent = voltageRMS / samplingResistor;

7. Multiply by the Turns Ratio to Get the Actual Current

The current transformer reduces current by a fixed ratio (1000:1), so we scale the measured secondary current back up to find the primary current, the real current flowing through the main wire.

const float turnsRatio = 1000.0;
float primaryCurrent = secondaryCurrent * turnsRatio;

Here’s the full code:

VSM103CT Simulation with Variable Current Injection

VSM103CT Simulation with Variable Current Injection
VSM103CT Simulation with Variable Current Injection

Download Library

Simply click on the button to download the library. You can refer to this post for instructions on how to install the library in Proteus 8. How to Download and install Library in Proteus (electronicstree.com)

ZIP Password : electronicstree.com

If you have any requests for Arduino Module Libraries in Proteus, feel free to leave a comment or contact us via the form.
Free libraries are developed during my free time, with priority given to the most requested ones.
Paid services are also available, including custom Proteus libraries and complete Proteus project development

Leave a Reply