LOAD CELL SIMULATION IN PROTEUS USING ARDUINO AND INA122 (INSTRUMENTATION AMPLIFIER)

Photo of author

By Jackson Taylor

Home » Electronics Topics » Arduino » LOAD CELL SIMULATION IN PROTEUS USING ARDUINO AND INA122 (INSTRUMENTATION AMPLIFIER)

As an Amazon Associate we earn from qualifying purchases.

This project shows a load cell simulation in Proteus using an Arduino and an INA122 instrumentation amplifier. A load cell produces a very small voltage, so it needs amplification before an Arduino can read it. Simulating the circuit first lets you check the amplifier stage and the code without any hardware.

The video below walks through the simulation, and the download link gives you the project files.

DOWNLOAD FILES

Hardware Hack

Stop Buying New Batteries for Your Tech

Electronics are expensive, but their power sources don't have to be. Discover the simple engineering trick to recondition dead batteries and bring your gadgets back to 100% capacity.

Watch the Free Video

How a load cell works

A load cell is a transducer that turns force or weight into an electrical signal. Most common types use strain gauges arranged as a Wheatstone bridge. When weight bends the metal body of the cell, the resistance of the gauges changes slightly and the bridge becomes unbalanced.

The output is a differential voltage between two bridge terminals. It is usually only a few millivolts at full load, often given as a sensitivity in mV per volt of excitation. That is far too small for the Arduino’s analog input to measure with useful resolution.

Why use the INA122

The INA122 is a low-power instrumentation amplifier that works from a single supply. It amplifies the small difference between its two inputs and ignores voltage common to both, which suits a bridge sensor. A single external resistor sets the gain.

According to the datasheet, the gain is G = 5 + 200 kΩ / RG. As a rough example, a gain of about 100 needs RG of roughly 2.1 kΩ. Check the datasheet for the exact formula and supply limits before building a real circuit.

If you want more background on this stage, our post on a load cell amplifier covers it in more detail.

What you need

  • Proteus with Arduino library files installed
  • An Arduino Uno (or compatible) model
  • An INA122 instrumentation amplifier model
  • A load cell, represented in the simulation by a bridge circuit or variable resistors
  • A gain resistor (RG) and a 5 V supply
  • A virtual terminal to view the serial output
See also
LINE FOLLOWER USING ARDUINO

How the circuit is arranged

The signal path has three parts:

  1. The load cell bridge is powered from the 5 V supply, and its two output terminals go to the INA122 inputs.
  2. The INA122 amplifies the difference between those inputs. The gain resistor between its gain pins sets how much.
  3. The amplifier output goes to analog pin A5 on the Arduino, which reads it with its built-in ADC.

Proteus has no real strain gauge, so you change the bridge values (for example, with a variable resistor) to mimic changing weight. The screenshot below shows the circuit used in the project.

SCREEN SHOT

Proteus schematic of Arduino reading a load cell through an INA122 amplifier

Choosing the gain

The Arduino ADC is 10-bit, so with the default 5 V reference it returns values from 0 to 1023. Each step is about 4.9 mV. A raw load cell signal of a few millivolts would barely move the reading, which is why the amplifier is needed.

As an illustration, if a load cell gives 10 mV at full load and the gain is 100, the output is about 1 V. The Arduino would read roughly 205. Aim for a full-load output a little below the supply, so the amplifier does not clip and the ADC range is well used.

PROGRAM

#define loadcell A5
void setup()
{
  Serial.begin(9600);
}
void loop()
{
  int sensorValue = analogRead(loadcell);
  Serial.println(sensorValue);
  delay(500);
}

How the code works

  • #define loadcell A5 gives the analog input a readable name.
  • Serial.begin(9600) starts serial communication at 9600 baud. Set the virtual terminal in Proteus to the same rate.
  • analogRead(loadcell) returns a value from 0 to 1023 that matches the amplifier output voltage.
  • delay(500) prints a new reading every half second.

The program prints raw ADC values, not weight. To get a weight, you need a calibration step.

Sustainable Tech

Keep Toxic E-Waste Out of Landfills

Don't throw away your failing laptop, phone, or car batteries. Learn how to recondition them at home in just a few hours. It's better for the planet—and your wallet.

Learn How It Works

Turning readings into weight

Calibration is simple for a linear sensor. Record the reading with no load (the zero offset), then record it with a known weight. The scale factor is the change in reading divided by the weight added. After that, weight = (reading − zero offset) / scale factor.

See also
Drowsiness or eye detection in opencv python raspberry pi

You can then show the result on a display. Our guide on LCD simulation in Proteus shows one way to do that.

Running the simulation

  1. Build the circuit in Proteus and double-click the Arduino to load the compiled HEX file.
  2. Open the virtual terminal and match its baud rate to the code.
  3. Start the simulation and note the reading with the bridge balanced.
  4. Change the bridge value to mimic added weight and watch the number change.

Tips and common problems

  • Reading stuck at 0 or 1023: the gain may be too high or too low, or the output is clipping. Recheck RG.
  • No serial output: check that the baud rates match and that the HEX file is loaded.
  • Noisy values on real hardware: average several readings and keep the load cell wiring short.

For better resolution on real hardware, a dedicated converter is a common upgrade. See our article on interfacing a load cell with the ADS1231. A full application of the same sensor is the smart ration card system project.

FAQ

Why can’t I connect a load cell directly to an Arduino?

Its output is only a few millivolts, which is smaller than the Arduino’s ADC can resolve well. An amplifier such as the INA122 scales it up to a usable range.

Does Proteus have a load cell model?

Proteus has no ready-made strain gauge load cell, so the sensor is usually represented by a bridge of resistors or a variable resistor that you adjust during the simulation.

How do I set the INA122 gain?

Use one external resistor, RG, between the gain pins. The datasheet gives the gain as G = 5 + 200 kΩ / RG.

Can I use this code with real hardware?

Yes, the sketch only reads an analog pin and prints the value, so it works with a real amplifier output on A5. You will still need to calibrate it to get weight.

Revive Your Dead Electronics

Got a drawer full of dead gadgets or a failing car battery? Instead of paying a premium for replacements, use this simple trick to easily recondition them right from home.

See How It Works