how to make single package power supply for Arduio Uno R3

I am new to Arduio and as a simple first project I would like to use an Arduino + photo cell to turn on and off a 110 VAC "security light" - a floor lamp in my living room. The problem I have is with the power supply for this project.

I have a recently purchased an Arduino Uno R3. I want to package the project in a common double wide (and double deep, or even triple deep) AC house wiring electrical box that will sit on the floor.

With input from a photo cell, the programmed Arduino will turn on and off the 110 VAC to the light at the proper times. I have completed the programming and it is working well to turn on and off an LED on the Arduino board - in what I would call prototype mode. In this mode the Arduino is powered by either the USB plug to my laptop, or a 12VDC wall wart.

The next step is to build the electronics. For this step I want to power the Arduino, and the relay to control the 110 VAC light, with a single 12 VDC power supply. I expect to budget about 100 mA for the 12 VDC relay that will control the 110 VAC to the light. My electrical box will have a 110 VAC 3-prong plug that will be plugged into a wall outlet near the lamp. My electrical box will also have a 110 VAC duplex outlet into which the floor lamp will be plugged.

Since my electrical box will have 110 VAC mains coming into it I do not want to use a wall wart to power the Arduino. I want to build a 110 VAC to 12 VDC power supply for this project and house it in the same (one and only) electrical box that contains the Arduino and relay. I have searched this forum, and the web unsuccessfully for a design for such a power supply. I have found many designs, and kits, and off the shelf products that use a wall wart to provide low voltage (12 to 40 VAC or DC), and then feed the output from this to custom electronics which provide a regulated and protected 12 VDC, 1 to 2 Amp supply for the Arduino and possibly other gear (such as my relay). However, I don't want a wall wart, so these do not work for me. I have also found designs for transformer-less power supplies, but they do not start with 110 VAC, and further, generally supply less than 100 mA, so they are not suitable for this project.

Can anyone point me to a design (with a parts list) for such a supply, or where to find a shield for the Arduino that takes 110 VAC input and can feed the Arduino with the output, or a kit for such a supply?

A wall wart, of course, provides just what you need, and some of them are small enough so you could fit it in your electrical box along with the Arduino and the relay. Trying to go from 110 v. ac to low dc is tricky, if you're not familiar with power supply technology. I think you should just use a wall wart, cut off its plug, and wire it directly to the ac in your electrical box.

Look at the Moteinos. They package an Arduino-compatible processor and wireless into a wall plate - they don't use a whole junction box.

It seems the power supply module is available as a separate unit: https://lowpowerlab.com/shop/switchmotepsu

Of course a USB wall wart is much cheaper than this but it will require more work to make it safe to be installed in a box for 10 years or more. Vinyl insulation tape is not an acceptable method of insulation for that time period.

This is basic electronics. Ypu need a transformer, a rectifier, voltage regulator and a couple of capacitors.
Just search for 12V power supply schematic and you will be good to go. Here’s one

Cramming it into a box the size of an iPhone wall-wart or the Moteino's power supply is not basic electronics. Since those devices are available so cheaply, it's a thousand times easier to just buy one.

Do a google image search for "12v switched mode power supply 110". Look for one that is UL listed and buy from a reputable supplier.

Hi, Use the "wall wart" and make the 110V GPO plug one of those that allows you to plug in the back of it. One GPO socket and two supplies, 110Vac and the 12Vdc "wall wart"

Tom... :)