How dipto9999/reflow_oven_controller works
Project Type and Purpose
• This is an embedded control system with a companion data‐processing application.
• The primary function is to run a reflow soldering process on a microcontroller‐controlled oven (N76E003), implement a finite state machine for safe temperature profiling, and capture real‐time temperature data on a host machine.
• A secondary function is to postprocess and archive run data in CSV form and optionally in a GCP data bucket.
File Structure Analysis
• Top level:
– Firmware/ : 8051 ASM source, peripheral include files, build/flash tasks, Python validation script.
– Data_Processing/ : Python app (app.py), GCP upload/download modules, Logbook CSV outputs, requirements.txt.
– Schematics/ : KiCad schematic and PCB files, backups.
– Documents/, Report/ : Design docs, reports, figures, LaTeX sources.
• Key patterns:
– Firmware separates peripherals into .INC modules (ADC.INC, PWM.INC, SERIAL.INC).
– MAIN.ASM implements the FSM controller.
– Data_Processing uses a Python MVC‐like UI/backend with pandas and GCP scripts.
• Configuration/Build:
– Firmware/.vscode/tasks.json defines compile (a51.exe) and flash (ISPN76E003.exe) commands.
– Data_Processing/requirements.txt lists Python dependencies.
README Insights
• Describes an electronic circuit with op‐amp and ADC feeding a thermocouple and room temp sensor.
• Highlights a finite state machine for reflow profile control.
• Details GCP bucket integration for CSV uploads and downloads.
a. Main Components
– Hardware Layer: thermocouple + op‐amp circuit, room‐temp sensor (LML335), oven heating element, MOSFET/driver for heater.
– Microcontroller: N76E003 (8051 core) with ADC peripheral, PWM output, serial UART. FSM runs in MAIN.ASM.
– Firmware Modules:
· ADC module (ADC.INC)
· PWM control (PWM.INC)
· Serial comms (SERIAL.INC)
· Math utilities (MATH32.INC)
– Host Application: Python app (app.py) for real‐time plotting, logging to CSV (Logbook).
– Cloud Backend: GCP Storage bucket accessed via uploading.py and downloading.py.
– User Interface: GUI in Python or CLI for controlling session and viewing state transitions.
b. Relationships & Data Flows
– Sensors → ADC → MCU (digital temperature values)
– MCU FSM → PWM → Heater → Temperature changes
– MCU FSM → UART → Host App receives state & temp messages
– Host App → pandas → CSV files in Logbook
– Host App → uploading.py → GCP bucket (upload)
– downloading.py ↔ GCP bucket → local CSV for analysis
c. Architectural Patterns & Principles
– Finite State Machine (FSM) in firmware: clear state transitions for preheat, soak, reflow, cool-down.
– Modular firmware: separate peripheral libraries for maintainability.
– Layered design: hardware abstraction on MCU, transport layer via UART, application logic in Python.
– Data persistence and cloud integration for scalability and post‐hoc analytics.
d. Key Technologies & Frameworks
– 8051 ASM toolchain (a51.exe, ISPN76E003.exe)
– KiCad for electronics schematics/board design
– Python with pandas, PySerial, Google Cloud Storage client
– GCP Storage bucket as external service