Hello friends, I hope you all are doing great. Today, I am going to share the new ADS1115 ADC Library for Proteus V1.0. The ADS1115 is the 16-bit analog-to-digital converter that Arduino makers add when the UNO's own 10-bit ADC is not enough: four inputs, a programmable gain amplifier that can read a few millivolts, and an I2C bus. It sits in weighing scales, battery testers, soil and gas sensor boards, heart-rate monitors and data loggers. Now you can build and test those projects in Proteus, with the blue ADS1115 module and a 10 kohm potentiometer to turn.
Behind the parts sit our own models, not a part that shows a number. The four inputs are analog pins, so the ADS1115 reads whatever your circuit puts on them, and it answers the Arduino from its four registers exactly as the datasheet says: the gain that clips, the eight data rates with their real timing, single-shot and continuous mode, and the ALERT/RDY pin that can wake an interrupt after every result. You get three devices: the module as a Simple device with a live STATUS panel and as an Advance device with a pop-up window and three test tools, and the potentiometer with its own panel and a knob that turns. The demo runs the Adafruit ADS1X15 library on our Arduino UNO V4.0.
NOTICE: an ADC is easy to fake: read a number from a property and hand it to the Arduino. We wanted more. Our ADS1115 measures the real voltage of the circuit at the end of each conversion, takes the time the datasheet gives for it, and answers the I2C bus register by register, so the Adafruit library reads it exactly as on your desk, and the classic mistakes fail exactly as they do there. It took our team a lot of hard work. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the ADS1115 board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the ADS1115 ADC Library for Proteus V1.0:
What is the ADS1115?
The ADS1115 from Texas Instruments is a 16-bit delta-sigma ADC with an I2C interface. Its four inputs, AIN0 to AIN3, go through a multiplexer to one converter: each input against GND, or two inputs against each other as a differential pair. In front of the converter sits a programmable gain amplifier (PGA) that sets the range, from +-6.144 V down to +-0.256 V. Compared with the UNO's 10-bit ADC, which steps in about 4.9 mV, the ADS1115 steps in 187.5 uV at its widest range and 7.8 uV at its smallest. If ADCs are new to you, our Introduction to ADC0804 and How to use ADC with STM32 explain the idea, and Heartbeat Monitoring System with ADS1115 and Raspberry Pi 4 shows the ADS1115 in a real project.
| ADS1115 | |
|---|---|
| Resolution | 16 bits: -32768 to 32767 |
| Inputs | 4 single-ended (AIN0 to AIN3 against GND) or 4 differential pairs |
| Ranges (PGA) | +-6.144, 4.096, 2.048, 1.024, 0.512, 0.256 V: 187.5 to 7.8 uV a step |
| Data rates | 8, 16, 32, 64, 128, 250, 475, 860 SPS: 125 to 1.16 ms a conversion |
| Modes | single-shot (then power-down) or continuous |
| ALERT/RDY | a comparator or a conversion-ready pulse, open drain |
| Interface | I2C at 0x48 (ADDR to GND) or 0x49 (ADDR to VDD) |
| Supply | VDD 2.0 to 5.5 V |
| Devices | ADS1115TEP (Simple), ADS1115ADVTEP (Advance), POTTEP (the potentiometer) |
The Gain and the Range
The PGA decides what a step is worth. At +-6.144 V (the library's GAIN_TWOTHIRDS, the default) a step is 187.5 uV; at +-0.256 V (GAIN_SIXTEEN) it is 7.8 uV. A signal outside the range does not damage anything, it just clips: the result stops at 32767 or -32768. And one rule beats them all: no input may go above VDD + 0.3 V. With a 5 V supply the +-6.144 V range is only a scale; the inputs still stop at 5.3 V.
Single-Shot and Continuous
Every access starts with the register pointer: a write of one byte sets it, a write of three bytes also writes that register, MSB first; a read returns the register the pointer points at. The Config register (power-on 0x8583) holds the input, the PGA, the data rate, the mode and the comparator. In single-shot mode, a write with OS = 1 starts one conversion; OS reads 0 while it runs and 1 when the result is in the Conversion register, then the chip powers down. In continuous mode it converts one result after another.
ALERT/RDY
The ALERT/RDY pin is open drain. It can be a comparator output, low when the result crosses the Hi_thresh and Lo_thresh registers, or, with Hi_thresh 0x8000 and Lo_thresh 0x0000, a conversion-ready pin: in continuous mode it pulses low for 8 us after each result, the perfect signal for an Arduino interrupt.
What's New in ADS1115 ADC Library for Proteus V1.0
- Real parts: the blue ADS1115 module drawn at about three times its real size, and a potentiometer with a knob that turns with its position.
- Two styles: a Simple device with a STATUS panel and an Advance device with a pop-up window; the LEDs and the panel button sit on the board itself.
- Real inputs: A0 to A3 are analog pins; the ADS1115 reads their voltages from the analog simulation at the end of each conversion.
- The real chip: four registers over I2C, the multiplexer with the pairs, the PGA that clips, the eight data rates with their timing, single-shot with OS, continuous mode, the address pin.
- ALERT/RDY: the traditional and window comparators, latching or not, after 1, 2 or 4 results, and the 8 us conversion-ready pulse, driven at the exact time of each result.
- A potentiometer: a real 10 kohm track with - and + buttons and six presets on its panel, or in the ADS1115's pop-up.
- Mistake detection: an input beyond the range, an input above the supply, a start while converting, an old result read again, a register that is not there.
- Three test tools on the Advance device: I2C, Readings, and Range and resolution.
- A two-node demo on our Arduino UNO V4.0 with the Adafruit library: the four inputs every second, the gain, the data rate, a differential reading, continuous mode with an interrupt on D2 and the comparator.
- A compact package: about 1.28 MB, without the C++ source code of the model.
Three Devices: the Module and the Potentiometer
The module looks like the one in your kit: the blue board with the ADS1115 in the middle, the pull-up resistors, the capacitor C1, the header VDD, GND, SCL, SDA, ADDR and ALRT on the left and the four inputs A0 to A3 on the right, facing your sensors.
The potentiometer is a real 10 kohm track between + and - in the analog simulation, with its wiper on OUT. Its panel has - and + (1 % a click), six presets (0, 10, 25, 50, 75 and 100 %), and the readouts OUT, the two halves of the track and the ADS1115 that reads it. The knob on the part turns from -135 to +135 degrees with the position.
| Simple | Advance | |
|---|---|---|
| Device | ADS1115TEP | ADS1115ADVTEP |
| On the schematic | The module and the STATUS panel | The module |
| The pot | On the pot's panel | The same, and in the pop-up |
| Status | Banner, 10 readouts, the last 4 events | A pop-up: Sensor, Event log, Tests |
| Interaction | The red X, PANEL on the board | The pop-up, OPEN PANEL on the board |
Download ADS1115 ADC Library for Proteus
Click the button below to download ADS1115-16-Bit-ADC-Library-for-Proteus-v1.0.zip (about 1.28 MB, without the C++ source code of the model):
ADS1115 ADC Library for Proteus V1.0: 16-Bit ADC Module for Arduino- README.txt: the devices, installation, the demo, wiring, the test tools and real hardware.
- Proteus Library Files:
TEPADS1115.LIBandArduinoV4TEP.LIBfrom our Arduino Library for Proteus V4.0. - Proteus Model Files:
TEPADS1115.DLLandTEPARDUINO.DLL. - Proteus Simulation:
ADS1115-16-Bit-ADC-ArduinoUnoV4.pdsprj,ADS1115_Demo.hexand copies of the two DLLs. - Arduino Code:
ADS1115_Demo.ino. It needs the Adafruit ADS1X15 library from the Library Manager of the Arduino IDE, only if you want to change the sketch.
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 ADS1115 ADC Library for Proteus
- Close Proteus and extract the whole zip file, for example to your Desktop.
- Copy the two files from Proteus Library Files into the LIBRARY folder of Proteus (usually
C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY). - Copy
TEPADS1115.DLLandTEPARDUINO.DLLfrom Proteus Model Files into the MODELS folder. - Delete
TEPADS1115.IDXfrom the LIBRARY folder if it is there. - Start Proteus, press P and search for ADS1115 or POTTEP.
Tip: keep the Proteus Simulation folder together, because the project needs its .hex file and the DLLs beside it. The library is tested in Proteus 8.5; Proteus 7 is not supported.
The ADS1115 Parts in Proteus
Three LEDs sit on the module's board: PWR while VDD is there, I2C, which flashes when the Arduino talks to the ADS1115, and RDY, which lights while ALERT/RDY is low. Next to the SIMPLE or ADVANCE badge is the panel button. The LEDs, the badge, the button and the panels are TEP additions; the real module has none of them.
The Simple device adds the STATUS panel. Its banner says what the chip just did, for example "POWER-DOWN - AIN3 = 0.0000 V (0) - 232 CONVERSIONS, 128 SPS", and turns orange or red when an input clips or a warning comes. Ten readouts follow: the state, the four inputs in volts, the last result, the input (MUX), the range (PGA), the rate and the reads. At the bottom are the last four events.
The red X closes the STATUS panel, and the PANEL button on the board opens it again, so a big project stays readable:
The Advance device keeps the schematic clean: only the module. Its live data opens in a pop-up window at Run, and the OPEN PANEL button on the board brings the window back if you close it. The module has one property, NOISE (1, about the datasheet's noise, by default; 0 for none). The potentiometer has POSITION (50 % by default) and RESISTANCE (10 kohm).
The Demo Circuit
The demo project has two nodes. Each one is an Arduino UNO V4.0 from our Arduino UNO Library for Proteus V4.0 with an ADS1115 on its SDA and SCL pins, which are A4 and A5, the module's ALRT on D2, and a potentiometer between 5 V and GND with its wiper on A0. Both UNOs run the same ADS1115_Demo.hex. Node 1 uses the Simple module with the pot at 50 %; node 2 uses the Advance module with the pot at 75 %.
Wiring
| ADS1115 module | Connects to |
|---|---|
| VDD | the UNO's 5V (3.3 V works too) |
| GND | GND |
| SCL | A5 (the SCL pin) |
| SDA | A4 (the SDA pin) |
| ADDR | open: the module pulls it to GND, address 0x48 |
| ALRT | D2 (INT0), only for continuous mode and the comparator |
| A0 | the pot's wiper (OUT); the pot's + to 5V, its - to GND |
In Proteus, SDA, SCL and ALRT reach their UNO through net labels, SDA_1, SCL_1 and ALRT_1 for node 1 and SDA_2, SCL_2 and ALRT_2 for node 2. A1 to A3 stay free for your own sensors. The Wire library turns on the UNO's internal pull-ups, which hold the I2C bus HIGH in the simulation, and the sketch does the same for ALRT. The serial monitor needs no wires at all, because it is built into the UNO V4.0.
The Arduino Code
The demo sketch uses the Adafruit ADS1X15 library (version 2.6.2) with Adafruit BusIO. New to Arduino? Start with Arduino Tutorial for Beginners and Introduction to Arduino UNO. The sketch begins with Wire and the library, the address, the ALRT pin and the converter object:
#include <Wire.h>
#include <Adafruit_ADS1X15.h>
const uint8_t ADS_ADDR = 0x48; // ADDR to GND
const uint8_t ALRT_PIN = 2; // ALERT/RDY (open drain, the module's pull-up) on INT0
Adafruit_ADS1115 ads;
In setup(), begin() checks that the ADS1115 answers. It leaves the library's defaults: GAIN_TWOTHIRDS (+-6.144 V) and 128 SPS:
if (!ads.begin(ADS_ADDR)) Serial.println(F("ADS1115 not found - check the wiring"));
A reading is one call per input. readADC_SingleEnded() writes the Config register with OS = 1, waits for OS to read 1 again and reads the Conversion register; computeVolts() turns the result into volts with the gain set last:
void readSingle() {
Serial.print('#'); Serial.print(++count);
for (uint8_t ch = 0; ch < 4; ch++) {
const int16_t r = ads.readADC_SingleEnded(ch);
Serial.print(F(" A")); Serial.print(ch); Serial.print(' ');
Serial.print(ads.computeVolts(r), 4); Serial.print(F(" V ("));
Serial.print(r); Serial.print(')');
}
Serial.println();
}
GAIN 2/3 to GAIN 16 pick the range, and RATE the data rate. The commands are compared without caring about upper or lower case:
bool setGain(const char* a) {
if (!strcmp(a, "2/3")) ads.setGain(GAIN_TWOTHIRDS);
else if (!strcmp(a, "1")) ads.setGain(GAIN_ONE);
else if (!strcmp(a, "2")) ads.setGain(GAIN_TWO);
else if (!strcmp(a, "4")) ads.setGain(GAIN_FOUR);
else if (!strcmp(a, "8")) ads.setGain(GAIN_EIGHT);
else if (!strcmp(a, "16")) ads.setGain(GAIN_SIXTEEN);
else return false;
return true;
}
The HEX file is in the package, so you do not need the Arduino IDE to run the demo. To change the sketch, install "Adafruit ADS1X15" from the Library Manager, open the sketch in the Arduino IDE and export the compiled binary, as in How to get the HEX file from Arduino. It needs 14,622 bytes of flash and 642 bytes of RAM.
The Serial Monitor
Both UNOs have the serial monitor built in, and it opens at Run. The screenshots use its Simple interface. Node 1 starts like this:
SDA on A4, SCL on A5, address 0x48, ALRT on D2
GAIN: +-6.144 V, one step 187.50 uV
RATE: 128 SPS, 7.81 ms a conversion
Commands: RUN | STOP | RAW | HELP
GAIN 2/3 | 1 | 2 | 4 | 8 | 16
RATE 8 | 16 | 32 | 64 | 128 | 250 | 475 | 860
SINGLE | CONT | ALERT 3.0 | DIFF
SINGLE: the four inputs, single-shot, every second
#1 A0 2.4994 V (13330) A1 0.0000 V (0) A2 0.0000 V (0) A3 0.0000 V (0)
#2 A0 2.4994 V (13330) A1 0.0000 V (0) A2 0.0000 V (0) A3 0.0000 V (0)
The maths is simple: 2.4994 V / 187.5 uV = 13330. Why 2.4994 V and not 2.5000 V? The pot at 50 % is like a 2.5 kohm source, and the ADS1115's input is 10 Mohm to GND, so it pulls the wiper down by 0.6 mV, exactly as on a real board. A1 to A3 are open and read 0. Node 2 shows its pot at 75 %:
Type a command in the monitor and press Enter: STOP stops the readings, RUN starts them again, and the others are explained below. HELP lists them all.
Turn the Potentiometer
Now let's turn the knob while the simulation runs. We clicked 100 % on RV1's panel with the mouse:
Then 10 % and five clicks on +:
#55 A0 2.4994 V (13330) A1 0.0000 V (0) A2 0.0000 V (0) A3 0.0000 V (0)
#56 A0 4.9993 V (26663) A1 0.0000 V (0) A2 0.0000 V (0) A3 0.0000 V (0)
#57 A0 4.9995 V (26664) A1 0.0000 V (0) A2 0.0000 V (0) A3 0.0000 V (0)
#60 A0 0.5503 V (2935) A1 0.0000 V (0) A2 0.0000 V (0) A3 0.0000 V (0)
#61 A0 0.7001 V (3734) A1 0.0000 V (0) A2 0.0000 V (0) A3 0.0000 V (0)
#62 A0 0.7502 V (4001) A1 0.0000 V (0) A2 -0.0002 V (-1) A3 0.0000 V (0)
At 100 % the wiper sits on +, so AIN0 reads the whole 5 V: 26664 steps. The lines #60 and #61 caught the clicks on the way, 11 % and 14 %, and #62 settled at 15 %: 0.75 V, 4001 steps. The ADS1115 follows within one line, because each conversion takes only 7.81 ms.
The Advance Pop-Up Window
At Run, the Advance ADS1115 opens its own window, ADS1115 16-Bit ADC, with the look of our TEP Serial Monitor Advance for Proteus. It has three tabs, Sensor, Event log and Tests, plus Settings and Help behind the gear and question mark icons. The status bar at the bottom always shows the pot, AIN0, the last result and the state.
The toolbar carries the pot's six presets. The top card is the inputs: AIN0 to AIN3 as bars, the green part is the PGA's range and the red line VDD + 0.3 V, and on the right the pot with -10, -1, +1 and +10 %, its two halves and the voltage across it. The next card is the ADS1115: the banner, the last result, the input, the range and the rate with the mode. The registers card decodes all four, with the pointer marked and the ALERT/RDY pin; the last card draws the last I2C transaction byte by byte, with the ones before it. We clicked the 25 % preset, then -10 and +1:
25 % of 5 V is 1.25 V, 6667 steps; -10 and +1 make 16 %, 0.80 V. The pop-up and the pot's own panel set the same wiper, and the pot's panel shows which ADS1115 reads it.
The Gain and Clipping
The most common ADS1115 mistake is a gain made for a smaller signal. Back at 75 %, we typed GAIN 1 and then GAIN 16 on node 2:
GAIN 1
GAIN: +-4.096 V, one step 125.00 uV
#13 A0 3.7490 V (29992) A1 0.0000 V (0) A2 0.0000 V (0) A3 0.0000 V (0)
#14 A0 3.7491 V (29993) A1 0.0000 V (0) A2 0.0000 V (0) A3 0.0000 V (0)
GAIN 16
GAIN: +-0.256 V, one step 7.81 uV
#16 A0 0.2560 V (32767) A1 0.0000 V (0) A2 0.0000 V (0) A3 0.0000 V (0)
With GAIN 1 the same 3.7491 V is 29993 steps of 125 uV: a finer reading, still inside +-4.096 V. With GAIN 16 the range is only +-0.256 V. The result stops at 32767, and the library turns it into 0.2560 V, as if it were true. A result of exactly 32767 or -32768 is always a clipped reading. We did the same on node 1:
The banner says it in words: "AIN0 = 0.750 V is beyond the +-0.256 V range (PGA): the result stops at 0x7FFF". After the warning, the banner stays orange with "AIN0 CLIPS" as long as AIN0 keeps clipping, even though the sketch reads the other three inputs in between. In the pop-up the bars show it too, the knob of AIN0 far outside the narrow green range:
The Range and resolution tool on the Tests tab works out the same input with every setGain():
It names the input that clips, the range and the supply limit, then shows the result each gain would give: GAIN_TWOTHIRDS and GAIN_ONE read it, the others clip. Open it for a reading stuck at 32767, a coarse reading or a voltage above VDD. GAIN 2/3 brings the reading back.
The Data Rate
RATE picks one of the eight data rates. We tried the fastest and the slowest:
RATE 860
RATE: 860 SPS, 1.16 ms a conversion
#21 A0 3.7491 V (19995) A1 0.0002 V (1) A2 0.0000 V (0) A3 0.0002 V (1)
#22 A0 3.7489 V (19994) A1 -0.0002 V (-1) A2 0.0000 V (0) A3 0.0000 V (0)
RATE 8
RATE: 8 SPS, 125.00 ms a conversion
#24 A0 3.7489 V (19994) A1 0.0000 V (0) A2 0.0000 V (0) A3 0.0000 V (0)
At 860 SPS a conversion takes 1.16 ms, but the last digit moves more: the faster the rate, the more noise, as the datasheet's noise tables say. At 8 SPS a conversion takes 125 ms, so one line of four inputs takes half a second, and the noise is gone. 128 SPS, the default, is a good middle.
DIFF and RAW
DIFF reads AIN0 against AIN1 with readADC_Differential_0_1(), and RAW reads the four registers by hand with Wire, the pointer first and then two bytes, MSB first:
DIFF
DIFF: AIN0 - AIN1 = 3.7491 V (19995)
RAW
RAW: Conversion 0x0000 Config 0xF180 Lo_thresh 0x0000 Hi_thresh 0x8000
AIN1 is open, so the pair reads AIN0 itself. A differential reading can be negative, which a single-ended one cannot. The Config word 0xF180 decodes by the datasheet: OS 1 (no conversion running), MUX 111 (AIN3, the last input of the loop), PGA 000 (+-6.144 V), MODE 1 (single-shot), DR 100 (128 SPS) and the comparator bits 0x00; Hi_thresh 0x8000 and Lo_thresh 0x0000 are the conversion-ready setting the library writes.
Continuous Mode and the RDY Interrupt
CONT switches to continuous mode on AIN0. The library writes the thresholds for the conversion-ready mode, so ALRT pulses low after every result, and the sketch attaches an interrupt to D2:
} else if (m == CONT) {
// continuous on AIN0; the library sets Hi_thresh 0x8000 and Lo_thresh 0x0000: ALRT pulses low after each result
ads.startADCReading(ADS1X15_REG_CONFIG_MUX_SINGLE_0, true);
attachInterrupt(digitalPinToInterrupt(ALRT_PIN), onReady, FALLING);
The interrupt only sets a flag; loop() reads each new result, the pointer and two bytes, and keeps the sum, the lowest and the highest:
if (mode == CONT && ready) { // a new result: read it (the pointer, then 2 bytes)
ready = false;
const int16_t r = ads.getLastConversionResults();
sum += r; results++;
if (r < lo) lo = r;
if (r > hi) hi = r;
}
CONT
CONT: AIN0 continuous, a result every 7.81 ms - the RDY pulse on D2 (INT0)
#69 AIN0 0.75024 V (4001 to 4002) 129 results, 129 RDY pulses on D2
#70 AIN0 0.75025 V (4001 to 4002) 129 results, 129 RDY pulses on D2
Every line is a little over one second, so it holds 129 results at 128 SPS, and the interrupt counted exactly as many RDY pulses on D2: not one result was missed. The average of 129 results has five decimals, and the lowest and highest result are only one step apart. Node 2 shows the same at 3.749 V:
The Comparator: ALERT
ALERT 3.0 turns ALRT into a comparator on AIN0. The sketch converts the threshold into steps and lets the library write it; the library's comparator is latching:
const int16_t th = (int16_t)(alertVolts * 32768.0 / ads.getFsRange());
ads.startComparator_SingleEnded(0, th);
Every second the sketch reads D2 first and then the result, because reading the result releases the latch:
void reportAlert() {
const bool low = digitalRead(ALRT_PIN) == LOW; // before the read: reading the result clears the latch
const int16_t r = ads.getLastConversionResults();
Serial.print('#'); Serial.print(++count);
Serial.print(F(" AIN0 ")); Serial.print(ads.computeVolts(r), 4); Serial.print(F(" V ALRT "));
Serial.println(low ? F("LOW - above the threshold since the last read") : F("high"));
}
Then we clicked 50 % in the pop-up:
ALERT 3.0
ALERT: ALRT (D2) goes low when AIN0 is above 3.000 V (16000)
#35 AIN0 3.7491 V ALRT LOW - above the threshold since the last read
#36 AIN0 3.7491 V ALRT LOW - above the threshold since the last read
#37 AIN0 2.4994 V ALRT LOW - above the threshold since the last read
#38 AIN0 2.4994 V ALRT high
#39 AIN0 2.4994 V ALRT high
3.0 V / 187.5 uV is 16000, the Hi_thresh. Line #37 is the latch at work: AIN0 had already dropped to 2.4994 V, but it was above 3 V after the last read, so ALRT stayed low until the sketch read the result. From #38 on, ALRT is high. A latching comparator never lets you miss a short peak.
The I2C and Readings Tools
The I2C tool is the one to open for a sensor that does not answer, a result that never changes, or a conversion that never ends. It counts the reads, the writes and the conversions, the OS polls (here about 31 reads of Config for each single-shot, more at the slow rates the demo tried), the starts written while a conversion runs and the old results read twice, and shows a reading of the Adafruit library step by step. The Readings tool lists the last 24 transactions and the last result of each input:
You can see the Adafruit library at work: the pointer to Config and a read, again and again while OS reads 0, then the pointer to Conversion and the result.
The Event Log
The Event log lists everything that happened, newest first: the power, every Conversion read with its input and value, the Config and threshold writes, the pot's changes with where they came from, notes and warnings. Filter it by I2C or warnings, pause it, or clear it.
The Simulation Log
Every ADS1115 and potentiometer also writes to the simulation log of Proteus, with the exact simulation time. This part shows the reads of one second and the 25 % preset on node 2:
U1: Read Conversion (AIN0): 0x3412 = 13330 = 2.4994 V (+-6.144 V) at 4.6849 s
U1: Read Conversion (AIN1): 0x0000 = 0 = 0.0000 V (+-6.144 V) at 4.6954 s
U2: Read Conversion (AIN0): 0x4E1B = 19995 = 3.7491 V (+-6.144 V) at 4.6849 s
RV2: the position: 25 % (25 % - a preset in U2's pop-up) at 5.5502 s
U2: the pot RV2: 25 % (25 % - a preset in U2's pop-up) at 5.5600 s
U2: Read Conversion (AIN0): 0x1A0B = 6667 = 1.2501 V (+-6.144 V) at 5.7263 s
Each line of the monitor is four single-shot readings about 10 ms apart: a conversion of 7.81 ms plus the I2C traffic. The pot logs its own change, and the ADS1115 logs which pot changed and from where.
How the Model Works
The ADS1115 is a mixed model. VDD, GND and A0 to A3 are analog: each input is 10 Mohm to GND in the SPICE simulation of Proteus, and VDD sees the chip's 150 uA. At the end of each conversion the ADS1115 reads the input from the solution and fills the Conversion register, with the PGA, the clipping and the noise. SCL, SDA and ADDR are digital: Proteus runs every edge from the Arduino with its exact time, and the model pulls SDA low to acknowledge and to send. ALRT is driven at the exact time of each result, so even the 8 us RDY pulse reaches the Arduino's interrupt. The potentiometer is analog too: two resistors that move with the wiper.
Troubleshooting
- "ADS1115 not found": no power on VDD and GND, SDA and SCL swapped or missing, or ADDR to VDD (0x49); the PWR LED is off or the I2C LED never flashes.
- The reading stops at 32767 or -32768: the input is beyond the range; a smaller gain number, and see Range and resolution.
- The voltage is wrong by a factor:
computeVolts()uses the gain set last; set the gain before the reading. - A coarse reading: steps of 187.5 uV at GAIN_TWOTHIRDS; a larger gain for a small signal.
- Slow readings: RATE 8 takes 125 ms a conversion, half a second for four inputs.
- CONT shows no result: ALRT is not wired to D2.
- No part or no monitor: TEPADS1115.DLL or TEPARDUINO.DLL is missing from MODELS and the project folder; a closed monitor opens again with a click on the UNO's USB port.
Things to Know Before Using a Real ADS1115
- The supply limit: no input above VDD + 0.3 V or below GND - 0.3 V, whatever the gain.
- Several modules: up to four on one bus: ADDR to GND (0x48), VDD (0x49), SDA (0x4A) or SCL (0x4B).
- ALRT is open drain: it needs a pull-up, like the UNO's INPUT_PULLUP.
- Show the result: for a display next to your ADC, see Display ADC Value on LCD using Arduino; for another I2C module in this series, see our INA219 Current Sensor Library for Proteus.
Limitations of the Simulation
- Not modelled: the ADS1115's offset and gain errors (the datasheet: +-1 step and 0.01 % typical), the input impedance's change with the gain, the averaging of the input over a conversion (the model samples it at the end), the digital filter's settling, ADDR to SDA or SCL; the pot has no power limit.
- The LEDs, the badge, the panel button and the panels are TEP additions.
- The model is our own, written from the ADS1115 datasheet. This library is not made or endorsed by Texas Instruments, Adafruit, the makers of the ADS1115 modules or Labcenter.
- Licences: the demo sketch uses the Adafruit ADS1X15 library 2.6.2 (BSD) and Adafruit BusIO 1.17.4 (MIT), which are not shipped; install them from the Library Manager. The demo's HEX file contains them and the Arduino AVR core 1.8.6 with LGPL-licensed code; the licence texts and the source links are in the README.
- Tested in Proteus 8.5 in October 2026 (the demo as shipped on two Arduino UNO V4.0 boards with their built-in monitors: both nodes reading, the pot's presets and + on node 1 with the mouse, GAIN 16, CONT, the red X and PANEL, the presets, GAIN, RATE, DIFF, RAW, CONT and ALERT on node 2, the three tools; 88.5 s of simulation took 167 s, about 0.5 x real time with the pop-up and both monitors open). Proteus 7 is not supported.
So, that was all about the ADS1115 ADC Library for Proteus V1.0. I hope the gain, the data rate and the ALERT/RDY pin are clear now, so your sensor reads the right voltage from the first run. If you use the ADS1115 ADC Library for Proteus in a project, please share it in the comments or in our forum, and if you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!