Some mornings I get up as soon as my alarm goes off, but other days I turn off the alarm and fall back to sleep. So I want to make and alarm clock which only goes off if I am still in bed. The time will be set 5-10mins after my normal alarm and ideally won't stop until I get out of bed.

Now the alarm clock aspect is relatively simple (RTC and a Buzzer) but the tricky bit is detecting there is someone in the bed. Load cells under the bed legs are the obvious choice, but that could get tricky to handle when my GF stays over. The other choice is I press a button when I get up to disarm the alarm, but that sort of defeats the point as:1. I can simply turn it off without getting up 2. I want this to be automatic, otherwise I may as well use a regular alarm clock

Does anyone have any bright ideas on how to detect whether I am still in bed or not?

in my opinion even if you use a dector alarm you will get up and turn it off and go back to bed. What I think you should do is make an alarm clock turn off only once you enter the correct answer to 3 randomly generated arithamtic math problem so by the time your brain is awake trying to compute the answer you will have lost sleep resulting in you being awake and not going back to bed.

Does anyone have any bright ideas on how to detect whether I am still in bed or not?

I guess you could use the weighing techniques they use in these 'self scan' supermarket checkouts: look at the absolute weight to see whether anyone is in bed at the beginning, and look for a change in weight to see if anyone has got out.

I only provide help via the forum - please do not contact me for private consultancy.

Does anyone have any bright ideas on how to detect whether I am still in bed or not?

I guess you could use the weighing techniques they use in these 'self scan' supermarket checkouts: look at the absolute weight to see whether anyone is in bed at the beginning, and look for a change in weight to see if anyone has got out.