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.

Determining Direction of a person

Status
Not open for further replies.

kaygeezo

New Member
Hi,
am designing a light control circuit ,now what i need is to determine if a person has entered in or has gone out. if a person(persons) them lights should be on until all persons are out. i need sample codes written in mikroC(am using mikroC). please am stuck!,cant go on with my project. i have two sensors connected to RA2 & RA3 and am using PIC16F84A( i also have 16F690).
thanks in advance
 
Well, if the sequence is 00 10 11 01 00 then a person entered. If it's 00 01 11 10 00 then a person left.

Mike.
 
Hi,
am designing a light control circuit ,now what i need is to determine if a person has entered in or has gone out. if a person(persons) them lights should be on until all persons are out. i need sample codes written in mikroC(am using mikroC). please am stuck!,cant go on with my project. i have two sensors connected to RA2 & RA3 and am using PIC16F84A( i also have 16F690).
thanks in advance

hi,
What type of sensor are you using.?
 
Hi Kaygeezo,

Don't forget to add checks for 00 10 10 10 00 (person partially enters, pauses, then leaves), 00 01 01 01 00 (person starts to leave but changes their mind), etc.

Do you see the pattern?

What happens if two people enter side by side? Is the entrance wide enough to allow that?


Torben
 
Hi Kaygeezo,

Don't forget to add checks for 00 10 10 10 00 (person partially enters, pauses, then leaves), 00 01 01 01 00 (person starts to leave but changes their mind), etc.

Do you see the pattern?

What happens if two people enter side by side? Is the entrance wide enough to allow that?


Torben

hi,
As you say there are many combinations.
I think this type of requirement has been posted about least 6 times in the past 12 months.
I wonder if its one of the standard school questions.?

I will be interested to see which sensors he is going to use.
 
Last edited:
hi,
As you say there are many combinations.
I think this type of requirement has been posted about least 6 times in the past 12 months.
I wonder if its one of the standard school questions.?

I will be interested to see which sensors he is going to use.

If I had access to unlimited time, an unlimited (or large enough) budget, and some smart/experienced minds to pick, what I would do is: count people entering and leaving (using something like the above pattern coding from e.g. laser beam-break detectors), have PIR sensors inside the room, and use video monitoring with image processing inside the room as well, all monitored by a central decision-making program to determine whether anybody was in the room. :)


Torben
 
If I had access to unlimited time, an unlimited (or large enough) budget, and some smart/experienced minds to pick, what I would do is: count people entering and leaving (using something like the above pattern coding from e.g. laser beam-break detectors), have PIR sensors inside the room, and use video monitoring with image processing inside the room as well, all monitored by a central decision-making program to determine whether anybody was in the room. :
Torben

hi,
A cheaper way would be to fit smaller lamps or employ a 'resident light switch operator'.;)

One possible set of sensors, would the pressure mats you buy for stair treads.
About 30in long by 7in wide. lay say 5 cross ways across the extrance to the room.
The mats arranged so that a normal person has to step on at least two mats as he enters or leaves.
This would improve detection but it still wouldnt be fool proof.
 
Last edited:
hi,
A cheaper way would be to fit smaller lamps or employ a 'resident light switch operator'.;)

:) Yep. "Please turn the lights out when you leave" is a good way to save juice on the cheap. And it's easy and everybody can do it.


Torben
 
:) Yep. "Please turn the lights out when you leave" is a good way to save juice on the cheap. And it's easy and everybody can do it.


Torben

hi,
I like your CCTV camera idea, take a video recording of the room, find out who keeps leaving the lights ON
and send him/her the power bill.!!:eek:
 
Last edited:
hi,
I like your CCTV camera idea, take a video recording of the room, find out who keeps leaving the lights ON
and send him/her the power bill.!!:eek:

You made me laugh out loud with that one! Not what I was thinking of doing, but your idea is a lot easier and probably more effective too. :)


Torben
 
Hi Kaygeezo,

Don't forget to add checks for 00 10 10 10 00 (person partially enters, pauses, then leaves), 00 01 01 01 00 (person starts to leave but changes their mind), etc.

Do you see the pattern?

What happens if two people enter side by side? Is the entrance wide enough to allow that?


Torben

gotcha!!, thanks pal. i will consider it.
concerning the side to side entering,i haven't yet made up my mind. but please if you have something to help on this please help.
 
What about some monitoring camera and "computer vision" software that counts and measure the people who goes in and out.. ?

What about cameras and motion detection software, combined with sensor on the door.. when nobody is inside, then inside nobody is moving.. it will bi sign to turn off the light.. if someone get inside, then the sensors on the door will detect the man.. and it will be sign to turn on the light...

sorry, i don`t seen that this is an old topic :D
 
Last edited:
not old

What about some monitoring camera and "computer vision" software that counts and measure the people who goes in and out.. ?

What about cameras and motion detection software, combined with sensor on the door.. when nobody is inside, then inside nobody is moving.. it will bi sign to turn off the light.. if someone get inside, then the sensors on the door will detect the man.. and it will be sign to turn on the light...

sorry, i don`t seen that this is an old topic :D

still am need of help. thanx anyway
 
not old

What about some monitoring camera and "computer vision" software that counts and measure the people who goes in and out.. ?

What about cameras and motion detection software, combined with sensor on the door.. when nobody is inside, then inside nobody is moving.. it will bi sign to turn off the light.. if someone get inside, then the sensors on the door will detect the man.. and it will be sign to turn on the light...

sorry, i don`t seen that this is an old topic :D

still am need of help. thanx anywayv
 
This is very similar as the problem of rotary encoders ( and linear ones ). There is a lot of stuff written on this. Try it in google.
 
I read a application data sheet recently (can't find it now) for a infared sensor that was sensitive enough to detect the presense of a person in a room (as long as s/he was alive of course :p).

That would make a simple detector able to turn out the lights in a room.

Lefty
 
PIR Sensor would be the easy way to tell and turn on the light when in the room. Off no one is in the room.
and it don't take a lot of code to make it work.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top