Live data from Hacker News

Turn a light bulb on with every new user or download

rigoneri.com

41–42 of 42 posts

Re: Turn a light bulb on with every new user or download

#41
post #16
post #11

BIG FAT WARNING: If you're going to relay your Raspberry Pi / Arduino to mains electricity, be very, very careful! Mains electricity can KILL. Make sure you learn about safe shielding, connecting and grounding practices. Above all, be extremely cautious! I can't stress this enough. EDIT: For more information: http://tubelab.com/Safety.htm

Better yet: Don't connect your Raspberry Pi / Arduino at all to mains electricity unless you use an opto-isolator, or you have training in designing such circuits. The usb relay is NOT designed for this! See the picture: http://www.circuitgizmos.com/products/cgu451/cgu451.shtml In a device intended for hybrid hi/low voltage there is a clear gap between the high and low voltage components, and an isolation transformer…

You're overreacting!

An isolation transformer would be of absolutely no use here and the optoisolator would provide the same functionality that the existing relays on that board do.

I can't see how the PC board is laid out so I can't verify if there is inadequate separation between the control side and the isolated side of the relay (even so, you only need about 5mm separation to be minimally safe at 120V), but barring that, it's fine!

Yes, this particular device is not explicitly designed to deal with all the hazards of switching a high voltage load, but I don't see anything that leads me to believe that it's unsafe for that purpose.

Re: Turn a light bulb on with every new user or download

#42
post #34
post #4

This seems like a really great use for raspberry pi. I recently finished a project involving a pi + a relay to activate a door buzzer, written in javascript. It was surprisingly simple and straightforward. Besides turning on lights, the cool thing about relays is that most things involving physical push-buttons can be taken apart and easily wired up to a relay.

Arduino or Raspberry Pi are kind of overkill for this ... USB breakout board -> MSP430 -> LEDs/Buzzers/Whatever You're talking somewhere around $14. Yes, you'll need to know C or assembly for the MSP430 and likely a scripting language for the PC, but it makes a lot more sense than bringing in all of that horsepower to essentially get an I/O and light an LED.

Your solution works totally fine, but it also involves using an entire computer to run the thing, which may or may not be overkill depending on whether or not you already have a computer that can be dedicated to it. Personally, I prefer these kinds of projects to be self-contained.
Post reply on HN