Reflective infrared photocell ITR8307

Introduction: The basic characteristics of ITR8307, including its static and dynamic characteristics, are measured. Its application is demonstrated by measuring the inertia wheel speed of unicycle.

Key words: ITR8307, reflective photocell

 

§ 01 reflective photocell

  ITR8307 It is a photocell integrating infrared emitter and receiving triode. stay TB ITR8307 Small photocells packaged in SOP-4 can be purchased.

1, Basic information

  reflective photoelectric switch ITR8307 It is a photoelectric switch integrating infrared transmitting tube and infrared receiving tube. When an object is detected, the object reflects the signal transmitted by the transmitting end of the photoelectric switch to the receiving end, so the photoelectric switch generates the switch model.

▲ Figure 1.1 basic package

  in ITR8307/S18/TR8 reflective photoelectric switch sensor sensing distance ranging 1mm patch SOP-4 The pin function distribution in SOP-4 package is given.

▲ Figure 1.2 SOP-4 packaging pin function diagram

  in ITR8307 optocoupler reflective non-contact The sensor is made into a general detection module. Original Yiguang ITR8307/S17/TR8(B) patch reflective photoelectric switch infrared photoelectric sensor The price given is only RMB0.37.

▲ figure 1.3 actual Discipline Distribution of itr8307

2, Characteristic test

1. Static characteristics

   use the diode gear of multimeter (DM3068) to measure PIN2-1: front guide on voltage. PIN2+, PIN1-.

Infrared LED measurement results: Current: 1mA
Voltage: 1.077V

   by measuring the resistance between PIN3 and pin4, it can be verified that the resistance in two directions of the triode is different. And as the hand blocks the light on the photocell, the resistance between PIN3 and pin4 will increase.

Measurement results of photoelectric triode: PIN3+,PIN4-: 0.577MΩ
PIN3-,PIN4+: ∞

2. Lead packaging

▲ figure 1.2.1 lead out photocell pin

   the pin definition of PIN4 lead (100mil) led out is consistent with that of pins ① ~ ④ of ITR8307.

3. Test circuit

  build the following test circuit on the bread board. The working voltage is + 5V.

Circuit measurement: V2: 1.193V
V3: 4.98V

▲ figure 1.2.2 schematic diagram of test circuit

   hold the reflective photocell and aim at the white paper. You can see that V3 has little change.

4. Different R2

  in order to improve the sensitivity of output voltage, increasing R2 can increase the sensitivity of output voltage. This will also make the influence of ambient light on the photocell.

(1) The photocells are placed in parallel

  place the photocell in parallel, and there is no reflecting object around the photocell.

   use the variable resistance box to change the R2 resistance value: the change of V3 voltage corresponding to 100k ~ 1M.

[table 1-4-1 photocells are placed in parallel, corresponding to V3 voltage value at different Rc]

R(100k)1R(100k)2R(100k)3R(100k)4R(100k)5R(100k)6R(100k)7R(100k)8R(100k)9R(100k)10
4.6619004.3577004.0644003.7795003.5040003.2344002.9725002.7157002.4634002.228700

(2) The photocell is placed vertically

   set R2=500k Ω and move the photocell. Due to the different brightness of the table lamp on the experimental table, V3 voltage will change.

▲ figure 1.4.1 potential change caused by different positions of photocell

3, Effect of distance on output voltage

  utilization Single axis stepping drive module SH-20403 Control the monorail stepping slide rail to drive the photocell to move, and measure the relationship between the distance from white paper and V3 voltage.

▲ figure 1.3.1 use stepping electric rail to drive photocell

1. Experiment 1

Experimental conditions: Step: 200
Steps: 100
R2 resistance: 500k Ω
R1 resistance: 330 Ω
Moving distance: 20mm

  the measurement data are as follows:

▲ figure 1.4.1 output voltage under asynchronous number

   by observing the measured data, it can be seen that the output voltage is very low before the number of steps is less than 55 (about 11mm distance); When the number of steps is greater than 55, V3 voltage shows a rapid upward trend;

   during the rise of V3, the voltage fluctuates obviously. The specific reason is unknown.

2. Experiment 2

Experimental conditions: Moving step: 500
Moving steps: 100

   the values of R1 and R2 are the same as those in Experiment 1. The measurement results are as follows:

▲ figure 1.2.2 output voltage under different moving steps

3. Experiment 3

   reduce the resistance of R2 to 200k Ω, and re measure the relationship between moving distance and output voltage.

Experimental conditions: Move step: 200
Moving steps: 100
R2 resistance: 200k Ω
R1 resistance: 330 Ω

▲ figure 1.2.3 change of output voltage under different moving steps

   it can be seen that with the increase of R2, the output voltage signal has the following changes compared with experiment 1:

  • The inflection point of output voltage is reduced by about 35 parts (more 7mm distance);
  • The voltage has no linear fluctuation and is very smooth.

4. Experiment 4

Experimental conditions: Move step: 200
Moving steps: 100
R2 resistance: 900k Ω

▲ figure 1.2.4 output voltage under asynchronous number

   it can be seen that with the increase of R2, the inflection point of output voltage increases to 75 steps (about 15mm).

from headm import *
import lscm8
from tsmodule.tsstm32       import *
'''

lscm8.lscm8mf(20000)
exit()
'''
vdim = []
step = 200

for i in range(100):
    lscm8.lscm8mb(step)
    time.sleep(2)
    meter = meterval()
    printff(i, meter[1])

    vdim.append(meter[1])

    tspsave('measure', vdim=vdim)

plt.plot(vdim)
plt.xlabel("Step")
plt.ylabel("Voltage(V)")
plt.grid(True)
plt.tight_layout()
plt.show()
#!/usr/local/bin/python
# -*- coding: gbk -*-
#============================================================
# LSCM8.PY                     -- by Dr. ZhuoQing 2020-01-14
#
# Note:
#============================================================
from head import *
import serial
#------------------------------------------------------------
cmdportdef = 'COM2'
cmdport = serial.Serial(cmdportdef, baudrate=115200, timeout=0.1)
cmdport.setDTR(False)
#cmdport.setRTS(False)
printf("Open %s for LSCM8."%cmdportdef)
#------------------------------------------------------------
COMMAND_FRAME_HEAD		= 0x56
COMMAND_FRAME_TAIL		= 0x65
COMMAND_STATUS_WAIT		= 0x0
COMMAND_STATUS_COMMAND	        = 0x1
COMMAND_STATUS_LENGTH	        = 0x2
COMMAND_STATUS_DATA		= 0x3
COMMAND_STATUS_CHECK	        = 0x4
COMMAND_STATUS_TAIL		= 0x5
#------------------------------------------------------------
COMMAND_HELLO_ECHO		= 0x20
COMMAND_BEEP_ON			= 0x21
COMMAND_BEEP_OFF		= 0x22
COMMAND_DIR_ON			= 0x23
COMMAND_DIR_OFF			= 0x24
COMMAND_REL_ON			= 0x25
COMMAND_REL_OFF			= 0x26
COMMAND_PUL_SET			= 0x27
COMMAND_PUL_STOP		= 0x28
COMMAND_GOTO_HEAD		= 0x29
COMMAND_GOTO_TAIL		= 0x2A
COMMAND_GET_STATE		= 0x2B
COMMAND_GET_PULSEOUT	        = 0x2C
COMMAND_CLEAR_PULSEOUT	        = 0x2D
#------------------------------------------------------------
def lscm8cmd(cmd, cmddata):
    checksum = cmd + len(cmddata)
    for cd in cmddata:
        checksum = checksum + cd
    checksum = (checksum & 0xff) ^ 0xff
    cmdstr = b'' + byte(COMMAND_FRAME_HEAD) + byte(cmd) + byte(len(cmddata)) +\
             cmddata + byte(checksum) + byte(COMMAND_FRAME_TAIL)
#    printf(cmdstr)
    cmdport.write(cmdstr)
def lscm8hello():
    lscm8cmd(COMMAND_HELLO_ECHO, b'')
def lscm8beepon():
    lscm8cmd(COMMAND_BEEP_ON, b'')
def lscm8beepoff():
    lscm8cmd(COMMAND_BEEP_OFF, b'')
#------------------------------------------------------------
def lscm8relon(bits):
    cmd = bits.to_bytes(1, byteorder='big')
    lscm8cmd(COMMAND_REL_ON, cmd)
#------------------------------------------------------------
# bits:0:relay0, 1:relay1
def lscm8reloff(bits):
    cmd = bits.to_bytes(1, byteorder='big')
    lscm8cmd(COMMAND_REL_OFF, cmd)
def lscm8diron(bits):
    cmd = bits.to_bytes(1, byteorder='big')
    lscm8cmd(COMMAND_DIR_ON, cmd)
def lscm8diroff(bits):
    cmd = bits.to_bytes(1, byteorder='big')
    lscm8cmd(COMMAND_DIR_OFF, cmd)
#------------------------------------------------------------
def lscm8setpulse(bits, pulse):
    cmd = bits.to_bytes(1, byteorder='big') +\
          pulse.to_bytes(4, byteorder='big')
    lscm8cmd(COMMAND_PUL_SET, cmd)
def lscm8stoppulse():
    lscm8cmd(COMMAND_PUL_STOP, b'')
def lscm8gotohead():
    lscm8cmd(COMMAND_GOTO_HEAD, b'')
def lscm8gototail():
    lscm8cmd(COMMAND_GOTO_TAIL, b'')
def lscm8clearpulseout():
    lscm8cmd(COMMAND_CLEAR_PULSEOUT, b'')
def lscm8mf(steps):
    lscm8diron(3)
    lscm8reloff(3)
    lscm8setpulse(3, steps)
def lscm8mb(steps):
    lscm8diroff(3)
    lscm8reloff(3)
    lscm8setpulse(3, steps)
#------------------------------------------------------------
if __name__ == "__main__":
    time.sleep(.5)
    if len(sys.argv) > 1:
        step = int(sys.argv[1])
        if step > 0:
            lscm8mf(step)
        else: lscm8mb(-step)
    else:
        lscm8mb(1000)
    tspbeep(1500, 100)
    printf('End of the command')
#------------------------------------------------------------
#        END OF FILE : LSCM8.PY
#============================================================

 

§ 02 application testing

1, Test unicycle speed

  unicycle may be the next one Smart car competition Car model. Next, a reflective ectopic photocell is used to measure its speed under the action of self-contained battery.

  the on-board battery is two 1.5V dry batteries. In order to be able to measure the rotation speed with a reflective photocell, use a marker pen to apply a 1.5cm black mark on the inertia wheel.

▲ figure 2.1.0 measuring the rotational speed of inertia wheel of unicycle with reflective photocell

1. Test results

Measurement conditions: R2 resistance: 50k Ω

▲ figure 2.1.1 measured V3 waveform

   measured: pulse frequency: 80.91Hz, which also reflects that the speed of inertia wheel is 80 rpm.

   through the waveform, it can also be seen that the frequency response of the photocell is about 1kHz at 50k Ω Rc.

▲ figure 2.2.2 unicycle traveling
▲ figure 2.2.3 unicycle operation

2, Measuring frequency response

   change the voltage of the reflective external photodiode and measure the output waveform.

1. Measurement results

  • R2 resistance: 50k ohm.

▲ figure 2.2.2 output waveform driven by square wave

  • Resistance value of R2: 100k Ω.

▲ figure 2.2.3 output waveform driven by square wave

  • Resistance value of R2: 10k Ω

▲ figure 2.2.4 output waveform driven by square wave

 

§ measurement conclusion

  ITR8307 is a reflective photocell. It can be used to measure the motion of reflectors in close range. The measurement distance can be about 5mm - 15mm through different Rc.

■ links to relevant literature:

● relevant chart links:

Tags: stm32 Autonomous vehicles

Posted on Sun, 05 Sep 2021 19:18:54 -0400 by optikalefx