0% found this document useful (0 votes)
120 views19 pages

MCR2 Encoder

This document discusses the components and control of a wheeled mobile robot like the Puzzlebot. It describes how DC motors, motor drivers, microcontrollers, and encoders are used. DC motors provide actuation and encoders on each motor measure position and velocity. A microcontroller runs low-level control of the motors using a motor driver and PID controller to regulate speed based on encoder feedback. This allows the robot to complete autonomous or remote controlled tasks by controlling its movement.

Uploaded by

Carlos Solano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views19 pages

MCR2 Encoder

This document discusses the components and control of a wheeled mobile robot like the Puzzlebot. It describes how DC motors, motor drivers, microcontrollers, and encoders are used. DC motors provide actuation and encoders on each motor measure position and velocity. A microcontroller runs low-level control of the motors using a motor driver and PID controller to regulate speed based on encoder feedback. This allows the robot to complete autonomous or remote controlled tasks by controlling its movement.

Uploaded by

Carlos Solano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

{Learn, Create, Innovate};

DC Motor
Control
Introduction
Control Hierarchy

• Robotics systems, are intended to perform complicated tasks in


different environments. Such tasks, can be performed
autonomously, semi-autonomously or remote controlled.

• The control of such systems can become very complex depending


on the task to perform.

• The HCS divides the control into layers, dividing each complex
task into subtasks (goals) to be achieved by a dedicated layer.

• This course is dedicated to the Low-Level control layer using


ROS.
ROS Control Hierarchy
ROS Control Hierarchy
Mobile robots

• Mobile robots, require different sensors and actuators to read


information from the environment, and to interact with it.

• One of the most common actuators found in most robotic systems


are DC motors.

• DC Motors are found in different robotics applications from


wheeled mobile robots, to robotic manipulators and unmanned
aerial vehicles.

• One example of a wheeled mobile robot is the Puzzlebot, which


uses two DC motors one for each wheel.

• DC motors, are a widely studied in different fields of science from


electromechanical systems to control engineering.
Puzzlebot by Manchester
Robotics.
Puzzlebot sensors and actuators
DC Motors

Introduction
• A direct current (DC) motor is a type of electric

machine that converts electrical energy into mechanical

energy.

• DC motors take electrical power through direct current DC Brushed Motor with Encoder.

and convert this energy into mechanical rotation.


𝜔
• This is done by using generated magnetic fields from
𝑉
the electrical currents, powering the movement of a
DC Motor 𝜏
rotor fixed within the output shaft.
DC Motor Model
• The output torque and speed depends upon both the Representation.
electrical input and the design of the motor.
DC Motors

• In robotics, controllers are used to regulate the rotational speed,


angular position or torque, required by the application.

• In robotics this is called low level control.

• For the case of a wheeled mobile robot is a common practice to


implement a PID control to regulate the angular speed of the DC
motors.

• The regulation of the angular speed or position of a motor,


requires different stages.

• Controller Stage

• Power Stage (Driver)

• Plant

• Sensor Stage
Motor Driver
• H-bridge is an electronic circuit that switches the polarity of a
voltage applied to a load.

• They work using a combination of switching components


(mechanical switches, transistors, etc.), as shown in the diagram,
to change the polarity to the load.
H-Bridge motor Driver
• H-Bridge Drivers are some of the most common motor drivers Diagram
used in the control DC motors to run forwards or backwards.

S1 S2 S3 S4 Motor
0 0 0 0 Motor Off
1 0 0 1 Right Turn
0 1 1 0 Left Turn
1 1 0 0 Short Circuit
0 0 1 1 Short Circuit
Motor Driver

• Another capability of the motor driver is to regulate the

angular speed of the motor. PWM Input


• There are many ways to obtain this result, one of the most

common one is to send a PWM (Pulse width modulated

signal) to the enable pin of the H-Bridge.

• PWM (Pulse Width Modulation): Is a technique used in

engineering to control the average power delivered by an

electrical signal, by dividing it into discrete parts.

• In practice this is accomplished by rapidly turning the switch

between the load and the source (enable switch), ON and OFF.

PWM Duty Cycle


Motor Driver

• Given that the motor can be modelled as a second order systems,


when applying a PWM voltage as an input, it is possible to
observe the output behaviour as in the figure.

• This behaviour, can be used to control the power give to the motor
and therefore controlling the motor angular speed.

Motor Output/Input
MCU

•A microcontroller is a compact integrated circuit. They • For the case of the PuzzleBot:
• ESP32-based Microcontroller
are made to perform a specific operation in an • Xtensa dual-core 32-bit LX6 microprocessor
• 520 KB of SRAM
embedded system.
• WiFi & Bluetooth
• In robotics they are usually in charge of the low-level • DC-DC Converter
• Motor Driver
control of the robot, such as motors, and sensors or • 0.96” I2C LCD Display

actuators that require a dedicated and fast controller to

work.

•A typical microcontroller includes a processor, memory

and input/output (I/O) peripherals on a single chip.


Robotic Sensors

•For the case of the sensors, they can be classified as Exteroceptive

and Proprioceptive.

•Exteroceptive: Used to measure the environment or the state of

the environment, topology of the environment, temperature, etc.

Some examples are Sonar, LiDAR, Light sensors, bumper sensors,

magnetometers.

•Proprioceptive: Used to measure the state of the robot such as

wheel position, velocity, acceleration, battery charge, etc. Some

examples include, encoders, battery level, gyrometers,

accelerometers.
Encoders

• Device that converts the angular position of a shaft (motor shaft) to an

analogue or digital signal.

• Absolute: Indicates the position of the shaft at all times, by

producing a unique digital code for each angle (Angle transducers).

• Incremental: Record the changes in position of the motor shaft with

no indication or relation to any fixed position of the shaft.

• Encoders in mobile robots are considered proprioceptive sensors because

they only acquire information about the robot itself, not the structure of the

environment.
Encoders

• Incremental encoders, produce a series of electrical high-low pulses. These

pulses, allows to obtain information such as the angular rotation of the shaft

or the angular speed of the motor by counting the number of pulses that

occur in a certain period (Δ𝑡) .

• In robotics, when an encoder is attached to the axle of each wheel in a

differential-drive robot, it is possible to convert the number of pulses into

useful information, such as the velocity or distance travelled by each wheel.

• With a single set of pulses (single channel / Channel A), it is impossible to

know if the motor is rotating clockwise (CW) or counterclockwise (CCW).

• Therefore, a second line (dual channel / channel B) is attached, having its

signal shifted by 90 electrical degrees (°e) with respect to channel A.


Encoders

• This phase shift allows to determine the direction of rotation.

• Depending on direction of rotation the signal of channel A is preceding

channel B or vice versa.

• A simple estimation of the direction would be to verify the previous inputs

(Channels A and B) and compare it with the actual inputs, the “code” will

change dependant on the rotation direction.

• Counting the pulses of both channels, also leads to a more accurate angular

velocity estimation.

• To count the pulses using a MCU, the most common methodology is to use

interrupts so that no information is lost.


Encoders

• Puzzlebot motors use an incremental dual channel, quadrature

encoders with 13 pulses per revolution, attached to the motor shafts

before the reduction (35:1).

• The encoder is used to estimate the speed of the motors.

• Since the encoders can have a lot of noise, it is recommended to use a filter

(low pass or band pass) to avoid having a noisy signal that affects the

controller.
Q&A
Questions?

{Learn, Create, Innovate};


{Learn, Create, Innovate};

Thank you

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy