Jason's (Interactive!) Fishcam

Camera Position
Gator
Water Temp.
/

Control widgets by ioBridge.com

Temperature in Winston-Salem, North Carolina (last 5 days)
Current Temperature:
 

Sunday, February 22, 2009

Jason's Fishcam Setup (long overdue post)

Since I finally have a little downtime, I thought I'd use this opportunity to explain my fishcam setup in a bit more detail. First take a look at a picture of the entire setup.


1. 10 gallon aquarium
2. USB webcam & servo
3. Laptop (server)
4. Gator ornament
5. Servo (for gator)
6. ioBridge module
7. Moonlights
8. Timer
9. Temperature probe







Not much to it, is there? As far as the video goes, I use an USB webcam plugged into an old 1GHz laptop. The laptop uses WebcamXP to grab the video stream from the USB camera and serve up the images. The laptop is connected to my router which has a port open for internet traffic to see the video. I suppose I could have used an IP camera, but I put this together with parts I already had.

You may have noticed that my fishcam is interactive. Not only can you pan the camera left and right, but you can open and close the gator jaws. Both actions are controlled by hobby servos (the kind you find in radio-controlled airplanes). For the webcam, I used zip-ties to attach a servo to the top of a miniature tripod. Then I just shoved the servo axle into the button of the webcam. The webcam is manual focus. After setting the the focus with the adjustment wheel, I placed a piece of tape over it. The tape was needed because of the back and forth motion caused the camera to slowly shift out of focus.

The gator is attached to a different servo with a piece of fishing line. I drilled a small hole in the top of the gator head and threaded the line through it. The line then comes up and out of the tank and attached to the servo below. You can see the servo clamped to the side of the aquarium stand with the fishing line running to it in the picture to the right.

So how are the servos being controlled from the web? This is done with a few pieces of hardware from ioBridge.com. The main component is the IO-204 module. It connects to my router through a network cable. Once plugged in, the module establishes a connection with the ioBridge servers on its own. After creating an account and registering the module, I was able to make a few "web widgets" that controlled the servo positions. The widgets were easy to create through a menu based wizard that asked a few questions about my setup. I then had a snippet of code that I inserted into the HTML of this page. That snippet automatically loads the button, which when clicked, moves the servo to the correct position. In order for the IO-204 module to control servos, I needed to get a Servo Smart Board from ioBridge. Basically, this is an accessory board that plugs into module and allows for servo control.

The ioBridge module is capable of doing a lot more than moving servos. Since I had a few open connections left on my ioBridge module, I decided to attach a few probes to track the temperature of the water in the aquarium as well as the outside temperature. Using the same online wizard, I was to make another widget to display the water temperature on this page.

The other aspects of my setup aren't quite as hi-tech. The main light is on a digital appliance timer. I have the light set to turn off at 11pm and back on at 7am. As my fishcam popularity began to grow, I noticed a lot of visitors were coming to my site when the light was off and seeing nothing. I added the moonlights to at least give them something to look at during the night-time hours. The moonlights are basically a string of blue LEDs. I drilled a row of holes in the aquarium hood and pushed the LEDs through the holes. I just leave the moonlights on all the time. It doesn't seem to hurt anything.

25 Comments:

  • Hey thank you VERY KINDLY for the explanation! ive wondered how to get the webcam stream to the net on a page!

    Maybe you will have to have a look at making a more permanent installation as it is VERY popular?

    Thanks! and keep it up!

    Nat (Roboteernat)

    By Blogger Roboteernat, at 7:06 AM  

  • Too cool. I may have to put something like this together for my aquarium too. Love the gator!

    By Blogger Daniel Rouse, at 11:14 PM  

  • Great Fishcam!!!

    By Blogger Karen, at 9:11 PM  

  • Great job!

    By Anonymous Anonymous, at 9:43 PM  

  • This is just awesome, I love it. I might have to try something like this with my old computer museum for an interactive tour or something.

    By the way, the gator is cool.

    Keep up the good work!

    By Anonymous Anonymous, at 2:21 PM  

  • Simply Fantastic!!! Kudos Jason!!!

    By Anonymous Anonymous, at 8:20 PM  

  • Yup - yours is cool, but I've gone for quantity ... my quality isn't half bad either: http://www.sandeeland.com/fishcam ~ Sandee

    By Blogger Sandee, at 8:52 PM  

  • i just got a fish today! its not my first since iv had hundreds of pets before because well jsut because ahahah anyways i got a blue halfmoon betta with a HUGE tail that covers most of its body and it has red fins on the side and like 3 shades of shiny blue. Its really pretty.

    By Anonymous Anonymous, at 3:33 PM  

  • Very impressed!!!

    By Anonymous Anonymous, at 6:36 PM  

  • This is freakishly cool. Aren't you worried that the gator closes too quickly and someone might try to "chomp on" one of the fishies?

    By Anonymous Anonymous, at 2:06 PM  

  • great stuff man many thanks for a cool cam

    By Blogger bluj420, at 10:49 PM  

  • I was wondering how u got the cam pics from Webcamxp to your webpage live without the Powerd By XP homepage?

    Great Page BTW...

    By Anonymous Richard (Tony) Smith, at 5:35 PM  

  • Great project! Love it!
    I also wanted to install a fishcam, but I think I will go for an IP Cam.
    Thx for the link to ioBridge!

    By Blogger Mike, at 11:32 AM  

  • Hi Jason! I love your impressive cam setup and your fish are really pretty, as is your tank. This is really fun site and a great idea. I like interacting with your gator!

    On another note, I wouldn't allow your fans to have the ability to feed your fish, as this could lead to overfeeding. As you know, overfeeding can be deadly. I wouldn't want to see anything bad happen to the little fellas! Just add a new feature or fish once in a great while to keep things interesting. Keep it simple. Again, great job Jason!

    By Anonymous Anonymous, at 2:33 PM  

  • I like it ! inever actualy seen anything like it

    By Anonymous Anonymous, at 12:24 PM  

  • I just googled fishcam to see if mine came up. We have a tank of weakly electric fish in the Maths Department at Manchester. Not as neat as yours! But it did get on local TV news
    http://billscience.blogspot.com/2009/07/eit-and-electric-fish-bill-on-teh-tv.html

    By Blogger Billlion, at 2:30 PM  

  • Wonderful aquarium!
    It's a permanent link on my page!

    By Blogger Bea, at 6:36 AM  

  • This is very cool; I like it. I’m worried though that eventually some jerks will try to snap your poor fishes in the gator’s mouth!

    By Anonymous Bob Bobson, at 8:49 PM  

  • How do you get the Temperature info

    By Blogger Brian, at 1:20 AM  

  • Dude, that is amazingly cool. Thank you for taking the time to do this. (found through stumbleupon btw)

    By Anonymous Anonymous, at 6:01 PM  

  • Had fun trying to eat fish with gator. Nice job

    By Anonymous Trace, at 11:16 PM  

  • cant believe i am watching fish!!! Time for suicude, yes . . .

    By Anonymous Anonymous, at 4:29 PM  

  • This is really fun. I'm a programmer myself and I just wanted to say that this is a really neat system. Very interactive. I'm going to give you a thumbs up!

    By Blogger Rachel, at 5:42 PM  

  • Jason, Thanks for the great webcam. Definately one of the best. Any chance we could get some sort of lure put in the gator's mouth?

    By Anonymous Anonymous, at 3:17 PM  

  • Beautiful tank :D, it's impresive lol
    Good job.

    Speak with same tank manufacturer to sell the idea :D

    By Blogger programador_psf, at 5:29 PM  

Post a Comment

<< Home