Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
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

A recommended shopping list for robot basics

We’ve got a plan—a test fit, a method to make the chassis, decisions about the processing on board, and how we will power the thing. Now, we need to buy the necessary parts and tools to make this happen.

Let’s start with the parts.

Robot parts and where to find them

There are many places to find robot parts, and some of these parts go by different names from different manufacturers. I’ll attempt to provide enough information about the parts so that they can be easily found in many countries.

Part shopping list

We’ll start with a part list for the initial robot chassis. For each part, where necessary, we’ll show search terms, synonyms, and manufacturer numbers. You can try combinations of these to find parts—I wouldn’t suggest using all the terms at once but instead refining them until you get something else. Then, we can discuss places to buy them:

  • Raspberry Pi Pico: This is the most important part to get you started. Other RP2040-based boards might be suitable; however, with different form factors and pins, you’ll need to get creative when it comes to wiring them. Beware of parts with fewer exposed pins, and ensure that they are RP2040 boards. Alternative parts: Headered Pico, Pimoroni Pico LiPo, Adafruit Feather RP2040, SparkFun Pro Micro RP2040, RP2040 Plus.
  • A USB micro cable: You might already have one for your phone, but phones have been coming with USB-C cables for some time. To be specific, I mean a USB-A to USB-Micro cable. However, some laptops have a USB-C port—for those cases, consider a USB-C to USB-Micro cable instead.
  • Headers: You’ll need to solder headers onto Raspberry Pi Pico and the motor controller. Later sensors will require them, too. Search terms for these include male breakaway strip and single-row PCB through-hole pin headers. Make sure that you choose 2.54 mm or 0.1-inch pitch headers.
  • A solderless breadboard: I suggest a mini/half plus 400 tie-point breadboard, self-adhesive. Standard 0.1-inch (or 2.54 mm) pitch spacing, with a separating channel between the columns.
  • Wiring: You’ll need wiring between the components on the breadboard. For this, I suggest precut breadboard jump wire kits. These should be of the U-shape solderless kind—insulated cables with bare ends. They will be in different color-coded lengths and can be bent into shape to fit across breadboard connections.
  • A Drv8833 or TB6612fng motor controller or motor driver: I recommend the SparkFun or Adafruit models; however, other models will work. Stick to this chip, and ensure it’s a module/breakout board, not just the bare chip. It should have a square device with a capacitor on the board, too. I recommend getting a model that has pin functions printed on it. Alternatives are the L9110S, the less efficient L298n boards, or the L293 chip, which may need additional space.
  • A 5V 3A UBEC or a 5V UBEC (DC/DC step-down buck converter): Search for ones that can handle a minimum of 3 A. Larger ones are also fine. Look for those with a 5V output. If they allow 6V too, just make sure that you set the jumper to 5V. Look for those with bare input cables and a pin header end. Other buck converter modules may be suitable, but check for 3 A current capacity, and ensure that the output is 5V.
  • 8 x AA battery holder or battery compartment: Look for the flat-style ones with an integrated switch. Some come with round barrel jacks instead of bare ends—in which case, a 2.1-mm jack to screw the terminal block can be used to finish this.
  • A 1N5817 Schottky diode: These are common in many electronic outlets.
  • Motors: The N20 micro-metal gear motors with encoders. The 298:1 ratio motors have the right combination of speed and torque. Adafruit has these as ADA4640. Small DC gear motors with encoders can be substituted, but please be aware that the larger motors may require the robot to scale up along with power requirements.
  • Ball caster: A 16-30-mm caster should be fine. Most models will be suitable. Just remember to use the drawings for their mount holes later.
  • 40-90-mm wheels with N20 d-hole or universal hubs: Make sure they are designed for N20 motors.
  • 3 mm or 0.118-inch thick styrene card sheets/plates: Go for an A4, 200 x 150 mm, or greater size. They should be solid, flat sheets—not foam or hollow, and, ideally, not textured. Possible search terms include Plasticard, styrene sheet, Evergreen, and Plastruct. ABS sheets are suitable, but not acrylic as this can be brittle.
  • Kit for mounting parts: Possible search terms include standoff and mounting kit. Preferably, they should be in metal, but nylon will do fine. They should be M2, M2.5, or M3 if possible. M2.5 will cover most cases. They should have standoffs, bolts (including machine screws and truss screws), and nuts.

This list of parts and search terms will help you find all the suggested parts to build this robot. Here is a helpful list of places to buy parts from. It isn’t exhaustive, and there might be sellers in your country that can help.

For electronics parts, wheels, motors, and modules, the following stores ship worldwide:

For the styrene sheet, model supply shops are a good bet. Brands such as Evergreen are widely distributed. Hobbycraft, AliExpress, Alibaba, and Amazon carry these. While there, I suggest getting styrene angle strips and square tubes for later robot enhancements.

The robot workshop and makerspaces

There is a list of workshop and hand tools associated with this book. You can buy them yourself or use a makerspace. Let’s start with the tools that you will need access to.

List of tools

The tools required for this book are common in many workshops. In addition to this, school and college DT rooms, makerspaces, and many workshop stores will carry them:

  • Plastic cutter: The kind with changeable blades. We will be cutting through styrene, which can quickly dull a knife. Linoleum flooring cutting blades will also be a useful alternative here.
  • A cutting mat to protect your work surfaces.
  • You’ll need a try square, preferably metal.
  • A ruler: This should be at least 200 mm long. Since the book is working in metric, I suggest metric markings, too.
  • Sandpaper: You will need a selection of, at the very least, 400, 600, and 1,000 grit or similar.
  • Soldering iron and stand: You’ll be soldering some parts, so an iron is essential. Do not use a soldering iron without a stand! Many come with them. I recommend a temperature-controlled iron. In addition to this, a brass wool tip cleaner and some solder are required. We’ll use lead-free flux core solder wire.
  • 10-20-mm hook and loop self-adhesive disks.
  • A drill with 2-mm and 3-mm bits. This should be a small drill, preferably cordless. These are small parts, so precision is required more than power.
  • You’ll need a pencil to make draft lines with. Personally, I like mechanical pencils.
  • I recommend safety goggles when you drill or cut. Get a good comfortable pair—cheap uncomfortable ones might end up on your head instead of covering your eyes and won’t be protecting you.
  • For drilling and cutting, a hobby vise or clamp keeps the part still and your hands safe. A small bench vise is suitable.
  • You need a flat work area with good lighting.
  • Screwdrivers: You will want a screwdriver set. It should have Phillips (PH0 and PH1) and flat-bladed (2 mm and 3 mm) screwdrivers.
  • Spanner or wrenches in metric. Precision sets will be useful.

You can purchase these items and tools from electronics, hobby, DIY, and tool stores. AliExpress, Alibaba, eBay, and Amazon will also have them. However, if you do not have all of these tools, it feels like a lot of stuff.

An alternative to buying all these tools is to find a makerspace or hackerspace near you. They will have most, if not all, of these tools. Makerspaces are community-run spaces, have collections of tools, and might even have scrap material of just the right kind of styrene. Additionally, they have other makers, who can lend you a hand and assist you if you run into difficulty with a robot project.

There are makerspaces in most cities globally. They can be easily found on search engines and social media. If there is no makerspace in your area, reaching out via social media to other makers might help you to find a similar community project. There is a global makerspace directory at https://makerspaces.make.co/.

You have been reading a chapter from
Robotics at Home with Raspberry Pi Pico
Published in: Mar 2023
Publisher: Packt
ISBN-13: 9781803246079
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 $19.99/month. Cancel anytime