Adjustable sensitivity IR Light gate

  • Thread starter xeozim
  • Start date
  • #1
2
0

Main Question or Discussion Point

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

Answers and Replies

  • #2
berkeman
Mentor
57,306
7,292
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.
 
  • #3
2
0
Thanks Berkeman, an IR window sounds like it will be useful
 

Related Threads on Adjustable sensitivity IR Light gate

Replies
1
Views
7K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
8
Views
4K
Replies
4
Views
1K
Replies
1
Views
3K
Replies
9
Views
1K
  • Last Post
Replies
13
Views
3K
  • Last Post
Replies
15
Views
4K
  • Last Post
Replies
3
Views
689
  • Last Post
Replies
5
Views
22K
Top