This is a continuation of the article from here: http://hackcorrelation.blogspot.de/2014/12/central-ventilation-augmentation.html
I've decided to give the original unit a coat of fresh paint since it seemed to work pretty reliably - or so I've thought...
Also it seemed to trigger falsely based on stray light level, time of day, planets' alignment, whether someone has showered or not...
So I've taken a look with the oscilloscope at the pins of the LED and decided that the capacitive detection method depended a lot of stray RF, making it highly unreliable. So drew up another schematic, this time using the LED as a photodiode (small voltage source). To get rid of having to tweak the constant in the code a small potentiometer (P1) was added - this has the effect of setting the light level:
I had to switch to a microcontroller version with two ADC inputs for this.
Also, another problem was that the servo was draining too much power causing the uC to brownout because of the lowered voltage. This was fixed by D2 and C1.
However the entire arrangement was still too touchy, causing it either to trigger falsely or not detect reliably the small red power-on light.
Take 3:I decided to take a brute-force approach and wired a 1.5W 220V LED spot light I had lying around.
This made the detection much more reliable but it still triggered randomly sometimes and the new code made the batteries run out much quicker.
So I've thought why not make my own enclosure and get rid of the original one completely.
Sketched up a rotary shutter in SketchUp and proceeded in carving it out of a CD case with a dremel:
However this was has proved not airtight enough and caused more audible noise than the cardboard solution.
Take 5:If you can't make it, buy it!
It seems I'm off to the drawing board, again.