Difference between revisions of "Sensor-Line Finder"

From Microduino Wiki
Jump to: navigation, search
(Instruction of the Sensor Pin)
 
(5 intermediate revisions by one other user not shown)
Line 17: Line 17:
  
 
==Instruction of the Sensor Pin==
 
==Instruction of the Sensor Pin==
{{Sensor_explain
+
{{ST_Pinout
|nameA=[[Sensor-Line Finder]]
+
|st_name=Line Finder Sensor
|modeA=Analog signal input
+
|pin3=Analog Input
|modeB=NC
 
 
}}
 
}}
  
Line 27: Line 26:
 
*With small size  
 
*With small size  
 
==Specification==
 
==Specification==
*Electric specification
+
*Voltage
**3.3V~5V working voltage
+
**3.3V~5V working voltage  
**Input device
+
 
 +
*Size
 +
**Size of the board: 23.5mm*13mm
 +
**1.27mm-spacing 4Pin interface connected with sensorhub
 +
**The CAD drawing of the sensor: '''[[File:Sensor_CAD.zip]]'''
 +
 
 
*Technical parameters  
 
*Technical parameters  
**Introduction of pins: GND, VCC, signal output, and NC(null).
+
**Can detect the distance form the obstacle, and the measuring range is about 3cm
**Digital input
+
**Can detect white and black, which make it can serve as line finder.
  
*Size
+
*Connection
**Size of the switch: 5mm*10mm
+
**This sensor can be connected to the following interfaces of core: '''A0~A7'''
**Size of the board: 20mm*10mm
 
*1.27mm-spacing 4Pin interface
 
*Output: Digital signal
 
*Connection  
 
**This output signal is digital signal, so it should be detected by signal ports(D0~D13). You can connect it to pin 3~10 of Sensor-hub, and the corresponding pins are  D0, D2, D4, D6, D8, D10, D12.
 
[[file:mCookie-sensorhub_rule.JPG|thumb|800px|center]]
 
[[File: Microduino-Line-track_rule1.jpg|600px|thumb|center]]
 
  
 
==Document==
 
==Document==
  
*Schematic diagram: '''[[File: Microduino_Line-track.Zip]]'''
+
*Schematic diagram: '''[[File:Sensor-Line Finder.Zip]]'''
 
+
*Main chip: '''[[File:ITR9909_datasheet.pdf ]]'''
  
 
==Development==
 
==Development==
===Preparation===
+
===Program Download===
*Make sure that you have set up the development environment of Microduino, otherwise, please refer to: [[Microduino Getting started]]
+
*Download and unzip the program '''[[File:Sensor-Line Finder_Test.zip]]'''
*Core selection
 
**1.Adopt [[Microduino-CoreUSB]] or [[mCookie-CoreUSB]] as core directly.
 
**2.If you adopt [[Microduino-Core]] or [[Microduino-Core+]] as the core, you also need [[Microduino-USBTTL]] to download the program.
 
 
 
 
 
===Program===
 
 
 
*Open Arduino IDE, choose File→Examples→Basics→DigitalReadSerial, the sample program, select the right board card, and download directly after compiling.
 
[[file:mCookie-crashCodeExample.JPG|thumb|800px|center]]
 
 
 
*int pushButton = 6;  Define the input pin is D6, which is modifiable, such as linePin.
 
*pinMode(pushButton, INPUT);    Define pushButton as input pin.
 
*int buttonState = digitalRead(pushButton);    Read the value of the input pin pushButton.
 
  
 +
===Programming===
 +
{{Upload
 +
|nameA=[[Microduino-Core]], [[Microduino-USBTTL]]
 +
|nameB=[[Microduino-USBTTL]]
 +
|boardName=Microduino/mCookie-Core(328p), Atmega328P@16M,5V
 +
|fileName=Sensor-Line Finder Test.ino
 +
}}
  
 
===Hardware Setup===
 
===Hardware Setup===
*Connect sensor lineTrack with the digital port D6 of Sensorhub, which is the pin that define the pushButton above, which is modifiable, such as linePin.
+
*Referring to the following diagram, connect the Sensor-Line Finder to the analog pin A0/A1 of '''[[Microduino-Sensorhub]]'''.
*You can refer to : [[Microduino-Sensorhub]]
+
<br>
[[file:Microduino-sensorhub_6.JPG|thumb|400px|center]]
+
[[file:Microduino-sLight_A1.JPG|thumb|400px|left]]
*You can refer to: [[mCookie-Hub]]
+
<br style="clear: left"/>
[[file:mCookie-sensorhub_6.JPG|thumb|400px|center]]
 
*Connect Sensorhub with lineTrack, and connect them to the computer with USB cable.
 
*Select the right board card and COM port, and directly download after compiling. You can refer to [[AVR Core:Getting Started]]
 
[[file:upload.JPG|thumb|800px|center]]
 
*After download, you can open the serial monitor. The returned value is “0” if there is no obstacle approaching to the sensor; if there is, the returned value is “1”, and through this it can judge whether there is something approaching to it.
 
 
 
  
 +
===Result===
 +
*After download, open the serial monitor.
 +
*The closer the obstacle, the smaller the returned analog value. So it can be used as obstacle avoidance sensor.
 +
*When the sensor detects white and black with the same distance, the return value of white is smaller (around 100), and the one of black is larger (around 800). So it can be used as line finder.
  
 
==Application==
 
==Application==
 
It can be used to detect obstacles and infrared emission, as a line finding sensor.  
 
It can be used to detect obstacles and infrared emission, as a line finding sensor.  
  
 
==Purchase==
 
  
 
==History==
 
==History==
Line 90: Line 77:
 
==Gallery==
 
==Gallery==
  
*Front
+
{| border="0" cellpadding="10" width="100%"
[[file: Microduino-Line-track-F.JPG|thumb|600px|center|Microduino-Line-track Front]]
+
|-
*Back
+
|width="50%" valign="top" align="left"|
[[file: Microduino-Line-track -b.JPG|thumb|600px|center|Microduino-Line-track Back]]
+
[[file: Microduino-Line-track-F1.JPG|thumb|400px|center|Sensor-Line Finder Front]]
 +
|width="50%" valign="top" align="left"|
 +
[[file: Microduino-Line-track -b1.JPG|thumb|400px|center|Sensor-Line Finder Back]]
 +
|}
 
|}
 
|}

Latest revision as of 23:32, 30 March 2017

Language: English  • 中文
Sensor-Line Finder

The product number of Sensor-Line Finder is: MSDI41

Sensor-Line Finder is an IR reflection sensor module, which can serve as line finder.

The principle of black line detection is: the infrared emitting tube emits light ray to the surface of the road, the IR light will be reflected when touching the white road, and the receiving tube will receive the reflecting light.




Instruction of the Sensor Pin

Sensor backpin.png

Line Finder Sensor
General Pin Out Sensor / Trinket's Pin Out
PIN1 (GND) GND
PIN2 (VCC) VCC
PIN3 (SIGNAL-A) Analog Input
PIN4 (SIGNAL-B) Not Connected
  • General Pin Out is the standard pin out of a Sensor / Trinket connector.
  • Sensor / Trinket's Pin Out is this specific Sensor / Trinket's wiring in relation to the General Pin Out.
  • SIGNAL-A / SIGNAL-B are signals that could be digital input, digital output, analog input or analog output. Or special signals such as serial communication (SoftwareSerial, IIC (I2C), etc) or other special signals.
  • Not Connected refers to the Pin not being used for this particular Sensor / Trinket.
  • Read more about the hub module.

Features

  • With high detection sensitivity and good stability
  • With small size

Specification

  • Voltage
    • 3.3V~5V working voltage
  • Size
    • Size of the board: 23.5mm*13mm
    • 1.27mm-spacing 4Pin interface connected with sensorhub
    • The CAD drawing of the sensor: File:Sensor CAD.zip
  • Technical parameters
    • Can detect the distance form the obstacle, and the measuring range is about 3cm
    • Can detect white and black, which make it can serve as line finder.
  • Connection
    • This sensor can be connected to the following interfaces of core: A0~A7

Document

Development

Program Download

Programming

  • Follow the Software Getting Started Guide.
  • Select the Board, Processor and Port.
  • Click [File]->[Open], browse to the project program address, and click "Sensor-Line Finder Test.ino" to open the program.
  • After confirming all these items are correct, click "→" to download the program to the development board.

Hardware Setup

  • Referring to the following diagram, connect the Sensor-Line Finder to the analog pin A0/A1 of Microduino-Sensorhub.


Microduino-sLight A1.JPG


Result

  • After download, open the serial monitor.
  • The closer the obstacle, the smaller the returned analog value. So it can be used as obstacle avoidance sensor.
  • When the sensor detects white and black with the same distance, the return value of white is smaller (around 100), and the one of black is larger (around 800). So it can be used as line finder.

Application

It can be used to detect obstacles and infrared emission, as a line finding sensor.


History

Gallery

File:Microduino-Line-track-F1.JPG
Sensor-Line Finder Front
File:Microduino-Line-track -b1.JPG
Sensor-Line Finder Back
Retrieved from "https://wiki.microduinoinc.com/index.php?title=Sensor-Line_Finder&oldid=14528"