Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Counter - Door

Status
Not open for further replies.
Atleast idea abt working of Infrared Reciever?

How to Switch the other LED (IR-TX1/ IR-TX2 depending on the direction) off, till the person moves in/out?
and also the change should not affect the counter.
Ex: if a person is entering the room, only up count should be performed, n down count should be disabled, similarly while the person leaves the room vice-versa should happen.
 
Last edited:
micro controller? how exactly, since i have no idea about it.
One thing is for sure i want this project to be done, no matter in any way.

What all should i use in place of IR Receiver?
 
Last edited:
micro controller? how exactly, since i have no idea about it.

I'm guessing that's a noooooooo on the µcontroller then.


What all should i use in place of IR Receiver?

Answer these questions:

  1. Will this be used on an interior or exterior doorway?
  2. Is the width of the doorway in the diagram (10ft) accurate or can it be smaller?
  3. How much traffic will be going through the doorway? Basically, will people be walking through the doorway so often that there will be no space in between them?
  4. What is the maximum number of people the system will have to count before it is allowed to rollover?
  5. How do you want the count to be displayed? LCD? Computer? 7-segment LED? Interpretive dance?
  6. Will the system have to count children or short people too?
  7. Does the system have to account for more than one person walking through the doorway at once?
  8. Can the 1 ft minimum as shown in the diagram be changed(larger or smaller)?
  9. What are you doing this project for? Work? School? Fun?
  10. What is your favortie color?
 
1. Will this be used on an interior or exterior doorway?
Interior
2. Is the width of the doorway in the diagram (10ft) accurate or can it be smaller?
4ft -10ft ; can manage with 4 ft
3. How much traffic will be going through the doorway? Basically, will people be walking through the doorway so often that there will be no space in between them?
Moderate, i mean about 4 persons in a minute(that maximum)
4. What is the maximum number of people the system will have to count before it is allowed to rollover?
I just want to show the concept this time; so 10 counts will do.
5. How do you want the count to be displayed? LCD? Computer? 7-segment LED? Interpretive dance?
7 segment LED
6. Will the system have to count children or short people too?
Not required, But what changes should i make for it?[I think Just lowering the sensors will do.]
7. Does the system have to account for more than one person walking through the doorway at once?
No, but just tell me how can it be done if required.
8. Can the 1 ft minimum as shown in the diagram be changed(larger or smaller)?
Surely.
9. What are you doing this project for? Work? School? Fun?
Student Project + Fun
10. What is your favorite color?
Color? Why?
 
Last edited:
Last edited:
1. Will this be used on an interior or exterior doorway?
Interior
2. Is the width of the doorway in the diagram (10ft) accurate or can it be smaller?
4ft -10ft ; can manage with 4 ft
3. How much traffic will be going through the doorway? Basically, will people be walking through the doorway so often that there will be no space in between them?
Moderate, i mean about 4 persons in a minute(that maximum)
4. What is the maximum number of people the system will have to count before it is allowed to rollover?
I just want to show the concept this time; so 10 counts will do.
5. How do you want the count to be displayed? LCD? Computer? 7-segment LED? Interpretive dance?
7 segment LED
6. Will the system have to count children or short people too?
Not required, But what changes should i make for it?[I think Just lowering the sensors will do.]
7. Does the system have to account for more than one person walking through the doorway at once?
No, but just tell me how can it be done if required.
8. Can the 1 ft minimum as shown in the diagram be changed(larger or smaller)?
Surely.
9. What are you doing this project for? Work? School? Fun?
Student Project + Fun
10. What is your favorite color?
Color? Why?

1. Will this be used on an interior or exterior doorway?
Interior


Since the doorway to be monitored will be interior, there is less concern for ambient light to affect the system than there would be if it was on an exterior doorway exposed to sunlight. You can probably get away with something like this for your transmitter and reciever pair. That's what I would try first anyway.

2. Is the width of the doorway in the diagram (10ft) accurate or can it be smaller?
4ft -10ft ; can manage with 4 ft


I asked the question about door width because if the door width is narrow enough, you could get away with using an IR distance sensors instead of a transmitter/reciever pair with each one mounted on an opposite side of the doorway. 4 ft would be narrow enough for this to work. The system would interpret someone passing through the doorway as a shortening of measured distance. This could be fed into a logic circuit to produce the desired output. This would probably be the more difficult approach though since you aren't going to use a microcontroller

3. How much traffic will be going through the doorway? Basically, will people be walking through the doorway so often that there will be no space in between them?
Moderate, i mean about 4 persons in a minute(that maximum)


This is good becasue that will give time in between people for the IR beam to "reconnect". All this circuit is doing is counting the number of times the line of sight between the IR LED and the phototransistor is broken. If people were to walk through such that their "shadows" overlapped, it would trick the system into thinking only one person had passed through.

4. What is the maximum number of people the system will have to count before it is allowed to rollover?
I just want to show the concept this time; so 10 counts will do.


If all you're doing is showing the concept, than a single 7 segment display 0 - 9 should be fine. It will simplify your circuit some.

5. How do you want the count to be displayed? LCD? Computer? 7-segment LED? Interpretive dance?
7 segment LED


Personally, I would have gone with interpretive dance but if you're not up to the challenge, I guess a 7 segment would be fine.

6. Will the system have to count children or short people too?
Not required, But what changes should i make for it?[I think Just lowering the sensors will do.]


If you are going to count short people or children, you will have to mount the sensors low enough so that they couldn't walk underneath them. This is great until a person of normal height walks through the door. If they are swinging their arms alot, it could produce false counts. It will be more reliable if you design it for only normal size people.

7. Does the system have to account for more than one person walking through the doorway at once?
No, but just tell me how can it be done if required.


If you want to account for people walking in the door side by side you would have to mount the sensors over head and have multiple pairs of sensors. This could become complicated so I would not make it a requirement.

8. Can the 1 ft minimum as shown in the diagram be changed(larger or smaller)?
Surely.


If you can adjust the distance that the recievers are away from one another, you might be able to get away with one transmitter (i.e. IR LED). With a single transmitter, the line of sight to each reciever (i.e. phototransistor) will be slightly different and they won't get broken at the same time. This might be doable with some tweaking but if you're not up for optimizations and just want to get the project done then the two LED two phototransistor setup will work fine.

9. What are you doing this project for? Work? School? Fun?
Student Project + Fun


What are you studying? What projects have you done so far?

10. What is your favorite color?
Color? Why?


Because I was going to buy you a car in your favorite color. Dude...it was a joke.:D

So this is how I would take a first hack at this project.

I would set up the two IR LEDs side by side. Maybe sepearted by 3" - 4". Wire them so they are on continuosly. I would mount the LEDs at the bottom of a long tube or maybe even a drinking straw. The reason is that I want the beam that comes out of the LED to be really narrow. I don't the adjacent LEDs to affect the adjacent phototransistors.

Next, I would mount the phototransistors on the other side of the door. You will have to be very careful to make sure the LEDs line up with the phototransistors for proper operation.

The phototransistors will be on when they can see the IR LED. Take the output from the phototransistor and feed them into a logic circuit. More on this logic circuit soon.

I would then feed the logic signals into a 4510 counter, connect the output of the 4510 to a 4511 and then ultimately into a common cathode 7 segment display. A tutorial for using the 4510, 4511, and 7 segment can be found **broken link removed**.

Now for the logic circuit. The 4510 has an input referred to as UP/DN. This input determines whether or not the low to high transition of the clock input increments or decrements the count. The logic signal to this input should change depending on which IR LED gets blocked first (i.e. if a preson is entering or leaving the room). According to the data sheet of the 4510, the UP/DN input pin should only be changed while the clock input is high. So this is what your logic circuit would have to do.

Depending on which LED gets blocked first the logic circuit would have to change the state of the UP/DN count or not. It should work like this:

No LEDs blocked:
UP/DN - high
CLOCK - high

LED1 gets blocked first (person enters):
Inhibit LED2
UP/DN - high
CLOCK - pulse low and then back to high
Re-enable LED 2

LED2 gets blocked first (person exits):
Inhibit LED1
UP/DN - transition to low
CLOCK - pulse low and then back to high
UP/DN - transition back to high
Enable LED1

There are several ways this logic circuit can be made and there may be easier methods but this is what I'd try first.
 
Very Nice!
**broken link removed**
How did u get the Logic?
So What Type of Latch is Latch 3(Set & Set) and i'm confused with Latch 2?

Holy crap dude. It's going to take me a minute or two to digest this. I'm not sure if this is how I would go about solving the problem but there's more than one way to skin a cat.
 
r.vittalkiran

i developed this logic for that thread, there is a small mistake in latch 3, U5C, say he top pin is enable and the down one is reset. but i used as set instead of reset since it reflect the meaning to set upcount or set down count.

about latch2, i eleminated one gate by taking its input from latch1 that is why it is confusing.

this circuit is to use only simple NAND gates, the latches can be replaced by flip-flops. the circuit has special features to disable other sensor input when one is already gives a signal. also until both sensors are cleared completely the circuit will hold the state.

also for ex: if one sensor is getting more than one signal hand or etc, it will not respond again and again, just hold and wait the conformation from the next one to make a propper count. write down the building blocks of the circuit putting blocks for latches i marked, then you can understand how it works.

you dont want to fear, assemble it using four 4011 ICs and check it will work as i mentioned. or if you can simulate do it and see.
 
Last edited:
I'm a College Student...
I had previously done Automatic Light and Water Level Controller...
Thanks Pals... any idea, that which would be much more easier?
 
Last edited:
I'm a College Student...
I had previously done Automatic Light and Water Level Controller...
Thanks Pals... any idea, that which would be much more easier?

Yeah, the easiest would be to use a microcontroller. I don't think any solution using logic ICs is going to be "simple". At least not significantly simpler than what Mbarazeen and I have already described. That's probably why it was made into an assignment for you to learn from. I'm assuming it was an assignment anyway.

What part are you struggling with?
 
Yeah, the easiest would be to use a microcontroller. I don't think any solution using logic ICs is going to be "simple". At least not significantly simpler than what Mbarazeen and I have already described. That's probably why it was made into an assignment for you to learn from. I'm assuming it was an assignment anyway.

What part are you struggling with?

:confused: :O
Thats what... i'm finding some difficulty in the logic part(design).
but Mbarazeen Design may be doable...

What would happen if i keep 2 sensors very close to each other? (Using Laser)
 
Last edited:
:confused: :O
Thats what... i'm finding some difficulty in the logic part(design).
but Mbarazeen Design may be doable...

I agree and it's pretty similar to what I've come up witrh so far. If I understand what's going on he is essentialy using some NANDs as SR latches and AND gates so that the latch doesn't reset until both sensors are clear again.

What would happen if i keep 2 sensors very close to each other? (Using Laser)

Nothing, as long as you can ensure either through design or setup that the two sensors don't interfere with each other. You don't want to get false triggers because one LED or laser can be seen by both phototransistors.
 
Last edited:
what you have to do is, buy 4011 ICs 4nos & a veroboard.
plug the ICs and start soldering following the IC data sheet. it will take 30min or less for an expert to solder it out.
see the attached how it has to be connected to the pins for example.

you can have the sensors closer its not a problem, can be some 4cm or more. you have to design the sensor part to give good signal to the logic.

the out put can be fed to a counter (up/down)
 

Attachments

  • connection.JPG
    connection.JPG
    111 KB · Views: 260
not yet, but im pretty sure that there wont be any problem, if any one can have a try? other wise let me see when i find some good time.

Edit: i simulated, there is only one discrepancy when the system resets, up/down count select output (latch-3) goes to indeterminable due to simultaneous signal reversal on U5C & U5D.

but in practice there will be a slight time difference in both input signals thus it makes a time delay (may be in micro seconds) that will always set the latch-3.

all other functions are working as expected.

Note: he has to use the resistor and the capacitor as indicated after U2A to prevent any miscount during this reset.
 
Last edited:
there is only one discrepancy when the system resets, up/down count select output (latch-3) goes to indeterminable due to simultaneous signal reversal on U5C & U5D.

That's what I was curious about that prompted me to ask the question. Bringing set and reset hi simulaneously will cause an indeterminent output. But I also agree with you that in real life, it will not be simultaneous. It might not be a bad idea to make one wire or trace a bit longer than the other.

I would also reccomend schmitt triggers on the inputs.

Also, if he goes with the 4510 counter, a circuit must be placed in between your circuit and the counter to ensure that the clock pulse is always high while the up/dn input is changing state.

Could maybe use a monostable 555???
 
Last edited:
Also, if he goes with the 4510 counter, a circuit must be placed in between your circuit and the counter to ensure that the clock pulse is always high while the up/dn input is changing state.

i checked with the datasheet, its not necessarily to be changed when the clock is high. see the timing diagram on the data sheet. but it can be allowed to change when the clock is high and will only reflect during the next clock.

so there is no need for any additional circuit, even no need for any RC delay. semiconductor delay will play the role to set the latch-3

on the circuit i posted count= clock
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top