0
\$\begingroup\$

My aim is to create a wall light switch similar to the LightwaveRF ones with a momentary switch rather than a rocker style switch. To handle the momentary switch I will create a custom chip based on the Arduino with a small AVR and a solid state relay switch and will also be controlled by radio frequency.

So my question is how can I safely power the custom chip behind the switch with 5v stepping down the 230v used for UK mains? Obviously I am aware of similar methods of reducing power such as the ones used in iPhone chargers for example using resistors and capacitors but I need this to be as small as possible and be safe in the event of a power surge. I am more than happy to purchase all of the parts separately and create the circuit myself but I could do with some guidance. I am guessing the LightwaveRF switches must use a similar method what I am proposing.

\$\endgroup\$
9
  • \$\begingroup\$ How much current do you think you'll be needing. Small = low current basically. \$\endgroup\$
    – Andy aka
    Oct 24, 2013 at 21:17
  • 1
    \$\begingroup\$ What custom chip are you referring to? And why would you use an arduino and a separate AVR for this purpose? \$\endgroup\$
    – Ashton H.
    Oct 24, 2013 at 21:17
  • \$\begingroup\$ The Arduino would be connected to a server which can be controlled remotely and transmit via RF to the light switch to turn the relay on and off. A custom chip that I will make to be used in the light switch back box would handle a momentary switch button and the RF reciever. On the chip would be a SRD-05VDC-SL-C relay. I believe 5v is needed to control the relay in question. \$\endgroup\$
    – Matt
    Oct 24, 2013 at 21:23
  • \$\begingroup\$ Is it correct that you are trying to convert 230V AC to 5V DC? In that case you simply need an AC-DC converter. It usually consists of a transformer, bridge rectifier with filter capacitors and a voltage regulator. \$\endgroup\$
    – Ashton H.
    Oct 24, 2013 at 22:05
  • 1
    \$\begingroup\$ @AshtonHearts because the circuit will be connected to AC power and likely only consuming 20mA max you can use a capacitor (and R current limit) dropper to a 3W 5V6 zener diode. This produces a positive half wave "squarish" voltage relative to the other wire of 5.6V which can be taken to 5V with a series diode and capacitor (smoothing). It's crude but it does work. \$\endgroup\$
    – Andy aka
    Oct 24, 2013 at 22:17

2 Answers 2

3
\$\begingroup\$

Here is a paper from ST Microelectronics about capacitive zener AC voltage droppers. Here's a picture from this document: -

enter image description here

TAKE NOTE - THIS IS NOT ISOLATED FROM THE INCOMING AC POWER MAINS - TAKE EXTREME CARE.

\$\endgroup\$
8
  • \$\begingroup\$ Having read through the document I gather it would be much safer to create a small transformer circuit? What are the possibilities of something going wrong with a capacitive power source? \$\endgroup\$
    – Matt
    Oct 25, 2013 at 21:15
  • 1
    \$\begingroup\$ If you use an X class capacitor I don't think there'll be a problem. I'm just worried about givin advice on stuff like this not knowing what safety precautions you might take when testing it. It's a matter of my conscience on your safety. \$\endgroup\$
    – Andy aka
    Oct 25, 2013 at 21:22
  • \$\begingroup\$ Well I'm currently testing with just my arduino and a 5v relay switch with a 3 pin plug using a 3amp fuse for switching a light bulb on and off. This is the way I would test a power supply and not directly from the mains cable, also I would use a multimeter to be sure. \$\endgroup\$
    – Matt
    Oct 25, 2013 at 22:07
  • \$\begingroup\$ i think you'll be ok. You're making the right noises. Based on this I'd recommend using the circuit above because finding a miniature mains transformer to fit behind a switch is going to be fruitless. I would also consider using a triac to switch the lamp. This is how commercial units work. \$\endgroup\$
    – Andy aka
    Oct 25, 2013 at 22:23
  • \$\begingroup\$ I have found all pieces needed for the circuit however I am struggling to find a X class capacitor. I have been looking on eBay with no success. None of the listings seem to detail the peak pulse voltage. Any ideas? Also this circuit would push out 5.6V and previously you mentioned a series of diode and capacitors to reduce this to 5V. Can you provide any specifics? \$\endgroup\$
    – Matt
    Oct 27, 2013 at 21:48
0
\$\begingroup\$

I am working on a similar project but I am looking to use a Moteino Tx behind the switch talking to a Moteino Rx that in turn talks to a Raspberry Pi with a web front end.

A Moteino is basically an Arduino (the same chip in a micro package and almost pin for pin the same) but on something the size of a SD card, a little longer I think, have built in RF and cost $18 a pop. Multiple Tx's can talk to a single Rx.

There are very small PCB mountable components that will drop mains down to 3 or 5V. The Moteino guy has built one the same size as his Moteino but he is US based so to copy it here will need some changes

If you want to know more about the Moteino use this link

www.lowpowerlab.com

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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