Human Tracking Fan System Using Atmega644

For our final project we decided to construct a human tracking rotating platform that supports a fan.
The platform, using dual element Pyroelectric Infrared Sensors (PIR) sensors, rotates itself independently to direct air flow to whatever position a person moves to. In addition, the fan includes another setting that allows precise rotation between two people. These modes are selectable by the user. The running mode is displayed on an LCD.
We decided to pursue this project because we had become fed up with the common fan’s limitations.
Human Tracking Fan System Using Atmega644

High Level Design

Rationale and sources of the project idea:

Although we experience cold weather for much of the Fall and Spring semesters when at Cornell, we have both lived in regions where the temperature and humidity are very high. In addition, neither of us had air conditioning. Using a fan was the standard way of cooling down and still is for many people. Unfortunately fans do not have very efficient or useful features when it is desirable to change the direction of air flow. Fans usually provide two options for directing airflow:
1. The fan is static and needs to be physically redirected to direct air in the desired direction.
2. The fan can rotate back and forth at a set angle which is approximately 180 degrees.
The first option is quite inconvenient when one wants to change their location in the room and thus redirect the fan’s air flow. It requires physical effort which may be difficult if the fan is large or the user is of elderly age. In addition it may require multiple attempts before actually getting the fan to redirect air flow in the exact desired direction. The second option is wasteful as the fan may direct air at empty spaces for much of the rotation cycle. Thus, we decided to focus on a project that could solve the daily stresses and inconveniences of fan use by automating the process.

Logical Structure:

Our solution to this problem consists of two dual element PIR sensors directed in the same direction as the fan. They can be seen in Figure 1 below. The PIR sensors measure infra-red light that is radiated in their field of view. They each contain two internal compensating pyro electric windows, one positive and the other negative, to minimize disruption from sources such as temperature variation. We decided to block the negative side with tape to increase the sensors sensitivity.  Because humans typically radiate more infra-red light than their surroundings, such as a wall for instance, detecting motion is fairly simple.
The two PIR sensors are separated in the middle. The purpose of this is to separate the sensors’ field of view.
When a sensor detects the right amount of infra-red light a comparator output goes high. We use the microcontroller to generate an interrupt on the comparator’s rising edge. The interrupt then signals a task that begins rotating the platform’s motor. The rotation is clockwise if the left sensor has detected a person or counter clockwise if the right sensor has detected a person. Once the fan is directed at the person’s location, there is just enough infra-red light in the second sensor’s field of view to trigger its comparator. This generates an interrupt that signals a task to either stop or redirect the motor, depending on the setting. At this point the customer is nice and cool without exerting any effort.


1. The Rotating Platform:

The rotating platform can be seen in Figure 2. The platform is mounted on four standoffs. The standoffs are mounted on a lazy Susan. We placed an O-ring around the standoffs and the motor shaft to increase the gear ratio, slow down the platform rotating speed, and produce more torque.
Upon detection, the output of the comparator remains high for as much as 2.5 seconds. This degrades system performance for reasons that are explained later. To fix this we increased the comparator threshold as well as decreased the feedback resistor on the integrator. Although both solutions improved the response of the circuit these solutions decreased the sensor’s range. Thus, we decided to minimize these changes as much as possible.

4. Limit Sensors

Human Tracking Fan System Using Atmega644 Schemetic

To avoid hazardous situations such as tangled wires the fan was allowed to rotate at angles that were no greater than 180 degrees. Two metal strips, one on each side of the fan, were grounded. Another strip of metal was mounted on the lazy Susan at the front center of the platform. The lazy Susan was connected to a pin on the development board with an activated pull up resistor. When the strips of metal touched, the pin was set low and detected by the microcontroller.

Parts List:

For more detail: Human Tracking Fan System Using Atmega644

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top