Skip to the content
2 layers98 × 70 mmReto Desing, the printed circuit board in 3D

This git is for all the code or assets that we used for the class Design and Implementation of Mechatronic Systems

Size
98 × 70 mm
Copper layers
2
Thickness
1.6 mm
Parts
41
Nets
21
Pads
83
Tracks, vias
189, 0
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
23 Mar 2026
Updated
15 Jun 2026

Overview

Reto Desing is an open-source printed circuit board by GenaroRdz, from the GenaroRdz/International-Power-and-Grid-Management repository on GitHub, published under the MIT licence. It is a 2-layer board of 98 × 70 mm with 41 parts on 21 nets, routed with 189 tracks and 0 vias.

It is built around the IRF4905. Its parts include 12 resistors, 10 connectors, 6 diodes, 3 ICs and 3 transistors.

Main components

1

README

README.md

⚡ Design and Implementation of Mechatronic Systems: ECU Test Bench

Python Version Microcontroller Firmware

This repository contains all the code, hardware schematics, and assets used for the class Design and Implementation of Mechatronic Systems.

The core of this project is a High-Current Load Controller (ECU Test Bench) designed to safely simulate, control, and monitor high-power loads (12V/5A) using solid-state switching and a custom Python Graphical User Interface (GUI).

---# ⚡ Automated HIL Power & Grid Management Unit

Solid-State ECU Test Bench for Automotive Hardware-In-the-Loop (HIL) Validation

This repository contains the firmware, host software, hardware schematics, and testing assets developed for the Design and Implementation of Mechatronic Systems engineering capstone.

The core of this project is a High-Current Power Management Unit (PMU) designed to safely automate the power cycling, control, and real-time monitoring of automotive Electronic Control Units (ECUs). By replacing traditional mechanical relays and manual resets with a fully automated, VISA-compliant Python GUI and a solid-state switching matrix, this system provides a robust framework for continuous ECU stress-testing.

📋 System Architecture

The architecture relies on a strict separation of concerns across three layers, safely isolating the low-voltage logic control (3.3V) from the raw automotive power stage (12V) using galvanic isolation.

  1. Host Layer (PC / Python): A robust GUI that manages serial connection watchdogs, visualizes live telemetry on an oscilloscope, and parses automation scripts (e.g., LOOP 10, DELAY 100) into single-line SCPI/VISA string commands (*IDN?, ECU1_BAT ON).
  2. Control Layer (ESP32 / MicroPython): An asynchronous event-driven firmware (asyncio) that parses commands, manages GPIO logic, polls I2C sensors, and controls the SPI CAN bus simultaneously without blocking the main loop.
  3. Hardware Layer (Custom PCB): A 12-channel power delivery matrix protecting the logic domain from automotive 12V inrush currents and inductive spikes.

🚀 Key Features & Core Components

  • Solid-State Power Matrix: Independent 12V/5A control over Battery (BAT), Accessory (ACC), and Ignition (IGN) lines across 4 distinct ECU channels.
    • Component: P-Channel Power MOSFETs (IRF4905) driven by PC817 Optocouplers.
  • Real-Time I2C Telemetry: Closed-loop monitoring of voltage, current, and power consumption per channel using custom bare-metal I2C drivers.
    • Component: INA226 digital power monitors with ultra-low 0.01Ω shunt resistors and hardware-configured I2C addresses.
  • CAN Bus Integration: SPI-driven CAN controller integration for broadcast messaging, ECU node-health supervision, and live traffic monitoring via the GUI.
    • Component: MCP2515 CAN Controller + TJA1050 Transceiver.
  • Automated Sequencer: Custom scripting engine allowing the execution of complex testing vectors (e.g. stress tests) directly from .txt files.

📂 Repository Structure

  • /Firmware: MicroPython scripts for the ESP32 (main asynchronous loop, custom INA226.py and mcp2515.py register-level drivers, command parser).
  • /Software: Python GUI application (Tkinter), live scope plotting, CAN monitor, and serial management.
  • /Hardware: KiCad schematics, wiring diagrams, LTspice validation simulations (.asc, .model), and Bill of Materials (BOM).
  • /Tests: Example sequence .txt files for automated stress testing (e.g., COMPLETE Test.txt).
  • /Docs: Final Technical Report, architecture diagrams, and component datasheets.

🛠️ Setup and Installation

1. Hardware Assembly

Assemble the physical circuit following the schematics provided in the /Hardware folder.

⚠️ Safety Warning: This system handles cumulative currents capable of exceeding 15A during inrush events. Ensure the use of appropriate gauge wiring (AWG 16 minimum) for the 12V power bus, use proper thermal dissipation techniques, and include a master inline fuse & kill-switch before the MOSFET array.

2. Firmware (ESP32)

  1. Flash the ESP32 microcontroller with the latest MicroPython firmware.
  2. Upload all python scripts from the /Firmware folder to the board using tools like Thonny IDE or mpremote.
  3. The board will automatically execute main.py on boot, initialize the SPI/I2C buses, and await serial commands at 115200 bauds.

3. Software (Python GUI)

The host control interface requires Python 3.13.x. Navigate to the software folder and install the required dependencies:

bash
cd Software
pip install -r requirements.txt
python main.py

📋 System Architecture

The project is modularly designed, safely isolating the low-voltage logic control (3.3V) from the raw power stage (12V) using optocouplers.

Core Components:

  • Microcontroller: ESP32 running MicroPython.
  • Power Switching: P-Channel Power MOSFET (IRF4905).
  • Current/Voltage Monitoring: INA226 (I2C) with an ultra-low shunt resistor.
  • Isolation: PC817 Optocoupler.
  • Simulated Load: 120 Ohms Resistors. (in total 12 Resistors ~1.2A drawn).

📂 Repository Structure

  • /firmware: MicroPython scripts for the ESP32 (I2C sensor reading, PWM/Digital control).
  • /software: Python GUI application for remote monitoring and control.
  • /hardware: Circuit schematics, wiring diagrams, and LTspice simulations (.asc, .model).
  • /docs: Final Report, technical documentation and component datasheets (INA226, IRF4905, etc.).

🛠️ Setup and Installation

1. Hardware Assembly

Assemble the physical circuit following the schematics provided in the /hardware folder.

⚠️ Safety Warning: This system handles currents <= 5A. Ensure the use of appropriate gauge wiring (AWG 16 minimum) for the power stage and include a master kill-switch before the MOSFET array.

2. Firmware (ESP32)

Flash the ESP32 with the latest MicroPython firmware. Upload the scripts from the /firmware folder to the board using tools like Thonny IDE or mpremote.

3. Software (Python GUI)

The control interface requires Python 3.13.xx. Navigate to the software folder and install the required dependencies:

bash
cd software
pip install -r requirements.txt
python main.py

Authors:
Genaro Rodríguez Garza - A00831640 
Juan Pablo Carrasco Ferra Martínez - A01252910 
Eduardo de la Rosa Flores - A01039969 
Kleber Andres Molina Yepez - A00838725 
Jose Joaquin Rodriguez Cisneros - A00833104 

Parts

41
QtyValueFootprintReferences
10Conn_01x02Connector:JWT_A3963_1x02_P3.96mm_VerticalJ1, J2, J3, J4, J5, J6, J7, J8, J9, J10
610KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR2, R4, R6, R8, R10, R12
6330Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1, R3, R5, R7, R9, R11
31N5408Diode_THT:D_DO-201AD_P15.24mm_HorizontalD4, D5, D6
3IRF4905Package_TO_SOT_THT:TO-220-3_VerticalQ1, Q2, Q3
3LEDLED_THT:LED_D5.0mmD1, D2, D3
3PC817Package_DIP:DIP-4_W7.62mmU1, U2, U3
1INA226Reto_Desing:INA226INA226

The 35 most common of 41 parts.

Similar boards

  • 2 layers316 × 119 mmTeensy Grovebox, the printed circuit board in 3D

    Teensy Grovebox

    jerry20091103/Teensy_Grovebox

    A portable synth and music multi-tool made with Teensy 4.1

    142 parts150MIT
  • 2 layers50.5 × 52 mmWellerRT Station projekt, the printed circuit board in 3D

    WellerRT Station projekt

    MarcelMG/DIY-Soldering-Station-Controller

    A soldering station controller compatible with Weller RT tips

    45 parts44MIT
  • 2 layers213.6 × 127.5 mmZuendbox v3 32, the printed circuit board in 3D

    Zuendbox v3 32

    fixxl/el-fueradoro

    Open source ignition-system for audio-fireworks

    205 parts10
  • 2 layers108 × 55 mmPower control pcb, the printed circuit board in 3D

    Power control pcb

    HacklabJKL/sergei_cnc2

    Second version of Hacklab's custom built CNC machine

    89 parts6
  • 2 layers120 × 100 mmMowercarrier, the printed circuit board in 3D

    Mowercarrier

    zohebzma2-cmyk/autonomous-mower

    Self-driving zero-turn mower retrofit — RTK GPS, LiDAR, cameras, on-device AI. Hardware + firmware + control software + parametric CAD.

    50 parts5
  • 2 layers77.2 × 50.3 mmDischarger, the printed circuit board in 3D

    Discharger

    Alan-JH/Batt-Discharger

    High current battery storage discharger for TJ UAV

    30 parts2
  • 2 layers80 × 53.6 mmPCB Pump, the printed circuit board in 3D

    PCB Pump

    im-alexis/Capstone-Project

    Team Members: Javier Padilla, Alexis Torres, Ian Skillman, Kiet Le, Evan LeBel, Jesus Hernandez, Jaime Sanchez, Rodrigo Romero

    35 parts2
  • 2 layers50.8 × 71.1 mmSmartSwitch1CH, the printed circuit board in 3D

    SmartSwitch1CH

    joelkoz/CommonSens

    A collection of ready to use Signal K devices

    25 parts2

Questions

How big is the Reto Desing PCB?

It measures 98 × 70 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Reto Desing use?

41 parts, built around the IRF4905. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Reto Desing KiCad files?

From the GenaroRdz/International-Power-and-Grid-Management repository on GitHub, at the commit this page was made from: the board is Hardware/Kicad/Reto_Desing/Reto_Desing.kicad_pcb and its schematic Hardware/Kicad/Reto_Desing/Reto_Desing.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Reto Desing design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).