So I need a motor or actuator of some kind to push and hold a button, then release.
But my concern is if there is a loss of power or some kind of problem with the arduino, that button needs to be released automatically, it cannot be stuck on in any situation.
I will include a micro-switch so the arduino will know if there's a problem eg. the button was not depressed correctly.
My thoughts are on a servo motor like on an RC car, but the servo motor I got with my arduino starter kit doesn't seem to be possible for a spring to pull it back. Perhaps there's other kinds of servo motors.
On ebay there are "linear electromagnet solenoid push/pull" but without having one in my hand I'm not sure if that will do the job.
Could you not replace the switch and its button with a relay? Wire the relay so that its normal position is the one you fail to when the power's off, and drive it to the other position under Arduino control?
You can get switches (they are common on electrical tools such as table-saws) which open when the power fails so that the tool will not restart when the power comes back on.
Is that the sort of problem you are trying to solve?
You don't say if the Arduino will stop when the power fails. Maybe you could arrange for it to move the servo (if you use a servo) to the off position in setup(). But I would not rely on that if there was any danger of injury.
If the Arduino does not stop you could, perhaps, monitor the power and move the servo to OFF if the power failed.
A motor relay setup that when the relay is energized, the motor goes to one limit, and when the relay is deenergized, the motor goes to the other limit.
I am familiar with the basic use of relays, NO & NC configuration, the button in question is a small momentary switch attached to the board (same as on the arduino), it is a possibility of removing it or simply attaching wires to the opposite side of the board and use a relay to short it, same as if the button was pressed.
The board is inside a tetra radio hand-piece (similar to a UHF radio hand-piece truckies use) which will be operated remotely (arduino > mosquitto > openHab on the raspberry pi) and interacted with via a speaker and microphone so this private radio network can be accessible from anywhere in the world).
My idea with keeping the operation of the switch mechanical is because if a better solution comes along I can simply remove my arduino/raspberry pi setup.
Also i'm no expert so I don't trust electronics, what if it went crazy and flicked that relay on/off a thousand times a second, it is a private radio network but its not operated by my employer. It play's a major part in being safe in remote areas.
So you can see that having that button stuck-on in the event of a failure of something would block the radio channel (that would not be good).
Though what does come to mind just now is if the raspberry pi powered the arduino and that was used as a fail safe. Though i'm no programmer.
The motor relay setup is sounding good for at least my first attempt, battery backup would ensure the motor remains powered.
Any thoughts on the reliability of the arduino? I've probably been worrying about nothing in regards to the likelyhood of it go crazy, probably more likely due to user error.