1. SIMATIC IOT2040 Hardware and I/O Architecture
The SIMATIC IOT2040 (article number 6ES7647-0AA00-1AA2) is a rugged 24 V DC industrial IoT gateway intended for DIN-rail mounting inside a control cabinet. The base platform is built around an Intel Quark x86 CPU clocked at 400 MHz with 1 GB of DDR3 RAM and 8 GB of soldered eMMC flash. It runs a Siemens-maintained Yocto-based Linux image that ships as a SIMATIC IOT2000 SD Card Example Image (current stable line: V2.x). The image bundles the mraa library, libnodave, Node-RED, Eclipse Mosquitto, and the SIMATIC IOT2000 Arduino sketch toolchain so the unit can act as a true edge gateway between shop-floor sensors/actuators and higher-level IT systems.
From an I/O standpoint, the IOT2040 has very few onboard industrial-grade channels of its own. The two Ethernet ports are reserved for upstream and PROFINET traffic, the single USB 2.0 port is for service or wifi, and the mPCIe slot is typically populated with a wireless modem. Local I/O expansion is therefore offloaded to a single Arduino Uno R3-compatible shield header. This single header is the only place where galvanically-isolated 24 V signals can be brought into the gateway without an external bus coupler.
Two important constraints flow from this architecture:
- All I/O expansion is mediated through the Arduino R3 shield header (8-bit AVR-style pinout, 3.3 V logic on the IOT2040) plus the I2C and SPI peripherals exposed on that header.
- The IOT2040 is fundamentally a protocol bridge, not a PLC. For applications needing deterministic bit-rate I/O beyond the shield header, Siemens expects you to either add a PROFINET-capable head station and an ET200SP slice, or stack a Siemens-branded shield that maps industrial 24 V channels onto the I2C bus.
libpn integration path. Always cross-check the firmware matrix in the IOT2000 manual before commissioning.For the operating instructions manual and current firmware notes, see the SIMATIC IOT2040 operating instructions (Siemens support, entry ID 109741654) and the SIMATIC IOT2040 product page.
2. Native Arduino-Compatible GPIO Limits
The Arduino R3 shield header on the IOT2040 brings out 14 digital pins (D0-D13), 6 analog input pins (A0-A5), and the standard I2C/SPI/UART peripherals. Although the Atmel AVR microcontroller is not present, the IOT2040 reproduces the same logical pin numbers through the Quark SoC GPIOs and a level-translator network. The analog inputs are routed to an internal 10-bit successive-approximation ADC that measures 0-3.3 V referenced to AGND.
| Arduino Pin | IOT2040 Function | Type | Notes |
|---|---|---|---|
| D0, D1 | UART0 RX/TX | 3.3 V digital | Reserved for serial console; not usable as GPIO |
| D2-D13 | GPIO | 3.3 V digital | 13 channels, approx 4 mA source/sink |
| A0-A5 | ADC inputs | 0-3.3 V analog, 10-bit | 6 channels; can be used as digital GPIOs D14-D19 in software |
| A4 (SDA), A5 (SCL) | I2C bus 1 | 3.3 V, 400 kHz max | Used by Siemens shields; external 4.7 kOhm pull-ups required on custom boards |
| D10 (SS), D11 (MOSI), D12 (MISO), D13 (SCK) | SPI bus 0 | 3.3 V, 10 MHz max | Chip-select must be managed in user code |
The maximum I/O count available without any expansion shield is therefore:
- 13 DI (D2-D13 as inputs, plus A0-A5 as digital D14-D19, but D14-D19 are not 24 V tolerant and conflict with analog readings)
- 6 AI (A0-A5, 0-3.3 V, 10-bit resolution, approx 1 kS/s aggregate)
- 0 industrial-grade DO without an external driver
Note that D14-D19 (analog pins configured as digital) are typically not used in production because the IOT2040 only exposes one analog MUX and 6 ADC channels - the analog pin group is intended to be read with mraa_aio_read() rather than as a digital word. Practical digital-only I/O ceiling is therefore 13 channels on D2-D13.
3. SIMATIC IOT2000 Official Arduino Shields
Siemens has released two industrial-grade 24 V shields that plug directly onto the Arduino R3 header of the IOT2040. Both shields use the I2C bus to communicate, which means they leave the SPI bus, the digital GPIOs, and the analog inputs free for additional user expansion.
| Article Number | Name | Digital Inputs | Analog Inputs | Digital Outputs | I2C Address |
|---|---|---|---|---|---|
| 6ES7647-0KA01-0AA2 | SIMATIC IOT2000 Input/Output Module | 5 DI 24 V (Type 3 / IEC 61131-2) | 2 AI 0-10 V or 0-20 mA, 12-bit, jumper-selected | 2 DO 24 V / 0.5 A, PNP, short-circuit protected | 0x48 default (0x48-0x4F via solder jumper) |
| 6ES7647-0KA02-0AA2 | SIMATIC IOT2000 Input Module sink/source | 10 DI 24 V, sink or source (P/N jumper per channel) | none | none | 0x49 default (0x48-0x4F via solder jumper) |
Both shields are stackable on the I2C bus as long as the I2C addresses do not collide. A typical stacked configuration mounts one Input/Output Module at 0x48 and one Input Module at 0x49, yielding a total of 15 DI / 2 AI / 2 DO from the IOT2040 shield header - already more than the 10 DI originally requested, but still not enough analog channels.
For the application requirement of 10 DI and 10 AI, the IOT2000 IO Module alone falls short (5 DI / 2 AI), and the IOT2000 Input Module adds only digital channels (10 DI). Stacking one of each gives 15 DI / 2 AI / 2 DO, but only 2 AI.
For full shield datasheets, consult the SIMATIC IOT2000 shield application description (Siemens support, ID 109757374) and the SIMATIC IOT2000 catalog pages on the Siemens product portal.
4. Custom I2C/SPI Expansion Shields
When the application requires more than 6 AI or more than 13 DI, the standard answer is to design a custom Arduino R3 shield. The IOT2040 exposes the full I2C and SPI bus on the shield header, so the PCB design is essentially an I2C and SPI carrier board. Siemens actively endorses this approach in the IOT2000 Arduino application note; it publishes reference schematics and bill-of-materials templates for the most common configurations.
4.1 I2C Digital Expansion
For additional digital inputs, the Microchip MCP23017 (16-bit I/O expander, I2C, 0x20-0x27) and the NXP PCF8575 (16-bit quasi-bidirectional I/O, I2C, 0x20-0x27) are the dominant choices. Each chip adds 16 channels; three MCP23017 chips at distinct addresses provide 48 additional digital I/O on a single I2C bus. The IOT2040 supports up to 8 devices per 7-bit address space, so practical I2C density is high.
Typical 24 V input circuit per channel:
The optocoupler provides galvanic isolation between the 24 V field side and the 3.3 V logic side; the 2.2 kOhm resistor limits the input current to roughly 9 mA at 24 V (well within the PC817 CTR-IF spec at 20 mA). The 10 kOhm pull-up to 3.3 V sets the logic level on the MCP23017 input when the optocoupler is off.
4.2 SPI Analog Expansion
For analog inputs, the SPI bus accepts any standard industrial ADC. Common part numbers:
| Part | Resolution | Channels | Throughput | Interface | Typical Application |
|---|---|---|---|---|---|
| MCP3008 | 10-bit | 8 single-ended / 4 differential | 200 kS/s | SPI, 3.3 V | Cost-sensitive generic 0-3.3 V AI |
| MCP3208 | 12-bit | 8 SE / 4 DI | 100 kS/s | SPI, 3.3 V | General-purpose 0-5 V or 4-20 mA with front-end |
| ADS1256 | 24-bit delta-sigma | 8 SE / 4 DI | 30 kS/s | SPI, 3.3 V | Load cell, strain gauge, RTD precision |
| MAX31865 | 15-bit | 1 RTD input | 50 Hz conversion | SPI, 3.3 V | PT100/PT1000 RTD direct digitization |
| ADS131M04 | 24-bit sigma-delta | 4 simultaneous | 32 kS/s/ch | SPI, 3.3 V | 3-phase voltage/current monitoring |
For the 10-AI requirement, two MCP3208 devices on independent SPI chip-select lines (D8 and D9 used as CS) provide 16 single-ended 12-bit analog inputs. Each chip uses four wires (MOSI, MISO, SCK, CS) and shares MOSI/MISO/SCK on the shield header. Total chip count: 1x MCP3208 + 1x MCP23017 (16-bit DI) = full 10 AI + 16 DI requirement without external bus coupler.
4.3 Sample Python Read on libmraa
The mraa library abstracts each Arduino pin as a numbered object. The following Python 3 snippet reads 10 analog channels from two cascaded MCP3208 devices and 16 digital inputs from a single MCP23017:
import mraa, time
# SPI bus 0, CS on D8 and D9
adc1 = mraa.Spi(0)
adc1.mode(mraa.SPI_MODE0)
adc1.frequency(1000000)
adc1_cs1 = mraa.Gpio(8); adc1_cs1.dir(mraa.DIR_OUT); adc1_cs1.write(1)
adc2 = mraa.Spi(0)
adc2.mode(mraa.SPI_MODE0)
adc2.frequency(1000000)
adc2_cs1 = mraa.Gpio(9); adc2_cs1.dir(mraa.DIR_OUT); adc2_cs1.write(1)
# I2C bus 1, MCP23017 at 0x20
bus = mraa.I2c(1)
bus.address(0x20)
bus.writeReg(0x00, 0xFF) # IODIRA = 0xFF (all inputs)
bus.writeReg(0x01, 0xFF) # IODIRB = 0xFF
def read_mcp3208(spi, cs, ch):
cs.write(0)
cmd = [(0x06 | (ch >> 2)), ((ch & 0x03) << 6), 0x00]
raw = spi.write(cmd)
cs.write(1)
val = ((raw[1] & 0x0F) << 8) | raw[2]
return val
while True:
# 10 AI: 5 from each MCP3208
analog = [read_mcp3208(adc1, adc1_cs1, i) for i in range(5)] + \
[read_mcp3208(adc2, adc2_cs1, i) for i in range(5)]
# 16 DI: read GPA and GPB
pa = bus.readReg(0x12)
pb = bus.readReg(0x13)
digital = ((pa << 8) | pb) & 0xFFFF
print("AI:", analog)
print("DI:", format(digital, '016b'))
time.sleep(0.1)
The I2C transaction uses standard 7-bit addressing; the 8-bit write to MCP23017 register 0x00 configures the I/O direction. A 0xFF value (all 1s) sets every port A pin to input. Reading register 0x12 returns port A; reading 0x13 returns port B.
Pin-level configuration of the IOT2040 shield header is documented in the Eclipse mraa IOT2000 platform mapping; the official source tree is the reference for any pin number used above.
5. PROFINET Expansion via ET200SP
When the application requires more channels than a single Arduino shield header can provide - or when it must integrate with PROFINET-conformant sensor/actuator wiring already in the field - the recommended architecture is to add an ET200SP distributed I/O station on the IOT2040's LAN port and run a PROFINET device or PROFINET controller service on the gateway.
The IOT2040's PROFINET integration is provided by the Siemens pndevice library and the pndevicelib package, both bundled in the SIMATIC IOT2000 SD Card Example Image. The current release supports the gateway in PROFINET device mode (the IOT2040 advertises itself as a PROFINET IO device to a higher-level controller such as a S7-1500 CPU) and a recent line of example images adds basic controller mode that can scan ET200SP head stations directly.
5.1 ET200SP Component Selection
| Component | Article Number | Function |
|---|---|---|
| IM 155-6 PN ST | 6ES7155-6AU01-0BN0 | PROFINET head station, supports up to 32 I/O modules per station |
| IM 155-6 PN HF | 6ES7155-6AU00-0CN0 | PROFINET head station, supports up to 64 I/O modules, with isochronous mode |
| DI 8x24VDC HF | 6ES7131-6BF00-0CA0 | 8 DI 24 V, type 3, 0.2 ms input delay |
| DI 16x24VDC ST | 6ES7131-6BH01-0BA0 | 16 DI 24 V, standard |
| AI 4xU/I/RTD/TC ST | 6ES7134-6HD01-0BA1 | 4 AI, 16-bit, voltage/current/RTD/TC selectable per channel |
| AI 8xU/I HS | 6ES7134-6GF00-0AA1 | 8 AI, 16-bit, high-speed, 0.5 ms conversion |
| Server module | 6ES7193-6PA00-0AA0 | Required terminator, slots in last position |
For a 10 DI / 10 AI application, a typical station is: 1x IM 155-6 PN ST + 1x DI 16x24VDC ST + 1x AI 4xU/I/RTD/TC ST + 2x AI 8xU/I HS + 1x server module. This is overkill on the digital side and slightly under-sizes the analog side; an optimal build is 1x IM 155-6 PN ST + 1x DI 16x (covers 10 DI) + 3x AI 8xU/I HS (24 AI, oversizes by 14) + 1x server module.
5.2 Wiring the PROFINET Connection
The IOT2040 has two Ethernet ports. Reserve port X1 (LAN1) for upstream IT connectivity and X2 (LAN2) for the PROFINET field network. Configure X2 with a static IP address in the PROFINET range (default subnet 192.168.0.0/24 in most Siemens demos). The ET200SP head station must be assigned a unique device name and IP address; the GSD file for the IM 155-6 PN ST is shipped with TIA Portal (HSP for ET200SP).
5.3 Reading PROFINET Data from the IOT2040
The simplest path for a Node-RED based application is the node-red-contrib-s7 package, which implements an S7 client and reads PROFINET-tagged I/O by symbolic name. For a pure Python or C++ application, the bundled pndevice library provides:
# pndevice - read DI 16x and AI 8x modules (Linux command line)
./pndevice -i eth1 -t 192.168.0.2 --read di16x0 # 16-bit digital input
./pndevice -i eth1 -t 192.168.0.2 --read ai8x0 # 8-channel AI 16-bit
For full TIA Portal integration the IOT2040 is imported as a third-party PROFINET device with the GSD file from the SIMATIC IOT2000 example image. Once assigned, the slots exposed by the ET200SP head station appear as input/output areas in the IOT2040 firmware and can be mapped to Node-RED flows or published to MQTT.
See the SIMATIC IOT2000 PROFINET application example (Siemens support, ID 109758644) for the complete commissioning procedure.
6. Signal Conditioning and 24 V Interfacing
Industrial sensors and actuators live on the 24 V side. The IOT2040 logic, the Arduino header, and the SIMATIC IOT2000 shields all run on 3.3 V (logic) or 24 V (Siemens shields with on-board DC-DC). When you build a custom shield you must isolate, level-shift, and protect the 3.3 V logic against field-side transients, surges, and short circuits.
6.1 Optocoupler Selection
| Optocoupler | CTR (min) | Vceo | Response Time | Recommended Use |
|---|---|---|---|---|
| PC817 | 50% at 5 mA | 80 V | 4 us | DI 24 V, low cost |
| HCPL-0701 | 400% at 5 mA | 24 V | 0.3 us | DI 24 V, high-speed |
| HCPL-181 | 50% at 5 mA | 80 V | 4 us | DI 24 V, AC-input variant |
| TLP291 | 50% at 5 mA | 80 V | 3 us | DI 24 V, SMD 4-pin SO-4 |
| VO615A | 50% at 5 mA | 70 V | 10 us | DI 24 V, EN 50178 qualified |
For 24 V PNP input wiring, the standard topology is:
+24V --- [2.2 kOhm] --- PC817 LED anode
PC817 LED cathode --- field sensor contact --- GND_24V
PC817 phototransistor collector --- 3.3V via 10 kOhm
PC817 phototransistor emitter --- GND_3V3
Current through the LED at 24 V nominal: I = (24 - 1.2) / 2200 = 10.4 mA, safely below the absolute maximum of 50 mA for the PC817. Saturation Vce of the phototransistor is around 0.2 V at 1 mA, which is well within the 0.8 V VIH max of the 3.3 V GPIO.
6.2 Digital Output Drivers
The IOT2040 cannot drive 24 V loads directly. The recommended approach is a high-side or low-side switch, depending on the field-side convention:
| Topology | Driver | Load | Field-Side Voltage | Typical Use |
|---|---|---|---|---|
| Low-side NPN | ULN2003A (Darlington array) | Solenoid, relay coil | 24 V PNP at the load | DO 0.5 A per channel, 7 channels per chip |
| High-side PNP | VNP10N07, IFX1051LE | Solenoid, lamp | 24 V supplied via switch | DO 5 A per channel, short-circuit protected |
| Solid-state relay | Crouzet 84 134, Celduc SO8 | AC loads, contactors | Up to 600 V AC | DO electrically isolated, zero-cross switching |
6.3 4-20 mA Input Conditioning
For 4-20 mA transmitters, the standard 250 Ohm sense resistor converts 4-20 mA to 1-5 V, which is then measured by an ADC with 5 V range. On the IOT2040 shield side, an op-amp buffer (e.g. MCP6002) drives the ADC input, and a TVS diode (P6KE6.8CA) clamps transients. The 24 V loop is supplied by an external 24 V source; the shield-side current flows through a 250 Ohm 0.1% precision resistor.
Loop burden voltage = 250 Ohm x 20 mA = 5 V. Make sure the loop supply is at least 24 V so that the transmitter headroom is sufficient (typical 12 V minimum headroom is industry norm).
7. Firmware and Software Stack
The IOT2040 runs a Siemens-maintained Yocto Linux image that bundles the I/O libraries needed for shield and PROFINET integration. The current stable line is the SIMATIC IOT2000 SD Card Example Image V2.4.0 (and later), with the underlying Poky/Yocto layer at 2.7.3 and the kernel at 4.19.
| Component | Version | Function |
|---|---|---|
| Yocto / Poky | 2.7.3 | Base Linux distribution |
| Linux kernel | 4.19 | Hardware support, GPIO, SPI, I2C drivers |
| mraa | 2.0.0 | Low-level GPIO/SPI/I2C abstraction |
| libmraa (Python) | 2.0.0 | Python bindings for mraa |
| Node-RED | 0.20.x | Visual programming for I/O flows |
| Node.js | 10.x | Server-side runtime for Node-RED |
| Eclipse Mosquitto | 1.5.x | MQTT broker for upstream IT |
| pndevice | 1.4.x | PROFINET device library |
| OPC UA server | node-opcua 1.x | OPC UA server for IT integration |
7.1 Programming Modes
The IOT2040 supports three primary development modes:
-
Arduino sketch mode: the IOT2000 image ships with a sketch upload tool that accepts standard Arduino code. The mraa library is wrapped to provide
pinMode(),digitalRead(),digitalWrite(), andanalogRead()semantics. Code is uploaded via a USB cable from a host PC running the Arduino IDE. - Node-RED mode: the IOT2040 boots directly into Node-RED on port 1880. Each shield or PROFINET channel is mapped to a Node-RED node. This is the most common production path because the flow is visually auditable and survives firmware updates.
- Native C++/Python mode: the user SSHs into the IOT2040 over LAN1 and writes application code against libmraa directly. This is the right mode for high-rate acquisition or when the application needs a custom protocol on top of raw I/O.
7.2 Update Procedure
To update the example image, follow the procedure in the IOT2000 manual: copy the new iot2000-example-image-*.wic file to a microSD card, power-cycle the IOT2040, and hold the SD bootloader button while the device boots. The new image is flashed to the eMMC in approximately 90 seconds. Always back up the running configuration with iot2000setup --export before reflashing.
Firmware and image download are linked from the SIMATIC IOT2000 downloads page (Siemens support, ID 109769129). Cross-check the image release notes against the PROFINET version you intend to use; pndevice compatibility is broken between major release lines (V1.x, V2.x).
8. Expansion Path Comparison and Selection
Three primary paths exist for extending I/O on the IOT2040. The selection depends on the number of channels, the level of galvanic isolation required, the field-side wiring convention, and the need for PROFINET integration with the rest of the plant.
| Approach | DI Capacity | AI Capacity | DO Capacity | Isolation | Complexity | Cost | Best For |
|---|---|---|---|---|---|---|---|
| Native GPIO only | 13 | 6 (0-3.3 V, 10-bit) | 0 (requires driver) | None | Low | $0 | Lab/prototype only |
| Siemens IO Shield (6ES7647-0KA01-0AA2) | 5 | 2 (0-10 V or 0-20 mA, 12-bit) | 2 (24 V / 0.5 A) | Galvanic, integrated | Low | approx EUR 180 | Small digital + few analog + few DO |
| Siemens DI Shield (6ES7647-0KA02-0AA2) | 10 | 0 | 0 | Galvanic, integrated | Low | approx EUR 150 | High-density DI only |
| Custom I2C + SPI shield | 16-48+ | 8-32+ | With driver | By optocoupler | High (PCB layout) | approx EUR 50 (parts) + PCB | Cost-optimized 10/10 or higher |
| PROFINET ET200SP (IM 155-6 PN ST + modules) | 16-512+ | 4-256+ | 16-512+ | Per-module, IEC 61131-2 | Medium (PROFINET config) | approx EUR 250 + EUR 30-200 per module | Industrial-grade 24 V with PROFINET |
For the original 10 DI / 10 AI application, the optimal path depends on whether PROFINET integration is desired:
- No PROFINET, lowest engineering cost: one Siemens IO Shield (5 DI / 2 AI / 2 DO) + one Siemens DI Shield (10 DI) + a custom I2C ADC shield (8 AI). Total: 15 DI / 10 AI / 2 DO.
- No PROFINET, lowest hardware cost: a custom I2C/SPI shield based on one MCP23017 (16 DI) + two MCP3208 (16 AI) + one ULN2003A (7 DO). Total: 16 DI / 16 AI / 7 DO. Engineered to 10 DI / 10 AI with spares.
- PROFINET required: 1x IM 155-6 PN ST + 1x DI 16x24VDC ST + 2x AI 8xU/I HS + 1x server module. Total: 16 DI / 16 AI. Field wiring is 24 V, standard PROFINET stack, integrates with S7-1500 controllers elsewhere in the plant.
9. Commissioning and Verification Procedure
Once a shield or PROFINET expansion is selected, follow this step-by-step procedure to bring the IOT2040 I/O into service.
-
Verify the firmware image. Boot the IOT2040, log in via SSH, and run
cat /etc/iot2000-version. Confirm that the running image includes the libraries required by the chosen expansion (mraa for shields, pndevice for PROFINET). - Inspect the shield header pin voltages. With the shield removed, power the IOT2040 and measure the 3.3 V and 5 V rails on the shield header. A missing 3.3 V rail indicates a hardware fault and shields will not respond on I2C.
-
Scan the I2C bus. Run
i2cdetect -y 1from the shell. The Siemens IO Shield appears at 0x48, the Siemens DI Shield at 0x49, and a properly-addressed custom MCP23017 at 0x20-0x27. If a shield is not visible, check solder jumpers and verify that the shield is seated square on the header. - Read each channel. For each DI channel, force a known state (24 V or 0 V) and confirm the value reported by the application matches. For each AI channel, apply a precision voltage source and confirm the reported value matches within the ADC quantization error (e.g. +/- 1 LSB on a 12-bit ADC, +/- 0.8 mV at 3.3 V FS).
-
Verify PROFINET connection. If a PROFINET head station is connected, run
pndevice -i eth1 -t 192.168.0.2 --list-modulesto confirm the head station is discovered. TIA Portal should show the IOT2040 in online diagnostics with green status indicators on all slots. - Load test. Drive all DI channels simultaneously with a 10 Hz square wave and confirm that the application logs the transitions without loss. For AI, run a continuous sweep on each channel and verify sample-by-sample consistency.
-
Long-run soak test. Leave the system running for 24 hours under load and verify that the IOT2040 mraa handles do not leak (use
valgrindfor C++ ortracemallocfor Python). A leaking handle is the most common cause of long-term instability on the IOT2040.
10. Troubleshooting Matrix
| Symptom | Likely Cause | Verification | Corrective Action |
|---|---|---|---|
| I2C device not detected by i2cdetect | Wrong address, missing pull-ups, shield not seated | Inspect with magnifier, run i2cdetect -y 1 | Re-seat shield; add 4.7 kOhm pull-ups; verify solder jumpers |
| AI readings noisy / offset | Ground loop, missing TVS, long cable | Short input to AGND; check 50/60 Hz content via FFT | Add differential amplifier front end; star-ground the 24 V return |
| DI input stuck high | Optocoupler LED burned out, missing input resistor | Measure 2.2 kOhm input resistor; measure V_F on PC817 | Replace optocoupler and resistor |
| DI input stuck low | Sensor sourcing current but shield not detecting | Confirm sensor type (PNP/NPN), check wiring | Reconfigure DIP switches on Siemens DI Shield for source/sink |
| PROFINET device not visible to TIA | Wrong GSD, IP collision, MRP ring not closed | Assign device name via PRONETA, ping IP | Reload GSD, reassign unique IP, verify ring topology |
| pndevice times out | Firmware image mismatch, wrong PROFINET version | Compare cat /etc/iot2000-version with image notes |
Reflash matching image from Siemens support portal |
| mraa handle errors after reboot | Stale lock file in /var/lock | ls /var/lock/mraa* | rm /var/lock/mraa-* and restart application |
| Arduino sketch upload fails | USB driver mismatch on host | lsusb on host, ls /dev/ttyACM* on IOT | Install udev rules; reset IOT2040 into DFU mode |
| Node-RED flow stops reading I/O | Exception in custom function node, lost mraa context | Check Node-RED log, restart flow | Add exception handlers; reload context with mraa_init() |
| Shield E1 fuse blown | Reversed 24 V polarity on field terminals | Visual inspection, continuity check | Replace F1 (T 0.5 A / 250 V), verify wiring convention |
11. Frequently Asked Questions
Can the SIMATIC IOT2040 provide 10 DI and 10 AI natively?
No. The Arduino R3 shield header on the IOT2040 exposes 13 usable digital channels (D2-D13) and 6 analog channels (A0-A5) at 0-3.3 V / 10-bit. Neither Siemens shield provides 10 AI, and the maximum AI count from the two Siemens shields stacked is 2. Achieving 10 AI requires either a custom I2C/SPI shield (e.g. two MCP3208 devices for 16 AI) or a PROFINET ET200SP head station with AI modules such as the 6ES7134-6GF00-0AA1.
What is the maximum number of I/O channels the IOT2040 can support via the shield header?
Practically, a fully populated custom shield can deliver 48 DI and 16 AI on the I2C bus (8 MCP23017-class devices at 0x20-0x27 plus 4 MCP3208-class SPI devices) and an additional 7-32 DO with ULN2003A or VN-series high-side drivers. This is software-limited by the I2C bus and the 8 MHz SPI clock; it is not a hardware ceiling on the IOT2040 itself.
Does the IOT2040 need a Siemens shield, or can I wire 24 V signals directly to the Arduino header?
You must not wire 24 V directly to the Arduino header. The Quark SoC GPIOs are 3.3 V tolerant; a 24 V signal will destroy the level translator and the SoC pad. Either use a Siemens shield (which provides built-in 24 V interface) or design a custom shield with optocoupler-based 24 V-to-3.3 V translation (e.g. PC817 plus 2.2 kOhm input resistor).
Which PROFINET head station is recommended for the IOT2040?
The 6ES7155-6AU01-0BN0 (IM 155-6 PN ST) is the standard head station, supporting up to 32 I/O modules per station and PROFINET conformance class C. The 6ES7155-6AU00-0CN0 (IM 155-6 PN HF) is the high-feature variant, supporting 64 modules and isochronous mode. Both are recognized by the pndevice library on the SIMATIC IOT2000 SD Card Example Image.
Can the IOT2040 act as a PROFINET controller for an ET200SP?
Yes, but only on example images that include the pncontroller library (V2.4.0 and later for IOT2040). Earlier images supported PROFINET device mode only. For controller mode, configure the IOT2040 LAN2 port as a PROFINET controller, assign the ET200SP as a PROFINET device, and import the ET200SP GSD file from TIA Portal or Siemens HSP.
Is the IOT2040 still supported by Siemens?
The IOT2040 has been replaced by the IOT2050 (6ES7647-0BA00-0AA2) as the active product, but the IOT2040 remains in active spare-parts and firmware-support phase. Current firmware (SIMATIC IOT2000 SD Card Example Image V2.4.0 and later) still ships with IOT2040 builds. For new projects, Siemens recommends the IOT2050; for installed IOT2040 bases, firmware updates remain available on the Siemens support portal.