Blog

Blog posts tagged Fish Tank
16Mar
2010
Home Automation Control Of RGB LED Lighting Strips

I'm replacing the blue fluorescent lighting above my fish tank with LED strips. The original intent was to use blue LEDs, but as I'm already going through the effort, I opted to use RGB LED strips (each LED is made up of three LEDs, one red, one green, and one blue), allowing me to create and endless choice of colors (although I know that I'll primarily use various flavors of blue to simulate moonlight).

The RGB LED strips come on a reel and are encased in rubber so they are waterproof. The strips can be spliced and reconnected at specified cut marks, and the reconnected strips can be waterproofed, too. RGB LED strips are powered by 4 wires, one each of red green and blue, and a common wire. Run power on the blue and common and the LEDs glow blue. Run power down the red and green and the common and the LEDs glow yellow. You get the idea.

Simply turning on and off power (at full intensity) to any wire is easy, any switch can do that. For greater control, and to be able to mix amounts of each color to obtain the exact color you want, that requires a RGB controller. Most controllers allow for some sort of color selection, and adjust the power to each wire accordingly. Pretty simple.

Where things get trickier is finding the right controller. Most RGB LED controllers are interactive, push a button or turn a knob to control the lights as you wish. What I needed was a way to do this under home automation control, so that changes could be scheduled or occur in response to other actions. And I could not find a single RGB LED controller with a programmatic interface. The next best option was to try the IR route. There are controllers with remote controls, and Insteon home automation can use an infrared link to fake remote control sequences. Unfortunately, that option did not work. The remotes that I found all allowed for cycling through programs or increasing and decreasing lighting power, but none allowed for explicit control over the R, G, and B values.

So, time to introduce a whole new technology and protocol to the mix. DMX512 is a communication standard commonly used to control stage lighting and effects. It's been around for over 20 years, and is what most clubs and concert halls use to sequence lighting, fog machines, moving lights, and more. It's a very simple and open protocol, and is widely supported by all sorts of hardware, software, devices, and more.

I found a DMX Decoder which accepts DMX512 commands to power RGB LEDs. The decoder plugs into any DMX512 source on one end (using an XLR connector), and connects to the RGB LEDs (via a simple screw terminal) on the other end. So now all I'd need to do is generate DMX512 sequences programmatically to fully control my lights. Simple, right? Not quite. Unfortunately, my Insteon based home automation system does not support DMX512.

My home automation controller, which I've discussed previously, is the ISY-99 from Universal Devices. One feature of the ISY-99 that I had not previously played with was its Network Module, an optional component which allows the controller to communicate with network resources over HTTP, TCP, UDP, and more. Using the Network Module you can talk to just about any networked device, sending raw text, binary data, and more.

With the Network Module I could send DMX512 commands to the DMX Decoder, all I would need is something to bridge DMX512 and Ethernet. And I found this exact bridge, the Ethernet / DMX512 Generator made by Cinetix in Frankfurt, Germany. This device does exactly what I was looking for, it acts (among other things) as a Telnet server, accepts commands, and generates DMX512 sequences which then get passed to the DMX Decoder which in turn controls the RGB LED strips. And the commands are pretty simple. For example, send S001,V$FF to turn on the red to full brightness (S001 is the first slot, red, and V$FF sets the value to 255), and so on. (The only gotcha is that Cinetix does not sell the device in the U.S., so I had to have it shipped to an address in Europe and then brought it over myself).

The last thing to do was to define the commands in the ISY-99. I added a whole bunch of commands, one for each color I'd want. Each command simply sends raw text TCP data to port 23 on the DMX512 Generator, and in milliseconds the lights respond. These commands can now be triggered as needed in the home automation controller. I can invoke them on scheduled intervals, in response to buttons being pushed or toggled, and much more.

So, I now have RGB LED strips above my fish tank powered by a DMX Decoder which receives commands from an Ethernet DMX512 bridge which in turn receives Telnet commands from my ISY-99 home automation controller. (And I even have a little in-house ColdFusion app on my home Intranet which pops up a color picker, allows for color selection, converts the selection to the required DMX512 Generator sequence, and then sends the command as a socket request to the controller)!

Now that I'm reading through everything I just wrote up, it seems like a whole lot of work for what started as a simple fish tank lighting enhancement. But, hey, this stuff is fun. And it's cool to see all the pieces fit together. And it's really cool to see just how flexible the Universal Devices ISY-99 is.

Read More ›

14Oct
2009
Home Automation And External Devices

It's been a while since I posted an update on my home automation adventures. But, having spent some time tweaking my system this week, I thought it worthwhile to share what I've been up to.

But first, a detour. As many of you know, I am an aquarium enthusiast, and made the switch from freshwater to saltwater marine fish about 9 years ago (I've posted some pictures to Flickr). And recently my setup suffered a minor setback. I have a 180 gallon fish tank stocked with all sorts of marine life (including coral, anemones, shrimp, urchins, and of course, fish). I have another 100 gallon tank below, which is used for filtration, and it is home to biological filters, a protein skimmer, a UV sterilizer, and more. That lower tank is also where water is added during water changes. Well, a couple of months ago that lower tank overflowed for several hours, and the backup measures I had in place to prevent flooding failed. Besides from water in my basement, I also ended up with a drop in water salinity levels (as salt water was being replaced by fresh water), and that stressed out marine life causing them to spew toxins which in turn hurt lots of my invertebrates and coral. The tank has since recovered nicely, and in fact may be healthier now than it was before, thank goodness.

But this little adventure prompted me to look into how home automation technologies could have helped the situation, and prevent similar situations in the future. Obviously, a water sensor could have helped. These are typically little boxes that connect to a sensor that sits on the floor, and when the sensor gets wet a circuit is completed and an alarm goes off. These are cheap, readily available, and really easy to use, but useless if no one is around to hear the alarm.

And then I discovered the Shut Off Valve Kits created by OnSite Pro. Like other sensors, this kit is made up of a small control box and a sensor that is placed on the floor, under the device that could leak. And like other sensors, when water is detected, an alarm sounds. But this goes a whole lot further, it also actually cuts off the water supply to prevent further flooding. It does this via a motor controlled ball valve that sits in between the water feed and your pipe (so it sits inline in between the faucet and whatever is connected to the faucet). When water is detected, and the alarm sounds, the motor is activated, and the ball valve closes, shutting off the water supply. OnSite Pro creates several versions of the kit with different size adapters (for washing machines, dishwashers, ice makers, etc.) ranging in price from $80 to $140 or so. The water feed for my fish tank is actually a washing machine feed, so I used the washing machine version. The sensor is now on the floor right beneath the lower tank, and if the sensor gets wet, the alarm sounds, and water feed is cut off. This is a no-brainer and I'd recommend installing these for use with washing machines and more, installation is quick and easy, and if you ever suffer a burst hose or a leaking washing machine, you'll be thankful for the minimal investment that could prevent serious flooding. Seriously, even if you're not tinkering with home automation, this kit can save you lots of time, money, and aggravation - this should be installed standard with every appliance that uses a water connection.

But wait, it gets better. We can also introduce home automation into the mix. Why would you want a home automation tie-in to a cutoff valve like this? Well, you could have all the lights in your house flash when a leak is detected. Or you could have the system send you an SMS alert. Or you could sound a louder alarm. Lots of options, you get the idea. The Shut Off Valve Kits do not have any integrated home automation support, but they do have an ingenious little interface that makes home automation possible. At the bottom of the control is a little connector where you can attach two wires. These wires are usually part of an open circuit, meaning that they are like a switch in the off position. But when the presence of water activates the alarm and closes the water valve, it also closes this circuit, like turning on a switch. The use of this wire is optional (and not even properly documented in the kit), but it is the key to tying in home automation.

Which brings me to the next Insteon device you need to know about, the I/O Linc. This is a plug in device, (it plugs into any outlet, and provides a pass-through outlet so the outlet can still be used as needed) which contains a wire block at the bottom to which you can attach sensors and more. Sensors generally come in two forms, normally open (circuit broken, like switched off, so when switched on an event has occurred) and normally closed (circuit closed, like switched on, so when switched off an event has occurred). The I/O Linc essentially allows you to connect any device that exposes a change in circuit making it a sensor (and it can also take actions, but more on that in a moment). So, all I needed to do was plug in an I/O Linc near the water shut off kit controller, attach the little connectivity to wire to the control, and then connect the wire to the I/O Linc connectors for a normally closed circuit. Now, when the water sensor activates the alarm and closes the water shutoff valve, it also tells my I/O Linc that the sensor is active, and now that the home automation system is aware of the event, well, it can do just about whatever you can dream up (in my case it sends me an e-mail and an SMS message). Pretty slick.

I/O Linc opens up all sorts of possibilities. If you can find a sensor, chances are that it can be made to work with the I/O Linc. In fact, SmartHome sells sensors for everything from water, to light, to motion, to sound, to temperature, to rainfall, to RFID, to keypads and more. And they also sell a magnetic garage door sensor, which I just installed last night (and thus this post). The I/O Linc Garage Door Control And Status Kit contains the previously mentioned I/O Linc, a magnetic reed switch which acts as a sensor, and a strong magnet. The reed switch switches between two circuits, one that is normally open and one that is normally closed. When the magnet is close to the switch, the open circuit closes and the closed circuit opens. So, mount the sensor on the garage door frame and the magnet on the garage door itself, and now you have a sensor that indicates if the garage door is open or closed. (The I/O Linc also features a relay that can be connected to the garage door activation switch, allowing control of door opening and closing, too). Next, simply connect the sensor to the I/O Linc, and now your home automation system can react to garage door openings and closings. For my own setup I connected each garage door to an illuminated switch in the house, so the lights show me which garage is open and which is closed, and I can use those switches to open and close the doors, too.

And I'm just getting started. For less than $50, I/O Linc opens up all sorts of new options to home automation enthusiasts, and is both useful and lots of fun.

Read More ›

5Apr
2009
My New Chromodoris Magnifica

Yep, the name is a bit of a mouthful, but the "magnifica" part is quite appropriate. This little guy is a sea slug, a member of the nudibranch species, and he joined my fish tank on Friday. This Chromodoris Magnifica is about 2 inches long, with bright vibrant colors, and with bright orange gills and rhinophores. He's (ok, we don't know that he's a he, but "it" seems so impersonal) also surprisingly agile, and can slither around, but also just kind of lets go and allows the current drop him down somewhere else.

Read More ›

7Sep
2008
My New Sea Apple

Sea apple is the popular name for large round sea cucumbers, and this sea apple (which has a diameter of about 12 inches) was introduced to my fish tank this weekend. What a beauty!

Read More ›

24Aug
2008
Home Automation Via X10

As many of you know, I am a bit of a home automation nut, and for close to a decade I've been wiring and rewiring parts of my home, while tinkering with all sorts of gadgets (some very useful, some admittedly less so). Part of the appeal is the fun factor. But there is a very practical aspect to this as well.

For example, I have a large saltwater marine reef fish tank in my house (it sits in the wall between my office and the family room). A healthy reef tank needs reliable lighting, with different lights (and different intensities) at different times of the day - brightest simulated sunlight at midday, moonlights at night, and more. Water temperature needs to be monitored carefully, a sudden drastic rise in temperature is a surefire way to kill off soft corals (I know, I've had it happen). And more. And flipping all of those switches manually is a pain (especially with my travel schedule). And so the entire setup is automated. Daytime lights start to turn on at sunrise and are off by sunset, and moonlights are obviously the reverse. Temperature changes outside of a set range are immediately reported to me via SMS, and I can check the temperature from anywhere in the world at any time. Even water leaks or overflows (a real concern when you have close to three hundred gallons of water being pumped around your house) trigger immediate alarms and notification (and will soon automatically activate cutoff valves). You get the idea.

So, how does this all work? Over the years I have played with a variety of home automation technologies, but have ended up sticking with X10. If you've not run into X10 before, here's what you need to know. The technology has been around for over three decades, and it is popular because it is easy to use, very flexible, and pretty cheap, too.

X10 works by allowing you to send signals over your house electrical wiring. To turn a switch on or an outlet off, you simply send a message over the AC wiring specifying the switch or outlet address, and the instruction. The appeal of X10 is that it needs no special wiring or data lines or anything like that. X10 commands are sent over the same electrical lines that the devices are already connected to.

Obviously, to make this work, you need switches and outlets and devices that are X10 compatible, and there are lots of these. Using standard wall light switches as an example, you'd buy an X10 replacement light switch, remove the existing one, and replace it with the X10 equivalent. The light switch would still function locally as it did before, but now it could also accept instructions sent over the same AC wiring that the switch is using to power the lights.

Every X10 device on your network must have an address, and X10 addresses are 1 byte long (or technically 2 sets of 4 bits), so a maximum of 255 devices can be connected at any given time. X10 devices do not come with preset addresses, and at setup time you pick the address you want for each device (and multiple devices can actually be given the same address, which can be a blessing and a curse). A command sent over the wire is then sent as address + 4 bit instruction code (3 for on, 11 for off, 15 for dim, and so on). Commands are usually sent by other devices. For example, if you want a light switch in one part of your house to control a light elsewhere, instead of having to run new wiring (and setting up 3-way switching) you could have the new light switch set up to send commands to another light switch, essentially creating a remote control of sorts.

Many home automation setups use large collections of switches and outlets and more all connected to each other. But where things become more interesting is when a controller is added to the mix. A controller lets you execute scheduled events, run through scripts in response to an action, activate entire scenes all at once (press a button on the wall marked "movie night" and the curtains close, lights dim, projector drops from ceiling, fireplace turns on, outside lights turn off to dissuade visitors ... you get the idea).

Which is exactly how my fish tank setup (among other things) is automated. I have a wall mounted controller that is powered by an AC feed and also sends back signals over that same feed. It allows one touch control, execution of timed events, and more.

The key is that home automation technologies like X10 allow you to break out of the simple "click this and that happens" mould. Instead, you get to mix and match triggers and their actions, using an ever growing array of triggers, and actions only limited by your imagination. And the array of X10 devices is truly remarkable. There are the obvious things, like switches and outlets and plug-in pass-through modules and keypads, to less obvious things like thermostats and motion sensors and security system integrators and irrigation system controls, to slightly more obscure devices like gas and water valves and curtain/shade openers/closers, to all sorts of connectivity modules allowing connections to IP networks and RF and phone systems. And there's a whole lot more, too.

It's fun, it's easy, it's inexpensive, and it works. Usually.

Read More ›