Building a Counter with IR Sensor and Manual Buttons

  • Thread starter Thread starter Kalagaraz
  • Start date Start date
  • Tags Tags
    Electronics
Click For Summary

Discussion Overview

The discussion revolves around designing a digital counter circuit that incorporates both manual buttons and an IR sensor for counting interruptions. Participants explore the technical aspects of circuit design, including component selection, voltage behavior, and the functionality of logic gates.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant outlines a project to build a counter that increments when an IR beam is interrupted and can be manually adjusted with buttons.
  • Another participant suggests using the CD4029B CMOS IC for the counter design and recommends studying the datasheet and digital circuit design literature.
  • A participant expresses difficulty in visualizing electrical flow in circuits and seeks clarification on the behavior of voltage and current in relation to logic gates.
  • Questions are raised about the voltage at the output and across indicators when a switch is in different states, with references to Ohm's Law.
  • One participant attempts to explain the current flow through the circuit based on the switch's state, discussing how the indicators behave under different conditions.

Areas of Agreement / Disagreement

Participants express varying levels of understanding regarding circuit behavior and the application of Ohm's Law. There is no consensus on the best approach to visualize electrical flow, and multiple interpretations of the circuit's operation are presented.

Contextual Notes

Some participants mention specific components and their datasheets, while others express uncertainty about the underlying principles of circuit operation. The discussion includes assumptions about voltage paths and resistance without definitive conclusions.

Who May Find This Useful

This discussion may be useful for individuals interested in digital circuit design, particularly those looking to understand the integration of sensors and manual controls in counter applications.

Kalagaraz
Messages
27
Reaction score
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
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...
 
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?
 
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 :(
 
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?
 
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.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
870
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 49 ·
2
Replies
49
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K