Go Down

Topic: Internet-Controlled-AC-DIMMER-Lightbulb: Need Help with Multi-Threading. (Read 1 time) previous topic - next topic

geoboytoy

My project is simple I want to control a lightbulb through the internet. I have created a website that allows for on and off and intensity values. These values are sent to a php page. Where My Arduino Uno Rv3 and the Wifi Shield reads the incoming info.

The AC Dimmer I use is the http://www.inmojo.com/store/inmojo-market/item/digital-ac-dimmer-module-lite-v.2/.

It pretty much works on using Interrupts. The website has the sample code.

Now my problem is I can't keep the light steady, and read the values from the website.
I understand the problem to be that the Interrupts are happening to frequently before I can continue to read the incoming data from the website.

I was wondering if I could do multi threading or something, or maybe I can solve the problem by buying a separate arduino.

Any Ideas would be greatly appreciated!


runaway_pancake

#1
Jul 04, 2013, 06:53 pm Last Edit: Jul 04, 2013, 06:54 pm by Runaway Pancake Reason: 1
With an X10-based setup you send the intensity code and it stays that way till it gets another data packet ("set it and forget it".)  You don't have to manage the triac.

X10 cannot dim CFLs (some 'dimmable' CFLs may work), but CFLs don't do with triacs either.

http://arduino.cc/en/Tutorial/x10
http://makezine.com/2008/09/07/x10-home-automation-with/

> > >
You can stay UL this way, too - no dodgey AC wiring etc
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

geoboytoy

So you are saying that I can use the X10 Library with my AC Dimmer? Or would I have to buy other hardware?
Thanks again!

zoomkat

I'd probably get the below and set it up to be operated with a servo.

http://www.homedepot.com/p/Leviton-Trimitron-600-Watt-Electro-Mechanical-Push-Dimmer-White-R60-06681-0IW/100068979#.UdWvASnD_iw
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

geoboytoy


I'd probably get the below and set it up to be operated with a servo.

http://www.homedepot.com/p/Leviton-Trimitron-600-Watt-Electro-Mechanical-Push-Dimmer-White-R60-06681-0IW/100068979#.UdWvASnD_iw



That was essential the first idea, but I was hoping I could do the whole thing through electronics. I guess I'll go back to that as a last resort or something.

runaway_pancake


So you are saying that I can use the X10 Library with my AC Dimmer? Or would I have to buy other hardware?
Thanks again!


The X10 library will not work your dimmer.
You'll have to buy an X10 'Firecracker' and a TM751 transceiver
http://kbase.x10.com/wiki/Firecracker
http://kbase.x10.com/wiki/TM751
http://kbase.x10.com/wiki/Firecracker_Setup

..or..

a Power Line Interface
http://kbase.x10.com/wiki/PL513

as well as a dimmer module
http://www.x10.com/products/x10_lm465.htm

The X10 site probably has many irresistible package deals or you may find ebay sellers with lower prices.
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

oric_dan


I'd probably get the below and set it up to be operated with a servo.

http://www.homedepot.com/p/Leviton-Trimitron-600-Watt-Electro-Mechanical-Push-Dimmer-White-R60-06681-0IW/100068979#.UdWvASnD_iw

The similar dimmer in my house requires 270-deg rotation from off to full-on, so slightly
outside the rotation range of a std servo.

zoomkat



I'd probably get the below and set it up to be operated with a servo.

http://www.homedepot.com/p/Leviton-Trimitron-600-Watt-Electro-Mechanical-Push-Dimmer-White-R60-06681-0IW/100068979#.UdWvASnD_iw

The similar dimmer in my house requires 270-deg rotation from off to full-on, so slightly
outside the rotation range of a std servo.


They are so easy to turn that "gearing" could be made from very simple parts like two different size plastic jar lids, string, wood, hot glue and such. I made the below to get ~2 turns on a blind shaft from .5 turn from a servo.



Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

oric_dan

Yeah, you can always built something to increase the gearing in some way. I was
pointing out that, if you use a servo, then you NEED to add additional gearing.
Either way, it's kind of a kludge, and an all-electronics approach would be preferable,
as OP said.

OTOH, he's buying non-agency-approved electronics stuff off ebay, designed by
who-knows-who, and tying it into the power mains in his house. Some people are
happy to do that - based on past threads on this forum - but I'm not.

Go Up