DigiTekXplorer
Home
Capstone Project
abCore16 Folder
  • abCore16 Project
  • Instruction Set
  • abCore16 User Guide
AI Case Studies
Coding Basics
Embedded Systems
RP Pico Folder
  • Raspberry Pi Pico
  • Pico VGA Project
  • Pico Audio Project
FPGAs
Basic Concepts
Android App Folder
  • BLE Basics
  • Android Studio
  • BLE App User Guide
  • The Gemini Prompt
  • Android App Development
UART Design Folder
  • UART Design
DigiTekXplorer
Home
Capstone Project
abCore16 Folder
  • abCore16 Project
  • Instruction Set
  • abCore16 User Guide
AI Case Studies
Coding Basics
Embedded Systems
RP Pico Folder
  • Raspberry Pi Pico
  • Pico VGA Project
  • Pico Audio Project
FPGAs
Basic Concepts
Android App Folder
  • BLE Basics
  • Android Studio
  • BLE App User Guide
  • The Gemini Prompt
  • Android App Development
UART Design Folder
  • UART Design
More
  • Home
  • Capstone Project
  • abCore16 Folder
    • abCore16 Project
    • Instruction Set
    • abCore16 User Guide
  • AI Case Studies
  • Coding Basics
  • Embedded Systems
  • RP Pico Folder
    • Raspberry Pi Pico
    • Pico VGA Project
    • Pico Audio Project
  • FPGAs
  • Basic Concepts
  • Android App Folder
    • BLE Basics
    • Android Studio
    • BLE App User Guide
    • The Gemini Prompt
    • Android App Development
  • UART Design Folder
    • UART Design
  • Home
  • Capstone Project
  • abCore16 Folder
    • abCore16 Project
    • Instruction Set
    • abCore16 User Guide
  • AI Case Studies
  • Coding Basics
  • Embedded Systems
  • RP Pico Folder
    • Raspberry Pi Pico
    • Pico VGA Project
    • Pico Audio Project
  • FPGAs
  • Basic Concepts
  • Android App Folder
    • BLE Basics
    • Android Studio
    • BLE App User Guide
    • The Gemini Prompt
    • Android App Development
  • UART Design Folder
    • UART Design

DigiTekXplorer - Capstone Project

Raspberry Pi Pico2 W Project: B_Bot

B_Bot System

The Raspberry Pi Pico2 W was utilized to build a low-cost, mobile platform running FreeRTOS and Bluekitchen's BTstack. 

System Description

The B_Bot project is a reimplementation of the A_Bot project, tailored for the Raspberry Pi Pico. The B_Bot project leverages FreeRTOS and BlueKitchen's BTstack for efficient multitasking and Bluetooth communications. The following tasks are performed by our system:

  • Motor control, 
  • LED indication, 
  • Ultrasonic ranging for collision avoidance, 
  • Wired user serial interface for development and debug, 
  • Onboard OLED graphic display,
  • Wireless connectivity (Bluetooth Low Energy, BLE).


In addition, the LightBlue app running on an Android cell phone is used to interact with the B_Bot's BLE interface, enabling remote control and data exchange.

B_Bot Software

C code for the B-Bot can be downloaded from:

https://github.com/digitekxplorer/b_bot


 B_Bot software characteristics:

1) Raspberry Pi Pico SDK V2.1.0

2) BTstack Bluetooth interface for wireless commands

3) FreeRTOS for Raspberry Pi Pico W and Pico 2 W

4) Dual motor control (PWM motor control)

5) Ultrasonic ranging for collision avoidance (PIO)

6) Finite State Machines (FSMs) for vehicle movement control

7) Watchdog timer to reset RP2350 in case of system crash

8) 0.96 inch OLED display (128 x 64 pixels; I2C interface)

9) Serial Interface for debugging (Default UART)

10) Blinking LEDs to indicate FreeRTOS is working

11) Pushbutton interrupt to activate vehicle movement

12) Extra ports for expansion or experimentation


B_Bot Hardware

KiCad V8.0 was used for the project's schematic capture and PCB design. The B_Bot PCB was fabricated by PCBWay.


 B_Bot hardware characteristics:

1) Raspberry Pi Pico2 W

2) B_Bot PCB (compact form factor 3 x 3.1 inches)

3) Two-layer custom PCB

4) Onboard 5V voltage regulation

5) Two 2-pin connectors for motors

6) Four pin connector for HC-SR04 Ultrasonic module

7) Battery Power barrel connector and power switch

8) Voltage divider for battery voltage input to ADC

9) Motor driver module (TB6612FNG)

10) 0.96 inch OLED Display; Shows messages, temperature, and battery voltage

11) Two LEDs

12) Pushbutton switch to activate vehicle movement

13) Extra port connectors for expansion or experimentation

14) Jumper to select battery power or Pico USB power

15) Jumper to select 3.3V or 5V to expansion port


B_Bot Video

View the B_Bot 2.0 introductory video powered by Raspberry Pi Pico 2 W:

Introduction to B_Bot 2.0

Project Concepts Mind Map

A mind map is a diagram used to visually organize information into a hierarchy, showing relationships among components of the project. It is often drawn as an image and associations of the system components or concepts.  Components or concepts are represented as circles with arrows or lines all leading to the center or the main concept. 


The second level components or concepts are:

  • System Requirements
  • Design Process
  • Real-Time Operating System: Multitasking
  • Communications
  • Inputs and Outputs
  • Project Coding Language
  • Code Build Process
  • Software Version Control
  • Schematic Capture and PCB Design


System Requirements

Engineering system requirements are a set of specifications that detail the precise functions, performance, and constraints of a system. They serve as the foundational document for the entire engineering process, guiding design, development, testing, and deployment.


System requirements are a fundamental part of the system design process and should be defined before starting a new project. In our case, the B_Bot system, we define simple requirements to guide the development process. The following items are requirements for our system.

  1. Low cost (less than $150)
  2. Low power 
  3. Mobile
  4. Communications
    1. Serial: UART, I2C
    2. Wireless (Bluetooth)
  5. Programmable
  6. Easy to use software development environment
  7. Microcontroller Multitasking (FreeRTOS)
  8. Main Controller: Raspberry Pi Pico W (or Pico 2 W)
  9. Collision avoidance (ultrasonic ranging)
  10. Software version control (GitHub)
  11. Hardware development
    1. Chassis & motors
    2. Motor drivers
    3. Power supply
    4. Ultrasonic sensor (HC-SR04)
    5. Connectors and cables
  12. Positive learning experience (Have Fun!)


Desgin Process

 Here is an overview of the engineeing design process

  • Define the Problem
    • B_Bot system requirements
  • Conduct Research
    • started with a previous design (A_Bot)
  • Brainstorm & Conceptualize
    • used mind maps
  • Create a Prototype
    • several subsystem prototypes were created
  • Select & Finalize
    • selected final electrical components
  • Product Analysis
  • Improve Product Design


In our informal design process, we did not adhere to all steps of the design process.  For example, a product analysis was not performed.  The final step, improve the product design, is an ongoing step that may continue for an extended period. 


Real-Time Operating System: Multitasking

A "real-time operating system" (RTOS) is a specialized operating system designed to manage and prioritize tasks within strict time constraints, guaranteeing timely responses to events and making it suitable for critical applications where fast and predictable processing is essential. Essentially, it ensures tasks are completed within specified deadlines, often measured in milliseconds, by prioritizing tasks based on their time sensitivity.


FreeRTOS was used in the B_Bot's Pico W.  FreeRTOS is a market-leading embedded system RTOS supporting many processor architectures, including the Pico's RP2040, with a small memory footprint, fast execution times, and cutting-edge RTOS features and libraries. It’s open-source and actively supported and maintained. 


Communications

Serial Interface (wired):  Universal Asynchronous Receiver / Transmitter (UART)


Wireless: Bluetooth Low Energy (BLE)


Inputs and Outputs

Microcontroller Input/Output (IO)


Outputs: LEDs, motor control, SSD1306 display, HC-SR04 ultrasonic module trigger, and UART TX.


Inputs:  Ultrasonic module echo, pushbuttons, battery voltage analog level, and UART RX.


Project Coding Language

The Raspberry Pi Pico supports two high-level languages (C and MicroPython) and assembly language.  For the B_Bot project the C language was selected because FreeRTOS and BTstack are written in C therefore the coding environment is naturally easier to configure in C.


Code Build Process

Because C was chosen as the project language, we needed a build process that would support C.  There are several tools and build processes that also support the Raspberry Pi Pico.  Two examples are Visual Studio Code (VSC) and the Makefile process.


Software Version Control

We use Git and GitHub to maintain version control for the B_Bot project.


Schematic Capture and PCB Design

We used KiCad for schematic capture and Printed Circuit Board (PCB) design.


B_Bot Mind Map

There is a lot of information in this diagram, but a clear understanding of the diagrams provides a guide to the system development from start to finish. As can be seen from the mind map, the second level components are: 

  • Raspberry Pi Pico W or Pico 2 W
  • Software
  • Real-Time Operating System: Multitasking
  • Collision avoidance
  • Development and Debug
  • Wireless control
  • External controller (cell phone with Bluetooth app)
  • System Integration
  • Power Supply
  • Mechanical Hardware
  • Schematic Capture and custom PCB Design

B_Bot Electrical Block Diagram

The B_Bot top-level block diagram shows the key electrical components or modules.


The Raspberry Pi Pico W (or Pico 2 W) is at the center of the diagram and is the most important device in the system. The motor driver module is connected to control signals from the Pico W and outputs bi-directional power lines to both DC motors. The ability of the motor driver to provide bi-direction current to the motors allows us to move the vehicle forward and backward. The motor driver also provides a higher voltage, and much higher currents required to drive the motors.


The HC-SR04 ultrasonic module accepts a trigger signal from the Pico W (or 2 W) and returns an echo signal indicating the distance to an object in front of the vehicle. The DC-DC converter takes in a battery voltage from 5V to 30V and regulates an output voltage of +5V with an output current of 1.5A.

Schematic Capture

KiCad V8.0 was used to create the electrical schematic for the B_Bot, providing a permanent and detailed record of the circuit design. The Raspberry Pi Pico W (or 2W) serves as the main component in the design. Connected to the Pico are key peripherals including a dual motor driver module, a small OLED display (for user feedback), a UART interface (for debugging), and header connectors for interfacing with external sensors and actuators. The Pico also drives two LEDs (for status indication) and interfaces with a pushbutton for user input. Power is supplied to the Pico via a +5V regulator, ensuring stable operation despite variations in battery voltage.


Unused Pico pins were brought out to header connectors for future expansion and experimentation. These connectors provide access to versatile GPIO (General Purpose Input/Output) pins, along with ground, +3.3V, and +5V rails for powering external circuits. 


PCB Design

KiCad V8.0 was used for the B_Bot's Printed Circuit Board (PCB) design.   The PCB is a two-layer board with 3.0 x 3.1 inch dimensions.  


The B_Bot PCB was fabricated at PCBWay.  


PCB Model

KiCad's PCB modeling feature provides a valuable way to visualize the assembled board. Designers can use it to verify component placement and identify potential mechanical issues before generating Gerber files for fabrication, reducing the risk of costly errors.

B_Bot Topics to Explore

Core Technologies

Software Development

System Architecture

Core technologies: Raspberry Pi Pico W, RP Pico SDK, Real-Time Operating System (FreeRTOS), and Bluetooth Low Engery (BTstack).

Xplorer More

System Architecture

Software Development

System Architecture

Description of the B_Bot system and methodologies used during the project development, from top level block diagrams to a more detailed information.

Xplorer More

Software Development

Software Development

Software Development

 C was the primary high-level language used for software development   

Xplorer More

Hardware Design

Hardware Design

Software Development

The final product, the B_Bot has both electrical hardware and mechanical hardware (chassis, motors, and sensor).

Xplorer More

Tools

Hardware Design

Tools

Many tools were needed for the system development.

Xplorer More

B_Bot Development

    Copyright © 2025 DigiTekXplorer - All Rights Reserved.


    Powered by

    This website uses cookies.

    We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.

    Accept