

Hexabot
Design files and source code of a mobile robot for the Eurobot competition
- Size
- 100 × 100 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 125
- Nets
- 113
- Pads
- 412
- Tracks, vias
- 1,515, 433
- Pours
- 3
- Routed
- Yes
- KiCad
- KiCad 4
- Created
- 7 Jun 2015
- Updated
- 7 Nov 2021
Overview
Hexabot is an open-source printed circuit board by Caerbannog, from the Caerbannog/hexabot repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 100 × 100 mm with 125 parts on 113 nets, routed with 1,515 tracks and 433 vias.
It is built around the DSPIC33EP256MU806-E/MR and L6201PS. Its parts include 32 capacitors, 29 resistors, 27 connectors, 14 diodes and 6 ICs. It belongs with the robots and motor control boards and the PIC boards of this library.
Main components
2DSPIC33EP256MU806-E/MR
QFN-64-EP(9x9)240MHz 3V~3.6V 51 Integrated ADC interface、Integrated PWM control、RTC and timer、Low-power mode、High-speed peripheral interface、Hardware MAC acceleration、DMA data transfer QFN-64-EP(9x9) Digital Signal Processors (DSP/DSC) ROHSMicrochip TechnologyDigital Signal Processors (DSP/DSC)L6201PS
PowerSO-20PowerSO-20 Brushed DC Motor Drivers ROHSSTMicroelectronicsBrushed DC Motor Drivers
README
README.mdHexabot Sources
Design files and source code of a mobile robot for the Eurobot competition.
The controller board is built in KiCad around a dsPIC33EP256MU806 (QFN, motor control, USB). You can control it from your development machine or an embedded Linux like the Raspberry Pi (raspbian jessie recommended).
Controller PCB
The board handles various functions: motor control, odometry, sensors and servomotors. It has two layers, 10cm*10cm and mostly 0806 SMT components.
You can buy 10 PCBs for 32$ at SeeedStudio. Then we hand-soldered ours.

Embedded Software
The source code for the microcontroller is in hexabot-dsPIC33.X. It is controlled with the tools in linux. Most are Python scripts that use PyUSB to communicate with the board through independant USB endpoints:
- Bulk commands to set parameters and read back values. The basic idea is to run
./command.py <register> <value>to set a value. - Bulk metrics broadcasting, isochronous packets for time-sensitive data. Dump them with
./usb_controller.py. - Serial port for debugging. Show the debug console with
miniterm.py /dev/ttyACM* 9600 -D.
A higher level scripts like joystick.py uses the command endpoint to let you control the motors with a USB joystick.
User Interface
The ui directory contains a Python webserver with these features:
- live updates of the position according to odometry,
- graphs to visualize metrics,
- maybe someday a way to send commands.
Setup
Download and install the MPLABX IDE and the XC16 compiler. You need xc16 v1.25+ because of bug XC16-781 (snprintf). Sadly the peripheral libraries were last shipped with v1.24 and the new Code Configurator doesn't support dsPIC33E yet. You need to copy the libraries from one installed version to the other.
Install Python 3 and debugging tools like Wireshark. For Ubuntu 15.04 you can run:
git clone https://github.com/Caerbannog/hexabot.git
sudo apt-get install python3-pip wireshark
sudo pip3 install pyusb==1.0.0b1 autobahn==0.10.4 pyinotify==0.9.6 bottle==0.12.8 pyserial
sudo adduser $USER dialout
sudo adduser $USER wireshark
echo usbmon | sudo tee -a /etc/modules
sudo cp 99-hexabot.rules /etc/udev/rules.d/
sudo service udev reload # then you need to replug the deviceContributing
Pull requests are welcome on the project page: https://github.com/Caerbannog/hexabot
Licenses
- Hardware design files are published under the CERN OHL v.1.2.
- Source code is published under the GPLv3 or later.
- Note that Microchip's USB library and the CDC-basic demo have a more restrictive license.
TODO list
- Documentation for the code. Links to documentation for the motor control and odometry.
Parts
125| Qty | Value | Footprint | References |
|---|---|---|---|
| 8 | 100n | Resistors_SMD:R_0805 | C3, C11, C12, C13, C14, C15, C16, C21 |
| 8 | 10k | Resistors_SMD:R_0805 | R5, R6, R7, R22, R26, R27, R30, R33 |
| 7 | NC | Resistors_SMD:R_0805 | C26, R9, R10, R11, R13, R14, R15 |
| 4 | 15n | Resistors_SMD:R_0805 | C17, C19, C22, C24 |
| 4 | 1k | Resistors_SMD:R_0805 | R16, R24, R28, R35 |
| 4 | 470R | Resistors_SMD:R_0805 | R19, R20, R21, R25 |
| 4 | D | Diodes_SMD:SOD-123 | D11, D12, D13, D14 |
| 4 | HOLE_M3 | hexabot:M3-hole-plated | MH1, MH2, MH3, MH4 |
| 4 | LEDB | Resistors_SMD:R_0805 | D7, D8, D9, D10 |
| 4 | Q_NMOS_GSD | Housings_SOT-23_SOT-143_TSOT-6:SOT-23 | Q1, Q2, Q3, Q4 |
| 3 | JUMPER | Pin_Headers:Pin_Header_Straight_1x02 | JP1, JP2, JP3 |
| 3 | NC | Pin_Headers:Pin_Header_Straight_1x01 | P25, P26, P27 |
| 2 | 0R | Resistors_SMD:R_0805 | R17, R18 |
| 2 | 0R1 3W | Resistors_SMD:R_1206 | R31, R34 |
| 2 | 10R | Resistors_SMD:R_0805 | R29, R32 |
| 2 | 18p | Resistors_SMD:R_0805 | C7, C8 |
| 2 | 220n | Resistors_SMD:R_0805 | C20, C25 |
| 2 | 22n | Resistors_SMD:R_0805 | C18, C23 |
| 2 | 2u2 | Resistors_SMD:R_0805 | C1, C2 |
| 2 | 4u7 | Resistors_SMD:R_0805 | C6, C9 |
| 2 | L6201PS | hexabot:powerso-20 | U5, U6 |
| 2 | ZENER | Diodes_SMD:SOD-323 | D2, D3 |
| 1 | 10u | Resistors_SMD:R_0805 | C10 |
| 1 | 1M | Resistors_SMD:R_0805 | R8 |
| 1 | 21k | Resistors_SMD:R_0805 | R2 |
| 1 | 2k | Resistors_SMD:R_0805 | R23 |
| 1 | 330R | Resistors_SMD:R_0805 | R4 |
| 1 | 330u | hexabot:c_elec_8x10.5 | C4 |
| 1 | 330u | hexabot:c_elec_10x10.5 | C5 |
| 1 | 4K7 | Resistors_SMD:R_0805 | R1 |
| 1 | 7k52 | Resistors_SMD:R_0805 | R3 |
| 1 | 8M | hexabot:XTAL_5x3.2 | Y1 |
| 1 | 9k | Resistors_SMD:R_0805 | R12 |
| 1 | BATTERY | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM3-96mm_Lock_2pin_straight | P1 |
| 1 | BUMP1 | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM2-54mm_Lock_2pin_straight | P9 |
| 1 | BUMP2 | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM2-54mm_Lock_2pin_straight | P10 |
| 1 | D | hexabot:SOD-128 | D1 |
| 1 | DEBUG | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM2-54mm_Lock_5pin_straight | P12 |
| 1 | DSPIC33EP256MU806 | hexabot:QFN-64-1EP_9x9mm_Pitch0.5mm | U4 |
| 1 | DYNAMIXEL1 | hexabot:molex-22-03-5035 | P5 |
| 1 | DYNAMIXEL2 | hexabot:molex-22-03-5035 | P24 |
| 1 | ENC1 | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM2-54mm_Lock_4pin_straight | P17 |
| 1 | ENC2 | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM2-54mm_Lock_4pin_straight | P18 |
| 1 | ENC3 | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM2-54mm_Lock_4pin_straight | P19 |
| 1 | ENC4 | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM2-54mm_Lock_4pin_straight | P20 |
| 1 | EXT_POWER | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM3-96mm_Lock_2pin_straight | P2 |
| 1 | FUSE | Resistors_SMD:R_1206_HandSoldering | F1 |
| 1 | LEDG | Resistors_SMD:R_0805 | D6 |
| 1 | LEDR | Resistors_SMD:R_0805 | D4 |
| 1 | LEDY | Resistors_SMD:R_0805 | D5 |
| 1 | LOGO | hexabot:hexabot | G*** |
| 1 | MCP1727 | hexabot:SOIC-8_3.9x4.9mm_Pitch1.27mm | U3 |
| 1 | MOTOR_L | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM3-96mm_Lock_2pin_straight | P15 |
| 1 | MOTOR_R | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM3-96mm_Lock_2pin_straight | P14 |
| 1 | NC | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM2-54mm_Lock_6pin_straight | P22 |
| 1 | NC | Pin_Headers:Pin_Header_Straight_1x06 | P8 |
| 1 | NC | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM2-54mm_Lock_5pin_straight | P13 |
| 1 | OPEN_HARDWARE_1 | Symbols:Symbol_OSHW-Logo_SilkScreen | LOGO1 |
| 1 | PANIC BUTTON | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM3-96mm_Lock_2pin_straight | P7 |
| 1 | PICKIT | Pin_Headers:Pin_Header_Straight_1x05 | P6 |
| 1 | PTN78020 +5V | hexabot:PTN78020H | U1 |
| 1 | PTN78020 SERVO | hexabot:PTN78020H | U2 |
| 1 | PUSH1 | hexabot:SW_PUSH-SMD | SW1 |
| 1 | PUSH2 | hexabot:SW_PUSH-SMD | SW2 |
| 1 | SERVO1 | Pin_Headers:Pin_Header_Straight_1x03 | P3 |
| 1 | SERVO2 | Pin_Headers:Pin_Header_Straight_1x03 | P4 |
| 1 | START | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM2-54mm_Lock_2pin_straight | P23 |
| 1 | UART1_5V | Sockets_MOLEX_KK-System:Socket_MOLEX-KK-RM2-54mm_Lock_4pin_straight | P16 |
| 1 | UART2_FTDI3V3 | Pin_Headers:Pin_Header_Straight_1x06 | P21 |
| 1 | USB_B | hexabot:MICRO-B_USB | P11 |
Questions
How big is the Hexabot PCB?
It measures 100 × 100 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Hexabot use?
125 parts, built around the DSPIC33EP256MU806-E/MR and L6201PS. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Hexabot KiCad files?
From the Caerbannog/hexabot repository on GitHub, at the commit this page was made from: the board is kicad/hexabot.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the Hexabot design in my own project?
Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).
Similar boards
- 2 layers72.4 × 45.7 mm

- 2 layers108.1 × 67 mm

Dvirka
pavelkejik/chicken-door
Automatic chicken coop door with Wi-Fi and ESP-NOW communication.
89 parts - 2 layers42.5 × 55.5 mm

- 2 layers133.9 × 76.2 mm

- 2 layers139.1 × 107.7 mm

Lotus58 Glow 130
TweetyDaBird/Lotus-58-Classic
A split ergo linear keyboard derived from the Lily58 family
125 parts390 - 2 layers98 × 128 mm

- 2 layers281 × 76.2 mm

Treadstone48
marksard/Keyboards
This repository is warehouse of my keyboard architecture.
125 parts193MIT - 2 layers20 × 110 mm
