Face-tracking fan

Today’s downpour notwithstanding, the UK has just experienced its hottest September day since 1911. Here at Pi Towers, we were acutely aware of this. The office roared with the noise from sixty-odd CPU fans at full tilt. The air conditioning conked out. And things got especially bad when we realised that it was buy-one-get-one-free day at the local noodle place, which meant we were also trying to justify the eating of hot food in an office that was feeling a lot like one of those spa steam rooms, but stinkier.

nerd-sweat

Artist’s rendering of the general situation at Pi Towers for much of this week

Sensible people would have engineered their way out of this mess, like DevinL9 (please let us know your real name in the comments if you’d like us to use it here) Devin LaCrosse. Devin is the possessor of an internet statistic: he reckons that a full-sized human can produce between two and four litres of sweat in an hour.

This is disgusting, so Devin has come up with a nice little OpenCV hack to evaporate as much of it as possible. This is a “use what you have” hack: it’s not beautiful, but it’s effective, and if your desk is anything like mine you’ve probably got almost everything you need for the build in a drawer. Meet the fan that recognises your face, and swivels to track it.

f0vlf4ciscbemgc-large

Meet FanBot. Devin says:

Welcome FanBot, the personal desktop fan that follows your face and keeps you cool when things are getting a little too spicy!

This is more of a proof of concept than a finished beautified product. It is for a intermediate developer. However, I wouldn’t write yourself off if you’re a beginner, it’ll just be a little more difficult. That being said, this project will get you a working version of openCV 3.0.0 on the Raspberry Pi 2 (RPi). [Liz notes: or any other model of Raspberry Pi! ] It will teach you a little about pulse width modulation (PWM) and how to control a servo with the general purpose input/output (GPIO) pins on the RPi. Let me know if you have problems. I’ll do my best to fix anything. It should be noted that this is not going to be a completely optimized solution in code or execution. The purpose of this project is to get a simple working version of openCV, play around with it by means of face detection, and move a servo so that a small fan can cool you off!

It works, too. There’s a complete build diary and full parts list and instructions, including all the code you’ll need, over at Instructables.

No soldering’s required: just breadboard and superglue for mounting. What are you waiting for?