MCR2 Encoder
MCR2 Encoder
DC Motor
Control
Introduction
Control Hierarchy
• The HCS divides the control into layers, dividing each complex
task into subtasks (goals) to be achieved by a dedicated layer.
Introduction
• A direct current (DC) motor is a type of electric
energy.
• DC motors take electrical power through direct current DC Brushed Motor with Encoder.
• Controller Stage
• Plant
• Sensor Stage
Motor Driver
• H-bridge is an electronic circuit that switches the polarity of a
voltage applied to a load.
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
between the load and the source (enable switch), ON and OFF.
• 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
work.
and Proprioceptive.
magnetometers.
accelerometers.
Encoders
they only acquire information about the robot itself, not the structure of the
environment.
Encoders
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
(Channels A and B) and compare it with the actual inputs, the “code” will
• 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
• 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?
Thank you