Skip to the content
PCBKitNew board
2 layers75.7 × 59.4 mmBbot pcb, the printed circuit board in 3D

balancing robot

Size
75.7 × 59.4 mm
Copper layers
2
Thickness
1.6 mm
Parts
16
Nets
53
Pads
103
Tracks, vias
233, 5
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
4 Apr 2021
Updated
5 Jun 2021

Overview

Bbot pcb is an open-source printed circuit board by SharpCoder, from the SharpCoder/bbot repository on GitHub, published under the MIT licence. It is a 2-layer board of 75.7 × 59.4 mm with 16 parts on 53 nets, routed with 233 tracks and 5 vias.

It is built around the L293D, ADXL335BCP and 74HC595, with the L7805 among its other parts. Its parts include 4 ICs, 3 capacitors and 2 resistors. It belongs with the robots and motor control boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

4

README

README.md

bbot

bbot - or balancing robot - is a two-wheeled, 3D printed robot which is capable of balancing just like a seguway. The general concept behind the algorithm is: if you are falling forward, move forward. If you are falling backward, move backward. The real challenge comes in doing this quickly and accurately enough.

picture of the robot with most parts assembled

Components

The main components for bbot are as follows:

  • Adafruit Metro Mini (Arduino)
  • ADXL335 (Accelerometer)
  • SparkFun OpenLog (Telemetry to SDCard)
  • 595N (Shift Register)
  • 2x L293D (H-Bridge)
  • 2x Stepper Motors

Project Files

The project is split out into different folders. Each folder is responsible for a different aspect of the robot design.

  • bbot-firmware: The arduino source code
  • bbot-jupyter: A jupyter notebook used to analyze sensor readings
  • bbot-models: SolidWorks models, as well as finalized STL files
  • bbot-pcb: KiCAD circuit board and gerber files

bbot-firmware

Overview

The algorithm which is currently implemented takes the approach of measuring the accelerometer sensor readings every 30ms and then comparing the observed values with a known threshold. If the readings indicate it is tilting forward, the robot will activate the step-forward routine for each motor. If the readings indicate it is tilting backward, the robot will activate the step-backward routine for each motor.

In order to actually move the motors, two primary files are responsible. The first being motors.h and motors.cpp. This code is designed to track which phase of each motor is active at any point in time. Knowing what phase is active allows us to determine what move to take in order to transition to a forward or backward step state. The H-Bridge is actually wired up to a shift register and to activate it, we must keep track of which pins are active in the shift register. The code which handles this is in the files shift.h and shift.cpp. Managing the shift register is relatively straightforward and simply requires sending an int array containing the state of each pin.

Collecting telemetry is an important part of this project, so that the thresholds can be tweaked in order to improve the algorithm. The logger.h and logger.cpp files are responsible for this. By leveraging a Sparkfun OpenLog, we are able to stream telemetry data to an SDCard. Each time the sensor is observed, its readings are written to the SDCard.

Building

You can build the code through the arduino IDE. The microcontroller I used is the Adafruit Metro Mini, which is compatible with most Arduino board targets (for example: Arduino Pro Mini).

Jupyter Notebook

3D Models

TBD

Assembly Instructions

TBD

License

All source code and models are provided under the MIT license.

Parts

16
QtyValueFootprintReferences
2HA-552-4Pbbot-pcb:HA-522P-Latch_TerminalU1, U3
2L293DPackage_DIP:DIP-16_W7.62mmMOTOR1_L293D1, MOTOR2_L293D1
2SPARKFUN-RESISTORS_4.7KOHM-0603-1_10W-1%Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_VerticalR1, R2
2Screw_Terminal_2bbot-pcb:Screw_Terminal_2BatteryPack1, PowerSwitch1
174HC595Package_DIP:DIP-16_W7.62mmSHIFT_REGISTER1
1ADXL335bbot-pcb:ADXL335U2
1ArduinoProMicropromicro:ProMicroU4
1C.0047mfCapacitor_THT:C_Axial_L3.8mm_D2.6mm_P7.50mm_HorizontalC2
1L7805bbot-pcb:L7805-AMOSFET1
1L7805_IN_CAPCapacitor_THT:C_Disc_D4.3mm_W1.9mm_P5.00mmC5
1L7805_OUT_CAPCapacitor_THT:C_Disc_D4.3mm_W1.9mm_P5.00mmC4
1MountingHole_3mmMountingHole:MountingHole_3mmMounting Hole

Questions

How big is the Bbot pcb PCB?

It measures 75.7 × 59.4 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Bbot pcb use?

16 parts, built around the L293D, ADXL335BCP, 74HC595 and L7805. 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 Bbot pcb KiCad files?

From the SharpCoder/bbot repository on GitHub, at the commit this page was made from: the board is bbot-pcb/bbot-pcb/bbot-pcb.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Bbot pcb design in my own project?

Its repository publishes it under the MIT 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 layers40.6 × 50.8 mmWALTsm, the printed circuit board in 3D

    WALTsm

    google/walt

    A device for measuring latency of physical sensors and outputs on phones and computers

    26 parts474Apache-2.0
  • 2 layers50.8 × 55.9 mmIMU, the printed circuit board in 3D

    IMU

    olin-electric-motorsports/MKIV-Boards

    KiCad files for the boards on 2018-2019 car

    55 parts1
  • 2 layers109.2 × 76.2 mmMicromouse, the printed circuit board in 3D

    Micromouse

    PolyEd/MicroMouse

    Poly Ed 2023-2024 MicroMouse Contest Entry

    17 parts1
  • 2 layers60 × 60.8 mmBattleBot, the printed circuit board in 3D

    BattleBot

    trhussain/battlebot_pcb

    42 parts
  • 2 layers100 × 100 mmFlipdot H Bridge, the printed circuit board in 3D

    Flipdot H Bridge

    comakingspace/FlipDotDisplay

    They were bought at the Makerfaire Hannover 2016.

    76 parts3
  • 2 layers72.2 × 53.6 mmLow cost robotics, the printed circuit board in 3D

    Low cost robotics

    gabs911/low_cost_robotics

    Low cost robotics platform for STEM programs.

    19 parts2MIT
  • 2 layers55 × 106 mmCxCat checker, the printed circuit board in 3D

    CxCat checker

    CixoDevelop/CxCat

    This is robotic toy for Cats

    54 parts
  • 2 layersFull Circuit, the printed circuit board in 3D

    Full Circuit

    EthanSousaProjects/CBR_Custom_Cluster

    A custom cluster design for my CBR 125RW6 (2006 carb model) to replace the old large mechanical cluster with a smaller simpler design.

    76 partsGPL-3.0