Arduino Temp Controlled Heater - Connecting to Main AC 220v

Hi All,

I have built, coded and tested an Arduino with DHT11 Temp & humidity Sensor and Relay
This will switch on the relay when Temp goes below 17 and turn off when Temp is above 22

I am happy with my build and ready to implement.

I only have one question - Powering the Arduino with Mains AC (In "Series" with the Heater if you will)

I don't want to have two power Supply's and I also don't want to Die. Taking a cautious approach

Some advice from more seasoned users would be much appreciated.

Can I use a USB 2 Pin Adapter (Iphone Charger) to Power the Arduino in this setup?

With “series” Do you mean connecting like this?

                 ____ RELAY ——HEATER 
                |
220VAC Main ——|—— iPhone USB <— usb cable —> Arduino power Jack

and arduino digital pin driving the relay?

Playing with 110 or 220v ac main is always dangerous. If you are unsure of what you do, then don’t...

Are you using an opto isolated relay module?

There are many modern power adapters that allow you to take 5VDC of the mains and if you're using a solid state relay of marginal quality, you're already isolated. If you're using an electro-mechanical relay, all bets are off.