circuits

WBahn

Joined Mar 31, 2012
33,140
What is LDR?

While we can provide some hints and suggestions, a big part of the point of the problem is for YOU to figure it out yourself; it's the struggle from which you learn, more so than the end result.
 

Thread Starter

MilkyTank

Joined Jul 27, 2012
13
this is the problem, i need to build a exit and entrance door and count the no. of people who enter the door at the same it decreases when somebody leave

this is my tools:

74192
7447
LDR
7segment

I dnt knw how to implement it :(:(

please help
 

bertus

Joined Apr 5, 2008
23,001
Hello,

Just have a look at the datasheets of the chips.
Then you can see what signals are needed.

If you want to determine the direction of the persons going in and out of the room,
you will need TWO ldr's and make a circuit that can see the direction.

Bertus
 

Attachments

Last edited:

bertus

Joined Apr 5, 2008
23,001
Hello,

Imagine a circuit that creates a puls on the up pin when a person walks along LDR 1 and then LDR 2.
Imagine a circuit that creates a puls on the down pin when a person walks along LDR 2 and then LDR 1.

What would be needed to create such a circuit?

Bertus
 

WBahn

Joined Mar 31, 2012
33,140
Imagine a circuit that creates a puls on the up pin when a person walks along LDR 1 and then LDR 2.
Imagine a circuit that creates a puls on the down pin when a person walks along LDR 2 and then LDR 1.
What about when two people are passing the sensors at the same time in opposite directions? Virtually every combination, including missed and overlapping hits.

The OP said that he was supposed to have separate entrance and exit doors, so just use one LDR on each door. You have to assume that people come through one at a time and that you only get one interruption per person (not one for each arm plus one for the torse and maybe a leg thrown in).

[/QUOTE]
 

WBahn

Joined Mar 31, 2012
33,140
Have you tried building any of the circuits you've been directed to? Or the circuit that you yourself posted (which has some problems, but it's a start)?

Start by trying to just make a single digit count up or down in response to button presses. Once you have that working (and I suspect you are going to have some problems getting to that point), then it becomes much easier to do the rest.

So build just the one-digit version using buttons and tell us what happens when you try to use it.
 

Thread Starter

MilkyTank

Joined Jul 27, 2012
13
i try to do it myself but it is not going smooth when it increase it always jump to far ex. 2 then 8 it always like that so that i try to see some other options
 

WBahn

Joined Mar 31, 2012
33,140
This is exactly what I expected you to see. I imagine that sometimes it jumps by, say, 5 and other times it jumps by, say 9.

Have you ever heard of switch bounce? Well, that's almost certainly what you are seeing.

So look up ways to debounce a switch. There are a few.
 

MrChips

Joined Oct 2, 2009
35,131
Debouncing an LDR is not the same thing as debouncing a mechanical switch.

The dual NAND-gate circuit is the classic way of using a single-pole double-throw switch or push-button.
(What you have there is an R-S flip-flop.)

Except that circuit is incorrect. Both R1 and R2 should be pull-ups (to Vcc). 10kΩ is suitable for CMOS gates. For 74LS00 TTL gates, R1 and R2 should be around 1kΩ to 4.7kΩ.

Debouncing an LDR sensor is a completely different story.
 

MrChips

Joined Oct 2, 2009
35,131
The problem with the LDR is more about logistics than debouncing, as WBahn pointed out in post #12.

You can condition the signal from the LDR with a retriggerable monostable multivibrator such as a 74LS123 to produce an extended signal of a suitable duration.

The problem is that it does not identify the direction of motion.

Then there is the problem of two persons passing each other, one coming in and the other going out.

On a first iteration basis, you will need at minimum, two sets of sensors, staggered in position. One sensor will detect later than the other. From this you can determine direction.
 
Top