Microduino Light indicator-Digital tube(TSL2561)

来自Microduino Wikipedia
Pkj讨论 | 贡献2014年4月3日 (四) 13:56的版本 (Created page with "{{Language | Microduino 光照指示器-数码管(TSL2561)}} {| style="width: 800px;" |- | ==Objective== This tutorial will teach you to use the TSL2561 sensor and use digital...")
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索
Language English

Objective

This tutorial will teach you to use the TSL2561 sensor and use digital tube to dispaly the result.

Equipment

TSL2561 light sensor:

Product overview TSL2561 is a light-digital converter which converts light into digital signal output, contains I2C interface or SMBus interface. Each device connected to a photosensitive diode tube and infrared photosensitive diode on a single CMOS integrated circuit. The integrated circuit has 20bit dynamic range optimal light response ability.

Features:

  • Programmable to set light intensity's threshold, when the actual light intensity exceeds the threshold sends a interrupt signal;
  • Digital output meets standard SMBus (TSL2560) and I2C (TSL2561) bus protocol;
  • Analog gain and digital output time programmable control;
  • 1.25mm x 1.75mm ultra small encapsulated, in low power mode, the power consumption only has 0.75 mW;
  • Automatic inhibition 50 Hz/60 Hz light wave.

Schematic

Pin table

Microduino Pin Digital tube pin 74HC595
10(A) Q0
9(B) Q1
1(C) Q2
4(D) Q3
3(E) Q4
6(F) Q5
5(G) Q6
2(DP) Q7
V5 VCC, MR
GND GND, OE
D11 DS
D10 ST_CP
D13 SH_CP
Q7’
D8 12
D4 9
D3 8
D1 6

Program

https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_Sensor/TSL2561Segments

Debug

Step 1:Download TSL2561 library, and uncompress it to libraries folder of Arduino IDE, then restart IDE. http://learn.adafruit.com/tsl2561/use

Step 2:Copy the code to IDE and compile it.

Step 3: Set up circuit, as follows:

Step 4:Run program.

Step 5:Observe digital tube, cover the light sensor with the hand and then let it see the light again, look at the digital tube change.

Result

Cover the TSL2561 sensor with the hand, the digital tube's value will decrease, put the hand away, the value will increase.


Video

http://v.youku.com/v_show/id_XNjkyMzUwMDc2.html