HC-020K Motor Speed Sensor Module (2-Pack)

Uses spoked sensor disk and IR transmitter/receiver pair DESCRIPTION The HC-020K Motor Speed Sensor Module utilizes a...
Vendor: Keszoox
$4.25
$5.25
$4.25

Shipping

The shipping fee depends on your address

Standard: 9-15 business days,fee is down to $3.99

Express: 4-7 business days,fee is down to $5.99

Support Customization

WE'RE READY TO BUILD A CUSTOM PRODUCT FOR YOU.

If you're looking for a custom product, we can help. Kindly contact us via email support@keszoox.com and send us the details for your need, then we'll let you know how we can deliver the right solution.

Built And process your order

We make into production usually Within 1 - 3 Bussiness Days.

Expect customization orders.
HC-020K Motor Speed Sensor Module (2-Pack)

HC-020K Motor Speed Sensor Module (2-Pack)

$5.25 $4.25

HC-020K Motor Speed Sensor Module (2-Pack)

$5.25 $4.25

Uses spoked sensor disk and IR transmitter/receiver pair

DESCRIPTION

The HC-020K Motor Speed Sensor Module utilizes a spoked sensor disk and IR transmitter/receiver pair to measure the speed of rotation of a motor.

PACKAGE INCLUDES:

  • Qty 2 – HC-020K Motor Speed Sensor Module
  • Qty 2 – Spoked sensor disk
  • Qty 6 – F/F jumper cables 8″ long
  • Qty 4 – Screws and nuts for mounting

KEY FEATURES OF HC-020K MOTOR SPEED SENSOR MODULE:

  • Two sensor assemblies to measure two different motors
  • Sensors modified to improve performance – Details below
  • 5V operation

The HC-020K motor speed sensor module has three main uses.

  1. The first is to determine the speed of rotation of an unknown motor or a motor being driven at different voltages or PWM settings in a bench-top setting.
  2. The second is to mount it permanently on a robotic vehicle to provide a means to measure the speed of the vehicle and to detect if the vehicle has stalled or is straining to rotate the wheels and therefore adjust the drive to the motors.  These sensors are usually mounted on the two drive wheels or 4 can be mounted for a 4-wheel drive vehicle.
  3. Use it to measure something that rotates around a shaft which is not a motor.  With this sensor and knowing the circumference of your hamsters wheel,  you can finally figure out just how fast that little guy really is.

The sensor works by mounting the spoked sensor wheel on the motor shaft. The spoked sensor wheel is designed to fit motors with a rectangular shaft of approximately 5.5 x 4mm as is found on the commonly used yellow motors sold with lower cost robotic vehicle kits.  The U-shaped sensor assembly is then mounted so that it cradles the spoked sensor wheel.

Some robotic vehicle kits may have slots and holes to mount the sensor but in many cases it will be necessary to cut or drill mounting slots and holes to mount the rotating disk and the sensor assembly.

As the spoked sensor wheel rotates with the motor shaft, the spokes in the wheel make / break the IR sensor beam and causes the sensor to output a series of pulses with one pulse for each of the 20 spokes in the wheel.  An LED on the module flashes for each pulse.

This pulse train is typically fed into an interrupt input on an MCU that counts the pulses as we show in the program below.  From these pulses, the rotational speed can be calculated and if the circumference of an attached wheel is known, the speed of travel can be calculated.

Module Connections:

The module has just 3 pins for connection, power, ground and sensor output.  The right angle header is mounted reversed to minimize the installed footprint.

1 x 3 Header

  • 5V – Connects to 5V on MCU
  • GND – Connects to ground on MCU
  • OUT – Connects to a digital interrupt input or digital pin on MCU

OUR EVALUATION RESULTS:

These assemblies are commonly available.  The issue is that as they are built, they do not provide accurate speed measurement data and are pretty much useless.  The reason for that is that the LM393 comparator circuit does not have hysteresis and therefore the output pulses have glitches on the edges of the waveform that cause erroneous pulse detection.  This results in the speed data reading being either too high or jumping between several different values.

To resolve this, we modify the assemblies by adding a 10K feedback resistor between the comparator output and the ‘+’ input which adds hysteresis and ensures clean switching of the output.

If you are in possession of some of these modules from another supplier and wondering why they don’t work, you can make a similar modification to improve the performance.  The resistor value is not critical so anything between about 10K and 47K should work OK.

The IR sensor assembles are general purpose and can also be used without the spoked sensor disk to detect anthing that breaks the IR bream to count rotations or to sense something opening or closing.

To use the program below, just hook up 5V and ground to the module and connect the output to an interrupt pin on the MCU.  We are using pin 2 on an Arduino Uno in our program below.

You will need a motor to attach the spoked sensor wheel to and a way to power the motor.  A variable power supply allows you to change the motor drive and see the effect as reported by the sensor.

Once the program is downloaded and running, open the Serial Monitor window to see the output which is reported in the raw spoke count per second, the RPS (Revolutions Per Second) which is the spoke count / 20 since there are 20 spokes and RPM (Revolutions Per Minute) which is simply RPS multiplied by 60.

The program is a bit unusual in that it does not have any code in the main loop.  All of the functionality is contained in the interrupt and timer routines and is basically self running.  It would be easy to embed this functionality with a main program such as if building a robotic vehicle.  For instance these automated routines could be used to update a global variable that can be checked occasionally from the main program without having to constantly poll the output of the sensors.

Motor Speed Sensor Test Program

/*
 * Exercise the Motor Speed Sensor Module
 * 
 * Module output connects to pin 2 which is an interrupt pin on Uno
 * Uses TimerOne.h which can be installed from Arduino IDE
 * 
 * All work is done in the interrupt and timer subroutines.
 */
#include "TimerOne.h"
unsigned int counter = 0;   // Holds the count of pulses detected

//===============================================================================
//  Initialization
//===============================================================================
void setup() 
{
  Serial.begin(9600);
  
  Timer1.initialize(1000000);            // Set timer to trigger every 1 second
  attachInterrupt(0, Do_Count, RISING);  // Create interrupt handler to count pulses
                                         // on rising edge of Int0
  Timer1.attachInterrupt( Timer_Isr );    // Define Interrupt Service Routing (ISR)
} 
//===============================================================================
//  Main
//===============================================================================
void loop()
{
  // Do nothting, everything is handled by the interrupt and timer routines
}

//===============================================================================
//  Subroutine - Increments the speed sensor counter when interrupt pin goes high
//===============================================================================
void Do_Count()  
{
  counter++;  // increase +1 the counter value
} 

//===============================================================================
//  Subroutine - Interrupt Service Routing (ISR)
//  Prints out speed info every second and restarts the counter
//===============================================================================
void Timer_Isr()
{
  Timer1.detachInterrupt();           // Disable the timer
  Serial.print("Count: ");            // Print raw count
  Serial.print (counter);
  Serial.print("   Motor Speed: "); 
  float rotation = (counter / 20.0);  // divide by number of holes in Disc
  Serial.print(rotation);  
  Serial.print(" RPS   ");            // Rotations Per Second 
  Serial.print(rotation * 60.0);  
  Serial.println(" RPM");             // Rotations Per Minute 
  counter = 0;                        // Reset counter to zero
  Timer1.attachInterrupt( Timer_Isr ); // Re-enable the timer
}

BEFORE THEY ARE SHIPPED, THESE MODULES ARE:

  • Modified to add 10K feedback resistor
  • Tested to verify basic operation
  • Packaged in a resealable ESD bag for protection and easy storage.

Notes: 

  1. None

TECHNICAL SPECIFICATIONS

 Operating Ratings
Vcc 4.75 – 5.25V
Dimensions
PCB ( W x L) 24 x 28 x 16mm ( 1 x 1.1″)
IR sensor slot (W x H) 6 x 8mm (0.24 x 0.32″)
Jumper cable length (female/female) 20cm (8″)

 

WE'RE READY TO BUILD A CUSTOM PRODUCT FOR YOU.

Contact us:
Support@keszoox.com
What we can help:
If you're looking for a wire or cable assembly, we can help.
What we need your help next:
Kindly contact us via email support@keszoox.com and send us the details fo your need, then we'll let you know how we can deliver the right solution.

Shipping Policy

All orders are dispatched from our warehouse. The shipments are fully tracked—from our door to yours. Please allow 3-5 business days for your order to be processed in addition to the shipping times below.

Shipping Times

Standard: 9-15 business days. Express: 4-7 business days.

Please note that shipping providers are extremely busy during this time, and some orders might experience a delay on top of usual delivery times. If your order is late, please allow 5-10 days more than indicated in standard shipping times before contacting our customer service. Thank you for your understanding.

Tracking

All orders are 100% tracked. You’ll receive an email with a tracking number and a link to track your parcel once your order leaves our warehouse. Please allow 24-48 hours for the tracking link to start showing shipping information.

Related Products

Recently Viewed Products