# FAB Academy 2026 - Daniel Peña Cruz

The following folders contain all the files created for the development of my FAB Academy 2026 final project: *Otto, the AI-powered Social Robot*. 

## Table of Contents
- [Software Requirements](#Software-Requirements)
- [Hardware Requirements](#Hardware-Requirements)
- [Files](#Files)
	- [Electronics](#Electronics)
	- [Mechanics](#Mechanics)
	- [Programming](#Programming)
	- [Others](#Others)
- [License](#License)	 
---
# Software Requirements
> Note: The following requirements are for a Unix based OS (Linux, OpenSUSE). Software names/installation may differ with other OS (Windows, MacOS).
- Python 3.x 
- OpenCV (python3-opencv, system level installation) 
- Piper TTS - PipeWire 1.4.2 
- Arduino IDE / arduino-cli 
- GStreamer (libcamerasrc pipeline)
---
# Hardware Requirements
- Seeed Studio Xiao ESP32C3 + Antenna.
- Seeed Studio Xiao ESP32S3 + Camera Module (OV5640) + Antenna.
- Raspberry Pi 5 (8GB, 256GB SSD).
- NEMA Stepper Motor.
- BOM components.

# Files

## Mechanics

> Note: There are no .stl files on this folder. This is to reduce the overall the folder’s size. Generating the .stl files from
> the .scad files requires the "BOSL2" library on your OpenSCAD installation. Please follow the [BOSL2 Official
> Documentation Page](https://github.com/BelfrySCAD/BOSL2) for a complete instalation guide.

### Folder Structure
```
OpenSCAD Files/
|--- Base/
			|--- baseExtension.scad
			|--- connectionPieces.scad
			|--- planetaryGearBase.scad
			|--- planetaryGearCarrier.scad
			|--- planetaryGearPlantes.scad
			|--- planetaryGearSolar.scad
			|--- planeatryGearSystem.scad
|--- Body
			|--- bodyBase.scad
			|--- mainBody.scad
			|--- RPIiMountingPlate.stl
			|--- tentacles.scad
			|--- xiaosupport.stl
```

### Files Descriptions
|File | Description|
|-----|------------|
|baseExtension.scad | Extension piece for the Rotating Base. Solved a problem with the change of stepper motor’s shaft length. |
connectionPieces.scad | Connection pieces designed to fix the Rotating Base to the a new MDF base, using screws |
planetaryGear(Base, Carrier, Planets, Solar, System).scad | Design files for the Rotating Base planetary gear system. |
---
## Electronics

### Folder Structure

```
finalProjectPCB/
|--- finalProjectPCB.kicad_pcb
|--- finalProjectPCB.kicad_pro
|--- finalProjectPCB.kicad_sch
BOM.csv
```

## Files Descriptions
| File | Description |
|--- |--- |
| finalProjectPCB.kicad_pcb | KiCAD PCB file. |
| finalProjectPCB.kicad_sch | KiCAD Schematic file. |
| finalProjectPCB.kicad_pro | KiCAD Project file. |
| BOM.csv | PCB’s Bill of Materials (generated from KiCAD). |
---
## Programming

### Folder Structure
```
ESP32C3/
|--- base_movement/
			|--- base_movement.ino

Xiao Sense/
|--- ESP32WebCam/
			|--- xiaoSenseWebCam.ino
			|--- *supporting files
			
Raspberry Pi 5/
			|--- ai.py
			|--- main.py
			|--- tracking.py
			|--- udp_worker.py
			|--- models/
						|--- en_GB-semaine-medium.onnx
						|--- en_GB-semaine-medium.onnx.json
			|--- tools/
						|--- speech_to_text.py
						|--- text_to_speech.py
			|--- requirements.txt
```
### Files Description
| Files | Description |
|--- | ---|
| main.py | Main script. Encapsulates the AI, tracking, STT y TTS scripts. |
| ai.py | Manages the Ollama model and prompt processing. |
| tracking.py | Manages the person tracking functionality, using MediaPipe and OpenCV. Connects to the Xiao Sense for video input and to the ESP32C3 through UDP. |
| upd_worker.py | Manages the UDP protocol and its functions. |
| speech_to_text.py | Speech to Text script. |
| text_to_speech.py | Text to Speech script. |
| en_GB-semaine-medium.(onnx, onnx.json) | Voice model for Piper TTS. |

### Use
1. Download the source code.
2. Create a python venv by running `python3 -m venv .venv` in the terminal.
3. Activate the python venv by running `source .venv/bin/activate` (for MacOS/Linux) or `.\.venv\Scripts\activate` (for windows) in the terminal.
4. Install the project’s requirements by running `pip install -r requirements.txt` in the terminal.
5. Run the script with `python main.py` for just a text output or `python main.py --voice` to enable STT.

---
## Others

### Files Description
| File | Description |
| --- | --- |
| ottoFace.png | Otto’s face (for vinyl cutting). |
| ottoNametag.png | Otto’s name tag (for vinyl cutting). |
| vinylLining.png | Circle shaped lining for the MDF base. |
---
# License 
This project is protected under the Creatives Commons’ License  [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/).

[![License: CC BY-NC-SA 4.0](https://licensebuttons.net/l/by-nc-sa/4.0/88x31.png)](https://creativecommons.org/licenses/by-nc-sa/4.0/)`
