Built to order

Firewall3D-Inspired 3D Printer Project with STM32 Hardware Firewall and Firmware Attack Protection

This project builds a Firewall3D-inspired hardware firewall for a desktop 3D printer, using an STM32F103 Blue Pill, ACS712 current sensors and a Python host that compares live stepper currents, temperatures, end-stop states and fan speed with the running G-code and halts the print on deviation. It is the student-scale version of the Texas A&M Firewall3D system: it monitors an Ender-3 class printer, stages three attack tests and never claims to catch every attack. Suitable for B.E./B.Tech final-year projects in IoT and Embedded Systems, Electronics and Computer Engineering.

Chat on WhatsApp — get a quotation

IoT & Embedded HTML · CSS · JavaScript dashboardSTM32F103C8 Blue Pill boardPython G-code comparator hostArduino IDE STM32 firmwareRelay module power cut-offHybrid
Firewall3D-inspired 3D printer security prototype — black Ender-3 style FDM printer with a blue STM32 Blue Pill board, ACS712 current sensor modules and coloured jumper wires on a white background
More project photos (3)

The problem

A 3D printer trusts its firmware completely: whatever G-code reaches the printer is executed, and nothing on the machine checks whether the motors, heaters and sensors are actually doing what the file asked for. That trust is the attack surface Texas A&M researchers demonstrated with Firewall3D in 2026 — a tampered G-code file or compromised firmware can move an axis off-path, overheat a nozzle or fake an end-stop signal, ruining a part or starting a fire, while the printer reports nothing wrong. This project builds the honest student-scale answer: a dedicated STM32F103 Blue Pill board that watches the printer from outside its firmware, reading stepper-motor currents through ACS712 sensors, tapping nozzle and bed thermistors, end-stop signals and fan speed, and comparing every live reading against the G-code the host is actually running. On a deviation beyond a set threshold it sounds a buzzer, opens a relay that cuts printer power, and raises an alert on the host dashboard.

Firewall3D, from Seyed Ali Ghazi Asgar and Narasimha Reddy at Texas A&M University ECE (arXiv:2607.10484, preprint updated 17 November 2026), is a dedicated hardware firewall built on an STMicroelectronics STM32F103C8K6 microcontroller connected to a host PC over USB. It continuously monitors stepper-motor current draw, end-stop switch status, fan speed, nozzle temperature and heated-bed temperature against expected values from the running G-code, and alerts and halts the print on deviation. The paper validates it against three attack vectors — motion manipulation, temperature-based attacks and end-stop spoofing — and claims sub-millimetre position-tracking accuracy, with only minimal wiring and no modifications to the printer's motherboard or firmware. The same week, Prusa announced the CORE One L+ Zero-Trace at Formnext 2026: no persistent storage, no USB port, no SD slot, no Wi-Fi and no camera, with jobs streamed over encrypted Ethernet from a customer-owned server and held only in volatile memory, first deliveries planned for January 2027. This student build does not replicate either system. It builds the monitoring loop at lab scale — four current sensors, temperature and end-stop taps, a USB-serial link to a Python comparator and a dashboard — and validates it with three staged student tests, reported as the student's own procedure with design-target thresholds, never as the paper's results.

This student build Firewall3D (Texas A&M paper) Prusa CORE One L+ Zero-Trace
What it is Student monitor for an Ender-3 class printer Research hardware firewall on STM32F103C8K6 Commercial secure printer, Formnext 2026
Monitors Stepper currents, nozzle/bed temps, end-stops, fan speed Stepper current, end-stops, fan speed, nozzle and bed temperature Nothing persists: no storage, no USB, no Wi-Fi, no camera
Comparison Python host parses the running G-code and compares expected vs actual Live readings vs expected values from the running G-code Jobs stream over encrypted Ethernet from the customer's own server
Response to attack Buzzer + relay cuts printer power + dashboard alert Alert and print halt File lives only in volatile memory; key on a separate board
Validation Three staged student tests with design-target thresholds Three attack vectors: motion manipulation, temperature attacks, end-stop spoofing Signed firmware only, audit logs, deliveries from January 2027
Honesty line Lab-scale monitor — does not detect all attacks, not a certified safety device Research system, sub-mm position tracking claimed by the paper Commercial product — this build does not reproduce it

How it works

The printer, the STM32 board and the host PC form one checking loop. The host sends G-code to the printer and simultaneously feeds the same lines to the Python comparator, which works out what each stepper current, temperature and fan speed should be at that moment. The STM32 samples the ACS712 current sensors, the thermistor taps, the end-stop lines and the fan tachometer at about 10 Hz and streams the readings to the host over USB-serial. The comparator checks every live value against its prediction: a stepper drawing far more current than its move requires, a nozzle hotter than the G-code asks for, or an end-stop that reports TRIGGERED in the middle of a print all count as deviations. A deviation beyond the threshold raises the dashboard alert, sounds the buzzer and opens the relay that cuts printer power.

  1. The builder wires the monitor: four ACS712 ±5 A modules in series with the X, Y, Z and extruder stepper lines, thermistor taps on the nozzle and heated bed, signal taps on the three end-stop switches, and a tachometer tap on the part-cooling fan, all into the STM32 Blue Pill board.
  2. The builder adds the halt chain: a relay module in the printer's power line and a buzzer on a digital output, so the STM32 can cut power and sound an alarm without the printer firmware's cooperation.
  3. The builder flashes the firmware: the STM32 samples all channels at about 10 Hz through its 12-bit ADC and streams readings to the host over USB-serial at 115200 baud.
  4. The builder writes the host comparator: a Python program that parses the running G-code, predicts the expected current, temperature and fan speed for each line, and compares each live reading against its prediction.
  5. The builder sets the thresholds: current deviation ±15%, nozzle ±10 °C, bed ±5 °C and fan ±10% (design targets), with a baseline capture at the start of every print so normal variation is measured, not guessed.
  6. The builder runs the three staged tests: a scripted G-code tamper that moves X off-path, a capped heater-runaway simulation on a safe test load, and an end-stop spoof that forces X TRIGGERED mid-print — recording whether the firewall halted each one.
  7. The builder reviews the dashboard: live vs expected values, the event log and the alert banner show exactly which channel deviated and by how much, and the results go into the report as the student's own validation.

Tech stack:

  • STM32F103C8 · Blue Pill board
  • ACS712 current sensors · ±5 A modules
  • Python · G-code comparator host
  • HTML · CSS · JavaScript dashboard
  • Arduino IDE · STM32 firmware
  • NTC thermistors · nozzle and bed taps
  • Relay module · power cut-off
  • Creality Ender-3 class FDM printer

How Firewall3D and Prusa Zero-Trace work — and what this build does instead

  • The Firewall3D paper: Ghazi Asgar and Reddy (Texas A&M ECE, arXiv:2607.10484) built a dedicated hardware firewall on the STM32F103C8K6, connected to a host PC over USB, that continuously monitors stepper-motor current draw, end-stop switch status, fan speed, nozzle temperature and heated-bed temperature against expected values from the running G-code. On deviation it alerts and halts the print. It was validated against motion manipulation, temperature-based attacks and end-stop spoofing, claims sub-millimetre position-tracking accuracy, and needs only minimal wiring with no modifications to the printer's motherboard or firmware. The paper puts the 3D-printing market at exceeding $30 billion (the paper's figure).
  • Why current reveals motion: A stepper motor draws current in proportion to the torque it delivers, and the torque a move needs depends on the speed and acceleration the G-code commands. So the G-code predicts the current: a tampered move that sends an axis somewhere the file never asked for draws a current the prediction does not expect, and the mismatch is visible in the current waveform before the print visibly goes wrong. That is the whole detection idea — the firewall never reads the firmware, it reads the physics.
  • The Prusa Zero-Trace side of the story: Prusa's CORE One L+ Zero-Trace, shown at Formnext 2026, attacks the same problem from the opposite direction — instead of watching the printer, it removes the places a file can hide. No persistent storage, no USB port, no SD slot, no Wi-Fi, no camera. Jobs stream over encrypted Ethernet from a server the customer owns, the file lives only in volatile memory with the decryption key on a separate board, the printer accepts only signed firmware, and audit logs record who printed what. The base machine is a CoreXY printer with a 300×300×330 mm build volume and optional hot ends rated to 400 °C, with first deliveries planned for January 2027 (Prusa reported).
  • What this build does instead: The student build takes Firewall3D's monitoring idea and shrinks it to a Blue Pill, four ACS712 modules and a Python host, and it takes nothing from Prusa's machine — the student printer is an ordinary Ender-3 class FDM printer with no security features of its own. The three attack vectors in the paper become three staged student tests with design-target thresholds, and every result reported is the student's own: the paper's sub-millimetre tracking claim and its three-vector validation are background, labelled as the paper's, never as this build's results.
Parameter Value
Controller STM32F103C8 · ARM Cortex-M3 up to 72 MHz · 64 KB Flash · 20 KB SRAM · 2× 12-bit ADC with 10 channels · USB 2.0 full speed (Datasheet values, STMicroelectronics)
Current sensors 4 × ACS712ELCTR-05B · ±5 A range · 185 mV/A sensitivity at 5 V · 2.1 kVRMS isolation · zero-current output 2.5 V (Datasheet values, Allegro MicroSystems)
Temperature sensing NTC 100 kΩ thermistor taps · nozzle and heated bed · read through the 12-bit ADC · nozzle design target 200–210 °C for PLA (design target)
End-stop monitoring X/Y/Z end-stop signal taps · expected state OPEN during a print · TRIGGERED mid-print counts as a spoof (design target)
Fan monitoring Part-cooling fan tachometer reading · expected 4,200 RPM at 100% PWM (design target — printer-dependent)
Host link USB-serial at 115200 baud · STM32 to Python host · G-code streamed to printer and comparator together (design target)
Comparison rate Live readings sampled at about 10 Hz · compared against the parsed running G-code (design target)
Deviation thresholds Stepper current ±15% · nozzle ±10 °C · bed ±5 °C · fan ±10% (design targets — configurable in one file)
Halt action Relay opens the printer power line · buzzer sounds · dashboard shows the offending channel and deviation (design target)
Printer Ender-3 class FDM · build volume 220×220×250 mm (Approximate — printer-dependent) · PLA test prints
Trend reference Firewall3D: STM32F103C8K6 hardware firewall · Texas A&M ECE · arXiv:2607.10484 · validated against motion manipulation, temperature attacks and end-stop spoofing · sub-millimetre position tracking claimed (paper claim). Prusa CORE One L+ Zero-Trace: no persistent storage, no USB, no SD slot, no Wi-Fi, no camera · encrypted Ethernet · volatile memory only · signed firmware · first deliveries January 2027 (Prusa reported). None of these figures describe this student build.
Builder note The ±5 A ACS712 module swings 1.575–3.425 V around its 2.5 V zero-current output (Datasheet values, Allegro), so divide its output down before the STM32's 3.3 V ADC — feeding it in raw clips the top of the range. Also note Allegro marks the ACS712 as not for new design and recommends the ACS723 as its successor; the ACS712 stays here because its modules are cheap and everywhere in college labs, and the report says so. The second most common failure is a noisy current reading: put a 1 nF filter capacitor on the ACS712 FILTER pin as the datasheet recommends, and average 8 samples per reading before comparing.

Project features

Four capabilities carry this build. First, independent monitoring: the STM32 board watches the printer from outside its firmware, so a compromised firmware cannot hide what it is doing — the current sensors see the motors directly. Second, G-code comparison: the Python host parses the file actually being printed and predicts what each motor current, temperature and fan speed should be at each moment, so the check is against the job, not a fixed number. Third, the halt chain: on a deviation beyond the threshold the board sounds a buzzer, opens a relay that cuts printer power, and raises a red banner on the dashboard with the offending channel and the size of the deviation. Fourth, the three staged attack tests: a scripted G-code tamper, a capped heater-runaway simulation and an end-stop spoof, each with a defined expected response, so the review panel sees the firewall do its job instead of taking it on trust.

  • [Independent STM32 monitoring] A Blue Pill board reads the printer's stepper currents, temperatures, end-stop signals and fan speed through its own sensors — it never trusts the printer firmware's own reports — implemented in the base build.
  • [G-code comparison] The Python host parses the running G-code line by line and predicts the expected current, temperature and fan speed for each moment, comparing live readings against those predictions — implemented in the base build.
  • [Four-channel current sensing] One ACS712 ±5 A module per axis (X, Y, Z, extruder) measures stepper current through the 12-bit ADC, with a design-target deviation threshold of ±15% — implemented in the base build.
  • [Temperature and end-stop taps] Thermistor taps watch nozzle and bed temperature and end-stop signal taps watch all three axes, so a heater attack or a spoofed end-stop shows up as a mismatch against the G-code — implemented in the base build.
  • [Relay power cut and buzzer] On a confirmed deviation the firmware opens a relay that cuts power to the printer and sounds a buzzer, so a bad print stops instead of continuing into a failed part or a hot nozzle — implemented in the base build.
  • [Live monitoring dashboard] The host dashboard shows live vs expected values for every channel, end-stop states, fan RPM, the event log and the attack-alert banner, with working halt and simulate-attack controls — implemented in the base build.
  • [Three staged attack tests] The build is validated against three defined tests — scripted G-code tamper, capped heater-runaway simulation and end-stop spoof — each with a stated expected firewall response — implemented in the base build.
  • [Threshold configuration] Deviation thresholds for current, temperature and fan speed are set in one configuration file, so the student can tighten or loosen them and record how the false-alarm rate changes — implemented in the base build.

What is included

  • Working prototype (Ender-3 class FDM printer with STM32 Blue Pill monitor board, four ACS712 current sensor modules, thermistor and end-stop taps, fan tachometer tap, relay power cut-off and buzzer, wired and labelled)
  • STM32 firmware (10 Hz sampling through the 12-bit ADC, USB-serial streaming at 115200 baud, relay and buzzer control on deviation)
  • Python G-code comparator (G-code parser, expected-value prediction, live-vs-expected comparison, threshold configuration file, dashboard data feed)
  • Monitoring dashboard (live vs expected values for every channel, end-stop states, fan RPM, event log, attack-alert banner, working halt and simulate-attack controls)
  • Setup and validation guide (wiring and sensor calibration, threshold tuning, the three staged attack tests, dashboard walkthrough)
  • Project report PDF (Firewall3D paper background with the paper's figures labelled as the paper's, Prusa Zero-Trace context, monitor design, comparator method, the student's own three-test validation, honest limits)
  • PPT presentation for final review
  • Viva Q&A preparation document (how a hardware firewall differs from firmware security, why stepper current reveals motion, G-code comparison, the three attack vectors, limitations)

Work plan & timeline

Total work plan: 100 hours, split across six phases. Phase 1, background study and parts: 14 hours — reading the Firewall3D paper (arXiv:2607.10484) and the STM32F103 and ACS712 datasheets, sourcing the Blue Pill board, sensor modules, relay and printer, and confirming the Prusa Zero-Trace coverage for the report. Phase 2, monitor build: 22 hours — wiring the four current sensors, thermistor and end-stop taps, fan tachometer and relay cut-off, and mounting the board beside the printer. Phase 3, firmware and host link: 24 hours — STM32 sampling and USB-serial streaming, the Python G-code parser and comparator, and the first live-vs-expected comparison on a real print. Phase 4, dashboard and halt chain: 16 hours — the monitoring dashboard with live values and the alert banner, the relay and buzzer halt path, and the simulate-attack control. Phase 5, validation: 12 hours — the three staged attack tests run end to end, repeated, with the results recorded for the report. Phase 6, review preparation: 12 hours — presentation slides, a demo walkthrough, and the question-and-answer document for the review.

Support

Support covers setup help for the delivered monitor board, sensors and dashboard, a walkthrough of sensor calibration, threshold tuning and the three staged attack tests, plus fixes for defects in the delivered code. Guidance is also provided for adapting the report and presentation to the student's college format and for answering guide questions about hardware firewalls, G-code comparison, stepper-current sensing and the Firewall3D paper. Support does not cover re-running the three-test validation beyond the setup walkthrough, and it does not invent results for tests or observations that were not run.

Limitations & prerequisites

  • Not the Firewall3D system: this build is a student-scale monitor inspired by the Texas A&M paper, not a reproduction of it. The paper's sub-millimetre position tracking and its three-vector validation are the paper's claims, not this build's results, and must never be presented as such.
  • Does not detect all attacks: the monitor checks four signals against the G-code. An attack that keeps currents, temperatures, end-stops and fan speed inside their thresholds — or that tampers with the G-code before the comparator sees it — will not be caught. The report states the three staged tests as the validation, not a security guarantee.
  • Not a safety-certified device: the relay cut-off is a student-built power interrupt, not a certified thermal-runaway protection system. The printer's own thermal protections must stay enabled, the heater-runaway test uses a safe capped load, and the build must never be presented as fire protection.
  • Thresholds are design targets: the ±15% current and ±10 °C nozzle thresholds were chosen for the student build and tuned on its own printer. A different printer, filament or print speed changes normal variation, so thresholds must be re-tuned and the false-alarm rate recorded.
  • ACS712 noise limits sensitivity: the ±5 A module's 185 mV/A sensitivity and its noise floor mean small current changes are hard to resolve; averaging and the datasheet filter capacitor help, but fine-grained motion tampering below the noise floor will not be seen.
  • Host-dependent: the comparator and dashboard run on the host PC over USB-serial. If the host disconnects, the STM32 keeps sampling but no comparison happens — the relay halt needs the host link, and the report says so.
  • Printer-dependent: sensor taps and thresholds are wired for an Ender-3 class printer. Other printers need different tap points and re-tuned thresholds, and the build guide covers only the Ender-3 class wiring.

Frequently Asked Questions

Is this project suitable for a final-year project?

Yes, for IoT and Embedded Systems, Electronics and Computer Engineering programmes, because it combines an STM32 monitor board, current and temperature sensing, a Python G-code comparator and a live dashboard around a current research paper. The report documents the Firewall3D paper with its figures labelled as the paper's, the monitor design, the comparator method and the student's own three-test validation, so the work reads as engineering rather than a copy of a news story.

Is this the real Firewall3D system?

No — this build is a student-scale monitor inspired by Firewall3D, the Texas A&M hardware firewall published as arXiv:2607.10484. The paper's system runs on an STM32F103C8K6 and was validated against three attack vectors with sub-millimetre position tracking claimed; this build uses a Blue Pill board, four ACS712 sensors and a Python host, and validates itself with three staged student tests. The paper's results are background for the project, labelled as the paper's, not results of this build.

Can it really stop a firmware attack?

It can stop the three attacks it is built to test: a scripted G-code tamper, a capped heater-runaway simulation and an end-stop spoof each trigger the buzzer, the relay power cut and a dashboard alert when they push a reading past its threshold. It cannot catch attacks that stay inside the thresholds or that tamper with the G-code before the comparator sees it, and it is not a certified safety device — those limits are stated in the Limitations section and in the report.

Why watch stepper current instead of just reading the printer's own sensors?

Because the printer's own temperature and position reports come from the same firmware an attacker would compromise. Stepper current is measured by the STM32's own sensors on the motor wires, outside the firmware, so a tampered move shows up as a current the G-code never predicted. That independence from the firmware is the whole point of a hardware firewall.

What printer does it work with?

The build is wired and tuned for an Ender-3 class FDM printer with a 220×220×250 mm build volume (Approximate). Other printers can be used, but the sensor tap points differ and the thresholds must be re-tuned on the new machine, with the false-alarm rate recorded — the setup guide covers the Ender-3 class wiring only.

What will I receive with the project?

You receive the working prototype — the Ender-3 class printer with the STM32 monitor board, four ACS712 sensor modules, thermistor and end-stop taps, relay cut-off and buzzer — plus the STM32 firmware, the Python G-code comparator, the monitoring dashboard, the setup and validation guide, the report, presentation and Q&A document.

Components & software requirements
  • STM32F103C8 · Blue Pill board
  • ACS712 current sensors · ±5 A modules
  • Python · G-code comparator host
  • HTML · CSS · JavaScript dashboard
  • Arduino IDE · STM32 firmware
  • NTC thermistors · nozzle and bed taps
  • Relay module · power cut-off
  • Creality Ender-3 class FDM printer

How Firewall3D and Prusa Zero-Trace work — and what this build does instead

  • The Firewall3D paper: Ghazi Asgar and Reddy (Texas A&M ECE, arXiv:2607.10484) built a dedicated hardware firewall on the STM32F103C8K6, connected to a host PC over USB, that continuously monitors stepper-motor current draw, end-stop switch status, fan speed, nozzle temperature and heated-bed temperature against expected values from the running G-code. On deviation it alerts and halts the print. It was validated against motion manipulation, temperature-based attacks and end-stop spoofing, claims sub-millimetre position-tracking accuracy, and needs only minimal wiring with no modifications to the printer's motherboard or firmware. The paper puts the 3D-printing market at exceeding $30 billion (the paper's figure).
  • Why current reveals motion: A stepper motor draws current in proportion to the torque it delivers, and the torque a move needs depends on the speed and acceleration the G-code commands. So the G-code predicts the current: a tampered move that sends an axis somewhere the file never asked for draws a current the prediction does not expect, and the mismatch is visible in the current waveform before the print visibly goes wrong. That is the whole detection idea — the firewall never reads the firmware, it reads the physics.
  • The Prusa Zero-Trace side of the story: Prusa's CORE One L+ Zero-Trace, shown at Formnext 2026, attacks the same problem from the opposite direction — instead of watching the printer, it removes the places a file can hide. No persistent storage, no USB port, no SD slot, no Wi-Fi, no camera. Jobs stream over encrypted Ethernet from a server the customer owns, the file lives only in volatile memory with the decryption key on a separate board, the printer accepts only signed firmware, and audit logs record who printed what. The base machine is a CoreXY printer with a 300×300×330 mm build volume and optional hot ends rated to 400 °C, with first deliveries planned for January 2027 (Prusa reported).
  • What this build does instead: The student build takes Firewall3D's monitoring idea and shrinks it to a Blue Pill, four ACS712 modules and a Python host, and it takes nothing from Prusa's machine — the student printer is an ordinary Ender-3 class FDM printer with no security features of its own. The three attack vectors in the paper become three staged student tests with design-target thresholds, and every result reported is the student's own: the paper's sub-millimetre tracking claim and its three-vector validation are background, labelled as the paper's, never as this build's results.
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Get a quotation