Hello friends, I hope you all are doing great. Today, I am going to share the Nordic Thingy:91 Library for Proteus, so you can run a cellular IoT sensor simulation of Nordic Semiconductor's Thingy:91. The Thingy:91 is a battery-powered prototyping platform with the nRF9160 cellular SiP, an nRF52840 for Bluetooth, environment, colour and motion sensors, a buzzer, an RGB LED and a big button in one rubber case. With this library it runs your Arduino sketch in Proteus 8.5, reads its sensors and sends and receives SMS over LTE-M or NB-IoT with a GNSS position.
Nordic Thingy:91 Library for Proteus
Latest version: V1.0 (November 2026, this tutorial)
Other new Arduino boards: UNO R4 WiFi · Nano ESP32 · UNO WiFi Rev2 · Nano 33 IoT · UNO Q · UNO R4 Minima · Nano Every · MKR WiFi 1010 · Nano RP2040 Connect · STM32 Black Pill · Nucleo-F401RE · STM32 Blue Pill · Teensy 4.1 · Arduino Due · Arduino Leonardo · Arduino Micro · BBC micro:bit V2 · GIGA R1 WiFi · MKR WAN 1310 · Nano 33 BLE Sense · XIAO nRF52840 Sense · RAK4631 WisBlock · Nano Matter · nRF52840 DK · nRF5340 DK · nRF9151 DK · nRF7002 DK · Nordic Thingy:53 · xG24 Dev Kit · xG24 Explorer Kit · Thunderboard BG22 · SiWx917 Dev Kit · B-L475E-IOT01A · NUCLEO-WB55RG · NUCLEO-WL55JC1 · NUCLEO-H743ZI2 · SAM R21 Xplained Pro · FRDM-MCXN947 · Portenta H7 · LP-CC2652R7 · PSoC 6 WiFi-BT · Feather nRF52840 · Thingy:91 X · xG26 Dev Kit · nRF52 DK · nRF52833 DK · nRF52840 Dongle · nRF5340 Audio DK · nRF54H20 DK · nRF54LM20 DK · nRF9160 DK · nRF9161 DK · nRF21540 DK · Thingy:52
RF modules: nRF24L01 · nRF24L01 PA LNA · CC1101 · RFM69HCW · HC-12 · 433MHz RF · XBee
Temperature and weather sensors: DHT11 / DHT22 · DS18B20 · BME280 · BMP280 · SHT31 · AHT20 · BME680 · MLX90614 · MAX6675
Helping Tools
- Laptop WiFi Monitor: a laptop on the Wi-Fi of your design: a browser, a TCP / UDP terminal and ping
- Mobile WiFi Monitor: a smartphone that opens the pages of your board and sends it commands
- Serial Monitor Advance: a serial terminal window for the UART of your board
For the demo we built a cellular beehive monitor: the Thingy:91 sits under the lid of a hive in a field far from any Wi-Fi. It warns the beekeeper by SMS when the brood gets cold, when the lid is opened and - with the theft watch on - when somebody moves the hive, with a map link to follow it.
NOTICE: Proteus has no nRF9160 model and no model of the Thingy's sensors, so our team has put a lot of effort into building this device ourselves: the RGB LED, the button, the sensors and the cellular modem with SMS and GNSS are all our own model, and your sketch compiles with our free TEP Boards for Proteus add-on. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below. And if our free libraries help you, you can buy us a coffee. So, let's get started with the Nordic Thingy:91 Library for Proteus:
What is the Nordic Thingy:91?
The Thingy:91 (PCA20035) is Nordic Semiconductor's first cellular Thingy: a ready-made device for trying LTE-M, NB-IoT and GNSS ideas without designing any hardware. Inside the rubber case are the nRF9160 SiP (an Arm Cortex-M33 with 1 MB of flash and 256 KB of RAM, the cellular modem and GNSS), an nRF52840 for Bluetooth LE, a power management chip with a 1400 mAh battery, a SIM, and a set of sensors. It has no pin headers for wiring.
| Part | The real Thingy:91 | In the library |
|---|---|---|
| SiP | nRF9160: Cortex-M33, LTE-M / NB-IoT modem, GNSS | your Arduino sketch, the modem on SerialModem |
| Environment | BME680: temperature, humidity, pressure, gas | Arduino_HS300x, Arduino_LPS22HB calls |
| Colour, light | BH1749 | Arduino_APDS9960 calls |
| Motion | ADXL362 low-power and ADXL372 high-g accelerometers | Arduino_BMI270_BMM150 calls |
| RGB LED | P0.29, P0.30, P0.31, lit when HIGH | LEDR, LEDG, LEDB |
| Button | BUTTON 1 on P0.26 | BUTTON1, clickable |
| Buzzer | on P0.28 | drawn |
The Thingy:91 and the Thingy:91 X
The Thingy:91 X is the newer version with the nRF9151, Wi-Fi locating and a different set of sensors; Nordic recommends it for new designs, but the original Thingy:91 is in many labs. See our Nordic Thingy:91 X Library for Proteus - both use the same Phone window and Sensors window. For a cellular development kit with Arduino headers see our nRF9160 DK Library for Proteus.
Talking to the Modem
The sketch talks to the modem with AT commands on SerialModem: AT+CEREG? asks whether it is registered, AT+CMGS sends an SMS and AT+CGPSINFO reads the GNSS position. On the real chip Nordic's modem library passes the same kind of commands to the modem.
A simulation lets you build the whole device before a Thingy and a SIM are on the desk: the sensor logic, the modem, the SMS and the map link. When the sketch works in the Proteus simulation, the real Thingy only has to confirm it.
Features of the Nordic Thingy:91 Library for Proteus
- The device as it looks: the grey rubber case, the big BUTTON 1, the buzzer, the RGB LED, the USB port, the SIM slot, the power switch, RESET, the cellular plate and our PANEL pad, drawn compact, with our small TEP signature.
- Your sketch: a .hex for "Nordic Thingy:91 (TEP Proteus)" with LEDR, LEDG, LEDB, BUTTON1, SerialModem and MODEM_ON.
- The modem: registration, SMS in text mode and GNSS, with the Phone window as the owner's phone.
- The sensors: temperature, humidity, pressure, colour, light and motion, set from the Sensors window.
- A complete package: about 3.4 MB with the part, the add-on and the demo, without the source code of the models.
The Thingy:91 in Proteus Simulation
Search THINGY in Pick Devices; the device NORDIC THINGY91 is in TEPTHINGY91.LIB (Microprocessor ICs, Cellular Boards), with the prefix U. The USB port opens the serial monitor, the PANEL pad the Sensors window and the cellular plate the Phone window.
The Parts the Sketch Uses
| Name | What it is |
|---|---|
| LEDR, LEDG, LEDB | the RGB LED, lit when HIGH |
| BUTTON1 | the big button, LOW when pressed |
| SerialModem, MODEM_ON | the modem's AT interface; HIGH starts the modem |
| HS300x, BARO, APDS, IMU | the sensors through the sensor libraries |
| Serial | the USB port: the built-in monitor |
Download Nordic Thingy:91 Library for Proteus
Click the button below to download Nordic-Thingy91-Library-for-Proteus-v1.0.zip (about 3.4 MB, without the source code of the models):
Nordic Thingy:91 Library for Proteus V1.0- README.txt: installation, the demo, the parts, the properties, troubleshooting and the limits.
- Proteus Library Files:
TEPTHINGY91.LIBand the phone and laptop libraries for your own designs. - Proteus Model Files:
TEPNET.DLL. - Arduino Code: the demo sketch and the TEP Boards for Proteus add-on 1.91.0, with the sensor libraries.
- Proteus Simulation: the demo project, its HEX file and a copy of the DLL.
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 Nordic Thingy:91 Library for Proteus
- 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
TEPNET.DLLfrom Proteus Model Files into the MODELS folder, replacing an older one. - Delete
TEPTHINGY91.IDXfrom the LIBRARY folder if it is there. - For your own sketches, copy Arduino Code\TEP Boards for Proteus\hardware into your Arduino sketchbook (Documents\Arduino) and restart the Arduino IDE; the board is Nordic Thingy:91 (TEP Proteus).
- Start Proteus, press P and search for THINGY.
Demo: a Cellular Beehive Monitor in Simulation
Bees keep the brood nest at about 34 to 35 C. A colony that cannot hold that temperature is weak or in trouble, so a falling brood temperature is one of the first signs a beekeeper wants to know about. Hives often stand far from the house, in orchards and on field edges - and hive theft is a real problem in many countries. A cellular monitor covers both.
Open Thingy91-Cellular-Beehive-Monitor.pdsprj. U1 runs Thingy91_Beehive_Monitor.hex; its TEMPERATURE property starts the brood at 34.5 C. The beekeeper's phone is the Thingy's own Phone window - no other parts.
| Event | What the monitor does |
|---|---|
| the network | "Hive monitor online" by SMS |
| below 30 C | BROOD COLD by SMS, the LED red; above 32 C again: "Brood warm again" |
| light for 3 s | LID OPEN by SMS |
| moved, with the watch on | HIVE MOVED with the map link, then every 30 s until STOP |
| STATUS, WATCH, STOP, HELP | the SMS commands (the Phone window's keys) |
The Brood and the Lid
readHive() runs once a second. It reads the temperature, the humidity, the pressure and the light, warns when the brood gets cold - with a gap between 30 and 32 C so it does not send a message at every wobble - and calls the lid open only after 3 s of light, so a passing reflection does not count:
void readHive() { // once a second: the brood's warmth and the lid
tempC = HS300x.readTemperature();
humidity = HS300x.readHumidity();
hpa = BARO.readPressure() * 10; // kPa to hPa
int r, g, b, c;
if (APDS.colorAvailable()) { APDS.readColor(r, g, b, c); light = c; }
if (!cold && tempC < COLD_C) {
cold = true; showState();
Serial.print(F(">> BROOD COLD: ")); Serial.print(tempC, 1); Serial.println(F(" C"));
sendSms(owner, "BROOD COLD: " + String(tempC, 1) + " C - check the hive");
} else if (cold && tempC > WARM_C) {
cold = false; showState();
Serial.print(F(">> Brood warm again: ")); Serial.print(tempC, 1); Serial.println(F(" C"));
sendSms(owner, "Brood warm again: " + String(tempC, 1) + " C");
}
const bool bright = light > LIGHT_OPEN; // the lid: light for 3 s in a row
if (!bright) brightSince = 0;
else if (!brightSince) brightSince = millis();
if (!lidOpen && bright && millis() - brightSince >= LID_MS) {
lidOpen = true;
Serial.print(F(">> LID OPEN (light ")); Serial.print(light); Serial.println(F(")"));
sendSms(owner, "Lid open: " + status());
} else if (lidOpen && !bright) {
lidOpen = false;
Serial.println(F(">> lid closed"));
}
}
The Theft Watch
With the watch off, checkMotion() keeps learning how the hive sits. With the watch on, a change of more than 0.35 g means somebody moves it - and the SMS carries the map link:
void checkMotion() { // the watch: does someone move the hive?
float x, y, z;
if (!IMU.accelerationAvailable() || !IMU.readAcceleration(x, y, z)) return;
if (!watch) { bx = x; by = y; bz = z; return; } // the watch off: remember the hive at rest
const float change = fabs(x - bx) + fabs(y - by) + fabs(z - bz);
if (moved || change < MOVE_G) return;
moved = true;
showState();
nextTrack = millis() + TRACK_MS;
Serial.print(F(">> HIVE MOVED (")); Serial.print(change, 2); Serial.println(F(" g)"));
sendSms(owner, "HIVE MOVED! " + where());
}
Commands from the Phone
A new SMS arrives as a +CMT line with the sender, followed by the text. command() acts on it:
void command(const String &from, String text) {
text.trim(); text.toUpperCase();
Serial.print(F("SMS from ")); Serial.print(from); Serial.print(F(": ")); Serial.println(text);
if (text == "STATUS") sendSms(from, status() + " " + where());
else if (text == "WATCH") { setWatch(true, F(">> SMS")); sendSms(from, "Watch on: " + where()); }
else if (text == "STOP") { setWatch(false, F(">> SMS")); sendSms(from, "Watch off: " + status()); }
else sendSms(from, "Commands: STATUS, WATCH, STOP, HELP");
}
The LED
showState() sets the colour: red for an alarm, yellow without network, blue with the watch on, green when all is well:
void showState() {
if (moved || cold) colour(1, 0, 0); // red: an alarm
else if (!registered) colour(1, 1, 0); // yellow: no network yet
else if (watch) colour(0, 0, 1); // blue: all well, the watch on
else colour(0, 1, 0); // green: all well
}
Starting the Modem
startModem() switches the modem on, waits for its OK, turns the echo off, chooses text-mode SMS, asks for new messages straight away and switches GNSS on:
void startModem() {
pinMode(MODEM_ON, OUTPUT);
digitalWrite(MODEM_ON, HIGH); // the modem starts (on the real chip: nrf_modem_lib_init())
SerialModem.begin(115200);
Serial.println(F("Starting the nRF9160 modem"));
while (!sendAT("AT", 1000)) { } // it answers once it has started
sendAT("ATE0", 500);
sendAT("AT+CMGF=1", 500); // SMS as text
sendAT("AT+CNMI=2,2,0,0,0", 500); // a new SMS comes straight to the AT interface
sendAT("AT+CGPS=1,1", 500); // GNSS on
Serial.println(F("Modem ready: SMS and GNSS on, waiting for the network"));
}
Run the Simulation
Press Run, and in the Sensors window click DARK - the closed hive. The serial monitor - the same window as our TEP Serial Monitor Advance for Proteus - shows the modem starting; the LED is yellow while it searches and turns green on the network:
Thingy:91 Cellular Beehive Monitor - The Engineering Projects
Starting the nRF9160 modem
Modem ready: SMS and GNSS on, waiting for the network
BUTTON 1 = the watch on / off SMS: STATUS, WATCH, STOP, HELP
Status: LTE searching, 34.5 C, 60 %, 1013 hPa, lid closed, watch off, SMS sent 0
GNSS fix: 31.520400, 74.358700
LTE: registered on the network
SMS to +15555550191: Hive monitor online: 34.5 C, 60 %, 1013 hPa, lid closed, watch off
Status: LTE registered, 34.5 C, 60 %, 1013 hPa, lid closed, watch off, SMS sent 1
Switch the Watch On
Press WATCH in the Phone window: the watch is on and the LED blue:
Somebody Moves the Hive
In the Sensors window click SHAKE: HIVE MOVED, the LED red, and the SMS goes out with the map link. Here is the complete circuit while the simulation runs:
The Lid and a Cold Brood
Press STOP, then click ROOM light: after 3 s the lid counts as open. Make it 10 C colder: 24.5 C is BROOD COLD. STATUS sends everything with the map link, and 10 C warmer brings "Brood warm again":
SMS from +15555550191: WATCH
>> SMS: the watch is on
SMS to +15555550191: Watch on: https://maps.google.com/?q=31.520400,74.358700
Status: LTE registered, 34.5 C, 60 %, 1013 hPa, lid closed, watch on, SMS sent 2
>> HIVE MOVED (1.68 g)
SMS to +15555550191: HIVE MOVED! https://maps.google.com/?q=31.520400,74.358700
SMS from +15555550191: STOP
>> SMS: the watch is off
SMS to +15555550191: Watch off: 34.5 C, 60 %, 1013 hPa, lid closed, watch off
Status: LTE registered, 34.5 C, 60 %, 1013 hPa, lid closed, watch off, SMS sent 4
>> LID OPEN (light 270)
SMS to +15555550191: Lid open: 34.5 C, 60 %, 1013 hPa, lid OPEN, watch off
>> BROOD COLD: 24.5 C
SMS to +15555550191: BROOD COLD: 24.5 C - check the hive
Status: LTE registered, 24.5 C, 60 %, 1013 hPa, lid OPEN, watch off, SMS sent 6
SMS from +15555550191: STATUS
SMS to +15555550191: 24.5 C, 60 %, 1013 hPa, lid OPEN, watch off https://maps.google.com/?q=31.520400,74.358700
>> Brood warm again: 34.5 C
SMS to +15555550191: Brood warm again: 34.5 C
Why the Brood Temperature Matters
Worker bees warm the brood nest by shivering their flight muscles and cool it by fanning and spreading water. A colony keeps the nest at about 34.5 C almost regardless of the weather, so the temperature there tells a lot: a strong drop can mean the colony has swarmed, lost its queen or is too small for the cold night. A sensor above the frames sees this without opening the hive.
Detecting an Open Lid
A closed hive is dark inside. The colour sensor's clear channel jumps when light comes in, so a sustained bright reading means the lid is off - the beekeeper at work, wind, an animal or a thief. The 3 s rule ignores a short flash. The lid-closed message is only printed on the monitor, so the phone gets one SMS per opening.
Following a Stolen Hive
Once the hive moves, the sketch sends the position every 30 s until the beekeeper sends STOP. On a real Thingy:91 GNSS needs a view of the sky - inside a closed van the fix may be lost - so the last known position is still valuable. LTE-M keeps the connection while moving from cell to cell.
Battery Life on a Hive
A Thingy:91 under a hive lid has to last weeks or months on its 1400 mAh battery. On the real device the modem's power saving modes PSM and eDRX let it sleep between reports, the accelerometer wakes the chip on movement, and the sketch reports only changes plus a daily summary. The simulation keeps the modem awake.
LTE-M or NB-IoT?
The nRF9160 speaks both cellular IoT standards. LTE-M (Cat-M1) carries a few hundred kilobits per second, hands over from cell to cell while the device moves and answers quickly - a good match for a tracker that follows a stolen hive along a road. NB-IoT (Cat-NB1/NB2) is slower and has a longer delay, but it reaches deeper into buildings and basements and needs very little energy for small messages, which suits a sensor that never moves. Which one works depends on the operator in your country: many offer both, some only one. An apiary in the countryside often sits at the edge of a cell, so the better coverage of NB-IoT can decide whether a message gets through at all.
Why SMS?
A text message needs no server, no app and no data plan on the beekeeper's side: any phone shows it, even an old one, and the beekeeper answers with a single word. That makes SMS a sensible first choice for a small apiary. Not every IoT SIM includes SMS, though, so check the plan before you buy. For many hives or for charts over a whole season, the same sketch could send its readings to a cloud service over MQTT or CoAP instead and keep SMS only for the alarms.
GNSS and LTE Take Turns
On the real nRF9160 the GNSS receiver and the LTE radio share parts of the same modem, so GNSS runs while LTE is idle - between transmissions, or during the PSM and eDRX sleep periods. A first fix from a cold start can take a while under open sky, and much longer under trees or a metal hive roof. That is why the sketch keeps the last known position and sends it with every message, instead of waiting for a new fix before it raises the alarm. In the simulation the fix arrives within the first seconds.
The Map Link
Every alarm carries a link of the form https://maps.google.com/?q=latitude,longitude. A tap on it opens the map with a pin at that point, so the beekeeper sees at once where the hive is. The position is written in decimal degrees with six digits after the point, which resolves about 0.1 m - far finer than GNSS itself, whose accuracy under open sky is a few metres.
Reading the Accelerometer
A hive standing still feels only gravity: about 1 g, split between the three axes by the way the Thingy lies. checkMotion() adds up how far each axis differs from the position it learned, so the alarm does not depend on how the Thingy was mounted. A gust of wind or a bee landing on the lid stays far below 0.35 g; lifting the hive onto a trolley does not. In the run the shake measured 1.68 g, well above the limit.
Try It Yourself
- Send a daily summary SMS with the minimum and maximum brood temperature.
- Use the pressure sensor to warn of a storm front.
- Sound the buzzer when the hive moves - it may scare a thief.
- Add a "WHERE" command that answers with the map link only.
Ideas to Extend the Monitor
- Weigh the hive with a load cell under it to follow the honey flow.
- Allow only the beekeeper's number to send commands.
- Report the humidity: too damp a hive breeds mould.
- Log the lid openings with their times.
Your Own Sketches
Write the sketch in the Arduino IDE with the board Nordic Thingy:91 (TEP Proteus), use Sketch > Export Compiled Binary and set the part's PROGRAM property to the .hex.
Moving to a Real Thingy:91
- Install Nordic's nRF Connect SDK with the board thingy91/nrf9160/ns.
- Insert the SIM (or use the eSIM) with an LTE-M or NB-IoT plan that includes SMS.
- Start from Nordic's SMS and GNSS samples; read the BME680, the BH1749 and the accelerometer with the sensor drivers.
- Move the logic of the demo across: the brood limits, the lid rule, the watch and the commands.
- Program the Thingy through its debug connector or the USB bootloader.
The limits, the commands and the messages stay the same; on the real Thingy Nordic's SDK takes the place of the Arduino calls.
Properties of the Thingy:91
| Property | What it does |
|---|---|
| PROGRAM | the sketch: a .hex from TEP Boards for Proteus (board "Nordic Thingy:91") |
| MONITOR, BAUD, AUTOOPEN | the built-in serial monitor: on, its baud rate (115200), open at Run |
| TEMPERATURE, HUMIDITY, PRESSURE | the air at Run (the demo: 34.5 C, 60 %, 101.3 kPa) |
Troubleshooting
- The modem never answers: set
MODEM_ONHIGH and callSerialModem.begin(115200)first. - No SMS arrives:
AT+CMGF=1andAT+CNMI=2,2,0,0,0bring a new SMS straight to SerialModem. - "LID OPEN" at Run: click DARK in the Sensors window within the first seconds - the hive is dark inside.
- A sensor reads 0: call its
begin()first. - A number goes wrong above 32767: int is 16 bits in the simulation - use long.
Limitations of the Simulation
- Cellular: registration, SMS in text mode and GNSS are modelled; data connections, voice, PSM and eDRX are not.
- The nRF52840 and its Bluetooth LE, the gas reading, the buzzer, the battery and the expansion connector are not modelled.
- Your sketch gets 8 KB of RAM in the simulation, and int is 16 bits there.
- Thingy:91, nRF9160, nRF52840 and Nordic Semiconductor are names of Nordic Semiconductor ASA and Arduino of Arduino; this library is not made or endorsed by them or by Labcenter.
- Tested in Proteus 8.5 in November 2026 (the demo as shipped, about 49 s of simulation). Proteus 7 is not supported.
So, that was all about the Nordic Thingy:91 Library for Proteus. I hope it helps you try your cellular sensor ideas in a simulation before a Thingy and a SIM are on your desk - the sensors, the modem, the SMS and the map link, all on one sheet. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!