Chapter 1 - Electric Motors
This chapter introduces the fundamental concepts of electric motors, including their types, characteristics, and selection criteria.
1.1 Overview
A general introduction to electric motors.
1.2 Types of Electric Motors
Discussion of different categories of electric motors.
1.3 Brushed DC Motors
Detailed explanation of brushed DC motors and their subtypes:
- 1.3.1 Permanent Magnet DC Motors
- 1.3.2 Series DC Motors
- 1.3.3 Shunt DC Motors
- 1.3.4 Compound DC Motors
- 1.3.5 Externally Excited DC Motors
- 1.3.6 Servomotors
- 1.3.7 Stepper Motors
1.4 Brushless DC Motors
An overview of brushless DC motor technology.
1.5 Motor Selection
Factors to consider when choosing a motor:
- 1.5.1 Torque: The rotational force produced by the motor.
- 1.5.2 Speed: The rotational velocity of the motor shaft.
- 1.5.3 Accuracy: The precision of motor positioning and speed control.
- 1.5.4 Operating Voltage: The electrical supply required for the motor.
- 1.5.5 Cost: The financial investment for the motor.
- 1.5.6 Physical Size and Weight: The dimensions and mass of the motor.
1.6 Transfer Function of a Brushed DC Motor
Mathematical representation of a brushed DC motor's behavior.
1.7 Torque - Speed Characteristics
Analysis of the relationship between motor torque and speed.
1.8 Summary
Recap of the key points covered in Chapter 1.
Chapter 2 - Simple DC Motor Projects
This chapter presents practical projects for controlling DC motors using Arduino and Raspberry Pi.
2.1 Overview
Introduction to the DC motor projects.
2.2 PROJECT 1 - Motor ON/OFF Control
Basic control of a DC motor's on and off states.
- 2.2.1 Block Diagram: Visual representation of the circuit.
- 2.2.2 Schematic - Arduino Uno: Wiring diagram for Arduino Uno.
- 2.2.3 Schematic - Raspberry Pi: Wiring diagram for Raspberry Pi.
- 2.2.4 Program Listing - Arduino Uno: Code for Arduino Uno.
- 2.2.5 Program Listing - Raspberry Pi: Code for Raspberry Pi.
- 2.2.6 Using a MOSFET Switch: Controlling the motor with a MOSFET.
- 2.2.7 Using a Relay: Controlling the motor with a relay.
2.3 PROJECT 2 - Two-Stage Motor Speed Controller
Implementing a two-stage system for motor speed regulation.
- 2.3.1 Block Diagram: Visual representation of the circuit.
- 2.3.2 Schematic - Arduino Uno: Wiring diagram for Arduino Uno.
- 2.3.3 Schematic - Raspberry Pi: Wiring diagram for Raspberry Pi.
- 2.3.4 Program Listing - Arduino Uno: Code for Arduino Uno.
- 2.3.5 Program Listing - Raspberry Pi: Code for Raspberry Pi.
2.4 PROJECT 3 - Varying Motor Speed
Adjusting the rotational speed of the motor.
- 2.4.1 Block Diagram: Visual representation of the circuit.
- 2.4.2 Schematic - Arduino Uno: Wiring diagram for Arduino Uno.
- 2.4.3 Schematic - Raspberry Pi: Wiring diagram for Raspberry Pi.
- 2.4.4 Program Listing - Arduino Uno: Code for Arduino Uno.
- 2.4.5 Program Listing - Raspberry Pi: Code for Raspberry Pi.
2.5 PROJECT 4 - Changing Motor Direction
Reversing the direction of motor rotation.
- 2.5.1 Block Diagram: Visual representation of the circuit.
- 2.5.2 Schematic - Arduino Uno: Wiring diagram for Arduino Uno.
- 2.5.3 Schematic - Raspberry Pi: Wiring diagram for Raspberry Pi.
- 2.5.4 Program Listing - Arduino Uno: Code for Arduino Uno.
- 2.5.5 Program Listing - Raspberry Pi: Code for Raspberry Pi.
2.6 PROJECT 5 - Using an Integrated H-Bridge Circuit
Controlling motors with an H-bridge IC.
- 2.6.1 Block Diagram: Visual representation of the circuit.
- 2.6.2 Schematic - Arduino Uno: Wiring diagram for Arduino Uno.
- 2.6.3 Schematic - Raspberry Pi: Wiring diagram for Raspberry Pi.
- 2.6.4 Program Listing - Arduino Uno: Code for Arduino Uno.
- 2.6.5 Program Listing - Raspberry Pi: Code for Raspberry Pi.
2.7 PROJECT 6 - Speed and Direction Control with Integrated H-Bridge
Combining speed and direction control using an H-bridge.
- 2.7.1 Block Diagram: Visual representation of the circuit.
- 2.7.2 Schematic - Arduino Uno: Wiring diagram for Arduino Uno.
- 2.7.3 Schematic - Raspberry Pi: Wiring diagram for Raspberry Pi.
- 2.7.4 Program Listing - Arduino Uno: Code for Arduino Uno.
- 2.7.5 Program Listing - Raspberry Pi: Code for Raspberry Pi.
2.8 PROJECT 7 - Using an Encoder - Motor Speed Display (Arduino Uno)
Measuring and displaying motor speed using an encoder with Arduino Uno.
- 2.8.1 Block Diagram: Visual representation of the circuit.
- 2.8.2 Schematic: Wiring diagram.
- 2.8.3 Program Listing: Code for Arduino Uno.
2.9 PROJECT 8 - Displaying Motor Speed on LCD (Arduino Uno)
Showing motor speed on an LCD screen using Arduino Uno.
- 2.9.1 Block Diagram: Visual representation of the circuit.
- 2.9.2 Schematic: Wiring diagram.
- 2.9.3 Program Listing: Code for Arduino Uno.
2.10 PROJECT 9 - Identifying the DC Motor (Arduino Uno)
Methods for identifying DC motor characteristics with Arduino Uno.
- 2.10.1 Block Diagram: Visual representation of the circuit.
- 2.10.2 Schematic: Wiring diagram.
- 2.10.3 Program Listing: Code for Arduino Uno.
2.11 PROJECT 10 - PID Speed Control of a DC Motor
Implementing Proportional-Integral-Derivative (PID) control for DC motor speed.
- 2.11.1 Block Diagram: Visual representation of the circuit.
- 2.11.2 Schematic: Wiring diagram.
- 2.11.3 Program Listing: Code for Arduino Uno.
2.12 PROJECT 11 - Using an Encoder - Displaying Motor Speed (Raspberry Pi Zero W)
Measuring and displaying motor speed using an encoder with Raspberry Pi Zero W.
- 2.12.1 Block Diagram: Visual representation of the circuit.
- 2.12.2 Schematic: Wiring diagram.
- 2.12.3 Program Listing: Code for Raspberry Pi Zero W.
2.13 PROJECT 12 - Displaying Motor Speed on LCD (Raspberry Pi Zero W)
Showing motor speed on an LCD screen using Raspberry Pi Zero W.
- 2.13.1 Block Diagram: Visual representation of the circuit.
- 2.13.2 Schematic: Wiring diagram.
- 2.13.3 Program Listing: Code for Raspberry Pi Zero W.
2.14 PROJECT 13 - Using Timer Interrupts to Calculate Motor Speed (Arduino Uno)
Calculating motor speed using timer interrupts on Arduino Uno.
- 2.14.1 Block Diagram: Visual representation of the circuit.
- 2.14.2 Schematic: Wiring diagram.
- 2.14.3 Program Listing: Code for Arduino Uno.
2.15 PROJECT 14 - Mobile Robot Control (Arduino Uno)
Controlling a mobile robot using Arduino Uno.
- 2.15.1 Block Diagram: Visual representation of the circuit.
- 2.15.2 Schematic: Wiring diagram.
- 2.15.3 Program Listing: Code for Arduino Uno.
2.16 PROJECT 15 - Obstacle Avoiding Robot (Arduino Uno)
Building a robot that avoids obstacles using Arduino Uno.
- 2.16.1 Block Diagram: Visual representation of the circuit.
- 2.16.2 Schematic: Wiring diagram.
- 2.16.3 Program Listing: Code for Arduino Uno.
2.17 PROJECT 16 - Line Following Robot (Arduino Uno)
Creating a robot that follows a line using Arduino Uno.
- 2.17.1 Block Diagram: Visual representation of the circuit.
- 2.17.2 Schematic: Wiring diagram.
- 2.17.3 Program Listing: Code for Arduino Uno.
2.18 PROJECT 17 - Mobile Robot Control (Raspberry Pi Zero W)
Controlling a mobile robot using Raspberry Pi Zero W.
- 2.18.1 Block Diagram: Visual representation of the circuit.
- 2.18.2 Schematic: Wiring diagram.
- 2.18.3 Program Listing: Code for Raspberry Pi Zero W.
2.19 PROJECT 18 - Obstacle Avoiding Robot (Raspberry Pi Zero W)
Building a robot that avoids obstacles using Raspberry Pi Zero W.
- 2.19.1 Block Diagram: Visual representation of the circuit.
- 2.19.2 Schematic: Wiring diagram.
- 2.19.3 Program Listing: Code for Raspberry Pi Zero W.
2.20 Summary
Conclusion of the DC motor projects.
Chapter 3 - Simple Stepper Motor Projects
This chapter explores projects involving the control of stepper motors.
3.1 Overview
Introduction to stepper motors and their operation.
- 3.1.1 Unipolar Stepper Motors
- 3.1.2 Bipolar Stepper Motors
- 3.1.3 Speed of a Stepper Motor
- 3.1.4 Motor Shaft Movement
- 3.1.5 Motor Rotation Time
3.2 PROJECT 1 - Basic Stepper Motor Control
Fundamental control of a stepper motor.
- 3.2.1 Block Diagram: Visual representation of the circuit.
- 3.2.2 Schematic (Arduino Uno): Wiring diagram for Arduino Uno.
- 3.2.3 Schematic (Raspberry Pi Zero W): Wiring diagram for Raspberry Pi Zero W.
- 3.2.4 Controlling the Stepper Motor: Methods for stepper motor control.
- 3.2.5 Program Listing (Arduino Uno): Code for Arduino Uno.
- 3.2.6 Program (Raspberry Pi Zero W): Code for Raspberry Pi Zero W.
3.3 PROJECT 2 - Thermometer with Dial
Creating a thermometer with a dial indicator using a stepper motor.
- 3.3.1 Block Diagram: Visual representation of the circuit.
- 3.3.2 Schematic (Arduino Uno): Wiring diagram for Arduino Uno.
- 3.3.3 Schematic (Raspberry Pi): Wiring diagram for Raspberry Pi.
- 3.3.4 Program Listing (Arduino Uno): Code for Arduino Uno.
- 3.3.5 Program Listing (Raspberry Pi Zero W): Code for Raspberry Pi Zero W.
3.4 Summary
Conclusion of the stepper motor projects.
Chapter 4 - Simple Servo Motor Projects
This chapter covers projects related to controlling servo motors.
4.1 Overview
Introduction to servo motors and their applications.
4.2 PROJECT 1 - Basic Servo Motor Control (Arduino Uno)
Fundamental control of a servo motor using Arduino Uno.
- 4.2.1 Block Diagram: Visual representation of the circuit.
- 4.2.2 Schematic: Wiring diagram.
- 4.2.3 Program Listing: Code for Arduino Uno.
4.3 PROJECT 2 - Controlling Servo Motor with a Potentiometer (Arduino Uno)
Using a potentiometer to control servo motor position with Arduino Uno.
- 4.3.1 Block Diagram: Visual representation of the circuit.
- 4.3.2 Schematic: Wiring diagram.
- 4.3.3 Program Listing: Code for Arduino Uno.
4.4 PROJECT 3 - Basic Servo Motor Control (Raspberry Pi Zero W)
Fundamental control of a servo motor using Raspberry Pi Zero W.
- 4.4.1 Block Diagram: Visual representation of the circuit.
- 4.4.2 Schematic: Wiring diagram.
- 4.4.3 Program Listing: Code for Raspberry Pi Zero W.
4.5 PROJECT 4 - Moving the Motor Shaft to a Specific Angle (Raspberry Pi Zero W)
Controlling the servo motor to move to a precise angle using Raspberry Pi Zero W.
- 4.5.1 Program Listing: Code for Raspberry Pi Zero W.
4.6 Summary
Conclusion of the servo motor projects.
Chapter 5 - Robot Remote Control via Bluetooth with Mobile Phone and Arduino
This chapter details how to control a robot remotely using Bluetooth, a mobile phone, and an Arduino.
- 5.1 Overview: Introduction to Bluetooth robot control.
- 5.2.1 Block Diagram: Visual representation of the system.
- 5.2.2 Schematic: Wiring diagram.
- 5.2.3 Android Smartphone Apps: Recommended applications.
- 5.2.4 Pairing the HC-06: Steps for connecting the Bluetooth module.
- 5.2.5 Controlling the Robot: How to operate the robot.
- 5.2.6 Program Listing: Code for Arduino.
5.3 Summary
Conclusion of the Bluetooth robot control project with Arduino.
Chapter 6 - Robot Remote Control via Wi-Fi with Smartphone and Arduino Uno
This chapter explains how to control a robot remotely using Wi-Fi, a smartphone, and an Arduino Uno.
6.1 Overview
Introduction to Wi-Fi robot control with Arduino Uno.
6.2 PROJECT 1 - Wi-Fi Based Robot Remote Control
Implementing Wi-Fi control for a robot.
- 6.2.1 Block Diagram: Visual representation of the system.
- 6.2.2 Schematic: Wiring diagram.
- 6.2.3 UDP or TCP ?: Discussion on network protocols.
- 6.2.4 Android Smartphone Apps: Recommended applications.
- 6.2.5 Controlling the Robot: How to operate the robot.
- 6.2.6 Program Listing: Code for Arduino Uno.
6.3 Summary
Conclusion of the Wi-Fi robot control project with Arduino Uno.
Chapter 7 - Robot Remote Control via Wi-Fi with Smartphone and Raspberry Pi Zero W
This chapter details how to control a robot remotely using Wi-Fi, a smartphone, and a Raspberry Pi Zero W.
7.1 Overview
Introduction to Wi-Fi robot control with Raspberry Pi Zero W.
7.2 PROJECT 1 - Wi-Fi Based Robot Remote Control
Implementing Wi-Fi control for a robot.
- 7.2.1 Block Diagram: Visual representation of the system.
- 7.2.2 Schematic: Wiring diagram.
- 7.2.3 Program Listing: Code for Raspberry Pi Zero W.
7.3 Summary
Conclusion of the Wi-Fi robot control project with Raspberry Pi Zero W.
Chapter 8 - Robot Remote Control via Bluetooth with Smartphone and Raspberry Pi Zero W
This chapter explains how to control a robot remotely using Bluetooth, a smartphone, and a Raspberry Pi Zero W.
8.1 Overview
Introduction to Bluetooth robot control with Raspberry Pi Zero W.
8.2 PROJECT 1 - Bluetooth Based Robot Remote Control
Implementing Bluetooth control for a robot.
- 8.2.1 Block Diagram: Visual representation of the system.
- 8.2.2 Schematic: Wiring diagram.
- 8.2.3 Enabling Bluetooth on Raspberry Pi Zero W: Configuration steps.
- 8.2.4 Python Bluetooth Library: Using the necessary library.
- 8.2.5 Access from Mobile Phone: Connecting and controlling.
- 8.2.6 Program Listing: Code for Raspberry Pi Zero W.
8.3 Summary
Conclusion of the Bluetooth robot control project with Raspberry Pi Zero W.
Appendix A - Raspberry Pi Zero W
This appendix provides detailed information on the Raspberry Pi Zero W hardware and setup.
- A.1 The Hardware: Overview of the Raspberry Pi Zero W components.
- A.2 Setting up the Raspberry Pi Zero W: Initial configuration steps.
- A.3 Installing the Operating System on an SD Card: OS installation guide.
- A.4 Booting the Raspberry Pi Zero W: Starting the device.
- A.5 Setting up WiFi and Remote Access: Network configuration.
- A.6 Shutting Down or Restarting in GUI Mode: System control.
- A.7 Remote Access to the Desktop: Connecting to the desktop remotely.
- A.8 Enabling Bluetooth: Activating Bluetooth functionality.
- A.9 Creating and Running a Python Program: Software development steps.
- A.10 GPIO Library: Understanding and using the GPIO library.
- A.10.1 Pin Numbering: Explanation of pin assignments.
- A.10.2 Channel (I/O Port Pin) Configuration: Configuring I/O pins.
Appendix B - List of Components
A comprehensive list of components required for the projects.
Appendix C - Arduino Uno Pinout
Diagram and explanation of the Arduino Uno's pin connections.
Appendix D - Raspberry Pi Zero W Pinout
Diagram and explanation of the Raspberry Pi Zero W's pin connections.
Appendix E - Using the gpiozero Library
A guide to using the gpiozero library for Raspberry Pi GPIO control.
Index
An index to help locate specific topics within the document.