TCRT5000-driver

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
Post Reply
User avatar
Werner_G
Posts: 17
Joined: Fri Sep 13, 2019 8:15 am
Location: Dortmund / Germany

TCRT5000-driver

Post by Werner_G » 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?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: TCRT5000-driver

Post by pythoncoder » 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.
Peter Hinch
Index to my micropython libraries.

User avatar
Werner_G
Posts: 17
Joined: Fri Sep 13, 2019 8:15 am
Location: Dortmund / Germany

Re: TCRT5000-driver

Post by Werner_G » 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.

User avatar
mcauser
Posts: 507
Joined: Mon Jun 15, 2015 8:03 am

Re: TCRT5000-driver

Post by mcauser » 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.

Post Reply