# Driverless Kart Documentation - Complete Content
This document contains the complete documentation for the autonomous KART project by Ü Motorsport Formula Student team.
---
## Home
## General Description
This project equips a standard competition kart with autonomous capabilities by integrating perception, control, and actuation systems. It serves as a modular platform for rapid development and testing of driverless technologies in outdoor environments.
## Motivation
In Driverless, our objective is to enable a single-seater vehicle to autonomously navigate a circuit delimited by cones.
Until now, teachers and researchers lacked a practical outdoor testbed for their algorithms. This year, Henakart donated a kart chassis, which we're converting to electric and equipping with autonomous systems. It's simpler and safer than the Formula car, making it ideal for early development and testing.
→ **[Learn more about Formula Student Driverless and our project](about.md)**
## Objectives
- Build a modular testbed for autonomous driving components (perception, planning, control).
- Enable outdoor algorithm validation for students, teachers, and researchers.
- Reuse and adapt developed components for the single-seater Formula vehicle.
- Maintain manual drive capability for supervised operation and data collection.
We are currently migrating from a Python-based stack to a ROS-based architecture to ensure compatibility with more complex vehicle platforms.
## Current Status (2025-06-18)
- The kart is fully operational in manual mode.
- Actuation systems for steering and braking are ordered.
- An emergency brake and telemetry system are in development.
- The camera used for cone detection is mounted.
- Work is ongoing to improve cone detection accuracy and software speed.
## Regulatory Requirements and Limitations
This prototype is not intended to compete, so no specific racing regulations apply. Development follows general safety and engineering standards, and deviations are documented. Manual driving must be preserved. Standard kart components are preferred; custom parts are used only when justified.
---
## About
## What is Formula Student Driverless?
Formula Student Driverless (FSD) is a category within the Formula Student competition where teams must develop a vehicle capable of driving **autonomously**, using only sensors, algorithms, and automatic control—without a driver.
### Competition Characteristics
The circuit is delimited by **cones** that define the track boundaries. Teams don't know the circuit layout in advance, so the vehicle must:
- **Detect the cones** using perception systems
- **Infer track boundaries** from sensory information
- **Plan a safe trajectory** that optimizes speed and stability
- **Execute maneuvers** (acceleration, braking, turns) without human intervention
### Competition Tests
Tests include autonomous versions of classic Formula Student disciplines:
- **Acceleration**: Maximum speed straight line
- **Skid-pad**: Figure-8 track to evaluate lateral handling
- **Autocross**: One complete lap on the unknown circuit
- **Trackdrive**: Multiple laps following the track consistently
### Technical Challenges
Developing a Driverless vehicle involves solving multiple engineering challenges:
**Perception**
- Cone detection and classification (blue, yellow, orange)
- Environment segmentation and noise filtering
- Multi-sensor data fusion
**Localization and Estimation**
- Vehicle state estimation (position, velocity, orientation)
- Real-time local map construction
- Correction using inertial sensors (IMU) and other systems
**Trajectory Planning**
- Generation of viable paths within detected boundaries
- Optimization considering vehicle dynamics
- Real-time adaptation to obstacles or incorrect detections
**Control and Actuation**
- Longitudinal control (throttle/braking)
- Lateral control (steering)
- System coordination to follow the planned trajectory
**Safety**
- Emergency stop systems
- Sensor and software integrity validation
- Redundancies and fail-safes
### Technologies Employed
Teams typically use a combination of:
- **Sensors**: Cameras, LIDAR, inertial sensors (IMU), GNSS/INS
- **Software**: Robotics frameworks (ROS), computer vision, SLAM algorithms
- **Actuators**: Steer-by-wire systems, brake-by-wire, electronic throttle control
---
## What Our Driverless Section Does
The Driverless section of U-Motorsport URJC is responsible for designing and implementing the complete autonomous driving system. Our goal is to develop these systems on the **kart as a testing platform** and subsequently integrate them into the **main competition single-seater**.
### 1. Perception and Sensing
**Objective**: Detect the environment and extract relevant information for navigation.
- Cone and track boundary detection using **cameras** and image processing (computer vision)
- Use of **inertial sensors (IMU)** to estimate orientation, accelerations, and vehicle attitude
- **Sensor data fusion** for robustness against noise or individual sensor failures
### 2. Localization and State Estimation
**Objective**: Know where the vehicle is and how it's moving.
- Estimation of **relative position** within the track (where each track boundary is)
- **Dynamic local map registration** without relying on a prior map (SLAM)
- **Sensor correction** to maintain precision over time
### 3. Trajectory Planning
**Objective**: Decide where the vehicle should drive.
- Generation of a **viable path** within detected boundaries
- Optimization of parameters like **minimum curvature, smoothness, and safety**
- **Real-time adaptation** to obstacles or poorly detected cones
### 4. Control and Actuation
**Objective**: Make the vehicle follow the planned trajectory.
**Longitudinal control**
- Throttle and braking management to reach and maintain target speed
- Response to track changes (braking before curves, acceleration on straights)
**Lateral control**
- Turn execution to follow optimal trajectory
- Compensation for slipping and disturbances
**Physical actuators**
- **Motorized steering** system (steer-by-wire)
- **Emergency braking** system
- Electronic throttle control
### 5. Safety and Redundancies
**Objective**: Ensure safe operation at all times.
- **Emergency braking** mechanism (brake fail-safe) to stop the vehicle if automatic decisions fail
- **Integrity validations** of sensors and software
- **Real-time monitoring** systems
- **Telemetry** for post-execution analysis
### 6. Hardware-Software Integration and Physical Testing
**Objective**: Validate the entire system under real conditions.
- Adaptation of **electronic architecture** to the real vehicle
- **Testing and calibration** on the kart as a testing platform
- Real circuit test iterations:
- Cone tracks on campus
- Slalom courses
- Unknown curves
- Increasing speed tests
---
## Previous Season (2024-2025)
During the previous season, the Driverless section laid the groundwork for the project:
### Software Development in Simulation
- **Complete Python prototype** for autonomous driving
- Development and validation **entirely in simulation**
- Testing of perception, planning, and control algorithms in virtual environment
### Physical Architecture Design
- Initial **mechanical architecture** design for automatic steering
- **Electronic system** planning (sensors, actuators, computation)
- Specification of braking and sensing components
### Virtual Validation
- **Tests in simulated environments** with different track configurations
- **Algorithm adjustments** based on simulation metrics
- Development of visualization and debugging tools
---
## Improvements and Advances This Season (2025-2026)
This season we've made a significant qualitative leap, moving from simulation to real implementation:
### 1. Migration to ROS (Robot Operating System)
**Why ROS:**
- **Mature ecosystem** with proven libraries for mobile robotics
- **Modularity**: Clear separation between perception, planning, control
- **Development tools**: RViz, rqt, rosbag for visualization and debugging
- **Compatibility** with future more complex systems on the single-seater
- **Active community** and extensive documentation
**Impact:**
- Complete migration from monolithic Python stack to **ROS node-based architecture**
- Better integration with commercial sensors and actuators
- Facilitates collaboration between different team subsystems
### 2. Introduction of the Real Kart (HenaKart)
**Testing platform advantages:**
- **Physical validation** of all subsystems before integrating on the single-seater
- **Real environment** without compromising the competition vehicle
- **Rapid iterations**: Simpler and safer than testing directly on the Formula car
- **Outdoor testbed** for perception and control algorithms
- **Educational platform** for students, professors, and researchers
**Addressing a Critical Need:**
Several professors from the Robotics department expressed the **need for an outdoor mobile robot platform** where they could test and validate their algorithms. Until now, autonomous navigation software and robotic experiments were limited to indoor environments.
This kart project solves two problems simultaneously:
1. Provides a testbed for Driverless technology development
2. Offers researchers an outdoor platform that can navigate the university campus
**Current status:**
- Kart fully operational in **manual mode**
- Actuation systems for **steering and braking ordered**
- Cone detection camera **mounted and functional**
### 3. Motorized Steering System (Steer-by-Wire)
**Functionality:**
- Allows the kart to **turn based on autonomous controller decisions**
- Integration with lateral control system in the ROS stack
- **Preservation of manual mode** for supervised operation
**Development:**
- Finalization of mechanical and electronic design
- Selection of actuators with adequate torque and speed
- Implementation of control interface from ROS
### 4. Emergency Braking System
**Purpose:**
- **Critical safety subsystem** to stop the vehicle in case of failure
- Automatic activation when:
- Loss of communication with control system
- Detection of dangerous conditions
- Operator emergency commands
**Characteristics:**
- System **independent** from main control
- **Redundancies** to ensure reliable activation
- Integration with telemetry for event logging
### 5. Perception Optimization without LIDAR
**Technical decision:**
- Operation **using only cameras and IMU**
- **Reduction of cost, weight, and complexity**
- Greater technical challenge, but more aligned with available resources
**Implemented improvements:**
- **Optimized cone detection** algorithms for higher precision
- **Reduced latency** in image processing
- **Improved camera calibration** for different lighting conditions
- **Robust filtering** to eliminate false positives
### 6. Improved Planning and Control Algorithms
**Approach:**
- Designed for **unknown tracks** delimited by cones
- **Minimized latency** for real-time response
- **Robustness** to imperfect or missing detections
**Advances:**
- Implementation of **adaptive controllers** that adjust parameters according to conditions
- **Predictive models** to anticipate vehicle behavior
- **Continuous validation** with real kart data
---
## Project Final Objectives
### Short Term (This Season)
1. **Functional autonomous kart** capable of:
- Detecting cones with high precision
- Navigating simple tracks autonomously
- Executing emergency braking reliably
2. **ROS architecture validation** for migration to the single-seater
3. **Real data collection** to train and improve algorithms
### Medium Term
1. **Technology transfer** from kart to Formula Student single-seater
2. **Participation in competitions** of Formula Student Driverless
3. **Research platform** available for:
- Students developing bachelor's/master's theses
- Professors testing algorithms
- Researchers validating new techniques
### Long Term
1. **Robust development ecosystem** documented for future team generations
2. **Open-source contributions** to the mobile robotics and autonomous vehicle community
3. **Academic and industrial collaborations** based on the developed platform
---
*For more detailed technical information, see the [Assembly](assembly/index.md), [Software](software/index.md), and [BOM](bom/index.md) sections.*
---
## BOM
## Overview
This page provides a comprehensive list of all components required to build the driverless kart. Component data is now stored in YAML files within each assembly folder, following the project structure.
!!! info "New BOM Management System"
Components are now managed via separate YAML files in each assembly folder. The folder structure represents the BOM tree itself, eliminating synchronization issues.
## How to Add Components to BOM
Adding a new component is simple:
1. **Find the right folder** - Navigate to the appropriate assembly folder (e.g., `docs/assembly/steering/`)
2. **Edit the bom.yaml file** - Open the `bom.yaml` file in that folder
3. **Add your component** - Copy an existing component entry and modify it with your new component's details
4. **Include key information**:
- `id`: unique identifier (e.g., "motor_controller_v2")
- `part_number`: manufacturer part number
- `description`: what it is
- `quantity`: how many needed
- `unit_cost`: price per unit
- `suppliers`: where to buy it (name, url)
That's it! The component will automatically appear in BOM reports.
## BOM Structure
The BOM is organized by assembly with YAML files containing detailed component specifications:
```
docs/assembly/
├── powertrain/
│ ├── bom.yaml # Motor, throttle pedal
│ ├── transmission/bom.yaml # Chain, sprockets
│ └── fasteners/bom.yaml # All powertrain fasteners
├── steering/
│ ├── bom.yaml # H-bridge, motor, sensor, coupling
│ └── fasteners/bom.yaml # All steering fasteners
├── electronics/
│ ├── bom.yaml # Orin, ESP32, DAC, level shifter
│ └── power/bom.yaml # Battery cells, BMS, auxiliary battery
└── sensors/bom.yaml # ZED2 camera, YOLOv5 models
```
## Assembly Overview
### 🔧 Powertrain Assembly
**Components**: Motor, transmission system, throttle control
- **Main Components**: [Powertrain BOM](../assembly/powertrain/bom.yaml)
- **Transmission**: [Transmission BOM](../assembly/powertrain/transmission/bom.yaml)
- **Fasteners**: [Powertrain Fasteners BOM](../assembly/powertrain/fasteners/bom.yaml)
- **Documentation**: [Powertrain Assembly](../assembly/powertrain/index.md)
**Key Components:**
- Kunray MY1020 3000W motor (€150.00)
- IRIS 219 chain and sprocket system (€40.00)
- Hall effect throttle pedal (€2.46)
### 🎮 Steering Assembly
**Components**: Motor, sensor, H-bridge, coupling
- **Main Components**: [Steering BOM](../assembly/steering/bom.yaml)
- **Fasteners**: [Steering Fasteners BOM](../assembly/steering/fasteners/bom.yaml)
- **Documentation**: [Steering Assembly](../assembly/steering/index.md)
**Key Components:**
- Cytron MD30C H-bridge (€45.00)
- AS5600 magnetic angle sensor (€2.00)
- 24V DC steering motor (€80.00)
### 💻 Electronics Assembly
**Components**: Computing, control, communication
- **Main Components**: [Electronics BOM](../assembly/electronics/bom.yaml)
- **Documentation**: [Electronics Assembly](../assembly/electronics/microcontroller.md)
**Key Components:**
- NVIDIA Jetson AGX Orin (€1500.00)
- ESP32 WROOM-32 microcontroller (€3.50)
- Custom Orin adapter board (€25.00)
### ⚡ Power Assembly
**Components**: Main battery pack, BMS, auxiliary power
- **Main Components**: [Power BOM](../assembly/electronics/power/bom.yaml)
- **Documentation**: [Power Assembly](../assembly/electronics/power/battery.md)
**Key Components:**
- 52x Molicel P42A cells in 13S4P (€234.00)
- Jiabaida Smart BMS 100A (€85.00)
- 12V auxiliary battery (€60.00)
### 📷 Sensors Assembly
**Components**: Vision system, AI models
- **Main Components**: [Sensors BOM](../assembly/sensors/bom.yaml)
- **Documentation**: [Sensors Assembly](../assembly/sensors/camera.md)
**Key Components:**
- Stereolabs ZED2 stereo camera (€450.00)
- Custom YOLOv5 cone detection model
## Estimated Project Costs
| Assembly | Estimated Cost | Key Items |
|----------|----------------|-----------|
| **Powertrain** | **€195** | Motor (€150), transmission (€40), fasteners (€5) |
| **Steering** | **€135** | H-bridge (€45), motor (€80), sensor (€2), fasteners (€8) |
| **Electronics** | **€1530** | Orin computer (€1500), ESP32 (€4), adapter (€25) |
| **Power** | **€380** | Li-ion cells (€234), BMS (€85), 12V battery (€60) |
| **Sensors** | **€450** | ZED2 camera (€450) |
| **Total** | **€2690** | *Excludes chassis, wiring, mechanical hardware* |
!!! warning "Cost Estimates"
Prices are approximate and subject to change. Always verify current pricing from suppliers.
## Component Status
### ✅ Active Components
Currently used and functional in the kart.
### ⚠️ Needs Replacement
Known to be damaged or worn:
- 219 aluminum rear sprocket (damaged from incompatible chain use)
### 🔧 Custom Components
Require fabrication:
- Custom 219 front sprocket (laser cut for 10mm shaft)
- Orin adapter board (EasyEDA design available)
- Battery pack assembly (professional assembly recommended)
## Supplier Information
### Primary Suppliers
- **Electronics**: Mouser, Digi-Key, Adafruit
- **Karting Parts**: KPS Racing
- **Batteries**: Authorized Molicel distributors
- **Vision Systems**: Stereolabs
- **General Components**: AliExpress, Amazon (for non-critical parts)
### Quality Guidelines
- ✅ Use official distributors for critical electronic components
- ✅ Verify specifications before ordering
- ⚠️ AliExpress/Amazon acceptable for mechanical parts and sensors
- ❌ Avoid counterfeit components for safety-critical systems
## Assembly Priority
1. **Power System** - Battery pack, BMS, charging setup
2. **Core Electronics** - Orin computer, ESP32 microcontroller
3. **Sensors** - ZED2 camera, angle sensors
4. **Propulsion** - Motor, controller, transmission
5. **Steering** - Motor, H-bridge, coupling
6. **Integration** - Wiring, mounting, calibration
## Working with YAML BOM Files
### Adding New Components
1. Locate the appropriate assembly folder
2. Edit the `bom.yaml` file
3. Follow the existing structure for consistency
4. Include all required fields: id, part_number, description, quantity, cost, suppliers
### YAML File Structure
```yaml
assembly: "assembly_name"
description: "Assembly description"
components:
- id: "unique_component_id"
part_number: "MANUFACTURER-PART-NUMBER"
description: "Component description"
quantity: 1
unit_cost: 0.00
currency: "EUR"
status: "active"
criticality: "essential"
suppliers:
- name: "Supplier Name"
url: "https://supplier.com/product"
verified: true
specifications:
key: "value"
notes: "Additional information"
```
### Future Automation
A BOM aggregation script is planned to automatically generate:
- Complete cost summaries
- Supplier contact lists
- Component status reports
- Assembly checklists
---
*This BOM system reflects the complete restructure from hardware-based to assembly-based organization, with component data stored in YAML files following the project's folder structure.*
---
## Tools
## Overview
This section catalogs all tools and equipment used for kart assembly, maintenance, and debugging.
!!! info "Tool Management"
Tools are tracked in the [`tools.yaml`](tools.yaml) file with status, location, and calibration information.
## Quick Reference
### Essential Tools for Assembly
**Hand Tools:**
- Torque wrench (0-30 Nm) - Required for critical fasteners
- Metric hex key set (1.5-10mm)
- Precision screwdriver set
**Electronics Tools:**
- Digital multimeter
- Soldering station
- Wire stripper/crimper
**Measurement Tools:**
- Digital caliper (0-150mm)
- Tape measure
## Tool Categories
### 🔧 Hand Tools
Basic mechanical tools for assembly and maintenance.
| Tool | Location | Status | Notes |
|------|----------|--------|-------|
| Torque Wrench (0-30 Nm) | Tool Cabinet A | Available | Required for powertrain |
| Metric Hex Key Set | Tool Cabinet A | Available | 1.5-10mm range |
| Precision Screwdriver Set | Tool Cabinet A | Available | For electronics |
### ⚡ Electronics Tools
Specialized tools for electrical work and debugging.
| Tool | Location | Status | Notes |
|------|----------|--------|-------|
| Digital Multimeter | Electronics Bench | Available | Voltage, current, resistance |
| Soldering Station | Electronics Bench | Available | 60W, temp controlled |
| Wire Stripper/Crimper | Electronics Bench | Available | 10-24 AWG |
| USB-CAN Adapter | Electronics Bench | Available | For CAN bus diagnostics |
### 🔨 Power Tools
Power tools for drilling, cutting, and grinding.
| Tool | Location | Status | Safety Requirements |
|------|----------|--------|---------------------|
| Cordless Drill (18V) | Tool Cabinet B | Available | Safety glasses |
| Angle Grinder (115mm) | Tool Cabinet B | Available | **Training required, PPE** |
!!! warning "Power Tool Safety"
Power tools require proper training before first use. Always wear appropriate PPE:
- Safety glasses (mandatory)
- Gloves
- Hearing protection (for angle grinder)
### 📏 Measuring Tools
Precision measurement equipment.
| Tool | Location | Accuracy | Calibration Status |
|------|----------|----------|-------------------|
| Digital Caliper | Tool Cabinet A | ±0.02mm | Needs yearly calibration |
| Tape Measure (5m) | Tool Cabinet A | N/A | No calibration needed |
### 🔬 Specialized Equipment
Advanced diagnostic and charging equipment.
| Equipment | Location | Purpose |
|-----------|----------|---------|
| Smart Battery Charger | Battery Station | 12V/24V charging |
| USB-CAN Adapter | Electronics Bench | CAN bus diagnostics |
## Calibration Schedule
Tools requiring periodic calibration:
| Tool | Frequency | Last Calibrated | Next Due |
|------|-----------|-----------------|----------|
| Torque Wrench (0-30 Nm) | Yearly | TBD | TBD |
| Digital Multimeter | Yearly | TBD | TBD |
| Digital Caliper | Yearly | TBD | TBD |
!!! note "Calibration Tracking"
Update calibration dates in [`tools.yaml`](tools.yaml) after each calibration service.
## Maintenance Schedule
### Weekly
- ✓ Check torque wrench calibration sticker
- ✓ Inspect power tool batteries
- ✓ Clean soldering iron tip
### Monthly
- ✓ Organize tool cabinets
- ✓ Verify all tools present
- ✓ Lubricate moving parts on hand tools
### Yearly
- ✓ Calibrate precision tools (torque wrench, multimeter, caliper)
- ✓ Replace soldering iron tips
- ✓ Service power tools
## Safety Guidelines
!!! danger "Safety First"
**Always follow these safety rules:**
- Wear appropriate PPE (safety glasses mandatory)
- Ensure workspace is well-ventilated when soldering
- Keep power tools unplugged when changing accessories
- Never bypass safety guards on power tools
- Store tools properly after use
- Report damaged or malfunctioning tools immediately
- Complete training before using power tools
## Tool Locations
**Tool Cabinet A** (Hand Tools & Measurement)
- Torque wrench
- Hex key set
- Screwdriver set
- Digital caliper
- Tape measure
**Tool Cabinet B** (Power Tools)
- Cordless drill + batteries
- Angle grinder
**Electronics Bench**
- Multimeter
- Soldering station
- Wire stripper/crimper
- USB-CAN adapter
**Battery Charging Station**
- Smart battery charger
## Procurement List
### Needed Tools
These tools would significantly improve our capabilities:
- [ ] **Oscilloscope** - For electronics debugging and signal analysis
- [ ] **3D Printer** - For custom parts and prototyping
- [ ] **Laser Cutter** - For precision metal fabrication
- [ ] **Dedicated Workbench with Vise** - Stable work surface
### Consumables to Stock
Regularly used supplies to keep on hand:
- Solder wire (lead-free)
- Heat shrink tubing (various sizes: 3mm, 6mm, 10mm)
- Cable ties (various sizes)
- Electrical tape
- Loctite threadlocker (blue 243 and red 271)
- Dielectric grease
- Contact cleaner spray
- Isopropyl alcohol (99%)
## Reporting Issues
If you encounter any issues with tools:
1. **Mark tool as "needs_repair"** in `tools.yaml`
2. **Tag with issue description** in the notes
3. **Notify team** via appropriate channel
4. **Do not use damaged tools**
---
*For the complete tool specifications and detailed tracking, see [`tools.yaml`](tools.yaml)*
---
## Assembly Instructions
This section contains all the information about the kart, organized as a tree of sub-assemblies. Each sub-assembly includes detailed specifications, components, and relevant documentation.
!!! note "Assembly Instructions"
Step-by-step assembly instructions are still a work in progress.
# Stuff
- The red plastic piece of the steering column goes on top of the bolt that holds it
- The bearings on the wheels are separated with tube of ? ID x ? OD x ? length to allow compressing them with the bolts without applying constant shear force on the bearings
- ...
---
## Overview
## Overview
The powertrain assembly converts electrical energy into motion, consisting of the motor, transmission system, and throttle control. This assembly is responsible for propelling the kart forward and providing speed control.
## Assembly Components
### Primary Components
- **[Motor](motor.md)**: Kunray MY1020 BLDC motor (72V, 3000W)
- **[Transmission](transmission.md)**: 219 pitch chain and sprocket system
- **[Throttle Pedal](throttle-pedal.md)**: Hall effect sensor for speed control
- **[Fasteners](fasteners.md)**: All mounting hardware and bolts
### System Integration
- Motor provides power through custom 10mm shaft
- Transmission transfers power to rear axle via 219 chain system
- Throttle pedal provides analog speed control signal
- All components mounted securely with documented fastener specifications
## Assembly Sequence
1. Mount motor to chassis using motor mount fasteners
2. Install custom front sprocket on motor shaft
3. Mount rear sprocket to axle
4. Install and tension 219 chain
5. Mount and wire throttle pedal
6. Test system operation and adjust chain tension
## Key Specifications
- **Power**: 3000W maximum
- **Operating Voltage**: 72V (motor), 5V (throttle)
- **Transmission Ratio**: Variable (depending on sprocket selection)
- **Chain Pitch**: 219 (7.774mm)
## Maintenance
- Regular chain tension checking and adjustment
- Sprocket wear inspection
- Throttle pedal calibration verification
- Motor controller connection inspection
See individual component pages for detailed specifications and BOM information.
---
## Motor
## Motor
We use a **Brushless DC (BLDC) motor** from [Kunray](https://kunraymotors.com/shop/) (model **MY1020**, 72V 3000W), along with its supplied controller.
The motivation for selecting an electric motor over a combustion engine is discussed in the [FAQ](../../faq.md#motor-choice).
---
## Motor Specifications
- **Type:** High-speed BLDC motor (Brushless DC)
- **Model:** Kunray MY1020
- **Nominal voltage:** 48VDC *(?)*
- **Nominal power:** 2000W–2500W *(?)*
- **Nominal current:** *(?)*
- **Rated speed:** *(?)*
- **Max speed:** *(?)*
- **Max torque:** *(?)*
- **Material:** Aluminum housing, full copper winding
- **Weight:** ~8 kg
- **Dimensions:** ~16.9 cm length x 9.6 cm height
- **Shaft:** 10mm diameter, no keyway (non-standard)
- **Product link (Amazon):** Kunray 72V 3000W Motor Kit
> **Note:** For transmission system details (chain, sprockets), see [Transmission](transmission.md)
---
## Controller Specifications
- **Input voltage:** 48V *(?)*
- **Max current:** *(?)*
- **Max supported power:** *(?)*
- **MOSFETs:** *(?)*
- **Phase angle:** *(?)*
- **Undervoltage protection:** *(?)*
- **Built-in features:**
- Reverse mode
- PWM speed control
- Three speed modes (low/medium/high)
- High/low-level braking input
- Hall sensor support
- Sensorless mode supported
- Ignition lock (anti-theft)
- Cruise control
- Soft start
- Twist-grip throttle control
- **Product link (AliExpress):** [Kunray BLDC Controller 72V](https://www.aliexpress.com/item/...)
---
## Throttle Pedal Sensor
The throttle pedal sensor has the following wire assignments:
- **Red:** Vcc
- **Yellow:** Ground
- **Green/Blue:** Signal
The twist-grip throttle that comes with the motor kit also includes:
- **Voltage range:** 12V–72V
- **Functions:** Throttle signal, 3-speed selector, reverse mode
- **Cable length:** ~1.5 m
- **Material:** Rubber + ABS
---
## Assembly
*This section will include real photos of the kart assembly taken from OwnCloud.*
> **Important:** During the first installation, the **red steering part** was mounted in the wrong orientation. Refer to these pictures to ensure correct assembly in future setups.
*(Insert images here once available)*
---
## To be added:
- Full wiring table (cable color, pin name, voltage, function)
- Integration with control system (e.g., microcontroller / bluepill)
- DAC details (used to convert PWM signal if applicable)
---
## Transmission
## Current Configuration - 219 Kit
The kart currently uses a **standard 219 pitch karting transmission system**. This is the definitive configuration after testing and discarding the original T8F kit that came with the motor.
### Components
#### Chain
??? example "View gold 219 chain installed on the kart"

- **Type:** IRIS 219 pitch chain
- **Color:** Gold
- **Length:** 100 links
- **Status:** Installed and working
- **Purchase link:** IRIS 219 Chain at KPS Racing
#### Rear Sprocket (Corona)
- **Type:** Aluminum 219 pitch sprocket
- **Color:** Black anodized
- **Teeth:** *(Check sprocket for exact number)*
- **Status:** **Damaged - needs replacement** (~20€)
- **Damage cause:** Used incorrectly with T8F chain (incompatible pitch)
- **Replacement link:** 219 Aluminum Sprocket at KPS Racing
#### Front Sprocket (Piñón)
- **Type:** Custom 219 pitch sprocket
- **Manufacturing:** Laser cut (custom design)
- **Material:** Steel
- **Teeth:** Multiple options manufactured with different tooth counts
- **Special features:** Custom design for non-standard Chinese motor shaft
---
## About chain pitch standards
The karting industry primarily uses three chain pitch standards:
1. **#219** - Standard karting chain (7.774mm pitch)
2. **#35** - Smaller chain used in some mini karts (9.525mm pitch)
3. **#428** - Larger chain used in heavy-duty karts (12.7mm pitch)
The kart currently uses the **#219** standard, which is the most common for 2-stroke racing karts. We made this choice because:
- It is widely available and supported in the karting community.
- It offers a good balance of strength, weight, and size for our kart.
- It is compatible with the sprockets we can source or manufacture.
- It allows for easy future upgrades or changes to the drivetrain.
- It was the closest match to the motor's original transmission kit. Initially, we thought that maybe the difference in pitch between T8F and 219 was negligible and we might avoid design any part, but after testing we found that it was not the case.
> **Note:** The original T8F kit that came with the motor is not a standard karting pitch and has been discarded in favor of the #219 system. However, as a temporary measure, part of the original T8F kit was used to get the kart moving initially, since we knew the switch to #219 would take some time due to sourcing parts and manufacturing the custom front sprocket. In this process, the rear sprocket was damaged due to the incompatible chain pitch, and it needs to be replaced.
## Why did you discard the T8F kit?
The T8F kit was not suitable for long-term use because is not a standard karting pitch, making it hard to find compatible parts locally. One of the requirements we established early on was to use components that could be easily sourced or replaced in case of failure, since **this kart was never intended to complex hardware development but software development**. Having a non-standard pitch would complicate maintenance and repairs, especially in a development environment where quick and cheap fixes are often needed due to failures or changes.
## Why Custom Front Sprocket?
The motor we purchased (Kunray MY1020) comes with a non-standard shaft configuration:
- **Shaft diameter:** 10mm
- **Keyway:** None
- **Length:** Very short
This is a 1:1 representation of the shaft configuration of the motor we purchased:

The rear sprocket in the T8F kit could not be mounted on the kart's axle easily. There are standard sprocket mounting options for a wide range of both kart axles and rear sprockets, but since T8F is not a standard karting pitch, we could not find a compatible rear sprocket mount that would fit our kart axle right away. Design and manufacturing of a custom rear sprocket mount was considered too complex and expensive for our needs, as well as time consuming. Knowing that we would eventually switch to a standard karting pitch, we decided to discard the T8F kit entirely.
You can see here both the price and images of the rear sprocket mount we actually mounted: [219 Rear Sprocket Mount - 40mm Axle](https://kpsracing.es/portacoronas-y-portadiscos/3386-portacorona-40mm-tipo-219.html). Its mounting holes do not match the original T8F rear sprocket mounting holes. We would have to design a custom rear sprocket mount if we wanted to keep using the T8F kit. This is why we discarded the T8F kit entirely.
However, since the motor shaft was either not standard on karting motors, or at least not compatible with standard karting sprockets, we were forced to design and manufacture a custom front sprocket that would fit the motor shaft while maintaining the 219 pitch for chain compatibility. Contrary to the rear sprocket, the front sprocket is much simpler to design and manufacture, as it only needs to fit the motor shaft securely. This was done via laser cutting service for a minimal cost. In fact, it was as easy as replicating the inner geometry of the original T8F front sprocket, which was designed to fit the motor shaft, and then adapting the outer geometry to match the #219 pitch standard. A matter of hours of CAD work and a few iterations to get the tooth count right.
Here you can see a cross section of both the [simplest #219 front sprocket](https://kpsracing.es/pinones-motor/2280-425-pinon-tipo-iame-20mm.html#/92-talla-10z) we could find and the motor shaft, before deciding to design a custom sprocket:

There was no way to adapt this standard sprocket to the motor shaft without extensive machining, which would have been more expensive than simply designing and manufacturing a custom sprocket.
> The custom sprocket design was completed and validated (3D printed) in January 2025 and manufactured via laser cutting service for a minimal cost in May 2025. However, due to laser cutting limitations, teeth are not chamfered, which may affect chain engagement slightly. This can be improved in future iterations by using CNC machining, which can produce more precise and durable sprockets. For now, the laser-cut sprocket is sufficient for testing and development purposes if we are careful with chain tensioning and alignment.
---
## Discarded T8F Kit
The motor originally came with a T8F transmission kit:
- **Chain:** Black T8F chain
- **Rear sprocket:** Black T8F sprocket (never used)
- **Front sprocket:** Black T8F 11-tooth sprocket
This kit was never intended for permanent use because as discused before, T8F is not a standard karting pitch. However, some components were temporarily used to get the kart moving while waiting for the 219 chain and custom front sprocket to arrive.
We have damaged knowingly the rear sprocket by using it with the incompatible T8F chain and front sprocket, which is why we need to replace it. Both chain and front sprocket are already replaced with the #219 equivalents.
**⚠️ These T8F components should be stored separately or discarded to avoid confusion.**
---
??? info "What do 219 and T8F mean? (Technical Details)"
### Chain Designation Explained
**219 Chain**
- Standard karting chain designation
- Pitch: 7.774mm (0.306")
- Roller diameter: 4.59mm
- Originally invented as timing chain for Kawasaki motorcycles
- European/Japanese standard for 2-stroke karting
- Does NOT follow standard ANSI numbering formula
**T8F Chain**
- "T" = Chain type designation
- "8" = 8mm pitch
- "F" = Manufacturer designation
- Pitch: 8.000mm
- Roller diameter: 4.7mm
- Common in Chinese electric scooters and pocket bikes
- Also known as 05B chain
### What is "Pitch"?
The **pitch** is the distance between the centers of two consecutive chain rollers. It's the most critical measurement for chain compatibility.
### Typical Usage
- **219**: Professional karting standard, especially 2-stroke racing in Europe and Japan
- **T8F**: Electric scooters, pocket bikes, and electric mobility devices (mainly Chinese market)
---
## Installation Notes
With the motor mount moved slightly backward (compared to the original 3D-printed mount), there is now sufficient clearance to properly install and tension the #219 chain.
### Correct Configuration Checklist
- Gold 219 chain installed
- 219 rear sprocket mounted (replace damaged one first)
- Custom 219 front sprocket mounted
- Proper chain tension adjusted
- All T8F components removed from work area
---
## Future Improvements
- Document exact tooth counts for ratio calculations
- Add chain tensioning procedure
- Include maintenance schedule
- Calculate speed/torque ratios for different sprocket combinations
---
## Throttle Pedal
## Overview
The throttle pedal sensor uses a linear Hall effect sensor (typically SS49E or similar) that converts pedal position into an electrical signal for motor speed control.
## Common Hall Sensor Specifications
### SS49E Linear Hall-Effect Sensor
- **Manufacturer:** Honeywell / Various
- **Type:** Bipolar linear Hall effect sensor
- **Operating Voltage:** 2.7V to 6.5V DC (typically 5V)
- **Current Consumption:** ~6mA at 5V
- **Sensitivity:** 1.4-1.8 mV/Gauss
- **Output Type:** Ratiometric analog voltage
- **Null Output:** VCC/2 (2.5V at 5V supply with no magnetic field)
- **Output Range:**
- ~0.86V with north pole magnetic field
- ~2.5V with no magnetic field
- ~4.2V with south pole magnetic field
- **Operating Temperature:** -40°C to +85°C (up to +150°C for some variants)
- **Package:** TO-92 (3-pin)
- **Datasheet:** [Honeywell SS49E](https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/ja/products/sensors/magnetic-sensors/linear-and-angle-sensor-ics/common/documents/sps-siot-ss39et-ss49e-ss59et-product-sheet-005850-3-en-ciid-50359.pdf)
## Pedal Assembly Specifications
- **Output Range (configured):**
- 0-1V = 0% throttle (pedal released)
- 4-5V = 100% throttle (pedal fully pressed)
- **Connector:** 3-wire cable
- **Mechanical:** Spring-return foot pedal with integrated magnet
## Product Sources
### Complete Pedal Assembly
- **AliExpress:** Foot Pedal Accelerator (~2.46€)
- **Amazon:** Various electric scooter throttle pedal listings
### Replacement Hall Sensors (SS49E)
- **Honeywell (Official):** Mouser Electronics - SS49E
- **Addicore:** SS49E Linear Hall-Effect Sensor
- **eBay:** 5x SS49E Hall Sensors for Throttle Repair
- **Sunrom Electronics:** SS49E Hall Sensor Linear Analog
!!! note "Replacement Parts"
SS49E sensors commonly fail and typically need replacement yearly in high-use applications. Having spare sensors available is recommended for maintenance.
## Wiring
### Cable Color Code
| Cable Color | Function | Voltage |
|-------------------|----------|---------|
| Red | Vcc | 5V |
| Yellow | Ground | GND |
| Teal (Green/Blue) | Signal | 0-5V |
!!! info "Signal Output"
The sensor outputs a linear voltage proportional to pedal position:
- Pedal released: 0V
- Pedal fully pressed: 5V
- The signal can be read by any ADC (Analog-to-Digital Converter) input
## Installation Notes
- Mount the pedal securely to prevent movement during operation
- Ensure cable is properly routed to avoid interference with pedal movement
- Protect connections from moisture and dirt
- Test full range of motion before use
## Interface Requirements
The throttle signal needs to be connected to:
- An ADC-capable microcontroller pin (ESP32, Arduino, etc.)
- Or directly to a motor controller with analog throttle input
For current kart configuration, this connects to the motor controller's throttle input.
---
## Fasteners
## Overview
This page documents all fasteners (bolts, nuts, washers) used in the powertrain assembly. Each fastener is identified by location, size, and purpose with reference photos showing exact positions.
!!! warning "Critical Safety"
Proper torque specifications must be followed. Loose motor mounts or sprocket bolts can cause catastrophic failure.
## Motor Mounting Hardware
### Motor to Chassis Mount
- **Location**: Motor mount bracket to chassis
- **Fasteners**: 4x M8x30 hex head cap screws with M8 nuts
- **Torque**: 25 Nm
- **Notes**: Use threadlocker on bolts. Check tension after first 10 hours of operation.
??? example "View motor mounting bolts"
---
## Overview
## Mechanical Overview
??? example "View steering mechanism with measurements"

The steering system uses a direct drive motor connected to the steering column. Key dimensions:
- Steering column diameter: 20mm
- Motor mount spacing: 50mm
- Connection diameter: 10mm (internal)
## Motor Data

24V motor, we will use it at 12V, estimated about 300W
## Main process
We need to move the steering shaft to the target angle.
1. Micro controller reads target position from main computer (Orin) and current position from the Hall effect sensor
- Micro controller may be a Blue Pill, Teensy 4.0, or one with CAN transceiver builtin.
2. Calculates PWM % value with PID. Sends PWM 3.3V to H-bridge
3. H-bridge (MD25HV) receives PWM and powers the DC motor
- The MD25HV accepts control voltages from 1.8V-30V, so 3.3V PWM from ESP32 works perfectly
- [Datasheet](https://docs.google.com/document/d/1xJHVG2dc3aEtedCHf3L9NzUy5KqpxeWjeS9Lfh9XuqA)
## H-bridge data
See [H-bridge](h-bridge.md) for more details.
## Power Requirements Investigation
### Torque Requirements
- **Reference torque**: ~40 Nm
- **Target performance**: 1 full revolution (lock-to-lock) in 0.3 seconds
- **Required power**: 40 Nm × (2π rad / 0.3 s) = **837 W**
### Design Constraints
- **Available voltages**:
- Battery: 13S (41.6V - 54.6V)
- Regulated: 12V, 5V, 3.3V
- **Budget**: < 1000€ for new components
- **Note**: Consider integrated servos as an alternative to separate electronics
### Power Alternatives Under Investigation
??? info "Motor Driver Alternatives (Click to expand)"
#### VESC (Vedder Electronic Speed Controller)
- **Advantages**: Multi-purpose, can be reused for other systems
- **Implementation**:
- Test with existing unit first
- ESP32 communication via UART at 3.3V
- Keep AS5600 magnetic sensor on I2C
- Note: VESC DC mode doesn't include position control, external PID needed
- **Alternative unit**: [Flysky FSESC67100 V2 Pro on Wallapop](https://es.wallapop.com/item/flysky-fsesc67100-v2-pro-1133224964)
#### Kelly Controller KDS Series
- **Link**: [Kelly Controller Shop](https://kellycontroller.com/shop/kds/)
- **Specs**: ~60€, 48V (max 60V), 50A
- **Control**:
- 0-5V analog signal for power
- REV/DIR signal for direction
- Requires external microcontroller with PID for position control
#### AllMotion EZSV23WV Servo Controller
- **Link**: [AllMotion EZSV23WV](https://www.allmotion.com/ezsv23wv-servo-control)
- Integrated servo control solution
#### Generic PWM Motor Controller
- **Link**: [Component Authority DC Motor Controller](https://componentauthority.com/products/dc-10-55v-max-60a-pwm-motor-speed-controller-cw-ccw-reversible-12v-24v-36v)
- **Specs**: 10-55V DC, Max 60A, CW/CCW reversible
- Works like current Cytron solution
- Use with ESP32 for same control method
#### Decision Matrix
*To be completed once alternatives are evaluated*
### Gear Reduction Investigation
**Requirements**: Minimum 5:1 reduction ratio, especially shorter teeth on pinion gear
??? info "Reduction Alternatives (Click to expand)"
#### Direct Gear Change
- Replace current gears with 5:1 ratio set
- Focus on shorter teeth for pinion gear
- Crown gear can remain similar size
#### Planetary Gearbox Addition
- Research compatibility with current motor
- Options:
- 3D print custom adapter if needed
- Drill mounting holes in steel L-bracket
- Modify existing mounting plate
#### Complete Motor/Servo Replacement
- Consider integrated servo motor with built-in reduction
- Higher initial cost but simpler integration
#### Decision Matrix
*To be completed once alternatives are evaluated*
---
## H-bridge
- **Cytron MD25HV** (25 A cont, 60 A peak, 7V-58V)
- Product page:
- Datasheet:
- GitHub library:
- Tutorial:
- Tutorial:
- **Note**: Upgraded from MD30C to support 13S battery (41.6V-54.6V). MD30C was limited to 30V max.
### Reasoning
Suggested H-bridges by gpt:
- **Cytron MD25HV** (25 A cont, 60 A peak, 7V-58V) - **CURRENT CHOICE**
- ~~**Cytron MD30C** (30 A cont, 80 A peak, 5V-30V) - Insufficient voltage rating for 13S battery~~
- **Pololu VNH5019 Driver** (12 A cont, 30 A peak)
-
- ~~Sabertooth 2x32: Overkill but excellent for dual motors, up to 32 A per channel~~
- ~~Simple BTS7960: Cheap dual half-bridge module, supports 43 A per channel, needs external PWM and logic control~~
- ~~IBT-4~~
- Needs two synced pwm signals to control the H bridge, so it's harder to use. Otherwise it would work and it's cheaper
---
## Angle Sensor
Sensor used is the cheap AS5600

Intended for use with a diametrically magnetized magnet, but works with a normal one turned 90 degrees too.
It may be a good idea to find bigger neodymium diametric magnets.
## AS5600 Wire Colors (2025 Temporary)
!!! warning "Temporary Color Code"
This color code is specific to the 2025 version wiring and is not official. Verify connections before use.
| Color | Signal |
|-------|--------|
| Grey | GND |
| White | 3.3V |
| Green | SDA |
| Blue | SCL |
## Code Repository
Repo with basic code to read the steering angle sensor (Arduino HAL with VSCode Platformio, no IDE): https://github.com/rubenayla/bluepill-angle-arduino.git


---
## Fasteners
## Fasteners Overview
This page documents all fasteners used in the steering assembly with precise identification using the annotated reference photo. Each bolt is numbered for easy identification during assembly or maintenance.
!!! warning "Critical Safety"
Steering fasteners are safety-critical. Use specified torque values and threadlocker. Inspect regularly for looseness.
## Reference Photo
??? example "View steering assembly with numbered fasteners"

**Fastener Identification:**
1. Coupling to motor bolts (4x M6x20)
2. Main coupling bolt (1x M8x25)
3. Sensor mounting screws (2x M3x8)
## Detailed Fastener Specifications
### Item #1: Coupling to Motor Bolts
- **Quantity**: 4 bolts
- **Size**: M6 x 20mm hex head cap screws
- **Location**: Motor flange to coupling connection
- **Torque**: 12 Nm
- **Material**: Steel, zinc plated
- **Installation**: Apply threadlocker, torque in cross pattern
- **Inspection**: Check weekly for looseness
### Item #2: Main Coupling Bolt
- **Quantity**: 1 bolt
- **Size**: M8 x 25mm hex head cap screw
- **Location**: Through steering shaft coupling
- **Torque**: 20 Nm
- **Material**: Steel, grade 8.8 (high strength)
- **Installation**: Critical connection - use threadlocker
- **Inspection**: Check bi-weekly, this bolt failure would disable steering
### Item #3: Sensor Mount Screws
- **Quantity**: 2 bolts
- **Size**: M3 x 8mm hex head cap screws
- **Location**: AS5600 sensor board to mounting bracket
- **Torque**: 3 Nm (be careful not to over-torque small screws)
- **Material**: Steel, zinc plated
- **Installation**: Hand-tighten plus 1/4 turn
- **Inspection**: Monthly visual check
### Motor Bracket Bolts
- **Quantity**: 2 bolts
- **Size**: M6 x 30mm hex head cap screws
- **Location**: Steering motor to chassis mounting bracket
- **Torque**: 15 Nm
- **Material**: Steel, zinc plated
- **Installation**: Ensure motor alignment before final tightening
- **Inspection**: Weekly check for vibration loosening
## Assembly Instructions
### Installation Sequence
1. **Mount sensor first**: Install AS5600 with Item #3 screws
2. **Position motor**: Mount motor to chassis with bracket bolts
3. **Install coupling**: Connect motor to shaft with Item #1 bolts
4. **Final connection**: Install main coupling bolt (Item #2)
5. **Test**: Verify smooth operation and sensor reading
### Critical Notes
- **Alignment**: Ensure motor shaft and steering shaft are properly aligned before tightening
- **Sensor position**: AS5600 must be centered over magnet (see sensor documentation)
- **Threadlocker**: Use blue (medium strength) on all bolts except sensor screws
## Maintenance Schedule
| Fastener | Check Frequency | Torque Check | Notes |
|----------|-----------------|--------------|-------|
| Item #1 (Coupling) | Weekly | Monthly | Critical for power transmission |
| Item #2 (Main bolt) | Bi-weekly | Bi-weekly | Most critical fastener |
| Item #3 (Sensor) | Monthly | Quarterly | Avoid over-torque |
| Bracket bolts | Weekly | Monthly | Check for vibration loosening |
## Troubleshooting
### Loose Steering Feel
- Check Item #2 main coupling bolt first
- Inspect Item #1 coupling bolts for looseness
- Verify motor bracket bolt tightness
### Sensor Reading Issues
- Check Item #3 sensor mount screws
- Verify sensor hasn't shifted position
- Ensure magnet alignment hasn't changed
## Procurement Information
### Estimated Costs
- **Total fastener cost**: ~€5.50 for complete steering assembly
- **Recommended spares**: 25% extra quantity
### Suppliers
- **McMaster-Carr**: Premium quality metric fasteners
- **Fastenal**: Industrial fastener supplier
- **Local automotive**: Grade 8.8 bolts available at auto parts stores
### Required Tools
- **Hex key set**: 3mm, 6mm, 8mm
- **Torque wrench**: 0-25 Nm range
- **Threadlocker**: Loctite 243 (blue, medium strength)
---
## Microcontroller
The ESP32 is a series of low-cost, low-power system on a chip microcontrollers with integrated Wi-Fi and dual-mode Bluetooth. The ESP32 series employs a Tensilica Xtensa LX6 microprocessor in both dual-core and single-core variations and includes built-in antenna switches, RF balun, power amplifier, low-noise receive amplifier, filters, and power management modules.
## Key Features
[](https://www.teachmemicro.com/)
* **CPU:** Xtensa dual-core (or single-core) 32-bit LX6 microprocessor
* **Clock Speed:** Up to 240 MHz
* **Wi-Fi:** 802.11 b/g/n
* **Bluetooth:** Bluetooth v4.2 BR/EDR and BLE
* **Flash Memory:** Up to 16 MB
* **SRAM:** 520 KB
* **GPIOs:** 34
* **ADCs:** 18-channel, 12-bit
* **DACs:** 2-channel, 8-bit
* **Communication Interfaces:** SPI, I2C, UART, CAN, I2S
## Kart Medulla - ESP32-DevKitC V4 Configuration
The ESP32-DevKitC V4 (with ESP32-WROOM-32 module) serves as the "medulla" of the kart, interfacing between the Orin computer, steering angle sensor, and motor controllers.
**Firmware Repository:** [UM-Driverless/kart_medulla](https://github.com/UM-Driverless/kart_medulla)
### Pin Assignments
#### Motor Control Outputs
| GPIO Pin | Function | Type | Range | Description |
|----------|-------------|---------|---------|-------------|
| GPIO 26 | Throttle | DAC2 | 0-255 | Analog throttle control |
| GPIO 25 | Brake | DAC1 | 0-255 | Analog brake control |
| GPIO 27 | Steering PWM| LEDC | 0-255 | Steering motor PWM |
| GPIO 14 | Steering DIR| Digital | 0/1 | Steering motor direction |
#### Sensor Interface (AS5600)
| GPIO Pin | Function | Connected To | Description |
|----------|----------|--------------|-------------|
| GPIO 22 | I2C SCL | AS5600 SCL | Clock signal |
| GPIO 21 | I2C SDA | AS5600 SDA | Data signal |
!!! note "AS5600 Status"
The AS5600 magnetic angle sensor remains disabled in firmware until hardware is physically connected.
#### Auxiliary Pins
| GPIO Pin | Function | Connected To | Description |
|----------|--------------|--------------|-------------|
| GPIO 2 | Status LED | Onboard LED | Status indicator |
| GPIO 18 | UART TX | Orin RX | Serial communication to Orin |
| GPIO 19 | UART RX | Orin TX | Serial communication from Orin |
## Wiring Connections
### ESP32 to AS5600 Angle Sensor
| AS5600 Pin | ESP32 Pin | Wire Color (2025) |
|------------|-----------|-------------------|
| SCL | GPIO 22 | Blue |
| SDA | GPIO 21 | Green |
| VCC | 3.3V | White |
| GND | GND | Grey |
!!! warning "Temporary Color Code"
Wire colors are specific to the 2025 version and not official. Always verify connections.
### ESP32 to Motor Controllers
#### Throttle Control
| Motor Driver Pin | ESP32 Pin | Signal Type |
|------------------|-----------|-------------|
| Analog Input | GPIO 26 | DAC2 (0-255)|
| VCC | 5V | Power |
| GND | GND | Ground |
#### Brake Control
| Motor Driver Pin | ESP32 Pin | Signal Type |
|------------------|-----------|-------------|
| Analog Input | GPIO 25 | DAC1 (0-255)|
| VCC | 5V | Power |
| GND | GND | Ground |
#### Steering Control
| Steering Driver Pin | ESP32 Pin | Signal Type |
|---------------------|-----------|-------------|
| PWM | GPIO 27 | LEDC (0-255)|
| DIR | GPIO 14 | Digital (0/1)|
| VCC | 5V | Power |
| GND | GND | Ground |
### ESP32 to Orin (UART Communication)
| Orin Pin | ESP32 Pin | Direction |
|----------|-----------|-----------|
| RX | GPIO 18 | ESP32 → Orin |
| TX | GPIO 19 | Orin → ESP32 |
| GND | GND | Ground |
!!! info "UART Configuration"
Serial communication enables future integration between the Orin computer and ESP32 for command/telemetry exchange.
---
## Computer
Our computer is based on the NVidia Jetson AGX Orin Development Kit.
# Links
- Main Nvidia Jetson AGX Orin page: https://developer.nvidia.com/embedded/learn/jetson-agx-orin-devkit-user-guide/developer_kit_layout.html
- Datasheets for NVidia Jetson Orin: https://developer.nvidia.com/embedded/downloads
TODO link here to datasheets in the repo itself
# Data
## Power
- Power consumption:
- Voltage range: 9-20VDC, typically 19V
- Power connector: Barrel Jack 5.5mm OD 2.5mm ID center positive
## Specs
TODO
# To connect it to the rest of the kart, we use a custom made adapter board
## This is the version 1.0 of the adapter board
Designed with [easyeda](https://easyeda.com/), can be downloaded [here](computer/images/ProProject_Orin Adapter_2025-03-09.epro)
### BOM (Bill of Materials)

### PCB Schematic

The schematic shows the component values and connections:
- **Power Supply**: 3.3V, 5V regulated outputs
- **CAN Interface**: SN65HVD232DR transceiver for CAN communication
- **Connectors**: 2.54-2*20 header for Orin connection
- **Filtering Capacitors**: C1 (47nF), C2 (100nF) for noise suppression
- **Resistors**: R1,R2 (60Ω), R3,R_T (330Ω), R4 (30Ω)
- **Test Points**: T1, T2 for debugging
### PCB Board Top View

### 3D Visualization

The path in our Owncloud folder is: `formula/formula 24-25/DV/ORIN/adapter/ProProject_Orin Adapter_2025-03-09.epro`
# Notes
## How to install Anydesk in Nvidia Jetson Orin
```bash
wget -qO - https://keys.anydesk.com/repos/DEB-GPG-KEY | sudo apt-key add -
echo 'deb http://deb.anydesk.com/ all main' | sudo tee /etc/apt/sources.list.d/anydesk.list
sudo apt update
sudo apt install -y anydesk
```
---
## DAC
### DAC – Digital to Analog Conversion
**Model:** MCP4725 I²C DAC Breakout Module
**Power supply voltage:** 5V
**Communication:** I²C @ 3.3V (logic level)
**Detected issue:**
The MCP4725 operates at 5V for power, but its I²C communication lines also run at that voltage. This creates a level mismatch when interfacing with a 3.3V microcontroller like the ESP32, which may result in communication errors or even damage to the I²C pins.
**Proposed or pending solution:**
Use a **bidirectional I²C level shifter** (e.g., TXS0108E or BSS138-based) between the microcontroller and the DAC to safely interface 3.3V and 5V logic.
---
## Wiring
TODO global diagram (Fritzing?)
## Throttle pedal sensor
For throttle pedal sensor specifications and wiring, see [Throttle Pedal Documentation](../powertrain/throttle-pedal.md).
## ESP32 wiring
For detailed ESP32 wiring connections including AS5600 sensor, motor driver, and Orin communication, see [ESP32 Microcontroller Documentation](microcontroller.md#wiring-connections).
---
## Battery
> To charge the battery with a bench power supply, see this tutorial: [Cómo Cargar una Batería de Litio con una Fuente](https://youtu.be/g1jsSbjsiTo?si=uZ7mVjXA2c-43zzz)
The main pack uses **Molicel P42A** cells in a 13S4P configuration, providing a nominal voltage of about 48 V. A separate 12 V car battery supplies the sensors to remain compatible with the Formula Student car.
For battery placement rationale see the [FAQ](../../../faq.md#battery).
| Parameter | Value |
|-----------|-------|
| BMS Cutoff voltage | 39.0 V (13 * 3.0V) |
| Configuration | 13S4P (13 cells in series, 4 in parallel) |
| Nominal voltage | 48 V |
| Maximum charging voltage | 54.6 V (13 * 4.2V) |
| Minimum voltage | 41.6 V (13 * 3.2V) |
| Power Capacity | 808 Wh (3.7V * 4.2 Ah * 13 * 4) |
| Charge capacity | 16.8 Ah (4 * 4200 mAh) |
| Maximum continuous discharge current | 180 A (4 * 45 A. 9828W at 100% charge!!) |
| Maximum continuous charge current | 32 A (4 * 8 A. about 1.7kW) |
| Cell type | Molicel P42A |
| Cell capacity | 4200 mAh (4.2 Ah) |
| Cell nominal voltage | 3.7 V |
| Cell maximum voltage | 4.2 V |
| Cell minimum voltage | 3.2 V |
## BMS
- Jiabaida BMS, 100A BT UART, NMC 6S-21S
- https://www.notion.so/BMS-Bater-a-Kart-JBD-16078747314380e68688c3ab787fc1f7?pvs=21
- https://es.aliexpress.com/item/1005007223779359.html

-
---
## Camera
## Overview
This document describes the integration of the **ZED2 stereo camera** into the kart, its usage through the **ROS 2 wrapper**, and the combination with **YOLOv5** for cone detection.
## Official Resources
- **ZED2 Camera Overview**: [https://www.stereolabs.com/zed-2/](https://www.stereolabs.com/zed-2/)
- **ZED ROS 2 Wrapper Documentation**: [https://docs.stereolabs.com/ros2/](https://docs.stereolabs.com/ros2/)
## Hardware: ZED2 Camera
The [ZED2](https://www.stereolabs.com/zed-2/) camera by Stereolabs is a stereo vision camera capable of providing:
- High-definition left and right stereo images
- Depth sensing
- 3D point clouds
- Positional tracking (6DoF)
- Integrated IMU sensors (accelerometer, gyroscope, magnetometer)
- Environmental sensors (barometer, temperature sensor)
## ROS 2 Integration
The ZED2 camera is integrated into the project using the **official Stereolabs ZED ROS 2 Wrapper**:
- GitHub: [https://github.com/stereolabs/zed-ros2-wrapper](https://github.com/stereolabs/zed-ros2-wrapper)
### Installation Requirements
To properly install and run the **ZED ROS 2 Wrapper** with the ZED2 camera, you must ensure the following dependencies and system configuration are in place.
- Operating System
- **Ubuntu 24.04 LTS** is the recommended version for this setup.
- Other Ubuntu versions may be used; however, note that dependencies such as CUDA, TensorRT, ROS2, and the ZED SDK may require different versions and additional compatibility testing.
- ROS 2 Jazzy
- Install **ROS 2 Jazzy** by following the official instructions here:
[https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debs.html](https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debs.html)
- CUDA Toolkit (12.0 to 12.9)
- Install **CUDA 12.x** (any version from 12.0 to 12.9 is compatible).
- Download from the official NVIDIA website:
[https://developer.nvidia.com/cuda-downloads](https://developer.nvidia.com/cuda-downloads)
- ZED SDK (v5.0)
- Download and install **ZED SDK v5.0** for Ubuntu 24.04 with CUDA 12 and TensorRT 10 from the official release page:
[https://www.stereolabs.com/en-es/developers/release/5.0#82af3640d775](https://www.stereolabs.com/en-es/developers/release/5.0#82af3640d775)
- TensorRT 10
- Download the **TensorRT 10** `.deb` package for Ubuntu 24.04 + CUDA 12.9 from the official NVIDIA repository:
[https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.10.0/local_repo/nv-tensorrt-local-repo-ubuntu2404-10.10.0-cuda-12.9_1.0-1_amd64.deb](https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/10.10.0/local_repo/nv-tensorrt-local-repo-ubuntu2404-10.10.0-cuda-12.9_1.0-1_amd64.deb)
After downloading the `.deb` file, run the following commands to install it:
```bash
sudo dpkg -i nv-tensorrt-local-repo-ubuntu2404-10.10.0-cuda-12.9_1.0-1_amd64.deb
sudo apt update
```
If you encounter **GPG key errors**, follow these additional steps:
```bash
sudo cp /var/nv-tensorrt-local-repo-ubuntu2404-10.10.0-cuda-12.9/*.gpg /usr/share/keyrings/
sudo nano /etc/apt/sources.list.d/nv-tensorrt-local-repo-ubuntu2404-10.10.0-cuda-12.9.list
```
Replace the content of the file with:
```bash
deb [signed-by=/usr/share/keyrings/nv-tensorrt-local-CD20EDBE-keyring.gpg] file:///var/nv-tensorrt-local-repo-ubuntu2404-10.10.0-cuda-12.9 /
```
Then update again:
```bash
sudo apt update
```
This should resolve the key issues.
Finally, install the required TensorRT runtime libraries:
```bash
sudo apt-get install libnvinfer10 libnvinfer-dev libnvinfer-plugin-dev python3-libnvinfer
```
- ZED ROS 2 Wrapper
- Clone and build the **zed-ros2-wrapper** package in your existing ROS 2 workspace:
```bash
cd ~/ros2_ws/src
git clone https://github.com/stereolabs/zed-ros2-wrapper.git
cd ..
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install
```
Official repository:
[https://github.com/stereolabs/zed-ros2-wrapper](https://github.com/stereolabs/zed-ros2-wrapper)
---
Once all the dependencies are installed and the wrapper is successfully built, you should be able to launch the ZED2 ROS 2 node without issues.
### Launching the Camera
The camera is launched using a provided launch file, typically:
```bash
ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zed2
```
## Cone Detection with YOLOv5
In this project, **YOLOv5** is used to perform **real-time cone detection** on images captured by the ZED2 camera.
The ZED ROS 2 Wrapper supports custom object detection models through **ONNX integration**, allowing you to run your own trained detectors such as YOLOv5 directly on the GPU using **TensorRT** for real-time inference.
### Exporting and Using a Custom YOLOv5 Model
If you have trained a YOLOv5 model (e.g., for cone detection), follow these steps to integrate it into the ZED wrapper:
1. **Export the model to ONNX format**:
You can do this using PyTorch and the YOLOv5 export tools (e.g., `export.py` script from the [YOLOv5 repository](https://github.com/ultralytics/yolov5)):
This will generate a `.onnx` file.
2. **Enable object detection in the ZED wrapper** by editing the configuration file:
Open your `common_stereo.yaml` (located in your ROS 2 workspace, inside `zed-ros2-wrapper/zed_wrapper/config`), and modify or add the following lines:
```yaml
object_detection:
od_enabled: true
model: 'CUSTOM_YOLOLIKE_BOX_OBJECTS'
custom_onnx_file: '$path to model'
```
### First-Time Optimization
The first time you launch the node with your custom ONNX model, **TensorRT will optimize the model for inference**, which may take additional time (several seconds to minutes depending on the system).
Subsequent runs will be much faster, as the optimized engine will be cached and reused.
---
Once all dependencies are correctly installed and the YOLOv5 model is configured, you should be able to run real-time object detection with the ZED2 camera using ROS 2.
---
## Emergency Braking
We need an emergency braking system that can be activated on loss of electrical power or error from the shutdown loop, and a proportional braking system that can be controlled by the main computer when the robot is running.
TODO redesign circuit with the valves we have, instead of using two different ones.
TODO order components: proportional valve, adapters to have no problems using any of our tanks, pressure sensors,
> Original Idea:
> Use a ball valve to merge the proportional braking line with the emergency one, and an extra electrovalve to stop flow to the proportional valve when emergency.
## Simplified design (TODO simulate it)
If the proportional valve does close both ways when not powered, we can get rid of the valve that goes in series with it. If we close port 3 of the emergency electrovalve, we can get rid of the valve with the ball at the top.

## Components
- [Solenoid valve](https://www.festo.com/tw/en/a/575488/)
> For emergency braking
- [Datasheet local](../../assets/datasheets/575488datasheet.pdf)
- [Datasheet online](https://www.festo.com/tw/en/a/download-document/datasheet/575488)
- G1/4 female thread
- [Proportional Valve](https://www.festo.com/es/es/a/8153644/)
> For normal controlled braking
- TODO CONSIDER AN 8-PIN M16 PROPORTIONAL VALVE SO WE CAN USE IT AS PRESSURE SENSOR
- [Datasheet online](https://www.festo.com/es/es/a/download-document/datasheet/8153644)
- [Datasheet local](../../assets/datasheets/8153644datasheet.pdf)
- [206533 documentation](../../assets/datasheets/206533_documentation.pdf)
- TODO QUESTION: Can we get the reading of pressure from this valve? There are some that allow it
- Fittings:
- 90º TODO what thread what size, what tube material and OD/ID.
- Straight TODO what adapters
- Pressure sensor
# Complete Design (Diego's Design)
We have validated a hybrid pneumatic circuit that integrates both the Emergency Braking System (EBS) and the Autonomous Service Brake (ASB).
The system uses a shuttle valve (OR logic) to allow either the emergency line or the proportional line to actuate the brake, ensuring redundancy and fail-safe operation.
> **Design Logic:**
> 1. **EBS (Fail-Safe):** The cylinder is normally extended (braking) by spring/external force. Air pressure retracts it (release). The EBS Electrovalve cuts pressure and exhausts air to atmosphere to trigger emergency braking.
> 2. **ASB (Proportional):** Controlled by the VPPM valve. It regulates pressure to modulate braking force during dynamic driving.
> 3. **Integration:** An OR Valve (Shuttle) isolates both lines so they don't interfere with each other.
## Schematic

## Components
### Actuators & Valves
- [x] **Pneumatic Actuator** (ADN-S-50-15-I-P-A) - Reuse
> **CRITICAL:** This cylinder uses **G1/8** ports, not G1/4.
- [Datasheet](https://www.festo.com/gb/en/a/5138190/)
- [x] **EBS Electrovalve V1** (Reuse)
- Normally Open / 3-way valve.
- **Action:** Needs a silencer on port 3.
- [ ] **ASB Electrovalve V2** (New)
- [Festo VUVG-L14](https://www.festo.com/es/es/a/8035167/)
- **Action:** Needs a silencer on port 3.
- [ ] **Proportional Valve** (VPPM-6L-L-1-G18-0L10H-A4P)
> Controls the service brake pressure (ASB).
- [Datasheet](https://www.festo.com/es/es/a/download-document/datasheet/8153644)
- **Action:** Requires specific M12 cable (see cables below).
- [ ] **Shuttle Valve (OR)** (OS-1/4-B)
> Merges EBS and ASB lines.
- [Festo 6682](https://www.festo.com/es/es/a/6682/)
- Ports: G1/4.
### Sensors & Electronics
- [ ] **Pressure Sensor** (SDE5-D10-NF-Q6E-V-M8)
- **Spec:** 0-10 bar, Analog output (0-10V), Integrated 6mm push-in fitting.
- [Product Page](https://www.festo.com/cat/en-gb_gb/products_SDE5)
- **Note:** Does not require a threaded adapter. Connects directly to tubing.
- [ ] **Cable for Proportional Valve**
- **Ref:** `NEBU-M12G8...` (M12, 8-pin, shielded).
- Necessary to control the VPPM.
- [ ] **Cable for Sensor**
- **Ref:** `NEBU-M8G3...` (M8, 3-pin).
- For the SDE5 sensor.
### Fittings & Accessories
- [ ] **Tubing:** [Polyurethane Tubing 6mm OD (PUN-H-6x1)](https://www.festo.com/gb/en/search/?text=PUN-H-6x1)
- [ ] **G1/8 Fittings:** 4x [QS-G1/8-6 (Male G1/8 -> 6mm push-in)](https://www.festo.com/gb/en/search/?text=QS-G1%2F8-6)
> Required for: Actuator (ADN-S-50) and New Electrovalve (V2).
- [ ] **G1/4 Fittings:** 7x [QS-G1/4-6 (Male G1/4 -> 6mm push-in)](https://www.festo.com/gb/en/search/?text=QS-G1%2F4-6)
> Required for: Shuttle Valve (3x), Proportional Valve (2x), and Reuse Electrovalve V1 (2x).
- [ ] **Silencers:**
- 1x [U-1/8](https://www.festo.com/gb/en/search/?text=U-1%2F8) (For New Valve V2).
- 1x [U-1/4](https://www.festo.com/gb/en/search/?text=U-1%2F4) (For Reuse Valve V1).
- [ ] **Distribution Tees (Choose Option A or B):**
- **Option A (Recommended - Flexible):** 3x [Plastic T-Connector 6mm (T-PK-4)](https://www.festo.com/gb/en/search/?text=T-PK-4)
> Allows a floating layout. Compatible with all components regardless of their thread size.
- **Option B (Rigid):** 3x [Threaded T-Fitting (TCN)](https://www.festo.com/gb/en/search/?text=TCN)
> Mounts directly onto the valves. Requires ordering a mix of TCN-1/8 and TCN-1/4 to match each specific valve.
---
## Hydraulics
- We are using flexible brake hoses with `M10x1.0 female inverted flare` connectors
## Brake Pressure Sensor
Our pressure sensor is the Sensata PTE7100, code `PTE7100-33CC-2E200BN`, [datasheet here](../assets/datasheets/sensata_pte7100_hermetic_analog_pressure_sensor_da-1919220.pdf), [mouser here](https://www.mouser.es/ProductDetail/Sensata-Technologies/PTE7100-32DC-0B200BN?qs=sGAEpiMZZMv1xWCHBjbGeVR9W0yhknQ8lfjrm5f%2FKxVuiB%2F1oy1aA%3D%3D).
- 7/16-20 UNF-2A (MALE) pressure port
- Packard Metri-Pack 150 connector
- HNBR o-ring
- 1-5Vdc/8-32Vdc
- 0–200 bar pressure range
- no mating connector or snubber
- Adapter: To connect the sensor to the brake lines, we use a `male M10x1.0 inverted flare to female 7/16-20 UNF adapter`

### Possible alternative
- [Bosch Motorsport PSS-260 --- PN0261545188](https://xtramotorsport.com/product/bosch-motorsport-pss-260-brake-pressure-sensor/)
- 0.5-4.5V, 0-260 bar
---
## Software
The software documentation will include its own repository, since it must be common and independent from Kart or Formula Student car.
- 2024 version of the software, using Python:
- [https://github.com/UM-Driverless/driverless.git](https://github.com/UM-Driverless/driverless.git)
- Tutorial: [https://youtu.be/wZSFr2eYE4M?si=K0gPpFHeWrK2Y9I8](https://youtu.be/wZSFr2eYE4M?si=K0gPpFHeWrK2Y9I8)
- 2025 version of the software, using ROS:
- https://github.com/UM-Driverless/KART_SW.git
- git@github.com:UM-Driverless/KART_SW.git
-
---
## Frequently Asked Questions
## Emergency Braking System
### Why are you using a pneumatic actuator for the braking system?
If we need a force of 100 kgf at a speed of 0.5 m/s the power requirement is roughly 500 W. An electric actuator capable of that is bulky and hard to source. A cable and pulley system with a motor and pressure feedback was considered, but cables cannot bend sharply. Since we already have a pneumatic piston from our sponsor Festo, it is the simplest solution.
## Battery
### Why is the battery placed at the back?
The rear of the kart offered the most practical space for such a large and heavy component. Because the seat, wheels and pedals remain in their original positions, placing the pack behind the driver was the best compromise. Handling is less of a concern since the kart will usually run autonomously without a driver's weight.
## Motor choice
### Why not use a thermal engine?
A combustion engine would add unnecessary complexity such as fuel, exhaust and cooling. Electric motors require little maintenance and are simpler to control electronically. Since this prototype focuses on sensors, actuators and software, the type of engine does not matter as long as the vehicle moves when throttle is applied.
---
## Contact
You can reach the Ü Motorsport Formula Student team via email at [marketingumotorsport@gmail.com](mailto:marketingumotorsport@gmail.com).
Our workshop is located at
[Ü‑Motorsport – C. del Molino, S/N, 28943 Fuenlabrada, Madrid](https://maps.app.goo.gl/aSBnuLuFuLq2rfQt5) (40.280670, -3.822346).
Our website: [https://u-motorsport.urjc.es/](https://u-motorsport.urjc.es/)
**Social media**
- [Instagram](https://www.instagram.com/_umotorsport/)
- [LinkedIn](https://www.linkedin.com/company/u-motorsport/)
- [TikTok](https://www.tiktok.com/@_umotorsport?is_from_webapp=1&sender_device=pc)
- [X](https://twitter.com/_umotorsport)
- [Facebook](https://www.facebook.com/umotorsport)
---
*This documentation is available at https://um-driverless.github.io/kart_docs/ and follows the llms.txt standard for LLM consumption.*