Go Down

Topic: TCRT5000 + TLC5940 + Beer Pong (Read 2695 times) previous topic - next topic


Aug 02, 2012, 05:06 am Last Edit: Aug 02, 2012, 05:10 am by saeveritt Reason: 1
I was wondering if someone could look over my circuit and tell me if I'm going in the right direction.

What I am using:
RGB Superflux Common Anode LEDs


I am currently trying to initiate a light sequence (Controlled by the TLC5940) when the sensor detects reflected IR Light.
As of now, I have the sequence constantly running and only visible when the IR light is detected.

The application of this is for Beer Pong. I would like the illuminate a cup when it is placed over the sensor.

I am  currently trying to use each TCRT5000 as a switch to power the LEDs and the TLC5940 to bring the powered ones to GND.

Thank you.


Aug 02, 2012, 09:06 am Last Edit: Aug 02, 2012, 09:19 am by Krodal Reason: 1
The TLC5940 has a BLANK input, to switch off the leds. That should be used to switch the leds on and off.

Allthough the LM324N can output about 40mA, it is not ment to do that.
It is also a Op Amp, and you need a comparator instead of a Op Amp.
If you need to drive current, I think you better use a comparator with transistors. Or use only 1 or 2 transistors, without comparator.

But if you use the BLANK input, just a comparator (or even the LM324N) is okay.

The TCRT5000 can have 60mA for the led (IF), but the normal forward current for the the led of the TCRT5000 is 10mA. The forward voltage drop is 1.1V at 10mA. So (5V - 1.1V) / 10mA = 390 Ohm.
With the 100 Ohm in the schematic, the IF current for the TCRT5000 led is about 39mA, so that's okay.


Aug 02, 2012, 09:48 am Last Edit: Aug 02, 2012, 09:53 am by saeveritt Reason: 1
I should probably explain more in detail what I'm trying to accomplish.

I plan on using 3 leds per TLC input, 20mA each, so 60mA total.

Tlc 0 would be red.
Tlc 1 would be green.
Tlc 2 would be blue.

So that would complete one "cup" module.

I would wire the Cathodes of each module to it's corresponding Sensor.

So if cup 1 was sensed, tlc 0-2 would turn on because the circuit above would supply 0-2 with power.

I would have cup two be:
Tlc 3 would be red.
Tlc 4 would be green.
TLc 5 would be blue.

These led's would be powered by the same (but independent) sensor circuit as above.

So if cup two were sensed, it would supply power to leds 3-5.


I hope someone else have a good idea how to do this easier.
My idea is to use an ATtiny per cup and with resistors for the leds.

Your explanation is even more confusing for me.
3 leds per TLC input -> output ?
Cathode to sensor -> anode ?
Perhaps adding a PNP transistor (and a resistor to the base) after the comparator will be enough to make it work. Although I still don't understand what you want the result to be.


Here is a very simple sketch that might help portray my question/idea.


The voltage over a blue led is mostly about 2.8 to 3.6 Volt.
If you use 3 blue leds in series, you can't use +5V anymore.
Do you also have +12V ?
With +12V a single PNP transistor to supply current to the leds can't be used anymore. You need two transistors. And if you have two transistors, you could remove the Comparator.


Aug 02, 2012, 09:31 pm Last Edit: Aug 02, 2012, 10:12 pm by saeveritt Reason: 1
This seems to work really well on the breadboard. What do you think?


Aug 02, 2012, 11:27 pm Last Edit: Aug 03, 2012, 09:32 am by Krodal Reason: 1
You moved the sensor also to 12V, that's good. According to the datasheet the TCRT5000 can have 70V at the collector.

Resistor R3 and R4 don't have to be 6k1. They could be 10k or 22k or so.

I'm still not happy with it that the Op Amp is used to drive a rather large current.
At 12V, you could use CMOS logic, like the CD40106, instead of the Op Amp. In that case you would not need R3 and R4.
The CD40106 could drive a P-channel MOSFET for the leds.

Go Up