I want to use the Arduino as an interface between a Methane sensor and drive a 5V relay module which switches a solenoid.
This is purely theoretical for a project.
The thing that is troubling me is power supplies. I need a 5V supply for the Arduino, a separate 5V relay supply as to not damage the board (relay works with optocoupler) and then there will be the 220 switching on the main contacts to energise the relay.
Can anyone help me as the idea is that the whole unit other than the solenoid will be placed on a ceiling. Cables pulled to power the arduino.
What power supply could I use? Could I use the 220 mains supply for the solenoid and step it down and rectify it to give me the separate 5V relay supply?
Any help is appreciated.