Si I recently fried my first Pi. I would be less heart broken if it wasnt because I actually had the nerve to snip a wire on a project board while everything was up and running. ( kick me) needless to say, metal scissors and microprocessors dont mix. Nevertheless, it gave me a great idea for driving DC motors and relays safely using ambient light sensors and LED's.
length of black rubber hose,
electrical tape
ambient light sensor radioshack 4-pack, 2.79
loose pack of LED's (anything but ultraviolet)
appropriate transistors and resistors to get the job done.
cut the hose to 1/2" and insert the light sensor in one end, and an LED in the other. Make sure no light is leaking in behind the light sensor OR the LED. Drive the LED with your Pi( pulse width works fine) and drive the transistor with the light sensor. Then kick yourself for not thinking of this sooner! (I did),
I've been using this all day, and it seems to be working fine, and there is no physical connection to my sloppy project board and my pi what so ever.





