Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# Self-Balancing drone
An autonomous two‑wheel platform featuring real‑time stabilization and Rust‑based embedded control.

**Author:** Jidovu Andrei‑Bogdan
**GitHub Project Link:** https://github.com/UPB-PMRust-Students/fils-project-2026-Moti452

---

# Description
This project implements a two‑wheel self‑balancing robot built entirely using **Rust** on an **ESP32** microcontroller.
The system uses an **MPU6050** IMU to measure tilt angle and angular velocity, while a pair of **156:1 Metal Gearmotor 20D×44L mm 6V CB** motors provide actuation.
A PID control loop written in Rust continuously adjusts motor speed to maintain balance.

The robot is designed as a compact demonstration of real‑time control, embedded Rust programming, and sensor‑driven actuation.
Optional BLE communication can be added using the `esp-radio` and `trouble-host` crates, enabling wireless telemetry or remote control.

---

# Motivation
I chose this project because I wanted to explore real‑time control systems using Rust.
Self‑balancing robots are a classic challenge that combine physics, control theory, and embedded programming into a single, elegant system.

Unlike traditional Arduino‑based balancing robots, this project demonstrates that Rust can be used for precise timing, safe concurrency, and low‑level hardware access.

The robot is intended as a prototype for future small‑scale reconnaissance robots — a compact ground‑based drone that is harder to detect — but it can also be a fun educational platform.

---

# Architecture

## Main Components

### Sensing Layer
- **MPU6050 IMU**
Measures pitch angle and angular velocity using accelerometer + gyroscope fusion.

### Control Core
- **ESP32 running Rust**
Executes the PID loop, reads IMU data over I²C, and drives the motors using PWM.
Optional BLE support via `esp-radio` + `trouble-host`.

### Actuation Layer
- **Two 156:1 Metal Gearmotor 20D×44L mm 6V CB motors**
- **Motor driver** for direction and PWM speed control

### Power Layer
- **2× 18650 Li‑ion cells**
- **Buck converter** for stable 5V logic power
- Motors powered directly from battery rail for high current capability

---

# Component Connection

### Sensor Link (I²C)
Connects the MPU6050 to the ESP32 and provides real‑time angle and angular velocity data.

### Control Loop (Rust + PID)
Runs at a fixed update rate.
Combines IMU data with PID output to compute motor commands.

### Execution Link (PWM/GPIO)
Connects the ESP32 to the motor driver.
Controls motor speed and direction.

### Optional Wireless Link (BLE)
If enabled, uses:
- `esp-radio` for radio stack
- `trouble-host` for BLE host

Allows telemetry or remote control.

---

# Log

### Week 23 – 29 March
Planned the project and defined the architecture.

### Week 30 March – 5 April
Got the idea approved and ordered all required components.

### Week 6 – 12 April
Waiting for components, started looking for wheels as they were the last component needed.

### Week 13 – 19 April
Found a 3D schematic for the wheels and got it printed.
Still waiting for my buck converter in order to start testing.

### Week 20 – 26 April
(Work in progress)

### Week 27 April – 3 May
(Work in progress)

### Week 4 – 10 May
(Work in progress)

### Week 11 – 17 May
(Work in progress)

### Week 18 – 24 May
(Work in progress)

---

# Hardware

---

# Bill of Materials

| Device | Usage | Price |
|--------|--------|--------|
| ESP32 DEVKIT V1 | Main control unit running Rust | X lei |
| MPU6050 | IMU for angle measurement | X lei |
| 156:1 Metal Gearmotor 20D×44L mm 6V CB (2 pcs) | Actuation | X lei |
| Motor driver | PWM motor control | X lei |
| 2× 18650 Li‑ion cells | Power | X lei |
| Buck converter | 5V regulation | X lei |
| 3D‑printed wheels | Locomotion | X lei |
| Jumper wires | Connections | X lei |
| Breadboard | Prototyping | X lei |

Prices not added yet; some components may change.

---

# Software

| Library | Description | Usage |
|---------|-------------|--------|
| Rust | Systems programming language | Core implementation |
| esp-hal | ESP32 HAL | GPIO, I²C, PWM |
| embedded-hal | Hardware abstraction | Peripheral interfaces |
| esp-idf-sys / esp-wifi | Optional WiFi/BLE support | Wireless |
| esp-radio | ESP32 radio stack | BLE (optional) |
| trouble-host | BLE host | BLE (optional) |
| nalgebra / micromath | Math utilities | PID + filtering |
| heapless | Fixed‑size data structures | No‑std buffers |



Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Smart Fire Detection and Suppression System

An embedded smart fire safety system built with STM32 and Rust using Embassy async framework.

:::info

**Author**: Hasti Kalatzadeh \
**GitHub Project Link**: https://github.com/UPB-PMRust-Students/fils-project-2026-hasti-kalatzadeh

:::

## Description

This project is a smart fire detection and suppression system based on an STM32 microcontroller programmed in Rust.
The firmware uses the Embassy async framework to run multiple tasks concurrently.

The system continuously monitors ambient temperature using a temperature sensor. When the measured temperature exceeds a predefined safety threshold, the system enters danger mode.

In danger mode:

- A buzzer alarm is activated
- A water pump starts automatically
- The LCD displays the warning message **DANGER**

When the temperature returns to a safe value:

- The pump stops
- The buzzer turns off
- The LCD displays **SAFE**

A push button is included for manual emergency stop. A potentiometer allows manual control of the water pump speed / pressure.

## Motivation

Fire hazards can happen unexpectedly and cause serious damage. I wanted to build a practical system that can automatically detect dangerous conditions and immediately react.

This project combines sensors, displays, motors, alarms, user input, and async embedded programming in Rust — covering many of the concepts studied throughout the course.

## Architecture

The STM32 microcontroller acts as the central controller, coordinating all peripherals through Embassy async tasks:

- **Sensor Task** — reads temperature from the DHT11 sensor continuously
- **Display Task** — updates the LCD 16x2 with current status (**SAFE / DANGER**)
- **Alarm Task** — controls the buzzer based on system state
- **Pump Task** — activates or stops the water pump via the MOSFET module
- **Input Task** — reads the push button for manual emergency stop

Peripheral interfaces used:

- **GPIO** — button input and buzzer output
- **Digital Sensor Input** — DHT11 temperature sensor
- **PWM / GPIO Output** — water pump activation through MOSFET
- **I2C** — LCD 16x2 display
- **ADC** — potentiometer for pump speed adjustment

## Log

### Week 5 - 11 May

Project idea selected and requirements defined. Components researched and ordered. Rust embedded environment and Embassy framework configured.

### Week 12 - 18 May

Hardware assembled on breadboard. Implemented sensor reading task and threshold detection logic. Tested buzzer and pump switching via MOSFET.

### Week 19 - 25 May

Integrated LCD display over I2C. Added push button debounce and manual stop logic. Potentiometer ADC reading connected to pump PWM speed control. Full system integration and testing.

## Hardware

The project is based on an STM32 development board which provides GPIO pins, timers, ADC inputs, and I2C communication. The DHT11 sensor reads temperature digitally. The water pump is switched by a MOSFET driver module controlled via GPIO/PWM. An LCD 16x2 screen shows system status over I2C. A buzzer provides audio alerts. A push button handles manual emergency stop and a potentiometer adjusts pump speed.

### Schematics

See schematic.svg

### Bill of Materials

| Device | Usage | Price |
|--------|-------|-------|
| STM32 Development Board | Main controller | 104 RON |
| DHT11 Temperature Sensor Module | Temperature monitoring | 15.55 RON |
| LCD 16x2 with I2C backpack | Status display | 23.22 RON |
| Mini Water Pump 3-6V | Water spraying | 13.31 RON |
| MOSFET IRF520 Module | Pump switching | 12.60 RON |
| Active Buzzer Module | Audio alarm | 7.42 RON |
| Push Button | Manual emergency stop | 6.36 RON |
| Potentiometer 10K | Pump speed adjustment | 8.31 RON |
| Breadboard 830 points | Prototyping | 10.00 RON |
| Jumper Wires Set | Connections | 10.00 RON |
| PVC Tube | Water output routing | 2.49 RON |
| Resistor Set | Pull-up / protection | 5.00 RON |
| Diode 1N4007 | Pump protection | 2.00 RON |
| **Total** | | **~220 RON** |

## Software

| Library | Description | Usage |
|---------|-------------|-------|
| [embassy-stm32](https://crates.io/crates/embassy-stm32) | Async HAL for STM32 | Peripheral drivers for GPIO, PWM, ADC, I2C |
| [embassy-executor](https://crates.io/crates/embassy-executor) | Async task executor | Runs concurrent tasks for sensor, LCD, buzzer, pump |
| [embassy-time](https://crates.io/crates/embassy-time) | Async timers and delays | Periodic temperature monitoring and scheduling |
| [embassy-sync](https://crates.io/crates/embassy-sync) | Channels and mutexes | Shares state between async tasks |
| [embedded-hal](https://crates.io/crates/embedded-hal) | Hardware abstraction traits | Generic peripheral interfaces |
| [hd44780-driver](https://crates.io/crates/hd44780-driver) | LCD driver for HD44780 | 16x2 display control over I2C |
| [cortex-m](https://crates.io/crates/cortex-m) | ARM Cortex-M support | Low level MCU support |
| [cortex-m-rt](https://crates.io/crates/cortex-m-rt) | Runtime support | Startup and interrupt vectors |
| [panic-halt](https://crates.io/crates/panic-halt) | Panic handler | Stops execution on panic |

## Links

1. [Embassy-rs async embedded framework](https://embassy.dev/)
2. [Rust Programming Language](https://www.rust-lang.org/)
3. [Embassy GitHub Repository](https://github.com/embassy-rs/embassy)
4. [STM32-rs HAL crates](https://github.com/stm32-rs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# RustInjector

RC car that can jump on desks and inject usbs into laptops.


**Author**: Carp Jianu-Novac-Mihail
**GitHub Project Link**:  [https://github.com/UPB-PMRust-Students/fils-project-2026-novacLearnsCyber](https://github.com/UPB-PMRust-Students/fils-project-2026-novacLearnsCyber)

## Description

An RC car controlled via Wi-Fi from a mobile phone, designed to jump approximately 75cm (average desk height) and land safely to perform a physical USB injection attack on a target laptop.The design may resemble a monster truck toy to "camouflage" better.


## Motivation

Initially, I wanted to build a cybersecurity-oriented project,because i am quiete pasionate of the subject, but I also wanted it to be flashy. My first ideas were a bizarre hardware token or a Wi-Fi IDS monitor, but they weren't exciting enough. Then I remembered the Jumper from Watch Dogs 2 and decided to build something inspired by it.
## Architecture

Add here the schematics with the architecture of your project. Make sure to include:

- what are the main components (architecture components, not hardware components)
- how they connect with each other

## Log

### Week 20 - 25 April
- ordered online 99% of all the components .I need to find a place that sells industrial springs strong enough to jump a 1 kg RC car into air
- brainstormed ideas for the jump mechanism
- a few roughs sketches on paper for now
### Week 5 - 11 May

### Week 12 - 18 May

### Week 19 - 25 May

## Hardware

SImple rc car, uses a simple hardware setup, keeping in mind the shocks it will suffer from jumping.
Control : Raspberry PI Pico W , while the ESP32-CAM provides live video
Jumping mech : high torque JGA25 motor compresses a steel spring , released by the MG996R servo latch.
Drive : 4x TT motors with custom 3D-printed tpu wheels for traction and shock absorption.
Power: Gens Ace LiPo Battery regulated by an XL4015 5A Buck converter to keep the servos and logic rails stable during the jumps.
Sensing: VL54L0X measuring altitude and MPU6059 monitors stability and landing orientation
Inject:MG90S servo deploys the usb.



### Schematics

Place your KiCAD or similar schematics here in SVG format.

### Bill of Materials

| Device | Usage | Price |
| -------------------------------------------------------------------------------------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------- |
| [Raspberry Pi Pico W](https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html) | The microcontroller | [35 RON](https://www.optimusdigital.ro/en/raspberry-pi-boards/12394-raspberry-pi-pico-w.html) |
| Dual Motor Driver L9110S | Driver for 4WD Drive Motors | 7.98 RON |
| SERVO MG996R (13kg) | Jumping Latch | 17.68 RON |
| ESP32-CAM + OV2640 | Video Streaming , Web Control Interface | 70.51 RON |
| Motor JGA25-370 20RPM | Jumping Mechanism Motor (High Torque) | 107.00 RON |
| 4x TT Motors + Wheels | 4WD Locomotion System | 31.86 RON |
| SERVO MG90S Metal | USB Injection Arm Actuator | 27.43 RON |
| XL4015 Step-Down 5A | 5V Power Regulation for Servos & Logic | 14.13 RON |
| L298N Motor Driver | High-Current Driver for Jump Motor | 15.00 RON |
| MPU6050 IMU | Gyroscope & Accelerometer | 14.68 RON |
| VL53L0X ToF Sensor | Laser Distance Measurement | 25.11 RON |
| Gens Ace LiPo Battery | Main Power Source | |
| IMAX B3 Charger | LiPo Battery Balancing Charger | 40.00 RON |
| Heavy-Duty Spring | Energy Storage for 1.20m Jump | 20.00 RON |
| PCB Prototype Kit | Custom Circuit Boards for Power Hub | 28.31 RON |



## Software

| Library | Description | Usage |
| ---------- | --------------------------------- | --------------------------------------------------------------------------- |
| cyw43 | Driver for the Pico W WiFi chip | Used to handle the wireless connection and the web control interface. |
| embassy-rs | async framework for Rust embedded | The main framework for task management |
| mpu6050 | MPU6050 IMU driver | Used to read gyroscope and accelerometer data for landing stability. |
| serde | Data serialization | Used to parse commands sent from the phone to ESP32-CAM via JSON or binary. |

## Links

1. [Jumper in game](https://www.youtube.com/watch?v=xSfsmZ3VV_s)
2. [Jumping mechanism inspiration](https://www.youtube.com/watch?v=RuMLHJW1teM) ...
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading