This is my first post, so I'm sorry if this is the wrong section.
I want to switch the light inside one of the lighted ceramic houses that people use for christmas displays on and off by using an arduino pin. However, in the United States, where I live, 120vAC is obviously beyond the capacity of an arduino.
Would a relay work for something like this, or do they draw too much power to drive directly from a pin?
1B. Are there better options than relays?
What is the possibility of something going wrong and accidentally frying the arduino? Is it necessary to take precautions against this?
2B. If so, what would you reccommend?
I am planning on using a Mega2560 to activate these systems, because there are a lot of houses I want to control, if that makes a difference in the power distribution/control systems.
do they draw too much power to drive directly from a pin?
Possibly. However, you can turn a transistor on and have that turn a relay on. Sparkfun sells a relay kit with the needed transistor, resistors, etc. Or, get a powertail.
What is the possibility of something going wrong and accidentally frying the arduino?
Depends how careful you are.
Is it necessary to take precautions against this?
Well, duh!
I am planning on using a Mega2560 to activate these systems, because there are a lot of houses I want to control, if that makes a difference
It makes a difference in how many you can control, but in no other way.
groundfungus:
do you have to use 120v lights. White LEDs are pretty bright, a lot easier to controll and much cheaper parts wise.
edit: and safer!
while not technically necessary, I already have all of these (they came with the houses), and I thought it would be cheaper to leave them than to go for another system...
If getting all of these LEDs is significantly cheaper than staying with the bulbs, I could see myself changing over. (and finally not needing to have 5 power strips to run all of these :))
Yeah, this seems to be cheaper (relay+outlet box+safety precautions+etc really add up).
thepenguin:
This is my first post, so I'm sorry if this is the wrong section.
I want to switch the light inside one of the lighted ceramic houses that people use for christmas displays on and off by using an arduino pin. However, in the United States, where I live, 120vAC is obviously beyond the capacity of an arduino.
Would a relay work for something like this, or do they draw too much power to drive directly from a pin?
1B. Are there better options than relays? Relays are your best options
What is the possibility of something going wrong and accidentally frying the arduino? Is it necessary to take precautions against this?
2B. If so, what would you reccommend? Possibilities always exist. you would need to optically isolate the relay side and the arduino side just to be safe, using opto couplers. you can always buy a relay module with opto couplers installed or make one. plenty of schematics available online
I am planning on using a Mega2560 to activate these systems, because there are a lot of houses I want to control, if that makes a difference in the power distribution/control systems. which processor you use, doesn't really make a difference (imo) if your only objective is only to turn on/off lights even a uno would work, with slightly more circuitry.
on another note, led lights as opposed to bulbs will save considerable amount of power.
fuzail:
Possibilities always exist.
you would need to optically isolate the relay side and the arduino side just to be safe, using opto couplers.
you can always buy a relay module with opto couplers installed or make one. plenty of schematics available online
I would also assume that because LED lights are safer, cooler, and don't require dealing with nasty power supplies, opto couplers (as well as all the other protections necessary for 120vAC) become unnecessary.
I am worried about a potential issue with quality when buying from amazon or ebay, but those prices seem to be approximately what LEDs should cost before RadioShack inflates the price by a factor of ten...
I am worried about a potential issue with quality when buying from amazon or ebay, but those prices seem to be approximately what LEDs should cost before RadioShack inflates the price by a factor of ten...
I have purchased many, have never had any problems. Maybe I'm lucky.