Use U-speed Module on Arduino

1,015

9

About: Let's play together! All about pcDuino,Arduino,Raspberry pi and technology. My facebook :Sherry Wu https://m.facebook.com/sasha.wu.775

Intro: Use U-speed Module on Arduino

The principle of U-speed is the grooves of U shaped has an optical sensor and a light sensitive transistors respectively on both sides. The conduction state of receiver determines the output is high level or low level module. And then through the level number changes that occurred within a certain time to infer the motor speed. This module is widely used for motor speed measurement, pulse count, location, spacing, etc.

Step 1: Part List

1 x U-speed
1 x Arduino

Several Jumper lines

Step 2:

U-Speed module pin V – > Arduino 3.3v
U-Speed module pin G – > Arduino GND

U-Speed module pin S – > Arduino D3

Step 3: Test Code


int sigState = 0;int sigPin = 3;void setup() {// put your setup code here, to run once:pinMode (sigPin, INPUT);Serial.begin (9600);}
void loop() {// put your main code here, to run repeatedly:sigState = digitalRead (sigPin);Serial.println (sigState);}

Copy the code to Arduino IDE on your computer and then upload it into the Arduino.

Step 4: Test Result

When there is no obstructions, the serial port is to output 1, indicate the output level is high.

When there are obstrctions, the serial port is starting to output 0, and the LED on this module will light.



Step 5:

Share

    Recommendations

    • Optics Contest

      Optics Contest
    • Electronics Tips & Tricks Challenge

      Electronics Tips & Tricks Challenge
    • Audio Contest 2018

      Audio Contest 2018

    Discussions