Hi
First project with the Pi/PiFace. The intent is to switch 12V solenoids on an air valve with drives a large cylinder. The solenoids pull 4.8W at full load (and I measured the current draw at 370mA)). The power supply is rated at 2000mA for both 5V and 12V. The solenoids are connected as +12V -> solenoid -> PiFace central terminal then PiFace lower terminal -> ground. The external switches are simple push to close arranged with a common to the +5V and then each one to one of the inputs on the PiFace. There are various LEDs as well - each with a 270 ohm resister between the LED and the PiFace output terminal. That's about as well as I can describe it without a diagram 
The problems seem to be around reliably detecting the button press and, possibly, the relay current draw 'resetting' the system. I immediately thought of a short circuit for that last one - but I can find no evidence of one. Also - the relay seems to 'lock' shut - keeping the power running continuously through the solenoid (which I fear has been damaged before i realised what was happening). I've (hopefully) attached the code - it's taken fairly directly from the latest github docs - and all the s/w was updated yesterday (June 2). The comments are in there as I was trying to trace where the breakdown was - and it seems that the input key events are simply not being detected or are doubles. Key bounce? If so - how do we avoid that with the pifacedigitalio libraries. Or do we use something else?
Comments and thoughts welcome
Thanks
Derek the confused





