Measuring DC Motor RPM Through Built-in Hall Sensor Encoder

Measuring DC Motor RPM Through Built-in Hall Sensor Encoder

INTRODUCTION

When we deal with controlling motor speed, normally we just provide PWM and the motor will rotate accordingly to the voltage reach at motor terminal. To have a better speed controlling, we can monitor RPM. Revolutions per minute (abbreviated rpm, RPM, rev/min, r/min) is the number of turns in one minute. It is a standard unit of rotational speed or the frequency of rotation around a fixed axis.

 

To monitor RPM, we need to have a feedback or sensor to sense shaft rotation. Luckily, nowadays, there have many DC motor in the market comes with built-in hall sensor encoder attach to the motor shaft. There have a few options offered by Cytron Technologies:

  1. SPG30 With Encoder (Spur Gear)
  2. IG32 With Encoder (Planetary Gear)
  3. IG42 With Encoder (Planetary Gear)

VIDEO

How it works? Please check on this video.

 

Hardware Preparation

This tutorial uses:

  1. Maker UNO
  2. Cytron 10Amp DC Motor Driver
  3. DC Motor IG42E-24K
  4. Planetary Motor Bracket (IG42E/IG45)
  5. LiPo Rechargeable Battery 11.1V 2200mAH
  6. 2-3 Cell LIPO Balance Charger

You can make hardware connection based on the table below.

Connection
MD10C: +Battery +ve
MD30C: -Battery -ve
MD30C: AMotor red/black wire
MD30C: BMotor red/black wire
MD30C: GNDMaker UNO: GND
MD30C: PWMMaker UNO: pin 10
MD30C: DIRMaker UNO: pin 12
Motor brown wire (Hall sensor VCC)Maker UNO: 5V
Motor green wire (Hall sensor GND)Maker UNO: GND
Motor blue wire (Hall sensor A)Maker UNO: pin 3
Motor purple wire (Hall sensor B)Not connected

SAMPLE CODE

This is sample code used in the video. Enjoy it!

 

Thank you

Thank you for reading this tutorial and we hope it helps your project development. If you have any technical inquiry, please post at Cytron Technical Forum.

Related Products