The Raspberry Pi Pico2 W was utilized to build a low-cost, mobile platform running FreeRTOS and Bluekitchen's BTstack.
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:
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.
KiCad V8.0 was used for the project's schematic capture and PCB design. The B_Bot PCB was fabricated by PCBWay.
View the B_Bot 2.0 introductory video powered by Raspberry Pi Pico 2 W:
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 are represented with arrows or lines all leading to the center or the main concept.
The second level components or concepts are:
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.
Desgin Process
Here is an overview of the engineeing design process
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.
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:
The B_Bot top-level block diagram shows the key electrical components or modules.
The Raspberry Pi Pico W (or 2W) 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 2W) 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.
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.
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.
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.
Core technologies: Raspberry Pi Pico W, RP Pico SDK, Real-Time Operating System (FreeRTOS), and Bluetooth Low Engery (BTstack).
Description of the B_Bot system and methodologies used during the project development, from top level block diagrams to a more detailed information.
C was the primary high-level language used for software development
The final product, the B_Bot has both electrical hardware and mechanical hardware (chassis, motors, and sensor).
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.