Arduino used as interface between gas sensor and relay module

Hello guys,

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.

(deleted)

spycatcher2k: It does not matter how you get 5V. Just document it with "+5V Supply"

I need to go into more detail though

(deleted)

Hi, What sort of theoretical Methane sensor?

You can power everything, the sensor, Arduino, and relay off 5V plug pack.

Tom... :)