Content-type: text/html Set-Cookie: cookiehash=D8TIX1F9GET8DML97LCWDC1UDL31CF7Q; expires=Thu, 07 Apr 2022 00:00:00 GMT; path=/; domain=.drivemeinsane.com
Previous Entry.. Next Entry.. |
The first lamp
July 15, 2012 00:26
One of the cams I frequently viewed in the early days was called "The VET-Live Cam". It was a cam in I think the Netherlands, in a computer lab in a college, which also seemed to double as a lounge for a select group of people. The cam was on 24/7, and featured a light that could be turned on and off over the internet. This inspired me to set up something similar. I had some small breadboard pieces that I dedicated to developing the circuit for this project. I went to Radio Shack and purchased a smallish relay that I figured would be sufficient for this project. While it was certainly sufficient, it was significantly more so. The relay I ended up using was good for 20 amps, when I was only trying to control a single lamp, with a single bulb, which any relay rated for an amp of current or more would have sufficed. Needless to say, there was serious overkill, but it worked, so I didn't worry about it.
Over the course of my life, starting from about 10 years old onward, I had played with electronics. As a kid, I had several of the electronics kits, and a pile of electronic parts, with which I proceeded to impress myself (and occaisonally others) by building things as novel as "a paper flashlight", which consisted of a battery pack and a green LED. I also learned how to solder and had a basic understanding of electronics, but never did anything complex or serious.
So when it came time to wire up actual AC power and feed it through the relay, I had no idea if it wasn't about to blow up on me. I wired the plug and socket through the relay, plugged a lamp into it, and used a 9V battery as my power source to flip the relay. I then CAREFULLY plugged it into the wall, and connected the 9V battery to see what would happen. The lamp turned on. Just as it was supposed to. It didn't blow up, or catch fire, or do anything dramatic besides turning on. So the relay worked. Now onto the computer control.
The next step was to figure out how to get the computer to output something via the parallel port to trigger the relay. I had enough knowledge of electronics to know that the 5V from the parallel port fed into a transistor would allow current to flow through the transistor, but I wasn't sure how large the transistor needed to be or anything like that. I ended up rooting around in the garage for old parts and found some old transistors, all very large, and was able to get one of those to work with the parallel port, so that plan worked. I assembled the circuit on the breadboard, rigged up some wires to the relay, and tested the switch by manually setting the parallel port bit to on.
And it worked!
And from December of 1998 until I moved out in August of 2003, that circuit remained on the breadboard, precariously perched on the edge of a low table, connected to an old 486 with no top cover for the case. The bulb in that lamp worked for 4 years before burning out.
The sprinkler used the same relay setup, but all of the other lamps in the house instead used X10. Smarthome had a sale, Xmas of 2000 I believe, where they were selling appliance modules for $3 apiece, so I purchased about 20 of them, along with the firecracker kit, and another computer interface which was directly wired. Wiring and interfacing using X10 was a lot simpler, so until about a year ago, I would use X10 exclusively for all lamps. I only recently regressed back to using relays since apparently X10 modules have a limited lifespan, especially when considering the abuse that this site would put them through.