Author Topic: Home automation light controller  (Read 3301 times)

0 Members and 1 Guest are viewing this topic.

Offline electron_misfireTopic starter

  • Contributor
  • Posts: 32
  • Country: au
Home automation light controller
« on: November 16, 2014, 12:20:41 am »
Hi all,

I'm currently designing my own home automation system using a beagle bone black, some micro controllers, nrfl01+ modules and some custom pcb's.
It will be a one off project that I *might* start selling in small quantity of all goes well.

My current problem is the light controllers.
I need to make something that can turn lights on and off as well as pwm them for dimming. So I had an idea of a solid state relay, an optocoupler, an nrfl01 and a micro.
I have one dilemma though:

safety

I know mains voltage is nothing to play around with. How would I make this safe to go in a wall and safe even to sell.

Thanks for your help in advance.
« Last Edit: November 16, 2014, 06:57:39 am by electron_misfire »
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: Home automation light controller
« Reply #1 on: November 16, 2014, 08:09:19 pm »
Is this DC lighting or AC lighting (LED's Imply DC) ?

In Aus anything under 50V DC is considered non-lethal for most situations, as such you do not need a license to fit and play with these voltages, and equally if you follow the specifications for trace seperation, voltage ratings on parts, and isolation where necessary you should be in a nice grey area for sales, (not something they will stop on something like eBay, but may frown upon in a store front)

If it is AC, make all the outputs isolated, equally make them isolated from one another if they are going to be similar to a contact pair for each light, as there are a number of old houses still floating about where neutral and active have been flipped by DIY'ers,

In these cases as it will be mounted behind a wall, keep your trace seperation wide wherever a large voltage gradient is, dust is a real killer, and distance can be your best freind when the abrasives in wall cavity dust scratch away small bits of solder mask,

As this device will have inputs, in the form of switches and/or ?? Analog or digital dimmers, for digital, isolate the data line, for analog it is much more difficult, and you may instead have to focus on making your inputs able to handle mains, via current limiting resistors and some form of voltage clamp, as it is not uncommon for someone to not read the instructions and go gung ho into it, or get 2 connections reversed,
 

Offline pickle9000

  • Super Contributor
  • ***
  • Posts: 2439
  • Country: ca
Re: Home automation light controller
« Reply #2 on: November 16, 2014, 08:33:32 pm »
I added some colour strip lighting (sticky back LED) to my home a couple years ago. It's all 12 volt, we have similar low voltage laws in Canada. The strips and remotes are all Chinese, the wall warts are leftover switching ones from my junkbox. No problems so far.

If you go for a 12 volt system there are a bunch of Chinese options that could help with your project. You could for example use one of the Chinese remotes and just generate an IR commands from a micro to make a receiver do what you want. You could make a custom receiver that can be operated with a Chinese remote... and so on.

Led Strips

http://www.ebay.ca/sch/i.html?_from=R40&_trksid=p2047675.m570.l1313&_nkw=5M+3528+RGB+Waterproof%28IP65%29+Flexible+300+LEDs&_sacat=0

Remotes

http://www.ebay.ca/sch/i.html?_from=R40|R40&_sacat=0&_nkw=5050+RGB+44+key&rt=nc&LH_BIN=1

Extenders

http://www.ebay.ca/sch/i.html?_odkw=5050+RGB+44+key&LH_BIN=1&_from=R40|R40&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313&_nkw=5050+repeat&_sacat=0

Panel (sort of)

http://www.ebay.ca/sch/i.html?_odkw=rgb+panel&_from=R40|R40|R40|R40&LH_BIN=1&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313&_nkw=rgb+panel+10w&_sacat=0

   
 

Offline djacobow

  • Super Contributor
  • ***
  • Posts: 1164
  • Country: us
  • takin' it apart since the 70's
Re: Home automation light controller
« Reply #3 on: November 17, 2014, 01:53:27 am »
If you want to control AC loads on/off, then use a simple triac circuit, optoisolated. I've built a device just like the one you describe and it's really quite simple and fun.

If you want to control AC load by phase-angle dimming, and those loads are incandescent, the use a simple triac dimming circuit, optoisolated. You will need to use an opto triac driver that does not provide ZC detection and will instead need to do ZC detection yourself and feed it to your processor. I've done this, too, and it's very simple, too. Be sure to add appropriate snubbers to your triac circuits.

In either case above, keep separate "DC" and "AC" sides to your PCB with ample clearances. Probably you want to route out slots under the optos, too.

If you want to AC dim other loads (LEDs lights, fluorescent lights, etc), then you will find that triac dimming becomes tricky. It works-ish, but not satisfactorily IMHO. In this case, you may want to experiment with forward phase angle dimming. For that, you won't be able to use a triac. You can put a single NFET inside a bridge rectifier and drive it appropriately. I've done that, too, and though it worked, I wasn't thrilled with the noise and dimming properties. The nice thing with  this setup is that you can experiment with reverse and forward phase angle dimming as well as PWM "sine wave" dimming. If you plan to experiment with PWM, note that you're circuit will be dissipating a lot more power and you need to design/plan appropriately. Another way to approach this is to drop the bridge rectifier and use two separate FETS that you fire independently. Can also be done with IGBTs.

Here's an old thread on my projects: https://www.eevblog.com/forum/projects/dimmer-to-end-all-dimmers/

Anyway, if you can swing it, you're life will be so much easier and, honestly, more fun, if you can build the luminaire and the dimming capability together. Then you can forgo AC, use DC and PWM however you feel like it.


 

Offline electron_misfireTopic starter

  • Contributor
  • Posts: 32
  • Country: au
Re: Home automation light controller
« Reply #4 on: November 17, 2014, 02:49:35 am »
Djacobow, I like the idea of the triac dimming, I assume it works for halogen bulbs since they're similar to incandescent. Would a device like this be legal to sell? This is my first 240v product. What would any common points of failure be?


Sent from my iPhone using Tapatalk
 

Offline djacobow

  • Super Contributor
  • ***
  • Posts: 1164
  • Country: us
  • takin' it apart since the 70's
Re: Home automation light controller
« Reply #5 on: November 19, 2014, 06:33:14 am »

I think a triac dimmer would work OK on a mains voltage halogen, but many halogens are powered by step down transformers. In that case, you'd be switching a transformer, which might or might not work acceptably.

Would it be legal to sell? I'm not lawyer. I think that getting something like that UL listed would be expensive and would take some learning to get on top of what is required. It is my understanding that UL listing is not strictly required in the US, but many will not buy without it. There is also the question of EMC compliance, which may be mandatory for such things. And as it turns out triac dimmers make a lot of electrical noise, so it's not a slam dunk to meet that compliance.

Basically, bringing a mains-interacting circuit to market is indeed more complex than just using an off the shelf power supply (which someone else had to jump through hoops to get on the market) and you just sticking to the lower DC voltage.

Djacobow, I like the idea of the triac dimming, I assume it works for halogen bulbs since they're similar to incandescent. Would a device like this be legal to sell? This is my first 240v product. What would any common points of failure be?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf