Building a Counter with IR Sensor and Manual Buttons

  • Thread starter Kalagaraz
  • Start date
  • Tags
    Electronics
In summary: when the switch is off both the indicators will glow and when the switch is on high will light up and when the switch is on low will not light up.
  • #1
Kalagaraz
28
0
I'm trying to learn to design digital circuits so as a project I wanted to build a counter that would work as follows:

When a reset button is pushed, it will set the counter at 0
When a + button is pushed, it will add one to the counter
when a - button is pushed, it will subtract one from the counter

and the complicated condition:

When a IR sensor/IR led pair gets interrupted it will add 1 to the counter

So basically I want to make a counter that goes up by one when something blocks the beam and then the +/- buttons are for manual adjusting it in case of an error or something.

I know I can build the sensor with a phototransistor as a switch, but the thing is I'm not sure how to limit the circuit incrementing the counter 1 and only 1 time when the beam is interrupted?

Also, I'd like some advice on whether an IR led / phototransistor is the best motion detection combination, if there is an easier alternative I would gladly hear it.

At work they have something similar, but I'm not sure it's IR. They have a beam that shoots and reflects off some kind of kalediscope looking mirror. I don't think it's IR, because when looking at mirror from angle is beam you can see red light being reflected. If I knew exactly what it was, I would make use of their beam and mirror, and just use my own detector.

Thanks for any help.
 
Engineering news on Phys.org
  • #3
Any specific books you guys recommend? I understand a bit, like I got no problem with logic gates etc... stuff like that, but I do some have difficulty mentally visualizing the path electricity flows.

For example

circuit0002.jpg


I know that only low will light when the switch is low, and high etc..., but I don't know WHY. People have tried explaining it to me but I don't understand. I've been staring at it all day to try and figure it out on my own, tell me if this reasoning is right.

When the switch is high, the electricity has 2 paths it could possibly flow. Up around towards the low indicator, and then through the switch to the high LED. The up around would require it going through a total of 4 resistive elements, then switch 2 elements. So it takes the path of least resistance and takes the switch path first. This puts Y as +5v so now the electricity can't flow through the LOW indicator because there is no potential different +5v on both sides..

That's the only reasoning I can think of why it doesn't take both paths...
 
  • #4
With the switch on HIGH, what will be the voltage at OUTPUT? How much voltage will be across the LOW indicator? How much voltage will be across the HIGH indicator?

Ohm's Law is the key to understanding these circuits. [ E = I * R ] How would you apply it to the above circuit?
 
  • #5
skeptic2 said:
With the switch on HIGH, what will be the voltage at OUTPUT? How much voltage will be across the LOW indicator? How much voltage will be across the HIGH indicator?

Ohm's Law is the key to understanding these circuits. [ E = I * R ] How would you apply it to the above circuit?

V = IR, 5v / 780 ohms = ~6 milliamps. That's all I know :(
 
  • #6
Kalagaraz said:
V = IR, 5v / 780 ohms = ~6 milliamps. That's all I know :(

In your circuit you show 5V connected to the bottom of the upper 390 ohm resistor. How much voltage would you say is across that resistor?
 
  • #7
i think..when the switch is high the current will flow through high indicator because at junction"y" it is five volt and above it is also 5 volt so the low indicator LED will be reverse biased and hence will not conduct and so the current will pass thru high indicator and it will glow.

and when the switch is low the left side supply is isolated and the current will flow from the above voltage supply to low indicator led and then to the ground via the switch.current will not go through high indicator because it high resistive path.

i think it is clear now.
 

1. How does an IR sensor work in a counter?

An IR sensor works by emitting and detecting infrared light. In a counter, the sensor is programmed to detect when an object (such as a hand or a product) breaks the infrared beam, triggering the counter to increase by one.

2. Can an IR sensor be used with any type of material?

It depends on the sensitivity of the sensor. Some IR sensors may have difficulty detecting certain materials, such as dark or reflective surfaces. It is important to test the sensor with different materials before using it in a counter.

3. How accurate is a counter with an IR sensor?

The accuracy of a counter with an IR sensor can vary depending on the quality of the sensor and its calibration. However, most IR sensors have a high accuracy rate and can count objects with precision.

4. What is the purpose of manual buttons in a counter with an IR sensor?

The manual buttons serve as a backup in case the IR sensor fails or if there are any discrepancies in the count. They also allow for manual input in case an object is missed by the sensor.

5. Is it possible to connect multiple IR sensors to one counter?

Yes, multiple IR sensors can be connected to one counter as long as they are properly programmed and calibrated. This can increase the accuracy and efficiency of the counter, especially in cases where multiple objects need to be counted simultaneously.

Similar threads

  • Electrical Engineering
Replies
2
Views
481
  • Electrical Engineering
Replies
9
Views
907
  • Electrical Engineering
2
Replies
49
Views
2K
  • Electrical Engineering
Replies
5
Views
1K
Replies
3
Views
1K
  • Electrical Engineering
Replies
1
Views
2K
Replies
6
Views
481
  • Electrical Engineering
Replies
6
Views
1K
Replies
2
Views
4K
  • Programming and Computer Science
Replies
1
Views
680
Back
Top