Hi all,
As mentioned above, I am very new to Arduino. Please bear with me here.
I have been tasked to create an 'out of bed' alarm, for a hospital, that will interface with an existing nurse call system.
Basic set up:
Pressure pad will be placed under a clients shoulders, so when they sit up in bed the nurse call system will alert staff. The nurse call system is looking for a closed contact to trigger the alarm, and only needs a 60mS input to trigger.
My plan:
I have a pressure pad that is normally open, when the client lays on it, it switches to a closed contact. I have chosen to use an Arduino to manage the change of state (so the alarm will trigger when the pressure pad changes to open, instead of closed), and also to implement a 2-5 second delay, to allow the client to move around in bed without setting off the alarm falsely. I will be driving a 5v relay board from the Arduino to switch the nurse call system 24v back into a nurse call system input to trigger a call.
I must also say that due to time restraints, the only gear I could get locally was a Funtronics 'Leostick', and slave relay board. The Leostick is basically a counterfeit Leonardo, compressed to fit onto a thumb drive sized USB stick. I have uploaded a simple blink on/blink off sketch, and it appears to work correctly.
My idea:
I am thinking of code along the lines of: monitor digital input closed contact, when it opens, trigger timer for (say) 5 seconds. If input contact does not close with-in 5 seconds, digital output to trigger relay. If input contact closes with-in 5 seconds, stop and reset timer and continue to monitor digital input closed contact.
The setup does not need to latch the relay, as the nurse call system latches a call alarm, until a staff member pushes the reset button, so it only needs to switch the relay for a period greater that 60mS (say half a second, to allow a buffer).
Sorry for the long winded story, I would love to take my time with this and learn the coding myself first, but I have to find a solution to this problem as soon as possible, and I have been unable to find any suitable code anywhere as yet.
Any assistance with coding this project would be greatly greatly appreciated.
Many thanks,
Horn20