Adjustable sensitivity IR Light gate

AI Thread Summary
The discussion revolves around creating a light gate for a timing system in a solar-powered car project, utilizing an IR receiver and emitter. The main challenge is achieving the right sensitivity for the sensor to detect the car amidst varying ambient light conditions and bright halogen lamps. The user seeks to implement a hysteresis loop with a comparator to prevent multiple triggers from a single car crossing the line. Suggestions include using an IR window to filter out visible light and modulating the IR signal to enhance detection. Additionally, it is advised to use positive feedback for the comparator hysteresis instead of negative feedback.
xeozim
Messages
2
Reaction score
0
Hi guys, this is to make something for a uni project I'm doing, not asking for the answers to a homework-type problem so I wasn't sure if it should go in the homework section, but if you think it should let me know and I will move it.

So the project background is a timing system for solar powered cars, the bulk of my work for the system will be the software behind it, but I need to get the hardware working first. I've got an IR receiver and emitter (LDR and LED) pair, and want to build a light gate out of them for use in the timing system.

The circuit receive power from the +3V pin on the micro-controller I'm using, and send input back to a different pin, through a voltage comparator. The idea is that when the cars cross the line, the voltage across the IR receiver spikes and the comparator allows a signal through to the controller.

The trouble I have been having is getting the right sensitivity so that the sensor can detect the car. Because the frequency range on the receiver isn't very tight, the bright halogen lamps used to power the solar powered cars for the race mean that the IR emitter from 2 ft away is not making a big % difference to the amount of light falling on the receiver. This problem which I hope to solve later, combined with the fact that pretty much every time the timing system is used there is a different level of ambient light regardless of the halogens, makes using a specific resistance to set the comparator control voltage very difficult.

To make it more difficult for myself (and your wonderful selves), I'd like to use a hysteresis loop with the comparator, to make it less likely one car trips the switch multiple times and really confuses the computer program.

I've attached what I came up with for a hysteresis loop with fixed resistors, in theory, it works (I think) like this:

The value of R1 is used to pull up the voltage from the IR reciever to increase its sensitivity in general.
The ratio between R3 and R4 sets the comparison voltage.
The feedback loop is used to create the hysteresis, the loop size being defined by the value of R2.

So after all that waffle, could someone explain how to use a potentiometer to adjust input to a comparator, I imagine it can be done by replacing one of these resistors with a pot, but I'm not sure which one to change which wouldn't also affect the hysteresis loop.

I think I have included everything I know about this, but if you need more info just ask.

Thanks in advance,

Xeozim
 

Attachments

Engineering news on Phys.org
xeozim said:
Hi guys, this is to make something for a uni project I'm doing, not asking for the answers to a homework-type problem so I wasn't sure if it should go in the homework section, but if you think it should let me know and I will move it.

So the project background is a timing system for solar powered cars, the bulk of my work for the system will be the software behind it, but I need to get the hardware working first. I've got an IR receiver and emitter (LDR and LED) pair, and want to build a light gate out of them for use in the timing system.

The circuit receive power from the +3V pin on the micro-controller I'm using, and send input back to a different pin, through a voltage comparator. The idea is that when the cars cross the line, the voltage across the IR receiver spikes and the comparator allows a signal through to the controller.

The trouble I have been having is getting the right sensitivity so that the sensor can detect the car. Because the frequency range on the receiver isn't very tight, the bright halogen lamps used to power the solar powered cars for the race mean that the IR emitter from 2 ft away is not making a big % difference to the amount of light falling on the receiver. This problem which I hope to solve later, combined with the fact that pretty much every time the timing system is used there is a different level of ambient light regardless of the halogens, makes using a specific resistance to set the comparator control voltage very difficult.

To make it more difficult for myself (and your wonderful selves), I'd like to use a hysteresis loop with the comparator, to make it less likely one car trips the switch multiple times and really confuses the computer program.

I've attached what I came up with for a hysteresis loop with fixed resistors, in theory, it works (I think) like this:

The value of R1 is used to pull up the voltage from the IR reciever to increase its sensitivity in general.
The ratio between R3 and R4 sets the comparison voltage.
The feedback loop is used to create the hysteresis, the loop size being defined by the value of R2.

So after all that waffle, could someone explain how to use a potentiometer to adjust input to a comparator, I imagine it can be done by replacing one of these resistors with a pot, but I'm not sure which one to change which wouldn't also affect the hysteresis loop.

I think I have included everything I know about this, but if you need more info just ask.

Thanks in advance,

Xeozim

Welcome to the PF.

For IR receivers, you should use IR windows (plastic that is transparent to IR, but fairly opaque to visible light), and you should modulate the IR signal at some frequency much higher than the AC Mains. I think typical IR remote controls may use something like 39kHz, but I'm not sure. You should search on IR remote control ICs, and maybe use one of them to save you some work. They will use a bandpass filter on the received signal, to reject the noise from AC Mains powered lights and DC signals like sunlight.

And for your comparator hysteresis, you need positive feedback, not negative feedback.
 
Thanks Berkeman, an IR window sounds like it will be useful
 
I used to be an HVAC technician. One time I had a service call in which there was no power to the thermostat. The thermostat did not have power because the fuse in the air handler was blown. The fuse in the air handler was blown because there was a low voltage short. The rubber coating on one of the thermostat wires was chewed off by a rodent. The exposed metal in the thermostat wire was touching the metal cabinet of the air handler. This was a low voltage short. This low voltage...
Hey guys. I have a question related to electricity and alternating current. Say an alien fictional society developed electricity, and settled on a standard like 73V AC current at 46 Hz. How would appliances be designed, and what impact would the lower frequency and voltage have on transformers, wiring, TVs, computers, LEDs, motors, and heating, assuming the laws of physics and technology are the same as on Earth?
Thread 'How Does Jaguar's 1980s V12 Dual Coil Ignition System Enhance Spark Strength?'
I have come across a dual coil ignition system as used by Jaguar on their V12 in the 1980's. It uses two ignition coils with their primary windings wired in parallel. The primary coil has its secondary winding wired to the distributor and then to the spark plugs as is standard practice. However, the auxiliary coil has it secondary winding output sealed off. The purpose of the system was to provide a stronger spark to the plugs, always a difficult task with the very short dwell time of a...
Back
Top