Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Robotics at Home with Raspberry Pi Pico

You're reading from  Robotics at Home with Raspberry Pi Pico

Product type Book
Published in Mar 2023
Publisher Packt
ISBN-13 9781803246079
Pages 400 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Danny Staple Danny Staple
Profile icon Danny Staple

Table of Contents (20) Chapters

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

An introduction to pulse width modulation speed control

Pulse Width Modulation (PWM) is how we control motor speeds from a digital control system. Instead of varying the voltage supplied to a motor, we use pulses to control it. The pulses are usually at a fixed rate, but the ratio of time-on to time-off changes. We call this the duty cycle. Controlling how much time per cycle the signal is on versus off will control the power getting to a motor. If the pulse is on for longer, the motor will go faster. The motor will go slower if the pulse is on for less time. So, at 50% time-on, the motor will be about 50% of its maximum speed.

The following diagram shows visual examples of this:

Figure 5.6 – PWM signals

The preceding diagram shows graphs of PWM signals. The top is a signal for driving a motor at half speed. The pulses on and off time are the same. The X axis is the level, and the Y axis is for time, with a solid line for the PWM signal and a dashed...

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 $15.99/month. Cancel anytime}