This shows you the differences between two versions of the page.
|
pm:prj2025:iivasciuc:bogdan.ciocea [2025/05/18 15:03] bogdan.ciocea [Hardware Design] |
pm:prj2025:iivasciuc:bogdan.ciocea [2025/05/21 19:51] (current) bogdan.ciocea [Software Design] |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| Designed by Ciocea Bogdan-Andrei, 333CA, May 2025 \\ | Designed by Ciocea Bogdan-Andrei, 333CA, May 2025 \\ | ||
| Contact: bogdan.ciocea@stud.acs.upb.ro \\ | Contact: bogdan.ciocea@stud.acs.upb.ro \\ | ||
| - | Github: [[https://github.com/BogdanCiocea | BogdanCiocea]] | + | Github: [[https://github.com/BogdanCiocea/C4T3-LU | BogdanCiocea]] |
| ===== Introduction ===== | ===== Introduction ===== | ||
| === Product description === | === Product description === | ||
| Line 31: | Line 31: | ||
| ===== General description ===== | ===== General description ===== | ||
| - | {{pm:prj2025:iivasciuc:bogdan.ciocea:schema_c4t3lu1.jpg?600}} | ||
| - | {{pm:prj2025:iivasciuc:bogdan.ciocea:schema_c4t3lu2.png?600}} | ||
| - | {{pm:prj2025:iivasciuc:bogdan.ciocea:diagram_bomb.png?600}} | ||
| - | |||
| The **hand controller** includes the following components: | The **hand controller** includes the following components: | ||
| * [[https://www.optimusdigital.ro/ro/shield-uri-pentru-arduino/274-shiel-pentru-arduino-cu-lcd-si-tastatura-.html|LCD 1602 shield]] – displays the current action sent to the robot and provides GPIO input via buttons. | * [[https://www.optimusdigital.ro/ro/shield-uri-pentru-arduino/274-shiel-pentru-arduino-cu-lcd-si-tastatura-.html|LCD 1602 shield]] – displays the current action sent to the robot and provides GPIO input via buttons. | ||
| Line 41: | Line 37: | ||
| * [[https://ro.mouser.com/ProductDetail/Seeed-Studio/101020054?qs=1%252B9yuXKSi8BEO0W3MQ6BNA%3D%3D|Grove 3-Axis Digital Accelerometer]] - communicates via I2C to detect angle rotation | * [[https://ro.mouser.com/ProductDetail/Seeed-Studio/101020054?qs=1%252B9yuXKSi8BEO0W3MQ6BNA%3D%3D|Grove 3-Axis Digital Accelerometer]] - communicates via I2C to detect angle rotation | ||
| * [[https://www.robotshop.com/products/i-o-grove-base-shield-arduino|I/O Grove Base Shield ]] – manages connections to all hardware components. | * [[https://www.robotshop.com/products/i-o-grove-base-shield-arduino|I/O Grove Base Shield ]] – manages connections to all hardware components. | ||
| + | {{pm:prj2025:iivasciuc:bogdan.ciocea:schema_c4t3lu1.jpg?600}} | ||
| The **robot** includes the following components: | The **robot** includes the following components: | ||
| Line 48: | Line 45: | ||
| * [[https://sigmanortec.ro/placa-dezvoltare-esp32-cam-wifi-bluetooth-ov2640-2mp|Support for ESP32 camera module]] - can be used independently for **WiFi video streaming** or interfaced via UART/SPI if needed. | * [[https://sigmanortec.ro/placa-dezvoltare-esp32-cam-wifi-bluetooth-ov2640-2mp|Support for ESP32 camera module]] - can be used independently for **WiFi video streaming** or interfaced via UART/SPI if needed. | ||
| * [[https://www.optimusdigital.ro/en/ultrasonic-sensors/9-hc-sr04-ultrasonic-sensor.html|HC-SR04 Ultrasonic Sensor]] - obstacle detection using **digital I/O** pins (trigger and echo). | * [[https://www.optimusdigital.ro/en/ultrasonic-sensors/9-hc-sr04-ultrasonic-sensor.html|HC-SR04 Ultrasonic Sensor]] - obstacle detection using **digital I/O** pins (trigger and echo). | ||
| + | {{pm:prj2025:iivasciuc:bogdan.ciocea:schema_c4t3lu2.png?600}} | ||
| The **bomb** includes the following components: | The **bomb** includes the following components: | ||
| * [[https://www.optimusdigital.ro/en/buzzers/635-3v-active-buzzer.html| Buzzer]] - a buzzer which connects to a digital port | * [[https://www.optimusdigital.ro/en/buzzers/635-3v-active-buzzer.html| Buzzer]] - a buzzer which connects to a digital port | ||
| * [[https://sigmanortec.ro/en/led-5mm-red | Led]] - a led which will light up to show it's active | * [[https://sigmanortec.ro/en/led-5mm-red | Led]] - a led which will light up to show it's active | ||
| - | ===== Hardware Design ===== | + | {{pm:prj2025:iivasciuc:bogdan.ciocea:diagram_bomb.png?600}} |
| - | <note tip> | + | |
| - | Aici puneţi tot ce ţine de hardware design: | + | ===== Hardware Design ===== |
| - | * listă de piese | + | |
| - | * scheme electrice (se pot lua şi de pe Internet şi din datasheet-uri, e.g. http://www.captain.at/electronic-atmega16-mmc-schematic.png) | + | |
| - | * diagrame de semnal | + | |
| - | * rezultatele simulării | + | |
| - | </note> | + | |
| List of components: | List of components: | ||
| Line 88: | Line 80: | ||
| * [[https://www.optimusdigital.ro/en/ultrasonic-sensors/9-hc-sr04-ultrasonic-sensor.html|HC-SR04 Ultrasonic Sensor]] | * [[https://www.optimusdigital.ro/en/ultrasonic-sensors/9-hc-sr04-ultrasonic-sensor.html|HC-SR04 Ultrasonic Sensor]] | ||
| {{pm:prj2025:iivasciuc:bogdan.ciocea:ultrasonic.png?600}} | {{pm:prj2025:iivasciuc:bogdan.ciocea:ultrasonic.png?600}} | ||
| + | * [[https://www.optimusdigital.ro/en/buzzers/635-3v-active-buzzer.html | Buzzer]] | ||
| + | {{pm:prj2025:iivasciuc:bogdan.ciocea:buzzer.png?600}} | ||
| + | * [[https://sigmanortec.ro/en/led-5mm-red | Led]] | ||
| + | {{pm:prj2025:iivasciuc:bogdan.ciocea:led.png?600}} | ||
| + | |||
| Line 113: | Line 110: | ||
| ===== Software Design ===== | ===== Software Design ===== | ||
| + | The code was written in ArduinoIDE. | ||
| + | I used these libraries: | ||
| + | * [[https://github.com/arduino-libraries/Arduino_SensorKit/|Arduino_SensorKit]] - for communicating with the controller accelerometer | ||
| + | * [[https://github.com/arduino-libraries/LiquidCrystal|LiquidCrystal]] - for showing on a 16x02 display the commands | ||
| + | * [[https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi|ESP8266WiFi]] - to know the MAC address of the boards | ||
| + | * [[https://github.com/henriberisha/EasyEspNow|espnow]] - for communicating with the boards | ||
| + | * [[https://github.com/jrullan/neotimer | neotimer]] - a non blocking timer for not using standard delays | ||
| - | <note tip> | + | The software consists of 6 source files — two for each board (ESP8266 and ATmega328P on controller, robot and bomb). |
| - | Descrierea codului aplicaţiei (firmware): | + | |
| - | * mediu de dezvoltare (if any) (e.g. AVR Studio, CodeVisionAVR) | + | |
| - | * librării şi surse 3rd-party (e.g. Procyon AVRlib) | + | |
| - | * algoritmi şi structuri pe care plănuiţi să le implementaţi | + | |
| - | * (etapa 3) surse şi funcţii implementate | + | |
| - | </note> | + | |
| - | + | ||
| - | The software consists of 4 source files — two for each board (ESP8266 and ATmega328P on both controller and robot sides). | + | |
| === 🧤 Hand Controller == | === 🧤 Hand Controller == | ||
| - | The **hand controller** acts as a **client**. It reads user input from buttons or an accelerometer and sends commands to the robot over ESPNOW. | + | The **hand controller** acts as a **master**. It reads user input from buttons or an accelerometer and sends commands to the robot over ESPNOW. |
| The board used combines two microcontrollers: | The board used combines two microcontrollers: | ||
| Line 132: | Line 128: | ||
| * **ESP8266** – communication by sending commands using ESPNOW to the robot. | * **ESP8266** – communication by sending commands using ESPNOW to the robot. | ||
| - | The `LCD shield` is used as both a display and a keyboard (for entering IP addresses when switching between multiple target devices). | + | The `LCD shield` is used as a display to show the user which command is transmitted. |
| - | The ATmega328P sends user input as a **command string** to the ESP8266, which then formats and transmits the command as an HTTP `GET` request to the robot server. | + | The ATmega328P sends user input as a **command string** to the ESP8266, which then formats and transmits the command to the slaves (robot and bomb). |
| The hand controller also can activate the bomb when the arm is controlling and the **SELECT** button is pressed. | The hand controller also can activate the bomb when the arm is controlling and the **SELECT** button is pressed. | ||
| - | == 🤖 Robot == | + | === 🤖 Robot === |
| - | The **robot** acts as a **server**, waiting for incoming requests from the hand controller. | + | The **robot** acts as a **slave**, waiting for incoming requests from the hand controller. |
| On receiving a command: | On receiving a command: | ||
| Line 146: | Line 142: | ||
| * It forwards this string via **USART** to the **ATmega328P**. | * It forwards this string via **USART** to the **ATmega328P**. | ||
| * The **ATmega328P** interprets the command and activates the motors accordingly (via PWM and digital I/O signals). | * The **ATmega328P** interprets the command and activates the motors accordingly (via PWM and digital I/O signals). | ||
| + | |||
| + | |||
| + | === 💣 Bomb === | ||
| + | |||
| + | The **bomb** acts also as a **slave**. | ||
| + | |||
| + | On receiving a command: | ||
| + | * The **ESP8266** extracts the command string. | ||
| + | * It forwards this string via **USART** to the **ATmega328P**. | ||
| + | * The **ATmega328P** interprets the command and activates the bomb. | ||
| + | * The bomb cannot be deactivated for obvious reasons. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| ===== Rezultate Obţinute ===== | ===== Rezultate Obţinute ===== | ||