Hello friends, I hope you all are doing great. Today, I am going to share the nRF9161 DK Library for Proteus, so you can run a cellular IoT simulation of Nordic Semiconductor's nRF9161 development kit. The nRF9161 is a system-in-package with an Arm Cortex-M33, an LTE-M and NB-IoT modem, DECT NR+ and GNSS under one metal shield - a complete cellular node the size of a fingernail. With this library the kit runs your Arduino sketch in Proteus 8.5, talks to its modem with AT commands, sends and receives SMS and reads a GNSS position.
nRF9161 DK 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
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 motion alarm for a shed, a boat or a holiday home without Wi-Fi. A PIR sensor watches the room; when the alarm is armed, motion sends an SMS with a map link to the owner's phone, and the owner arms, disarms and checks the alarm by SMS.
NOTICE: Proteus has no nRF9161 model, so our team has put a lot of effort into building this board ourselves: the pins, the LEDs, the buttons 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 nRF9161 DK Library for Proteus:
What is the nRF9161 DK?
The nRF9161 DK (PCA10153) is Nordic Semiconductor's development kit for the nRF9161 SiP. The SiP joins the processor, the cellular modem, the RF front end and the power management in one shielded package, so a product needs little more than an antenna and a SIM. The kit carries the SiP, a nano-SIM holder, an LTE antenna, a GNSS antenna, an interface MCU that programs it over USB, four LEDs, two buttons, two slide switches and Arduino Uno compatible headers.
| Part | The real nRF9161 DK | In the library |
|---|---|---|
| SiP | nRF9161: Cortex-M33, LTE-M / NB-IoT modem, DECT NR+, GNSS | your Arduino sketch, the modem on SerialModem |
| Cellular | LTE-M and NB-IoT with a nano-SIM | registration and SMS (text mode) |
| GNSS | GPS and other systems, its own antenna | AT+CGPS / AT+CGPSINFO with GNSS scenes |
| LEDs | LED1 to LED4 on P0.00, P0.01, P0.04, P0.05, active HIGH | LED1 to LED4 |
| Buttons | BUTTON1, BUTTON2 on P0.08, P0.09; SWITCH1, SWITCH2 | BUTTON1, BUTTON2; the switches drawn |
| Headers | Arduino Uno layout | D0 to D13, A0 to A5, SDA, SCL |
Cellular IoT in a Few Words
LTE-M and NB-IoT are the low-power branches of 4G. LTE-M carries more data and moves between cells, which suits trackers; NB-IoT sends small messages from deep inside buildings and basements, which suits meters. Both run on ordinary mobile networks, so a device works wherever there is coverage - no Wi-Fi, no gateway. SMS is still the simplest way to reach a person's phone.
DECT NR+
The nRF9161 adds DECT NR+, a non-cellular radio standard that builds its own mesh network without operators or SIM cards - for example across a factory or a city's street lights. Our library models the cellular modem and GNSS; DECT NR+ is drawn, not modelled. For the earlier members of the family see our nRF9160 DK Library for Proteus and our nRF9151 DK Library for Proteus.
Talking to the Modem
The sketch talks to the modem with AT commands on SerialModem: AT+CEREG? asks whether the modem is registered on the network, AT+CMGS sends an SMS, AT+CGPSINFO reads the position. The modem answers with lines such as +CEREG: 0,1 - registered at home. On the real chip Nordic's modem library passes the same kind of commands to the modem.
Where Is It Used?
The nRF91 family is in asset trackers, smart meters, wearables for lone workers, pet trackers, agricultural sensors and alarm systems - anything that must report from places without Wi-Fi. The DK is the reference design for all of them.
A simulation lets you try the whole flow before the kit and a SIM are on the desk: the sensor, the modem's answers, the SMS and the GNSS position. When the sketch works in the Proteus simulation, the real kit only has to confirm it.
Features of the nRF9161 DK Library for Proteus
- The board as it looks: the blue kit with the nRF9161 SiP under its shield, the nano-SIM holder, the LTE and GNSS antennas, the interface MCU with its USB port, the power switch, RESET, the buttons, the slide switches, the four LEDs and the Arduino headers, drawn compact, with our small TEP signature.
- Your sketch: a .hex for "Nordic nRF9161 DK (TEP Proteus)" with D0 to D13, A0 to A5, LED1 to LED4, BUTTON1 and BUTTON2.
- The modem: AT commands on SerialModem - registration, SMS in text mode and GNSS.
- The Phone window: the owner's phone receives and sends SMS, with four quick keys, and sets the GNSS scene.
- A complete package: about 3.9 MB with the part, the add-on, the PIR sensor and the demo, without the source code of the models.
The nRF9161 DK in Proteus Simulation
Search NRF9161 in Pick Devices; the device NRF9161 DK is in TEPNRF9161DK.LIB (Microprocessor ICs, Cellular Boards), with the prefix U. The USB port opens the serial monitor, a click on the SiP the Phone window.
The Pins
| Pins | What the library does with them |
|---|---|
| D0 to D13 | GPIO, PWM, interrupt; D10 to D13 SPI |
| A0 to A5 | analogRead 0 to 1023 for 0 to 3.3 V, or GPIO |
| SDA, SCL | Wire |
| LED1 to LED4 | the green LEDs, lit when HIGH (the real P0.00, P0.01, P0.04, P0.05) |
| BUTTON1, BUTTON2 | the buttons, LOW when pressed (the real P0.08, P0.09) |
| SerialModem, MODEM_ON | the modem's AT interface; HIGH starts the modem |
Download nRF9161 DK Library for Proteus
Click the button below to download nRF9161-DK-Library-for-Proteus-v1.0.zip (about 3.9 MB, without the source code of the models):
nRF9161 DK Library for Proteus V1.0- README.txt: installation, the demo, the pins, the properties, troubleshooting and the limits.
- Proteus Library Files:
TEPNRF9161DK.LIB, the PIR sensor (TEPHCSR501.LIB) and the phone and laptop libraries for your own designs. - Proteus Model Files:
TEPNET.DLLandTEPHCSR501.DLL. - Arduino Code: the demo sketch and the TEP Boards for Proteus add-on 1.88.0.
- 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 nRF9161 DK 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 the DLLs from Proteus Model Files into the MODELS folder, replacing an older
TEPNET.DLL. - Delete
TEPNRF9161DK.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 nRF9161 DK (TEP Proteus).
- Start Proteus, press P and search for NRF9161.
Demo: a Cellular Motion Alarm in Simulation
A shed at the end of a garden, a boat in a marina, a holiday home - places with no Wi-Fi, where a cellular alarm makes sense. Our alarm uses a PIR motion sensor, the kit's LEDs and buttons, SMS to the owner's phone and the GNSS position in every alarm, so the owner knows where the movement happened even if the alarm itself is carried away.
Open nRF9161-DK-Cellular-Motion-Alarm.pdsprj. U1 runs DK9161_Motion_Alarm.hex; U2 is the HC-SR501 PIR sensor from our PIR Sensor Library for Proteus on D2. The owner's phone is the kit's own Phone window.
| SMS | What the alarm does |
|---|---|
| ARM | arms the alarm (LED2) and answers with the position |
| DISARM | disarms it and answers with the alarm count |
| STATUS | armed or not, the alarms, the map link |
| RESET | clears the alarm count |
Motion and the Alarm
checkMotion() runs from the loop. A change on the PIR's output lights or clears LED3; motion while armed sends an ALARM SMS - at most one a minute, so a person walking around does not fill the owner's phone:
void checkMotion() {
const bool now = digitalRead(PIR_PIN) == HIGH;
if (now == motion) return;
motion = now;
led(2, now);
Serial.println(now ? F(">> MOTION") : F(" (quiet again)"));
if (now && armed && (lastAlarm == 0 || millis() - lastAlarm >= QUIET_MS)) {
lastAlarm = millis();
alarms++;
sendSms(owner, "ALARM " + String(alarms) + ": motion! " + where());
}
}
Sending an SMS
sendSms() uses the modem's text mode: AT+CMGS with the number, the modem's > prompt, the text and Ctrl+Z to send it. LED4 flashes while it goes out:
void sendSms(const String &to, const String &text) {
if (!registered) { Serial.println(F("(no network: the SMS waits)")); return; }
led(3, true); flashUntil = millis() + FLASH_MS; // LED4: an SMS is going out
SerialModem.print(F("AT+CMGS=\""));
SerialModem.print(to);
SerialModem.println(F("\""));
unsigned long end = millis() + 2000;
while (millis() < end && SerialModem.read() != '>') { } // the modem's prompt
SerialModem.print(text);
SerialModem.write(26); // Ctrl+Z ends the text
Serial.print(F("SMS to ")); Serial.print(to); Serial.print(F(": ")); Serial.println(text);
sentSms++;
delay(200);
}
The Position
The sketch asks the modem for the GNSS position every 2 s; where() turns it into a map link the phone can open:
String where() {
if (!fix) return "no GNSS fix yet";
return "https://maps.google.com/?q=" + degrees6(lat6) + "," + degrees6(lon6);
}
Commands from the Phone
A new SMS arrives as a +CMT line with the sender, followed by the text. command() acts on the text:
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 == "ARM") { setArmed(true, F(">> SMS")); sendSms(from, "Armed. " + where()); }
else if (text == "DISARM") { setArmed(false, F(">> SMS")); sendSms(from, "Disarmed, alarms " + String(alarms)); }
else if (text == "RESET") { alarms = 0; lastAlarm = 0; Serial.println(F(">> SMS: the alarm count cleared")); sendSms(from, "Alarm count cleared"); }
else if (text == "STATUS") sendSms(from, status());
else sendSms(from, "Commands: ARM, DISARM, STATUS, RESET");
}
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 nRF9161 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. The serial monitor - the same window as our TEP Serial Monitor Advance for Proteus - shows the modem starting; the LTE LED blinks while it searches, and LED1 lights once it is registered:
nRF9161 DK Cellular Motion Alarm - The Engineering Projects
Starting the nRF9161 modem
Modem ready: SMS and GNSS on, waiting for the network
SMS: ARM, DISARM, STATUS, RESET BUTTON1 = arm / disarm, BUTTON2 = send the status
Status: LTE searching, DISARMED, alarms 0, no GNSS fix yet, SMS sent 0
GNSS fix: 31.520400, 74.358700
LTE: registered on the network
SMS to +15555550191: Motion alarm online: DISARMED, alarms 0, https://maps.google.com/?q=31.520400,74.358700
The Phone and the Position
The Phone window shows the owner's messages. Its GNSS scene is PARKED - a 3D fix with ten satellites within seconds - so every message carries the map link:
Arm
Press ARM in the Phone window: the SMS reaches the kit, LED2 lights and the answer comes back with the position:
Somebody Walks In
In the PIR's window walk a person into the room: the sensor's output goes HIGH, LED3 lights and the ALARM SMS goes out with the map link. Here is the complete circuit while the simulation runs:
Disarm
When the person has gone, the PIR's output falls again. STATUS reports the alarm, DISARM switches it off, RESET clears the count, and BUTTON1 on the kit arms it again:
SMS from +15555550191: ARM
>> SMS: ARMED
SMS to +15555550191: Armed. https://maps.google.com/?q=31.520400,74.358700
>> MOTION
SMS to +15555550191: ALARM 1: motion! https://maps.google.com/?q=31.520400,74.358700
(quiet again)
SMS from +15555550191: STATUS
SMS to +15555550191: ARMED, alarms 1, https://maps.google.com/?q=31.520400,74.358700
SMS from +15555550191: DISARM
>> SMS: DISARMED
SMS to +15555550191: Disarmed, alarms 1
SMS from +15555550191: RESET
>> SMS: the alarm count cleared
SMS to +15555550191: Alarm count cleared
>> BUTTON1: ARMED
How a PIR Sensor Sees Motion
A PIR sensor does not see a picture. Its pyroelectric element has two halves behind a Fresnel lens, and it reacts when the infrared heat of a body moves from one half to the other. That is why it notices a person walking but not a warm radiator. The HC-SR501 holds its output HIGH for a set time after each trigger; its pots set that time and the sensitivity.
Why at Most One Alarm a Minute?
A person in a room triggers the PIR again and again. Without a quiet time the owner would get a message every few seconds - and SMS costs money. The sketch remembers when the last alarm went out and sends the next one only after a minute; the count still shows how often motion was seen.
Power and Sleep
A real alarm runs from a battery for months. The nRF9161 helps with power saving modes: PSM lets the modem sleep for hours while the network keeps the registration, and eDRX lets it listen only now and then. A PIR sensor wakes the chip on motion. Our simulation runs the modem awake; PSM and eDRX are not modelled.
Map Links Instead of Coordinates
Raw coordinates such as 31.5204 and 74.3587 mean little on a phone. A link to a map service opens the position with one tap. The sketch keeps the position in millionths of a degree in long integers, because the 16-bit int and the float of the simulation have too few digits for six decimals.
From GNSS Degrees and Minutes to a Map
The modem reports the position the way GNSS receivers always have: degrees and minutes in one number, such as 3131.224 for 31 degrees and 31.224 minutes. The sketch splits the two, divides the minutes by 60 and adds them to the degrees - 31.5204 - and makes the number negative for south or west. The map link then needs nothing more than the two values separated by a comma. Six decimals of a degree are about 11 cm on the ground - far finer than GNSS itself can measure.
Who May Send Commands?
In the demo any phone that texts ARM or DISARM is obeyed - fine on a desk, risky on a real alarm. A real product checks the sender's number against the owner's before it acts, and may ask for a short PIN in the message. The sketch already knows the sender: command() receives it as from, so the check is a single line.
Reading the Status Line
Every 10 s the monitor prints the network state, armed or not, the number of alarms, the map link and the number of SMS sent. It is the easiest way to see what the alarm knows without a phone - for example that the GNSS fix arrived before the network registration, which is normal: the two radios work independently.
Try It Yourself
- Add a siren: a buzzer on D3 that sounds for 10 s with each alarm.
- Arm the alarm automatically when the phone has not been heard for an hour.
- Send a daily "all quiet" SMS at the same time.
- Use SWITCH1's header pin for a door contact (a reed switch).
Ideas to Extend the Alarm
- Add a second PIR sensor for another room and say which one fired.
- Allow only the owner's number to send commands.
- Report the battery voltage with STATUS.
- Store the last ten alarms with their times.
Your Own Sketches
Write the sketch in the Arduino IDE with the board Nordic nRF9161 DK (TEP Proteus), use Sketch > Export Compiled Binary and set the part's PROGRAM property to the .hex.
Moving to a Real nRF9161 DK
- Install Nordic's nRF Connect SDK with the board nrf9161dk/nrf9161/ns.
- Put a nano-SIM with an LTE-M or NB-IoT plan into the holder and fit the antennas.
- Start from Nordic's SMS and GNSS samples; the modem library sends the same kind of AT commands.
- Wire the HC-SR501: VCC, GND and OUT to D2.
- Move the logic of the demo across: the arming, the quiet time, the map link and the commands.
The pins, the commands and the messages stay the same; on the real kit Nordic's SDK takes the place of the Arduino calls.
Things to Know Before Using a Real nRF9161 DK
- A SIM and a plan: LTE-M or NB-IoT must be offered where the kit is used; SMS must be part of the plan.
- Antennas: keep the LTE and GNSS antennas clear of metal; GNSS needs a view of the sky.
- Shared pins: on the real kit the LEDs, buttons and switches share header pins.
- 1.8 V or 3.3 V: the kit's I/O voltage is selectable; check it before connecting modules.
Properties of the nRF9161 DK
| Property | What it does |
|---|---|
| PROGRAM | the sketch: a .hex from TEP Boards for Proteus (board "Nordic nRF9161 DK") |
| MONITOR, BAUD, AUTOOPEN | the built-in serial monitor: on, its baud rate (115200), open at Run |
Troubleshooting
- The modem never answers: set
MODEM_ONHIGH and callSerialModem.begin(115200)first; send AT until it answers OK. - No SMS arrives:
AT+CMGF=1andAT+CNMI=2,2,0,0,0bring a new SMS straight to SerialModem. - "no GNSS fix yet": switch GNSS on with
AT+CGPS=1,1and set the GNSS scene to PARKED or DRIVING. - No alarm on motion: press ARM first; after an alarm the next one waits a minute.
- 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, DECT NR+, PSM and eDRX are not.
- SWITCH1 and SWITCH2 are drawn, not modelled; on the real kit they share header pins.
- Your sketch gets 8 KB of RAM in the simulation, and int is 16 bits there.
- nRF9161 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 54 s of simulation). Proteus 7 is not supported.
So, that was all about the nRF9161 DK Library for Proteus. I hope it helps you try your cellular IoT ideas in a simulation before the kit and a SIM are on your desk - the sensor, 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!