120V AC Light Dimmer

6 posts
by taylorofcanada » Thu Feb 07, 2013 9:31 pm
Hi, Guys.

I ordered my Pi and tons of accessories (including some relays) a few days ago. I've been looking for a solid-state way to use my Pi as a light dimmer (without using a motor).

The only thing I was able to come up with, is having a solid state relay switch on and off really fast to dim the lights, but I'm not sure that will work (for example, 120hz = 50% power). I'm not experienced in this stuff, but even by my logic, that doesn't seem ideal. Unfortunately, I haven't been able to find a better way to do it.

Any comments/ideas?
Posts: 6
Joined: Thu Feb 07, 2013 9:21 pm
by Raspberry wino » Sat Feb 09, 2013 12:43 am
If you're running some variety of Linux which most Raspis will, I think it'll be hard to damn near impossible to guarantee sufficiently accurate timing for such a task.

You'd be much better off using a microcontroller: PIC, Arduino etc where a very small program is all it does and you can guarantee the timing. Then use the Raspi for some higher level task where something closer to a proper computer can do so much more and provide computing facilities and a nice interface but humans won't notice it taking a few tens of milliseconds to respond.

You could dedicate a Raspi to doing this but then you're into 'bare metal' programming where the operating system doesn't get in the way.

I hope this helps.
Posts: 49
Joined: Mon Mar 05, 2012 11:48 am
by Playagood » Sat Feb 09, 2013 1:06 am
Try this tutorial : http://wiki.dxarts.washington.edu/group ... rcuit.html

It works for me!!
Posts: 17
Joined: Sun Jan 13, 2013 12:41 am
by taylorofcanada » Sat Feb 09, 2013 1:40 am
Thanks for the input. Arduino may be the way to go, and I understand I can have one interface with my Pi. As for that tutorial posted - looks really cool, but makes me realize what a n00b I am! :lol:

If I were to build that board, is there a way I could have it interface with the Pi directly, or would I need an arduino due to incompatible pinout?
Posts: 6
Joined: Thu Feb 07, 2013 9:21 pm
by taylorofcanada » Sun Feb 10, 2013 9:27 am
Ok, so, I was doing some reading. It appears that the wiring, once the voltages are converted to 3.3v for the pi, this device would work with the GPIO of the Pi.

When the zero,cross detector sends a signal to the Pi, the Pi would then send a short multi-millisecond pulse to the triarc. The longer the pulse, the dimmer the lights, the shorter the pulse, the brighter the lights.

Now, perhaps the Pi may not be precise enough with a general Linux distro, but I would like to know if my general understanding of the circuit (or rather circuits, as there are two) is correct.
Posts: 6
Joined: Thu Feb 07, 2013 9:21 pm
by Rathin1980 » Mon Apr 07, 2014 10:57 pm
Hey, did you get a chance to figure out the 3.3v part? Thanks!
Posts: 1
Joined: Mon Apr 07, 2014 10:55 pm