I'm doing a project in which a 5mm LED is near a 5mm phototransistor. There are times in which the sensor must pick up external light even with the LED on.
I understand one option is to turn the LEDs off everytime I want to sense light, but that means the microcontroller will run slower overall (as it spends time turning the LED on and off) and flickering might drain batteries faster.
So I'm opting for a second option. Using heat-shrink tubing to cover up the sides of the LED's so they don't affect the nearby sensor.
I have tried 5mm heat-shrink tubing on a 5mm led and it fits decently but somewhat loose. They say the traditional way is to use a blow-dryer on very low heat to tighten the tubing to the LED, but I was thinking maybe theres a better approach.
Online there is an option to buy 6mm tubing as well (http://futurlec.com/Cable.shtml).
So other than applying heat, which of the following is better to secure the tubing to the LED?
Should I buy 5mm and 6mm tubing, put the 5mm tubing on the LED and force the 6mm tubing over the 5mm tubing in place?
Should I change 6mm to a higher number for 2nd tubing size?
or should I get a larger tube diameter and use some tool (I don't know the name of it) to feed it through itself (so one end looks like a cup rim and the other end looks cut)?
or is there a specialized tool to actually cover the LED completely?
I thought of led holders and clips but they cover only parts of the sides or they angle the LED the wrong way. Also the sensor side is about 6mm maximum away from the LED side.