Page 1 of 1
Posted: Sat Jan 02, 2021 5:44 pm
A happy New Year to all of you! Just a short question - I am going to play a little bit with a widely used IR line tracking module (TCRT5000 which includes IR transmit and receive). I cannot find a driver for this module. Can anyone help?
Posted: Tue Jan 05, 2021 7:53 am
That device is so simple it doesn't need a driver.
You will need a resistor in series with the IR emitter to limit the current - say 39Ω to 3.3V. You'll also need a load resistor in series with the phototransistor - the value rather depends on the distance and reflectivity of your target. I'd start with values in the region 1-10KΩ. Use an ADC to read the voltage between the phototransistor and its load resistor.
Posted: Tue Jan 05, 2021 7:26 pm
Thank you Peter! I was wondering why such a widely used module isn't supported by Micropython. So I just have to readout D1 or A0.
Posted: Thu Jan 07, 2021 5:11 am
If you are using one of these modules
, it has the resistors on board.
The A0 and D0 are analog and digital outputs. You can use one or the other, depending on your needs.
The blue potentiometer is for tweaking the D0 sensitivity - where on the analog scale it triggers.