TCRT5000 - faulty?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
olleman
Normal user
Posts: 53
Joined: 27 Aug 2017, 08:10

TCRT5000 - faulty?

#1 Post by olleman » 06 Nov 2017, 20:06

I just got to testing a TCRT5000 I bought a couple of weeks ago but i'm beginning to think that it's faulty...

I have connected gnd to gnd, vcc to 3,3v and DO to D7 (GPIO 13) on my Nodemcu V3.

No matter what I do I can't get it to change state. I have tested with mirrors just in front of the diodes, I have tried putting my fingers directly over both diodes etc and nothing happens. The only way I can get it to change state is to turn the adjustment screw but this is the ONLY way and even after adjusting I can't get it to change state no other way but to turn the screw backwards again. I have looked at the diodes with my phones camera and I see to light coming from the IR diode, shouldn't it be on constantly?

Could this be faulty or have I connected this wrong somehow? Is the voltage from my Nodemcu v3 to low? I have meassured 3.3v on the TCRT5000.

Any suggestions would be appreciated!

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: TCRT5000 - faulty?

#2 Post by grovkillen » 06 Nov 2017, 22:33

What's the incoming voltage level? A long wire might give a too weak signal back from the counter.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

s0170071
Normal user
Posts: 36
Joined: 21 Oct 2017, 20:49

Re: TCRT5000 - faulty?

#3 Post by s0170071 » 07 Nov 2017, 07:04

Have you used any resistors ?
The datasheet says the forward current through the diode is to be no larger than 60mA. With 3.3 V supply and an emmitter forward voltage of about 1V there should be a (3.3-1)/0,06 = 36 Ohms resistor in series with the diode. I would go for a little bit more, say 47 Ohms.
Otherwise one of these things may happen:
- you blow the IR diode (overcurrent)
- if your supply is weak you blow the voltage regulator on the nodemcu board or
- the supply voltage simply breaks down each time you try to drive/connect the diode.

Also make sure you have a pull-up resistor at the input as shown here:
https://cdn.instructables.com/FC2/G3QM/ ... MEDIUM.jpg

olleman
Normal user
Posts: 53
Joined: 27 Aug 2017, 08:10

Re: TCRT5000 - faulty?

#4 Post by olleman » 07 Nov 2017, 08:32

Thanks for your quick replys.

I'm a bit confused. According to the wiki it seems that it's more or less plug and play with the TCRT5000. And since it has a control diode that shows if it detects the ir-signal or not I don't even have to connect the GPIO to test the function of the device.

Since I use the board to count IR-flashes for my electricity meter as well I'm sure the nodemcu board is fine. But perhaps I did blow the IR diode on the TCRT5000 since I didn't use any ressistor...?

And the incoming voltage is 3.303V.


,Olle

s0170071
Normal user
Posts: 36
Joined: 21 Oct 2017, 20:49

Re: TCRT5000 - faulty?

#5 Post by s0170071 » 07 Nov 2017, 09:59

which board are you refering to ? I was refering to the plain TCRT5000 as described in the data sheet.
As for your meter. Which type is it ? Does have a communication interface ? This is often a round window with a IR led in it which sends a burst of data every second or so.

olleman
Normal user
Posts: 53
Joined: 27 Aug 2017, 08:10

Re: TCRT5000 - faulty?

#6 Post by olleman » 07 Nov 2017, 13:22

I'm using the Nodemcu with a photoresistor that sends a swtich command for each IR blink and then sends this data in bursts to domoticz each minute.

Just to avoid confusion, this is the device I'm talking about:

https://www.aliexpress.com/item/Free-Sh ... 83ad75f1d1


,Olle

s0170071
Normal user
Posts: 36
Joined: 21 Oct 2017, 20:49

Re: TCRT5000 - faulty?

#7 Post by s0170071 » 07 Nov 2017, 13:41

allright, the pullup seems to be on the PCB already.
So, no data interface then? Just a IR pulse ?
What does your board do if you shine a flashlight on it ? Does the LED indicate this ?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: TCRT5000 - faulty?

#8 Post by grovkillen » 07 Nov 2017, 14:11

I would cover the IR diode on the device or else the signal from the electric meter is lost in the noise.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: TCRT5000 - faulty?

#9 Post by Shardan » 07 Nov 2017, 16:19

For some clarification:

The TCRT5000 itself consists just of a IR LED and a photo transistor.
The little chip on the breakout board is a so called "Comparator", usually a LM393, LM358 or similiar.
The chip only does one thing: It takes the analog output from the photo transistor and forms the waveform into sqare wave.

The TCRT5000 is made for reading mechanical devices, the black mark on an old-fashioned electricity counter's disk
or the little wheel on a water counter.
For this the IR-LED has to be on permanently, the photo transistor takes up the changes from dark to reflecting and back.

Datasheet Sensor: http://www.vishay.com/docs/83760/tcrt5000.pdf
A similiar schematic: http://www.electrodragon.com/analog-and ... schematic/

The photo transistor is used best for the reflections of the IR-LED at a distance of around 2,5 mm.

If you want to read simple IR pulses ("x pulses per kWh" scheme) from a electricity meter you should disconnect the IR LED. As grovkillen said, the pulses will get lost otherwise.
The sensor should be placed near to the IR LED of the meter.

If your electricity meter sends data pulses (encoded power data) per IR i doubt if this sensor is suitable at all.

If your breakout board has an "AO" analog output, it shoud be possible to check if the sensor itself is broken.
Just check the voltage between AO and GND with a black and a white paper in front of the sensor.

Regards
Shardan
Regards
Shardan

olleman
Normal user
Posts: 53
Joined: 27 Aug 2017, 08:10

Re: TCRT5000 - faulty?

#10 Post by olleman » 07 Nov 2017, 17:47

Thanks for all replys! I think I might have expressed myself a bit unclear.

I have a phototransistor connected to the same Nodemcu board that I connected the LM393 to. The reason for saying this is that I guess that this tells us that there's no problem with my Nodemcu board itself since the electricity meter function is working just fine.

BUT this has nothing to do with the LM393. I just connected it to see what it could do and perhaps use it as an alternative to a magnetic door switch. My problem is that it doesn't seem to work. No matter what I do: shine a light directly on it, put a mirror directly in front of the diodes or put my fingers around the two diodes. Nothing gives me a reading (I can see this directly on the LM393 since it has a led that shines when it detects the ir reflection). I have looked at the IR diode through my camera and I can't detect any light at all - shouldn't this be on constantly?.

So my questions is: Have I connected this wrong somehow (GND > GND, VCC > 3V and DO to GPIO13), is the Nodemcu not strong enough to drive the LM393 or is there a good chance that it's actually faulty?

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: TCRT5000 - faulty?

#11 Post by Shardan » 07 Nov 2017, 18:24

Yes, the LED should be "on" constantly.
There is no circuit driving the LED its just connected to power via a resistor.

I've just tested my module - the same one as you use.
LED is permanently on, it shows "on" if i get near with my finger.
Works with 5V and 3.3V, 3.3V is less sensitive as the IR LED is darker.

Seems that something is wrong with your sensor board.
Is the red LED on when powering the board?

Regards,
Shardan
Regards
Shardan

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: TCRT5000 - faulty?

#12 Post by grovkillen » 07 Nov 2017, 19:30

Also, have you tried to adjust the threshold by screwing on the potentiometer?

But as Shardan said, if the IR LED not shining the board seems to be malfunctioning.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

olleman
Normal user
Posts: 53
Joined: 27 Aug 2017, 08:10

Re: TCRT5000 - faulty?

#13 Post by olleman » 07 Nov 2017, 19:54

Yes, the power led on the LMA393 is on, although it's green on my version. I'm gonna test 5V power supply when I get the chance and have ordered a new sensor as well.

Adjusting the sensor doesn't work but if I adjust it far enough it goes to a state where it's always "on" and the second led lights up.

Thanks for all input!

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 131 guests