This repository documents the drive-by-wire electrical and control architecture of the Automama EV platform.
The system is designed for research, experimentation, and future autonomous driving integration.
The vehicle is fully electronic — no mechanical steering column or brake linkage is used.
Jetson Nano (Orin Super) — high-level host. ESP32-S3 dev board — low-level real-time controller.
| Layer | Hardware | Role |
|---|---|---|
| High-Level Host | Jetson Nano / Laptop | Sends control commands |
| Low-Level Real-Time Controller | ESP32-S3 | Executes steering, braking, and throttle |
The ESP32-S3 is always actuator master.
Jetson/Laptop only issues setpoints.
Electrical power flow diagram showing the 48V → 24V → 5V distribution and propulsion path.
48V Battery Pack
├──> BLDC Motor Controller → Propulsion
├──> 48→24V Buck (600W) → Steering & Brake Actuators
└──> 24→5V Buck → ESP32-S3, Sensors, Display
Battery Example:
Example 12V battery cell (pack uses multiple in series for 48V).BTS7960 H-bridge motor driver used for steering motor control.
| Component | Description |
|---|---|
| Motor | 380 kg·cm DC Gear Motor |
| Driver | BTS7960 high-current driver |
| Feedback | Rotary Encoder |
Control Logic:
error = target_angle - encoder_angle
if |error| > deadband:
drive motor toward target
else:
stop motor
Recommended deadband: ±1.5° to ±3°
24V linear actuator used for drive-by-wire braking.
Feedback Sensor:
Slide potentiometer (10k) for brake position feedback.brake_level (0–100%)
↓
desired actuator stroke
↓
measured via slide potentiometer feedback
1000W 48V BLDC motor for propulsion. BLDC motor controller (throttle analog input interface).
Throttle command:
PWM (ESP32) → Analog Throttle Input (BLDC Controller)
(Keyboard / Bluetooth / Jetson)
↓ Serial UART
ESP32-S3
┌──────────┬──────────┬──────────┐
Steering Brake Throttle
(Encoder) (Slide Pot) (PWM Out)
| Command | Example | Meaning |
|---|---|---|
S<x> |
S30 |
Set steering angle to +30° |
B<x> |
B75 |
Apply 75% braking |
T<x> |
T120 |
Set throttle PWM to 120 |
STOP |
STOP |
Emergency stop |
| File | Purpose |
|---|---|
Automama_control_test.ino |
System main control loop |
steering_control.ino |
Steering control logic |
brake_operation.ino |
Brake actuator control |
throttle.ino |
Propulsion PWM control |
read_data.ino |
Encoder / potentiometer readings |
serial_communication.ino |
Serial command parser |
manual_steering.ino |
Local test/override mode |
preference_manager.ino |
Calibration & limits |
| ESP32-S3 Pin | Name | Device | Notes |
|---|---|---|---|
| GPIO14 | STEER_PWM | BTS7960 | Motor speed control |
| GPIO15 | STEER_DIR | BTS7960 | Direction control |
| GPIO36 | ENC_A | Rotary Encoder | Input |
| GPIO39 | ENC_B | Rotary Encoder | Input |
| GPIO4 | BRAKE_PWM | Actuator Driver | Speed control |
| GPIO5 | BRAKE_DIR | Actuator Driver | Extend / Retract |
| GPIO34 | BRAKE_FEEDBACK | Slide Pot | ADC input |
| GPIO16 | THROTTLE_PWM | BLDC Controller | Throttle PWM |
| GPIO1 / GPIO3 | UART TX/RX | Jetson / Laptop / BT Module | Command input |
| 5V | Logic Power | LM2596 | Must be stable |
| GND | Ground | All devices | Common ground required |
- No control signal >200ms → Throttle = 0 + Brake engaged
- Startup → Neutral Safe Mode
- Hard-limit travel protection in software
- Physical 48V emergency kill switch
Vehicle during field testing. Onboard display and monitoring interface.
| Name | Profile |
|---|---|
| Nainaiu Rakhaine | GitHub |
| Ad-Deen Mahbub | GitHub |
Open for research and educational use.
Contact for commercial or industrial usage.

















