Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Robotics at Home with Raspberry Pi Pico

You're reading from   Robotics at Home with Raspberry Pi Pico Build autonomous robots with the versatile low-cost Raspberry Pi Pico controller and Python

Arrow left icon
Product type Paperback
Published in Mar 2023
Publisher Packt
ISBN-13 9781803246079
Length 400 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Danny Staple Danny Staple
Author Profile Icon Danny Staple
Danny Staple
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Part 1: The Basics – Preparing for Robotics with Raspberry Pi Pico
2. Chapter 1: Planning a Robot with Raspberry Pi Pico FREE CHAPTER 3. Chapter 2: Preparing Raspberry Pi Pico 4. Chapter 3: Designing a Robot Chassis in FreeCAD 5. Chapter 4: Building a Robot around Pico 6. Chapter 5: Driving Motors with Raspberry Pi Pico 7. Part 2: Interfacing Raspberry Pi Pico with Simple Sensors and Outputs
8. Chapter 6: Measuring Movement with Encoders on Raspberry Pi Pico 9. Chapter 7: Planning and Shopping for More Devices 10. Chapter 8: Sensing Distances to Detect Objects with Pico 11. Chapter 9: Teleoperating a Raspberry Pi Pico Robot with Bluetooth LE 12. Part 3: Adding More Robotic Behaviors to Raspberry Pi Pico
13. Chapter 10: Using the PID Algorithm to Follow Walls 14. Chapter 11: Controlling Motion with Encoders on Raspberry Pi Pico 15. Chapter 12: Detecting Orientation with an IMU on Raspberry Pi Pico 16. Chapter 13: Determining Position Using Monte Carlo Localization 17. Chapter 14: Continuing Your Journey – Your Next Robot 18. Index 19. Other Books You May Enjoy

What this book covers

Chapter 1, Planning a Robot with Raspberry Pi Pico, introduces Raspberry Pi Pico in relation to other robotics main controllers. It shows the advantages of the CircuitPython programming environment and takes you through making an overview plan for a robot build built around Pico. The chapter provides a robot hardware shopping list for the first half of the book, discussing the parts and trade-offs in choosing them.

Chapter 2, Preparing Raspberry Pi Pico, takes you through getting CircuitPython onto Pico, then taking your first steps in writing code with it. It will also cover soldering headers onto Raspberry Pi Pico so it can connect to robot parts.

Chapter 3, Designing a Robot Chassis in FreeCAD, introduces FreeCAD while turning the overview plan into 3D CAD designs. It shows you how to make drawings from the design for building the robot parts.

Chapter 4, Building a Robot around Pico, shows how you can use CAD drawings with hand tools to craft robot parts by cutting and drilling sheet plastic. It guides you in assembling the parts then wiring and connecting the electronics. This chapter is where the robot is first powered on!

Chapter 5, Driving Motors with Raspberry Pi Pico, introduces you to controlling motors with CircuitPython and Raspberry Pi Pico, showing how motors can be used to make line motions and turns and how speed can be controlled. The chapter then shows you how to pull these together into programmed motion sequences.

Chapter 6, Measuring Movement with Encoders on Raspberry Pi Pico, introduces the first robotic sensor in the book with wheel encoders, showing you how to detect wheel movement in code. The chapter covers the Raspberry Pi Pico PIO peripheral as a powerful way to manage these sensors.

Chapter 7, Planning and Shopping for More Devices, prepares you for the next section of the book with distance sensors, Bluetooth LE, and an inertial measurement unit (IMU), with further advice on choosing the devices and how they will be attached. The chapter provides a shopping list for the latter part of the book. You will revisit FreeCAD part design to make sensor mounts, and then use tools to cut them.

Chapter 8, Sensing Distances to Detect Objects with Pico, takes you through attaching and wiring two distance sensors into the robot. The chapter provides information on I2C communication and then shows you how to program the robot to communicate with the sensors. You will then build code for the robot to autonomously avoid walls.

Chapter 9, Teleoperating Raspberry Pi Pico Robot with Bluetooth LE, makes a comparison of wireless connection options, showing why Bluetooth LE was a suitable design choice. You will connect a Bluetooth LE module to the robot, then extend existing code to output sensor data through this connection, and display the output on a smartphone. You will also see how to drive the robot from a smartphone.

Chapter 10, Using the PID Algorithm to Follow Walls, provides an introduction to the PID algorithm, a fundamental building block for sensor/output control behaviors in robotics. We build a wall-following demonstration using a distance sensor, then show you how to tune the PID with smartphone plots via Bluetooth LE.

Chapter 11, Controlling Motion with Encoders on Raspberry Pi Pico, revisits encoders, showing you how to convert their output into units understandable by humans. You will learn how to combine these sensors with the PID algorithm to control motor speeds and drive in a straight line. You will then program the robot to drive a specified distance in a straight line at a specified speed.

Chapter 12, Detecting Orientation with an IMU on Raspberry Pi Pico, introduces the IMU, a sensor that lets you determine the orientation of the robot. The chapter provides a guide on connecting the sensor and calibrating it. You will use the IMU with the PID algorithm for a behavior that makes a robot always face north. Finally, the chapter shows you how to program the robot to make a specified turn using the IMU.

Chapter 13, Determining Location with Monte Carlo, will show you how to program a robot to determine where it is likely to be in an arena. You’ll use plans in the chapter to build a foam board arena and model this arena in code. You are shown how to visualize this space on a computer using Bluetooth LE with Matplotlib. You will then learn about moving robot poses based on sensor input. The chapter shows how multiple robot behaviors can cooperate in the same application. You will be introduced to using probability algorithms in robot motion, making predictions, and refining them.

Chapter 14, Continuing Your Journey – Your Next Robot, provides a summary of the topics learned in the book, with information on digging deeper into each of them. The chapter provides ideas and research areas for you to extend all the aspects of the robot, and then further suggestions to build more ambitious robots and grow your skills. The chapter also recommends robotics communities you could participate in.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime