- #1
xeozim
- 2
- 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
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