I am currently working on a project that will be a type of night light that plugs straight into a wall. What parts can I use to convert the wall outlet voltage into that which can be used by a couple LEDs. I was thinking These(a few Board Mount AC/DC converters on DigiKey) should work, will they? Also how do I find the prongs that go into the outlet? I would like to make this in a way that could be manufactured and sold on a larger scale and I need help!

How do nightlights like this 👇 work? is there a really small AC/DC adapter? If so where can I get one? LED night lightenter image description here


closed as off-topic by Chris Stratton, Dmitry Grigoryev, Voltage Spike, R Drast, Charles Cowie Jul 18 '18 at 21:34

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on the use of electronic devices are off-topic as this site is intended specifically for questions on electronics design." – Chris Stratton, R Drast, Charles Cowie
If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ Please explain what "these" are in the question so we don't have to follow links and the question makes sense when the link dies. Note that questions seeking product recommendations and where to buy them are off-topic and tend to get closed. See the site Help for details. \$\endgroup\$ – Transistor Jul 13 '18 at 22:05
  • \$\begingroup\$ Look up HLK-PM01, HLK-PM03, and HLK-PM12 as three possibilities to consider. You should prefer a unit that is as sealed as possible. Much less chance of something going wrong. If the volume is too much for those, then you will need to cobble up something else on your own. ICs such as the MP157, for example. Other possibilities include combinations of (possibly) Y-class capacitors and resistors. But since there will be other circuitry (guessing), a nice DC rail would be better I suspect. \$\endgroup\$ – jonk Jul 13 '18 at 22:35
  • \$\begingroup\$ Possible duplicate of LED as 230V AC indicator \$\endgroup\$ – Dmitry Grigoryev Jul 15 '18 at 7:34

Most inexpensive "dollar store" night-lights use a diode and series resistor to drop 115 VAC (as indicated by your outlet, as opposed to some countries where 240 VAC is common) to the ~3 VDC needed by the LED. This is wasteful, since ~97% of the energy is changed to heat by the resistor. While a small amount of power, about 2.5 W is continuously wasted. Additionally, it appears you do not have experience working with mains circuits, so for safety, buy an approved wall power supply (AKA "wall wart").

If you get or salvage an isolated 5 Volt DC cell-phone or tablet charger, you'd need to drop ~2 volts across a resistor. If the LED uses 20 mA, a 100 Ohm resistor for each LED is needed. You might prefer to run the lights from a rechargeable cell: one lithium cell with a 50 Ohm resistor for each LED would work, and this could also be used in a power outage.

  • \$\begingroup\$ Thanks for the very informative answer! Do you have any insight on how one would go about creating a manufacturable product? I believe I have an understanding of a few 'DIY' ways to this but I really want to make professionally. Also asking @jonk \$\endgroup\$ – Nathan Anderson Jul 14 '18 at 3:53
  • 1
    \$\begingroup\$ I've seen more capacitive droppers than resistive droppers, but perhaps it's a power-level thing and lower-power devices might use resistors. \$\endgroup\$ – Hearth Jul 14 '18 at 4:13
  • \$\begingroup\$ @Felthry The majority the nightlights I've seen are capacitive too, A resistive dropper would be pointless IMO. Doing a night light using a wall wart would could be a possibility, you can get plenty of 5V chargers (1A) for around the $2 mark on Ebay, and you may get some valid certifications on higher priced units. For example Amazon have a pricier one that may have valid certs: amazon.com/Version-Power-Charger-Adapter-Paperwhite/dp/… \$\endgroup\$ – Jack Creasey Jul 14 '18 at 4:36
  • \$\begingroup\$ Think about 0.1uF capacitor to back-back (dual) LEDs. Now realize that 0.1uF capacitor is a potentially tragic failure point. What to do? \$\endgroup\$ – analogsystemsrf Jul 15 '18 at 3:40
  • \$\begingroup\$ Yes, and with capacitors in both legs, there's potentially 40 mA to ground. One capacitor requires a polarized plug. \$\endgroup\$ – DrMoishe Pippik Jul 15 '18 at 3:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.