Hello I am trying to make a pressure switch for my alarm clock where when I stand on it for a certain amount of time the alarm will stop. I've never done any arduino work before so I was wondering what board would best suite me for this project. I found some code online that I think would work. Here is the link for the code: Arduino time(milli) and pressure sensor - Arduino Stack Exchange... Also would this be how I would set the entire thing up? Do I need any resistors? What type of power supply would I be able to use?
An Uno will probably do just fine for reading a pressure switch, then producing a signal based on it.
How to hook up the pressure switch and the alarm clock depends on the specific devices, which you didn't specify.
And the link is broken.
![](http://* FYL3TG4JHGJE1H4.LARGE.jpg)Your drawing does not make sense and does not contain enough detail.
Maybe you could connect the pressure switch directly to the alarm and do away with the Arduino.
More likely the pressure switch should be connected just to the Arduino as aninput and the Arduino should then have an output to connect tothe alarm.
Either way you need to provide more infomration about the pressure switch and particularly the connections available to the alarm.
The pressure switch would be homemade like this one: https://www.instructables.com/id/Use-a-DIY-Pressure-Plate-Switch-to-Automate-Your-H/
I would replace the "turn off alarm" switch with the pressure switch but to make it so I will need to stand on it for a short amount of time I would use an arduino. I don't have the alarm clock yet but I am going to buy it specifically for this project.
Sorry about the link being broken. Here it is: Arduino time(milli) and pressure sensor - Arduino Stack Exchange
Looks like that pressure plate is basically an oversized momentary push button.
There are many easier ways to implement a delayed reaction of a signal. RC circuit + comparator or a 555 monostable, just to name two. Far more power efficient than an Arduino (which is a major issue if your alarm is to run on batteries).
But why not make a complete alarm clock out of your Arduino?
wvmarle:
There are many easier ways to implement a delayed reaction of a signal. RC circuit + comparator or a 555 monostable, just to name two. Far more power efficient than an Arduino (which is a major issue if your alarm is to run on batteries).
Do you mean I build something like this and connect it to the pressure switch? How would I be able to change it to where it turns off after I am stepping on it after a certain amount time? https://www.youtube.com/watch?v=Pjsehr7i7EI
By changing values - or adding a pot.
Anyway, you better first figure out how you're going to actually switch off that (as I understand currently non-existent) alarm clock, then you can devise the signal that does it, and when you know that, worry about the delay.
boom_man56:
...
I would replace the "turn off alarm" switch with the pressure switch but to make it so I will need to stand on it for a short amount of time I would use an arduino. I don't have the alarm clock yet but I am going to buy it specifically for this project.
....
Your comment does not make sense to me, and a lot depends on the specific alarm clock you use.
Many alam clocks do not have a turn off alarm switch , instead what the have is a spring loaded momentary push button.
The alarm rings, you push the button down, the alarm stops, you let the button go and the spring pushes it back up.
Normally it makes no difference how long you hold the button down for and pressing the button when the alarm is not ringing has no effect.
So why not keep things simple. Just wire a pressure switch in parallel with the push button on the clock. Then you can either push the button or stand on the pressure pad to silence the alarm. Where does having a delay come into things?
You do need to be careful if the alarm is mains operated. In particular unplug the alarm before opening the case and make absolutely sure that there is no way your pressure switch and associated wires can become live through contact with the mains (even after some wear and tear). If not a ringing alarm may be the least of your worries.
As a project it might be best to do this using an old battery operated alarm rather than risking damaging a new mains operated alarm or yourself.
The various alarm clocks we have all have a momentary button for snooze, and a separate toggle switch for alarm on/off. The first can probably be easily handled electronically, the second not so much.
wvmarle:
The various alarm clocks we have all have a momentary button for snooze, and a separate toggle switch for alarm on/off. The first can probably be easily handled electronically, the second not so much.
It does depend on the clock. Mine does not snooze, hit the button and that is it the buzzing stops for good. Other buttons are then used to reset the alarm and I think there is a switch to choose buzzing or radio for the wake up.
ardly:
Your comment does not make sense to me, and a lot depends on the specific alarm clock you use.
Many alam clocks do not have a turn off alarm switch , instead what the have is a spring loaded momentary push button.The alarm rings, you push the button down, the alarm stops, you let the button go and the spring pushes it back up.
Normally it makes no difference how long you hold the button down for and pressing the button when the alarm is not ringing has no effect.So why not keep things simple. Just wire a pressure switch in parallel with the push button on the clock. Then you can either push the button or stand on the pressure pad to silence the alarm. Where does having a delay come into things?
That is what I meant I just couldn't think of the words lol sorry.
The reason I want the delay is so that when I get up I have to stay out of bed instead of just standing on the pressure switch and going back to sleep.
Also what type of alarm clock do you have? It sounds like that is the type of alarm clock I am looking for.
Easier solution: place your alarm clock out of reach, so you have to get up to switch it off.
wvmarle:
Easier solution: place your alarm clock out of reach, so you have to get up to switch it off.
Lol I've tried that before... Okay so back to the question. Would that code work for the arduino if I were able to get it all connected correctly?
Standing on a pressure plate then won't help much, either. You can still easily go back to bed.
What helped for me as well was to equip my coffee maker with timer clock, so coffee started running when I had to get up. It's a motivator.
Or how about a bucket of water, suspended above your bed, with a valve that will open 1 minute after the alarm starts ringing and weight is still detected in the bed (i.e. you still didn't get up).
boom_man56:
Lol I've tried that before... Okay so back to the question. Would that code work for the arduino if I were able to get it all connected correctly?
It all depends on the alarm clock and how you want to switch it off.
Arduinos can take an input (e.g. your pressure plate activated, or the sound of your alarm going off, or the cicadas outside the window starting to make a terrible noise), and produce an output which you can use to control something: a mechanical hammer pouncing on your alarm until it stops ringing, a solenoid opening the water above your bed, whatever. Depending on the alarm clock it may take such a signal to switch off its alarm, but if it has a mechanical switch for that this may be tricky to implement.
boom_man56:
...
Also what type of alarm clock do you have? It sounds like that is the type of alarm clock I am looking for.
I'll try an remeber to look but it is so old I doubt if the manufacturer is in business any more never mind making the same model.
What you need is a Nostromo alarm the one that goes off when Ripley activates the self destruct. Ear splitting alarm, strobe lights, smoke effect. Just put it on the other side of the room.