Instructables

Arduino Controlled Personal Fan with Ping Sensor / ATtiny2313

Picture of Arduino Controlled Personal Fan with Ping Sensor / ATtiny2313
DSC01694.JPG
DSC01676.JPG
                                                      What does this do?

This is a fan that will automatically come on when i sit at my workbench and off when i leave.
It uses an Ultrasonic Distance Sensor, or commonly called a  "Ping " sensor for detection.
An ATtiny2313 to handle the processing.
A power supply from a router. ( Wall wort )
A relay to switch the AC power.

The ping sensor works by sending out radio waves and times how long it takes for the radio waves to bounce off of an object then return. From this time we can calculate distance. I know it is more complicated than this but this is the simplified version 

Video Link
 
Remove these adsRemove these ads by Signing Up

Step 1: BOM

Picture of BOM
  • ATtiny2313
  • 6v relay
  • 20 pin socket
  •  Ping sensor
  • Fan
  • 2n2222 transistor
  • 1N4004 Diode (2)
  • 10K resistor
  • 330R Resistor
  • 8.2v power supply
  • Perf board
  • Switch
Wire Glue

Step 2: Circuit

Picture of Circuit
Screenshot_13333.png
Screenshot_4.png
 Not much to say here it is pretty straight forward.

The one thing that needs explaining is the power supply.
It is a 5v ( wall wort ) that puts out 6.08v whether under a load or not.  Just rite for a 6v relay, but not a micro-controller
Scenes the ATtiny2313 needs 5v i put a 1N4004 diode in the VCC line to reduce the voltage by .6v. That is the standard voltage drop for a rectifier diode.  

 6.08v - .6v = 5.48v.

Maximum allowable operating voltage is 5.5v in the data sheet. Yes it is pushing to run piratically at max volts. But it is an experiment to see how it works out. So far it has been running for 3 months and all is well.  

Data Sheet

Step 3: Power Supply

I could of just plugged the wall wart directly into the wall outlet then powered the circuit with a power jack but that means i would use 2 plugins. With taking the wall wart apart and using only the circuit i could make this all on one board and one plugin.

Step 4: Main Board

FAN.png
Screenshot_13333.png
Arrange the components for best fit and clearance. Solder everything down and run traces as per the circuit diagram. 

Nice idea. I came here to find some inspiration for my project where the Ultrasonic Sensor trigger the relay for the light. Anyway, two things I noticed and I believe should be said for the newcomers:

1. The so called ping sensor does not emit radio waves. As the name suggests it emits ultrasounds. Sound which cannot be heard by humans. The following is true - by measuring the time needed for the sound to bounce we can calculate the distance.

2. Please work on your spelling :) I am not an English speaker but fortunately I understood what you meant by 'scenes' :) It's spelled 'since'.

WWC (author)  kasia.kowalska.5099941 month ago
You come to this site and the first thing you do is complain about one of my projects. This is your one and only contribution to this community. I suggest you actually do something of your own instead of complaining about somebody else hobbies. I am sure you do not realize that making an Instructable is far more work than the actual project and is done for the sure pleasure of sharing with other DIY'ers. If you do not like somebody's Instructable i suggest you move on and not try to fix people to conform to the way you think the world should be. This explains why your FB link on your Instructables page shows only one friend.
gazmono2 months ago

I am working on a project which requires that a very powerful bulb gets brighter as a person aproaches it.

How could I modify this to give an output voltage which increases in a linear fashion from 0 to 10 volts?

There
are many projects on instructables and elsewhere that either use the
distance information to output to a digital display or light up a few
leds in steps as with car reverse sensors, but I have not found anything
which will give a continous analogue output voltage neccessary to
operate a lighting dimmer. Can anyone point me in the right direction?

vishalapr1 year ago
When I upload the code it gives an error saying that 'class Ultrasonic' has no member named 'Ranging'
What do I do now?
WWC (author)  vishalapr1 year ago
Did you install the Ultrasonic library?
vishalapr WWC1 year ago
It works fine, just had to install a newer version of the Ultrasonic library, thanks for the tutorial :D
WWC (author)  vishalapr1 year ago
Your welcome.
I also was trying to get the ranging adjustable with a pot but never got that worked out.
sath021 year ago
Nicely done!
Well suit for the tropical climate!
WWC (author)  sath021 year ago
Thanks
pfred21 year ago
Following the advise of my spiritual guide Saint Ozzy I'd have used an electric eye.

http://www.youtube.com/watch?v=tsLkL8DTHeg
iceng1 year ago
You do good work !
And that is a heavily well worked bench.

A
WWC (author)  iceng1 year ago
Thanks A

i was trying to prevent myself from getting tennis elbow from turning the fan switch on and off, You know how dangerous that can be.
iceng WWC1 year ago
Extremely elbow hazardous !
And very humid by the iron oxide on the fan lamination :-P
Especially since I see you are using a 220VAC style of power connector.
rimar20001 year ago
Clever idea! Nice work.
WWC (author)  rimar20001 year ago
Hi
Thank You for looking at one my Instructable and it is a honor to have you comment also.
I follow you work as well.

Thank You