So, I have some trouble waking up and going to class, so I thought I might have an Arduino detect that my alarm is going off (I use my iPhone) and then reel up my curtain and (if it is cold) turn on my little portable heater that I keep just for that reason. (When it is cold in the morning I turn it on when I get out of bed)
So, I need some ideas for detecting that my phone alarm is going off. Ideally I would be able to put my phone anywhere on my night stand and be able to detect the alarm. The phone vibrates quite intensely when the alarm is going. I was thinking a about attaching a piezo element to the night stand. You guys think that would work? Anyone have any better ideas?
Thanks,
Grant
What you suggest could work, but I think it might work too well and may also activate every time you vacuum or set something else down on your night stand. You could add a clock so it could only activate during certain hours, but that’s going to start increasing the complexity too.
The only certain way I can think of would be to use the headphone jack, but that might cut the sound unless you split the wire off to another set of speakers. (and then you’d have to plug the phone in)
Chanler:
What you suggest could work, but I think it might work too well and may also activate every time you vacuum or set something else down on your night stand.
Good point. Could the OP have his detector time the duration of the vibration. Assuming the alarm goes on for some “long” period of time, this factor could be used to differentiate it from other, more transient, vibration sources. Let’s SWAG a period of 1-2 seconds ? To make things easier could there be a pad to put the phone on that contains the piezo sensor ? It’s not as easy as using the whole nightstand but, if large enough, would not be too restrictive. And it would allow the piezo to be desensitized so only vibes on the pad would be picked up.
Anyway just some ideas to muse over …
Yes, that is a good point, I would have to do some testing to see if I could get it to filter out false positives. I guess I will just have to get a sensor and start testing.
The phone probably vibrates at the same frequency every time. This might be enough to avoid false positives.
Three things…
Two on avoiding false positives: Have a switch… it could be “automatic” by some mechanical means… that enables the “ring alarm when you see vibration” only when the phone is on the stand.
I wonder if the module that causes the phone to vibrate throws out some electro-magnetic waves? Maybe a Hall sensor close to the right part of the phone could pick them up.
The “automatic heater turn on” worries me… suppose you have a cold snap after several warm days. Are you sure, sure, sure that you won’t, absent mindedly, have pushed the heater out of the way, up against something flammable? Or accidentally left a discarded shirt lying over it? Of course, if you are using a “low” heat heater, like an oil filled radiator, it is LESS of a problem, but even they get pretty hot. At least get a smoke detector? (Seriously.)
You might want to look into a gyro or accelerometer. You could tape it down to the table top and have it look for set periods of activity. The phone probably pulses for the same amount of time every time, right? Have it look for a long period of activity followed by much less and only from like 5am to 10am or something so it won’t activate if you bump your bedside table before bed.