Photo Interrupter Sensor

From Waveshare Wiki
Jump to: navigation, search
Photo Interrupter Sensor
Speed Measuring
Photo-interrupter-sensor-1.jpg

Photo Interrupter Sensor, robot speed measuring module
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

Primary Attribute
Category: AlphaBot, Sensors, Light
{{{userDefinedInfo}}}: {{{userdefinedvalue}}}
Brand: Waveshare
Website
English: Website
Chinese: 网站
Onboard Interfaces
I/Os
Related Products

Introduction

Photo Interrupter Sensor, robot speed measuring module

More

Getting Started

Interface

Pin No. Symbol Descriptions
1 DOUT Digital output
2 GND Ground
3 VCC Positive power supply (3.3V-5.0V)

How to use

We will illustrate the usage of the module with a NUCLEO-F103RB (STM32F103) or Arduino UNO development board. 1. Download the Demo code and extract it, then program the examples to your NUCLEO or Arduino development board. 2. Connect the development board to a PC via a serial wire and the module to the development board. Then, power up the development board and start the serial debugging software (e.g. PuTTY or Serial Monitor). Here is the configuration of the connection between the module and the development board.

Port NUCLEO-F103RB Pin
DOUT A0
GND GND
VCC 3.3V
Port Arduino Pin
DOUT D2
GND GND
VCC 5V

Here is the configuration of the serial port.

Baud rate 115200
Data bits 8
Stop bit 1
Parity bit None

Expected result

When a barrier is placed above the sensor, the signal indicator will turn on and serial port will say "ON" or else the serial port will say "OFF".

Resources

Support

Mail.png Contact your seller (fast response and most recommended)

or send emails to service@waveshare.com (not fast enough but please be patient) for help.

Our working time: 09:00-18:00 (UTC+8 Monday to Saturday)