Adding Cellular Connectivity to ESP32 and Arduino Projects: SIM7000/SIM800L, AT Commands, and NB-IoT/LTE-M
WiFi covers your house and LoRa covers your property, but neither helps when a project needs to report in from a trailhead, a remote job site, or a vehicle in motion — anywhere there's cellular coverage but no network you control. This guide covers adding cellular connectivity to ESP32 and Arduino projects using SIM7000/SIM800-series modules, from wiring and AT commands to choosing between NB-IoT, LTE-M, and full LTE, and the real-world gotchas (power draw, antenna selection, carrier compatibility) that trip up a first attempt.
Choosing a Module: Match the Network to the Job
ModuleNetworkData RatePower Draw (TX peak)Best For SIM800L2G GSM/GPRS only~85 kbps~2A pulsesLegacy/lowest cost — check 2G is still live in your region first SIM7000NB-IoT / LTE-M (Cat-M1)~100-300 kbps~500mA-1A pulsesLow-power remote sensors, asset tracking SIM7600Full LTE Cat-4Up to 150 Mbps~2A pulsesAnything needing real bandwidth (image/video upload, OTA) SIM7080GNB-IoT / LTE-M, smaller footprint~100 kbps~500mA pulsesCompact low-power designs, newer SIM7000 successorCheck network shutdown dates before buying anything. Multiple US and international carriers have been shutting down 2G and 3G networks over the past several years — a SIM800L GSM module can be dead on arrival in a region where 2G no longer exists. NB-IoT and LTE-M (Cat-M1) are the current low-power IoT standards and the safer long-term bet, but coverage and carrier support still vary by region — verify with your specific carrier and a real SIM before committing a design to one module.
Wiring
These modules pull short current spikes up to 2A during transmit bursts — this is the single most common cause of "it won't respond to AT commands" or random resets, because most people try to power them from the ESP32's onboard 3.3V regulator or a USB-serial adapter that can't source that current.
- Power directly from a dedicated supply rated for at least 2A peak — a LiPo cell direct (3.7-4.2V, most modules accept this range) or a beefy buck converter, not through the microcontroller board's regulator.
- Add bulk capacitance — a 1000µF+ electrolytic capacitor close to the module's power pins smooths the current spikes and prevents brownout resets during TX bursts.
- UART wiring: module TX → ESP32 RX, module RX → ESP32 TX (through a voltage divider or level shifter if the module is 5V logic — most are 3.3V-tolerant but check the specific board), common ground between module and MCU.
- Use a hardware UART, not SoftwareSerial — these modules send bursty, timing-sensitive data and software serial on an ESP32 will drop characters under load. The ESP32 has multiple hardware UARTs available for exactly this reason.
AT Command Basics
These modules are controlled entirely over serial with AT commands, the same command set lineage as old dial-up modems. A basic bring-up sequence looks like:
CommandPurpose ATSanity check — module should reply OK AT+CPIN?Check SIM is inserted and unlocked AT+CSQSignal quality (0-31, higher is better; 99 means no signal) AT+CREG?Network registration status AT+CGATT=1Attach to GPRS/packet service AT+CSTT="apn"Set your carrier's APN AT+CIICR / AT+CIPSTARTBring up the IP connection / open a TCP or UDP socketFor rapid iteration, wire the module to a USB-serial adapter and use a terminal program to send AT commands by hand before writing any code — confirming registration and signal quality manually saves hours of debugging a stuck sketch later. Libraries like TinyGSM abstract most of this into simple function calls (`modem.gprsConnect()`, etc.) once you've confirmed the module talks to your specific carrier.
Power Strategy for Battery Deployments
Cellular radios are power-hungry compared to LoRa or BLE, which makes battery life the real design constraint for a field-deployed sensor. Combine these techniques, the same ones covered in this site's ESP32 Deep Sleep & Battery Optimization guide:
- Power the modem down between reports rather than leaving it registered on the network — re-registration after wake takes seconds but the modem draws idle current the whole time it's attached.
- Batch data and report on a schedule (hourly, not every reading) rather than opening a new connection per sample.
- Prefer NB-IoT/LTE-M over full LTE when you don't need bandwidth — these modes are specifically designed for low-power, infrequent-report IoT devices and use dramatically less energy per transmission.
- Size the battery around peak current, not average — a 2A transmit spike on an undersized battery or through resistive wiring causes a voltage sag that can brown out the whole board even if average consumption looks fine on paper.
Antenna Matters More Than You'd Think
The tiny ceramic antenna that ships soldered to some breakout boards is adequate for bench testing near a cell tower and inadequate for a real deployment. A proper external antenna with a u.FL or SMA connector, mounted with some clearance from metal enclosures, is often the difference between a module that registers reliably and one that drops off the network intermittently — especially at the edge of coverage, which is exactly where a remote sensor project tends to live.
Cellular is the right call when a project needs to work somewhere you don't control the network — just budget for the current spikes, pick a network mode your carrier actually still supports, and verify registration with hand-typed AT commands before you trust it to a field deployment.
Related Guides
- Arduino vs ESP32: Which Should You Use? A Practical Comparison
- Getting Started with ESP32: GPIO, WiFi, and Your First Project
- ESP32 LoRaWAN and The Things Network: OTAA Join, Payload Decoding, and Downlinks
- Building a Standalone ESP32 Web Control Panel: AsyncWebServer, LittleFS, and Captive Portal Setup
- ESPHome and Home Assistant Beginner Guide: Build Your First WiFi Sensor
- Build a Wired ESP32 IoT Sensor Node with W5500 Ethernet for Reliable Uptime
- ESP32-WROOM-32
- How to Program Addressable LED Strips: WS2812B Patterns, Effects, and Power Design