design project

i have a project called "room light controller with person counter"
im using Atmel microcontroller. i dont really have idea/s how to start.
can anybod help me?

That’s a very broad project

That’s a very broad project description. We will need more info to help.

  • What exactly are you trying to do with the light contorller?
  • What exactly are you trying to do with the person counter?
  • Which Ateml uC are you using?
  • What is your level of experience with Atmels/uC’s in general?
  • Are there any design limitations (odd room shape, no sensors allowed on the doors, etc.) that need to be taken into account?

fun idea…

It would be cool to have the room get brighter as more people come in lol. Just for fun

a person counter is

a person counter is simple.

use multiple ir sensors to determine which way people are going by what sensor is triggered first.

in terms of code you have to create a variable and have it changed by inputs from the sensors.
then use that value as a condition for triggering the action on the lights.

yeah! actually that’s the

yeah! actually that’s the main idea. when the last person leaves the room, the lights will automatically turn off

those were really nice

those were really nice questions. i think i have to study the project again to anwers all those. ill be posting again. thanks JAX

woah. that is a real help.

woah. that is a real help. thanks.

im using infrared sensor to

im using infrared sensor to count visitors/persons going in and out.
the more person inside the room, the more lights will be turned on.
im using AT89S52 as my uC.

im actually a beginner in uC project. its just my 2nd time to do a uC-based project. so im not well-informed. but i love making and doing this kinds of things. i think its my passion

design limitations i think will come along the way. hahahaha thanks btw

You might take a look at my

You might take a look at my bird box gate

https://www.robotshop.com/letsmakerobots/node/27959

 

What sort of environment is

What sort of environment is it? Public space, home, office?

Personally, depending on how many doors are in the room, I’d do something like have two IR beams across the door, then the order in which they’re triggered will tell you in what direction the person is walking.

Then some IF routines saying “if sensor says ‘in’ then people count goes up 1” and vice versa, and "if people count is zero then turn the light off"

Geir’s bird box is a really good example, especially the error checking stuff :slight_smile:

Good luck!

I didn’t think of it immediately, but,

what you and DaveyJones are suggesting is like a horizontal quadrature encoder. The sensors will need to be close enough together to only allow one person to trip them and not close enough together that one person can trip both. Otherwise, the count will be off.

yeah that was the main idea,

yeah that was the main idea, increment counter whenever a person goes in and decrement down to zero whenever somebody exits.
the project will be installed i a typical classroom having only one door. therefore the number of persons to go in/out will be controlled.

i really dont understand how the logic will flow in the program.

what i did was, there would

what i did was, there would be two sensors. one for the the person coming and another for coming out.
my PROBLEM is, how can i install them in a way that when one is tripped the other will automatically turned-off.
please help :slight_smile:

You answer is a setup like

You answer is a setup like Geir has in his bird box. The horizontal quadrature encoder, if you will.