I want to build a device that ensures that I'm at bed and wake up early because right now my sleep schedule is really messed up and I have absolutely no willpower.
I have a clock module, an mp3 module and a light sensor module, what I'm missing is some kind of module to detect with precision if I'm in the room.
I was thinking about detecting the sound, the movement or with RFID device that could sense a bracelet, but I'm not an expert and I would appreciate new ideas.
Thanks in advance and I'm sorry if I did any spelling mistakes, English is not my first language.
What worked for me is a loud alarm clock placed at the other end of the bedroom. Then the only discipline you need is that you don't go back in bed after getting up to switch it off.
fhalcorn:
Thx for your answer, but I'm also looking for a way to force me to go to sleep.
How about a timer on the power supply of your computer?
Of course it's fun to use Arduinos or so, but for some projects they're not the best solution. A simple alarm clock is very reliable, and the last thing you want is the alarm failing due to a simple programming error or power loss or so.
GPS might be accurate enough. Do you carry your phone everywhere?
Most sensors that sense the presence of someone in a room since motion. At work, we have motion sensors to turn the lights off if nobody is in the building and sometimes when I'm the only person there the lights go off and I have to get-up out of my chair to activate the sensors.
RFID might work, but you'd somehow have to "calibrate" the sensitivity for the acceptable distance. I don't know much about RFID. You might need an active device to reach across the bed and that would mean batteries/charging. And you'd have to wear the thing every day near bedtime.
Realistically, I think a regular-old alarm clock (probably with a snooze button) set to your go-to-bed time should be good enough. That could be an actual alarm clock or a phone app.
...I did build something a long-long time ago (with another microcontroller) to help me get-up in the morning. There's a sunrise dimmer that fades-up the light for 10 minutes before "alarm time". Then, the "alarm" is a short-gentile "beep". It beeps every 30 seconds, and after 1-minute it starts counting the minutes, so at the 5-minute mark (and again at the 5:30 mark) I get beep-beep-beep-beep-beep, etc. So I don't have to jump out of bed when the alarm goes off (I might not even wake-up 'till the 2nd beep at 30-seconds), but I don't fall back to sleep either, and I can keep track of how long I've been lying there.
The thing I built doesn't have a real-time clock. It runs off my master X-10 timer.
fhalcorn:
People, I appreciate the effort, but I'm looking for a way to sense whether if I'm in the room or not.
PIR - if you move enough (not likely when asleep).
Break beam sensors - with two of them you can detect whether someone enters or leaves the room, and that way keep track of whether someone (or multiple someones) is in that room.
Break beam sensors - with two of them you can detect whether someone enters or leaves the room, and that way keep track of whether someone (or multiple someones) is in that room.
Only if you somehow prevent someone from stopping the doorway after breaking the first one, never breaking the second one.
PaulS:
Only if you somehow prevent someone from stopping the doorway after breaking the first one, never breaking the second one.
That's why you only count them upon breaking the second beam - or maybe even only after the two beams have been restored in the correct order (i.e. after the passage is complete).
wvmarle:
That's why you only count them upon breaking the second beam - or maybe even only after the two beams have been restored in the correct order (i.e. after the passage is complete).
Again, that requires that only one person at a time can enter or exit.
Counting the number of people in a room is NOT a trivial task.
I know, it's not a trivial task. However in this case it appears it can be highly simplified, as we don't need to know the number of people in the room, just whether or not there is someone.
The actual problem at hand is how to know whether OP (or even just "someone") is in the room or not. As OP has all the time been talking in the singular, it appears there's no SO who OP shares the bedroom with. So that makes it even less likely two people going in at the same time, as there is only one person in the picture. A single break beam would work in this case albeit two is more reliable.
Now how about combining a break beam sensor with a PIR motion sensor. The moment the beam is broken (someone passes through the door), the PIR activates. If it measures movement for say five seconds from the beam being broken, there is someone in the room. If no movement, OP left the room.
This may go wrong in case of there being an SO (or a date) in that room who is asleep, and as such goes unnoticed by the PIR. To compensate for that, a weight sensor in the bed would have to be added. No motion and no significant weight in the bed (say 20 kg over the normal weight of the bed) means there no-one in the room.