TCRT-5000 Reflective Optical Sensor #4662
Replies: 1 comment
-
Posted at 2015-03-30 by @gfwilliams Hi - yes, sorry - I need to update the documentation on that. Have a look here As well as a great photoshop it gives some good information on using it with Espruino (just connect to 3.3v rather than 5v)... Posted at 2015-03-30 by jacklee Hi, Girdon
Is this code correct? Posted at 2015-03-30 by @gfwilliams You need to call analogRead each time, so:
Also, Espruino is case-sensitive, so you need to use capital and non-capital letters in the right places... Posted at 2015-03-30 by @allObjects Take a look at Photomicrosensor (Transmissive) - Omron EE-SJ5 conversation. The difference is 'reflect' vs. 'not interrupt'. the Photomicrosensor (Transmissive) - Omron EE-SJ5 has the receiving phototransistor opposite of the infrared emitting diode. Something (blocking) in between stops the phototransistor from 'conducting' / to switch off, where - in your case - something reflecting will make it to conduct / to switch on. Using the analog read is a good idea to measure the amount of reflection... most phototransistors have though a more switching behavior than (linear) amplifying one. I used the analog read to figure out what is going on, because I had some strange behavior with a material I expected to block the infrared light. The material looked very blocking to my naked eye, but it was not blockin infrared. Weird... that's all what I can say, since did not do more research on that particular material. As @gfwilliams mentioned - with the digital ready, you could eliminate the external resistor that I use in my circuitry: To drive the infrared LED, you still need an external resistor to limit the current (and give the LED a life) - if the LED has not a built-in resistor. Posted at 2015-05-07 by caliskan Jack, on a hardware level, you need to ensure that you’ll be getting a fixed signal with no fluctuations in its analog values, you can do that by using an oscilloscope. Once you start writing your program, you can use ADC averaging or a moving average filter to get best possible results from your optical sensor. I’m planning to use this sensor in one of my circuits as well and I’m going to be waiting for your feedback. Posted at 2015-05-08 by DrAzzy Are you working with the bare component, or with one of the boards available? There are boards available with a little pot on them and some other electronics - those contain a comparator. They seem to usually have 4 pins - power, ground, an analog out (probably raw output), and a digital out (output of the comparator, the trip point of which is set by the pot) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2015-03-30 by jacklee
Hi, all
may I know how to use the Tcrt-5000 with espruino?
The link on the website is just intro the sensor?
Can anyone provide some idea and example.
Thanks.
http://www.espruino.com/InfraredProximity
Beta Was this translation helpful? Give feedback.
All reactions