Overview
Proper electrical design is crucial for robot safety and functionality. Even if you don’t fabricate a custom PCB, a clear wiring diagram ensures correct connections and helps troubleshoot issues.Deliverable: Wiring diagram showing all electrical connections
Optional: Custom PCB design for cleaner, more reliable connections
Wiring vs PCB
Wiring Diagram (Minimum Required)
- Shows all connections between components
- Can use breadboard, terminal blocks, or hand-soldered wires
- Faster to prototype
- Easier to modify during development
- Recommended for first iteration
Custom PCB (Advanced, Optional)
- Professional, compact solution
- Reduces wiring errors
- More reliable connections
- Takes time to design and fabricate
- Consider for final version
Electrical System Architecture
Power Distribution
Signal Connections
Component Specifications
Power Requirements
| Component | Voltage | Current (Typ) | Current (Peak) | Notes |
|---|---|---|---|---|
| DC Motor (each) | 12V | 0.5A | 3A | Peak at stall/startup |
| ESP32 | 5V | 0.5A | 0.8A | Via USB or VIN |
| Raspberry Pi 4/5 | 5V | 1.5A | 3A | Higher if using USB devices |
| IBT-2 Driver (each) | 12V logic | 50mA | - | Logic only, motor power separate |
| IMU ICM-20948 | 3.3V | 15mA | - | ESP32 provides 3.3V |
| LiDAR A1M8 | 5V | 400mA | 500mA | Via USB from RPi |
- Motors: 4 × 0.5A = 2A typical, 12A peak (brief)
- ESP32: 0.5A
- Raspberry Pi: 2A
- LiDAR: 0.5A
- Total @ 5V: ~3A typical
- Total @ 12V: ~2A typical, ~12A peak
Wiring Diagram Design
Tool Options
EasyEDA (Recommended for Beginners)
EasyEDA (Recommended for Beginners)
Pros:
- Free, web-based
- Integrated with JLCPCB for PCB fabrication
- Large component library
- Easy to learn
KiCad (Open Source)
KiCad (Open Source)
Pros:
- Free, powerful
- Professional-grade
- Active community
- Cross-platform
- Steeper learning curve
Fritzing (Visual, Beginner-Friendly)
Fritzing (Visual, Beginner-Friendly)
Pros:
- Visual breadboard view
- Easy for documentation
- Good for prototyping diagrams
- Less professional
- Limited for complex designs
Cadence OrCAD (Professional)
Cadence OrCAD (Professional)
Pros:
- Industry standard
- Powerful simulation
- University license available
- Complex for beginners
- Windows only
Creating the Wiring Diagram
Step-by-step in EasyEDA:-
Create New Project
- Sign in to EasyEDA
- New Project → “Mecanum Robot”
- New Schematic
-
Add Components
- Search library for: ESP32, IBT-2, etc.
- If not found, create custom symbol or use generic blocks
- Place all components on canvas
-
Draw Connections
- Power connections (red for +, black for GND)
- Signal wires (different colors for clarity)
- Label all nets (e.g., “MOTOR1_PWM”, “ENC1_A”)
-
Add Annotations
- Component values (resistor values, capacitor values)
- Voltage levels
- Pin numbers
- Wire gauge recommendations
-
Design Rules Check
- Verify no floating pins
- Check all grounds connected
- Confirm polarities (power supplies)
Wire Gauge Selection
Choose appropriate wire gauge (AWG) for current:| Current | Minimum AWG | Recommended AWG | Notes |
|---|---|---|---|
| < 0.5A | 24 AWG | 22 AWG | Signal wires, logic |
| 0.5-2A | 22 AWG | 20 AWG | 5V power distribution |
| 2-5A | 20 AWG | 18 AWG | Motor power, 12V bus |
| 5-10A | 18 AWG | 16 AWG | Main battery leads |
Connectors and Terminals
Recommended Connectors
Power:- XT60 or XT30 for battery (anti-spark, high current)
- Screw terminals for power distribution
- Fuse holders inline
- Dupont connectors (2.54mm pitch) for breadboard-style
- JST connectors for permanent connections
- Pin headers for modular connections
- Bullet connectors or solder direct
- Consider quick-disconnect for easy removal
Terminal Block Layout
For wire management without PCB:PCB Design (Advanced)
If you choose to design a custom PCB:PCB Design Steps
1
Schematic Capture
Create complete schematic with all components and connections in EasyEDA or KiCad
2
Footprint Assignment
Assign physical footprints to each component (THT vs SMD, package size)
3
PCB Layout
Arrange components on board, considering:
- Power distribution first
- Signal routing
- Thermal management (motor drivers)
- Mechanical constraints (mounting holes, size)
4
Routing
Connect all traces:
- Power traces wide (2-3mm for high current)
- Signal traces thin (0.3-0.5mm)
- Ground plane (pour copper on bottom layer)
5
Design Rule Check (DRC)
Verify no errors, proper clearances, manufacturability
6
Generate Gerber Files
Export manufacturing files for PCB fabrication house
7
Order PCBs
Upload to JLCPCB, PCBWay, or other service (~$5 for 5 boards, 1-2 week delivery)
PCB Design Guidelines
Trace Width:- Add 3-4mm mounting holes at corners
- M3 size (3.2mm holes)
- Keep components >5mm from board edge
Safety Considerations
Fusing and Protection
Fusing and Protection
- Main battery fuse: 10A
- 5V regulator fuse: 5A
- Fuse should blow before wires melt
- Use automotive blade fuses (easy to replace)
Battery Safety
Battery Safety
- LiPo batteries can catch fire if damaged
- Use LiPo safety bag for storage
- Don’t over-discharge (<3.0V per cell)
- Balance charging required
- Emergency disconnect switch mandatory
Short Circuit Prevention
Short Circuit Prevention
- Double-check polarity before powering on
- Insulate all exposed connections (heat shrink, electrical tape)
- Secure wires with zip ties (prevent movement into fan blades)
- Test with multimeter before connecting battery
Thermal Management
Thermal Management
- Motor drivers can get HOT (60-80°C)
- Ensure airflow or add heatsinks
- Don’t enclose drivers in sealed box
- Monitor temperature during initial testing
Testing Procedure
Before full power-on:1
Visual Inspection
- Check all connections match diagram
- Verify no loose wires
- Confirm polarity of all power connections
2
Continuity Testing
- Use multimeter in continuity mode
- Verify GND connections (should beep)
- Check NO shorts between power rails
3
Power Supply Test
- Connect power supply (not battery yet)
- Measure voltages at each component
- Verify 12V and 5V rails correct
4
Low-Power Test
- Power ESP32 only via USB
- Test all GPIO outputs with LED
- Verify signal levels
5
Motor Test (One at a Time)
- Connect ONE motor driver + motor
- Test with limited PWM duty cycle (20%)
- Verify rotation and encoder signals
- Repeat for all motors
6
Full System Test
- Connect all components
- Power from battery
- Monitor current draw
- Test all functions
Documentation Requirements
Your wiring diagram should include:- All components labeled with designators (U1, M1, etc.)
- All connections shown clearly
- Wire colors indicated
- Pin numbers labeled
- Voltage levels marked
- Current ratings noted
- Component values (resistors, capacitors)
- Connector types specified
- Legend/notes explaining symbols
- Revisions/version number
Example Projects
Study these open-source robot electrical designs:- ROS2 Turtlebot: Simple diff-drive wiring
- Arduino Robot Car: Similar motor driver setup
- DIY Roomba: Power distribution examples
Next Steps
Mechanical Assembly
Integrate electrical and mechanical systems
ESP32 Basics
Learn ESP32 GPIO and programming
Motor Driver Guide
Understand IBT-2 motor driver
Hardware Reference
Complete component specifications