revolving header hack

Wednesday 2 May 2012

Maker School: Tuesdays - week 5

click for a closer look
It was a challenging week this week.  Our new project is a Motion Sensing Intruder Alarm!  To make this happen we are going to be using an Arduino microcontroller to detect variations in light levels hitting two LDRs (Light Dependant Resistors).

The neat bit - and the bit that saves using a whole Arduino board for such a simple project - is that we're going to be running the Arduino program on a titchy little chip called an ATtiny85.  Tiny by name, tiny by nature.

The challenge is "how much do you need to know about what you're doing before you do it?"

I pitched it wrong and tried to walk through everything… breadboards, microcontrollers, Arduino programming etc etc.  All amazing stuff and arguably stuff you should know before you set off.

However, the response after a while was "This is School.  When are we going to start Making!?"

Ouch!  Lesson learned  ;)

Next week will be more 'plug-and-play', I promise.

EUREKA!!
When we did power up my demo (as seen on the breadboard above) it didn't work — which was very frustrating for all of us.  However, afterwards, I reprogrammed the chip in case that was the problem… nope, same mad beeping.  A lot of head-scratching and fiddling later I realised that it was RESPONDING TO THE LIGHTS!!!

There are some large (sodium?) floodlights in The Gallery which naturally flicker a bit.  Most of the time your eyes don't notice but it's flickering all the time.  That flicker was setting off the intruder alarm… continuously!   Doh!

Interestingly this 'not noticing the flicker' thing is exactly what I'd shown the boys a little earlier.  We made an LED flash: 1,000th of a second ON (a millisecond) and a millisecond OFF.  The LED looked like it was just on - the flashing was too fast for the eye to see.  Until, that is, you wave the LED about a bit a WOW you see spots of light - not one long streak!  This is called Persistence of Vision (POV) and could well be a future project where we write messages in the air.  ;)

I digress.  When I took the breadboarded device to the window it worked perfectly!  What a relief.

Another lesson learned — TEST YOUR DEMOS!  Although I'm not sure I'd have discovered the problem beforehand.  The project has been working on the breadboard for a month already so I knew it worked!

Hey ho.  That's what this is all about — learning by doing!

No comments:

Post a Comment