
Maquina compostaje
dani0421/Compostaje
El SDA se conecta al pin 33 del ESP32 y el SCL al pin 36 de ESP32, cabe resaltar que en la placa no quedaran orificios para la pantalla, unicamente los pines para hacer la conexión.

Autonomous Gas Sensing Rover - Spring 2026 Capstone
VaporTrack Board is an open-source printed circuit board by Samuel-Habib, from the Samuel-Habib/VaporTrack repository on GitHub, published under the MIT licence. It is a 2-layer board of 65 × 65 mm with 29 parts on 57 nets, routed with 269 tracks and 60 vias.
It is built around the L298N and AMS1117-3.3. Its parts include 9 capacitors, 9 connectors, 4 resistors, 2 ICs and 1 diode. It belongs with the robots and motor control boards and the STM32 boards of this library.
VaporTrack is an autonomous robotic rover powered by an STM32F446RE (ARM Cortex-M4F @ 180 MHz) running FreeRTOS. The rover characterizes spatial volatile organic compound (VOC) gas distributions in indoor environments, computes 2D spatial gradients ($\nabla G = [\partial G/\partial x, \partial G/\partial y]$) via weighted planar least-squares regression, and tracks plume sources while executing reactive obstacle avoidance using a 3-sensor ultrasonic array.
┌─────────────────────────┐
│ NUCLEO-F446RE (ARM) │
│ 180 MHz Cortex-M4F │
│ │
│ FreeRTOS (CMSIS-V2) │
└────────────┬────────────┘
│
┌────────────────────────┼────────────────────────┐
│ │ │
I2C1 (PB6/PB7) TIM4 / GPIO TIM1 PWM (PA8/PA10)
│ │ │
┌──────┼──────┐ ┌─────┴─────┐ ┌─────┴─────┐
│ │ │ │ │ │ │
BME688 BNO055 OLED HC-SR04 x3 Heartbeat L298N H-Bridge
(Gas) (IMU) (Diag) (PC0 - PC5) (PA5) │
┌─────┴─────┐
│ │
Left 4WD Right 4WD| Subsystem | Component | Bus / Interface | Operational Parameters | Role in System |
|---|---|---|---|---|
| MCU | STM32F446RET6 (Nucleo-64) | On-chip | 180 MHz, 512 KB Flash, 128 KB SRAM, FPU | Main controller, RTOS scheduler, spatial math |
| RTOS | FreeRTOS Kernel v10.3.1 | Software | CMSIS-RTOS v2 API, preemptive scheduling | Task timing, thread synchronization, IPC |
| Gas / Environment | Bosch BME688 | I2C1 (0x77, 100 kHz) | Forced mode, 320°C heater (150 ms dwell) | MOX gas resistance ($R_{gas}$), T, P, RH |
| IMU / Heading | Bosch BNO055 | I2C1 (0x28, 100 kHz) | NDOF fusion mode, internal sensor fusion | Absolute Euler yaw ($\theta$), dead-reckoning |
| Diagnostics Display | SSD1306 0.96" OLED | I2C1 (0x3C, 100 kHz) | 128x64 monochrome framebuffer | Real-time telemetry, state, gradient vector |
| Distance Ranging | 3x HC-SR04 Ultrasonic | GPIO + TIM4 (1 MHz) | Sequential 10 µs trigger, 1 µs timing resolution | Front, Left, and Right obstacle distance |
| Motor Driver | L298N Dual H-Bridge | TIM1 PWM + GPIO | 20 kHz PWM (ARR=8999), 2A max per channel | 4WD differential steering control |
| Chassis & Motors | YIKESHU 4WD Chassis | Mechanical | 4x DC gearmotors (1:48 gear ratio) | Differential mobility platform |
| Power Regulation | DFRobot DFR0831 Buck | DC-DC Step-Down | 7.4V input $\rightarrow$ 5.0V regulated (3A max) | Clean 5V logic & ultrasonic sensor supply |
| Battery Source | 2x 18650 Li-ion Cells | Series Pack (2S) | 7.4V nominal (8.4V peak), 2600 mAh | Primary rover energy source |
2S 18650 Li-ion Battery
(7.4V - 8.4V)
│
├───[ Main Switch ]───┬───────────────────────────────► L298N VMS (Motor Power)
│ │
│ ▼
│ DFRobot Buck Converter (DFR0831)
│ (7.4V -> 5.0V Regulated)
│ │
│ ├───► HC-SR04 Ultrasonic Array (VCC = 5.0V)
│ │
│ ▼
│ Nucleo-64 5V / E5V Rail
│ │
│ ▼
│ On-Board LDO (5.0V -> 3.3V)
│ │
│ ├───► STM32F446RE MCU Core & Peripherals
│ ├───► Bosch BME688 Gas Sensor (VDD = 3.3V)
│ ├───► Bosch BNO055 9-DOF IMU (VDD = 3.3V)
│ └───► SSD1306 128x64 OLED Display (VDD = 3.3V)
│
└─────────────────────────────────────────────────────► Common Ground Bus (GND)[!NOTE] Ground Isolation & Noise Mitigation: The motor return current path through the L298N is tied to the central battery ground tab to prevent high-current switching noise from inducing ground bounce on the 3.3V analog and I2C lines. Echo pins PC1, PC3, and PC5 on the STM32F446RE are true 5V-tolerant (FT) inputs, allowing direct interface with 5V HC-SR04 echo signals without resistive voltage dividers.
| Signal Name | STM32 Pin | Function / Alternate Function | Electrical Characteristics | Notes |
|---|---|---|---|---|
I2C1_SCL | PB6 | AF4 (I2C1) | Open-Drain, 4.7 kΩ pull-up | Shared I2C bus clock (BME688, BNO055, SSD1306) |
I2C1_SDA | PB7 | AF4 (I2C1) | Open-Drain, 4.7 kΩ pull-up | Shared I2C bus data line |
ENA (Left PWM) | PA8 | AF1 (TIM1_CH1) | Push-Pull, 20 kHz PWM | Left motor bank duty cycle (ARR=8999) |
ENB (Right PWM) | PA10 | AF1 (TIM1_CH3) | Push-Pull, 20 kHz PWM | Right motor bank duty cycle (ARR=8999) |
IN1 | PB10 | GPIO Output | Push-Pull, Low Speed | Left motor forward control |
IN2 | PB4 | GPIO Output | Push-Pull, Low Speed | Left motor reverse control |
IN3 | PB5 | GPIO Output | Push-Pull, Low Speed | Right motor forward control |
IN4 | PB3 | GPIO Output | Push-Pull, Low Speed | Right motor reverse control |
USS_FRONT_TRIG | PC0 | GPIO Output | Push-Pull, High Speed | Front ultrasonic 10 µs trigger pulse |
USS_FRONT_ECHO | PC1 | GPIO Input (FT 5V-tolerant) | Floating / Internal Pull-down | Front echo pulse width measurement |
USS_LEFT_TRIG | PC2 | GPIO Output | Push-Pull, High Speed | Left ultrasonic 10 µs trigger pulse |
USS_LEFT_ECHO | PC3 | GPIO Input (FT 5V-tolerant) | Floating / Internal Pull-down | Left echo pulse width measurement |
USS_RIGHT_TRIG | PC4 | GPIO Output | Push-Pull, High Speed | Right ultrasonic 10 µs trigger pulse |
USS_RIGHT_ECHO | PC5 | GPIO Input (FT 5V-tolerant) | Floating / Internal Pull-down | Right echo pulse width measurement |
STATUS_LED | PA5 | AF1 (TIM2_CH1) | Push-Pull PWM | Activity heartbeat LED (duty $\propto$ motor drive) |
The application runs 6 prioritized, decoupled FreeRTOS tasks. Inter-task communication follows a producer-consumer snapshot model: sensors update a shared state struct protected by a FreeRTOS mutex (g_sensor_mutex), and consumer tasks copy local snapshots to eliminate torn reads without holding the bus.
In addition, access to the shared physical I2C1 bus (hi2c1) between SensorTask (reading BME688 and BNO055) and DisplayTask (flushing 1024-byte framebuffer to SSD1306) is serialized using a dedicated FreeRTOS mutex (g_i2c_mutex). To prevent bus starvation during BME688 gas sensor heating, the driver splits forced-mode triggering and data readout: SensorTask initiates the measurement, yields CPU execution via osDelay(160) while the heater stabilizes, and acquires g_i2c_mutex again only when measurement registers are ready to fetch.
SensorTask UltrasonicTask
(BME688/BNO055) (HC-SR04 x3)
│ │
▼ ▼
┌─────────────────────────────────┐
│ Thread-Safe Sensor Snapshot │ (sensors.c: g_sensors)
└────────────────┬────────────────┘
│
┌───────────┴───────────┐
▼ ▼
MappingTask NavigationTask (State Machine)
(2D Least-Squares) │
│ ▼
└──────────────► MotorTask (L298N PWM/GPIO)
│
▼
DisplayTask (SSD1306 OLED)| Task Name | Period | Priority | Stack Size | Role & Responsibilities |
|---|---|---|---|---|
MotorTask | 50 ms | osPriorityHigh (40) | 256 words (1 KB) | Translates navigation velocity commands to TIM1 PWM compare values and GPIO directions. |
SensorTask | 250 ms | osPriorityAboveNormal (32) | 512 words (2 KB) | Triggers BME688 forced-mode gas read and polls BNO055 Euler heading in NDOF mode. |
NavTask | 150 ms | osPriorityAboveNormal (32) | 512 words (2 KB) | Dead-reckoning position integration, state machine updates, and obstacle avoidance overrides. |
USSTask | 100 ms | osPriorityNormal (24) | 256 words (1 KB) | Sequentially fires HC-SR04 triggers using TIM4 1 MHz counter with 1 ms inter-ping decay gaps. |
MapTask | 500 ms | osPriorityNormal (24) | 512 words (2 KB) | Logs spatial samples and solves 2D planar weighted least-squares system for $\nabla G$. |
DispTask | 500 ms | osPriorityBelowNormal (16) | 512 words (2 KB) | Formats telemetry strings and flushes 1024-byte framebuffer to SSD1306 OLED over I2C. |
Standard plume-tracking approaches rely on instantaneous concentration thresholds (if gas > threshold -> move forward). In indoor environments, turbulent eddies and diffusion create local pockets of high concentration, causing naive rovers to stall or oscillate. VaporTrack uses a two-pass planar spatial gradient estimation:
As the rover maneuvers, it logs discrete coordinate tuples: $$S_i = (x_i, y_i, \theta_i, G_i)$$ Where $(x_i, y_i)$ is dead-reckoned position derived from heading $\theta_i$ and differential wheel displacement.
Because the BME688 metal-oxide semiconductor (MOX) sensor's raw resistance $R_{\text{gas}}$ drops when reducing VOC vapors interact with its heated sensing layer, the rover converts raw resistance into relative conductance $G_i$ ($\mu\text{S}$): $$G_i = \frac{10^6}{R_{\text{gas}, i}}$$ This inversion guarantees that $G_i$ increases proportionally with gas plume concentration, allowing standard gradient ascent to naturally steer toward the gas source without sign inversion.
In the localization phase, the rover models the local gas distribution in a neighborhood of radius R as a first-order planar surface centered at (x, y).
Setting up the normal equations:
[ Sum(dx^2) Sum(dx*dy) ] [ b ] = [ Sum(dx*G) ]
[ Sum(dx*dy) Sum(dy^2) ] [ c ] = [ Sum(dy*G) ]Solving via Cramer's rule:
D = Sum(dx^2)*Sum(dy^2) - Sum(dx*dy)^2
b = (Sum(dx*G)*Sum(dy^2) - Sum(dy*G)*Sum(dx*dy)) / D
c = (Sum(dx^2)*Sum(dy*G) - Sum(dx*dy)*Sum(dx*G)) / DThe estimated gradient vector gives the direction of steepest concentration change:
Grad(G) = [b, c]
target_heading = atan2(c, b)The rover computes heading error $e_\theta = \theta_{\text{target}} - \theta_{\text{current}}$ and applies differential steering proportional to $e_\theta$. When $|\nabla G|$ drops below the planar detection threshold and $G$ exceeds the plume peak threshold, the rover transitions to NAV_STATE_SOURCE_FOUND.
┌──────────────┐
│ STATE_BOOT │
└──────┬───────┘
│ Hardware peripherals ready
▼
┌──────────────┐
│ INIT_SENSORS │
└──────┬───────┘
│ I2C devices acknowledged
▼
┌──────────────┐
│ CALIBRATION │◄────────┐ BNO055 NDOF cal dance
└──────┬───────┘ │ (sys >= 1, gyro+mag >= 2)
│ Calibration OK │
▼ │
┌──────────────┐ │
│ MAPPING ├─────────┘
└──────┬───────┘
│ Waypoint quota reached (>= 64 samples)
▼
┌──────────────┐
│ LOCALIZATION │
└──────┬───────┘
│ Valid gradient computed (|grad| > threshold)dist_front_cm < 20.0 cm or either side sensor detects an obstacle < 15.0 cm, the rover immediately halts forward movement and transitions into NAV_STATE_OBSTACLE_AVOID.40.0 cm, then restores the previous state to resume gradient navigation.VaporTrack/
├── Core/
│ ├── Inc/
│ │ ├── bme688.h # Bosch BME688 MOX gas & environmental driver header
│ │ ├── bno055.h # Bosch BNO055 9-DOF IMU & Euler orientation header
│ │ ├── hcsr04.h # 3-channel HC-SR04 ultrasonic driver header
│ │ ├── ssd1306.h # 128x64 OLED framebuffer driver & font header
│ │ ├── motor.h # L298N differential drive & PWM interface header
│ │ ├── sensors.h # Mutex-protected thread-safe sensor snapshot header
│ │ ├── mapping.h # 2D spatial sample grid & least-squares gradient header
│ │ ├── navigation.h # Autonomous finite state machine & obstacle avoidance header
│ │ ├── main.h # Pin assignments, peripheral exports, and clock macros
│ │ └── FreeRTOSConfig.h # FreeRTOS kernel configuration (32 KB heap, FPU enabled)
│ └── Src/
│ ├── bme688.c # BME688 register access & datasheet compensation formulas
│ ├── bno055.c # BNO055 NDOF mode setup & Euler heading acquisition
│ ├── hcsr04.c # TIM4 microsecond pulse width timing & distance calculation
│ ├── ssd1306.c # Framebuffer manipulation & 6x8 ASCII font renderer
│ ├── motor.c # TIM1 PWM duty update & GPIO direction control
│ ├── sensors.c # Global sensor snapshot & FreeRTOS mutex synchronization
│ ├── mapping.c # Planar regression solver using Cramer's rule
│ ├── navigation.c # Navigation state machine, steering laws & obstacle overrides
│ ├── main.c # System clock setup, peripheral init & FreeRTOS task threads
│ └── stm32f4xx_hal_msp.c# Low-level MSP peripheral clock and GPIO initializationarm-none-eabi-gcc $\ge$ 10.3)# Clone repository
git clone https://github.com/Samuel-Habib/VaporTrack.git
cd VaporTrack
# Configure build directory
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/gcc-arm-none-eabi.cmake -DCMAKE_BUILD_TYPE=Debug -B build
# Build ELF and generate binary
cmake --build build -j$(nproc 2>/dev/null || sysctl -n hw.logicalcpu)# Flash using CMake target (via st-flash)
cmake --build build --target flash
# Or flash binary directly with st-flash
st-flash --connect-under-reset --reset write build/vapor_track.bin 0x08000000
# Or using OpenOCD
openocd -f openocd.cfg -c "program build/vapor_track.elf verify reset exit"CAL S:<sys> G:<gyro> M:<mag>. Once mag >= 2 and gyro == 3, calibration locks.NAV_SPEED_CRUISE offsets in Core/Inc/navigation.h.This project is licensed under the MIT License - see the LICENSE file for details.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | C | Capacitor_SMD:C_0805_2012Metric | C6, C7, C8, C9 |
| 2 | 100nF | Capacitor_SMD:C_0805_2012Metric | C3, C5 |
| 2 | 10uF | Capacitor_SMD:C_0805_2012Metric | C1, C2 |
| 2 | 4.7k | Resistor_SMD:R_0805_2012Metric | R2, R3 |
| 1 | 10k | Resistor_SMD:R_0805_2012Metric | R1 |
| 1 | 2.2uF | Capacitor_SMD:C_0805_2012Metric | C4 |
| 1 | 330 | Resistor_SMD:R_0805_2012Metric | R4 |
| 1 | AMS1117-3.3 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U1 |
| 1 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J1 |
| 1 | Conn_01x05 | Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_Vertical | J2 |
| 1 | J_BME688 | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J3 |
| 1 | J_BNO055 | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J4 |
| 1 | J_HC_SR04_1 | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J6 |
| 1 | J_HC_SR04_2 | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J7 |
| 1 | J_HC_SR04_3 | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J8 |
| 1 | J_OLED | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J5 |
| 1 | L298N | Connector_PinHeader_2.54mm:PinHeader_1x07_P2.54mm_Vertical | J9 |
| 1 | LED | LED_SMD:LED_0805_2012Metric | D1 |
| 1 | STM32F446RETx | Package_QFP:LQFP-64_10x10mm_P0.5mm | U2 |
The 25 most common of 29 parts.

dani0421/Compostaje
El SDA se conecta al pin 33 del ESP32 y el SCL al pin 36 de ESP32, cabe resaltar que en la placa no quedaran orificios para la pantalla, unicamente los pines para hacer la conexión.

elshazlio/ecng4504-maze-solver_team_5
ECNG 4504 (AUC, Spring 2026): autonomous maze-learning & solving robot — MCU (Arduino), Python BLE host app, KiCAD/docs, team deliverables. Single monorepo per course charter.


phbnascimento/carrinho-pizza
Código fonte, documentação, esquemáticos e PCB do projeto "Gigantes de MDF"

prisca7c/Customized-AI-Electric-Wheelchair
Manual wheelchair turned electric! This wheelchair uses electronic components such as modules and a PCB to make this wheelchair much for user interactive (and helps make life easier when you can't walk).

yuxinz310/antweight-battlebot
ESP32-based Wi-Fi-controlled antweight combat robot featuring two-motor differential drive, custom PCB design, a servo-actuated weapon, and integrated safety mechanisms.


It measures 65 × 65 mm and has 2 copper layers, 1.6 mm thick.
29 parts, built around the L298N and AMS1117-3.3. 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.
From the Samuel-Habib/VaporTrack repository on GitHub, at the commit this page was made from: the board is hardware/VaporTrack_Board.kicad_pcb and its schematic hardware/VaporTrack_Board.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
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).