Introduction: Use U-speed Module on Arduino

Picture of 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:

Picture of

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

Picture of 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:


About This Instructable




Bio: Let's play together! All about pcDuino,Arduino,Raspberry pi and technology. My facebook :Sherry Wu
More by shansa wu:How to Use App to Control Your LED StripPano 360 Virtual Reality Photo Shot With PcDuino8 UnoTutorial of Using E-paper Shield on Arduino
Add instructable to: