Hardware, Software & Product Development | Sparx EngineeringHardware, Software & Product Development | Sparx EngineeringHardware, Software & Product Development | Sparx EngineeringHardware, Software & Product Development | Sparx Engineering
  • Home
  • Expertise
    • Software Engineering
    • Electrical Engineering
    • Chemical Products and Services
    • Biomedical Engineering
    • Mechanical Engineering
    • Production Management
    • Automation
    • Industrial Design
  • Blog
  • About Us
NextPrevious

Building a Garage Computer From a Beagle Bone

By dsmoot | Hardware, Software | 0 comment | 24 February, 2015 | 1

This is one of those projects I’ve wanted to do for a while and finally all the pieces are coming together. I hated the user interface on my home sprinkler system. Despite an engineering degree and a P.E. license, the Hunter Pro-C controller in my garage regularly humiliated me with both under and over watered grass. How hard could it be to make a timer that opens and closes relays that has an intuitive interface? And I had a Raspberry Pi with plenty of computing power and a network connection just waiting for a purpose in life. So that was the germ of the project, use my Rasberry Pi to present a web UI and put my sprinkler valves on my home network.

Hunter Pro-C Sprinkler Controller

The irritant that inspired my pearl

But like all truly great engineering projects, it ran over budget, behind schedule, and had massive feature creep.

Actually it was delivering results on schedule for my paying day job that consumed a lot of bandwidth and made it was hard to peel away hours to figure out how I was going to do this. But procrastination paid off in this case: A customer paid for a quick and dirty one off project involving the excellent Beagle Bone Black. And I then I stumbled across the “Osbo“, an add on board for the Beagle Bone Black that can control up to 8 sprinkler zones and adds a DS1307 battery backed real time clock for maintaining schedule across power cycles. All I needed was a network link to my garage. Wifi was too weak in my garage so I got ahold of a pair of TP-Link Powerline Ethernet adapters model TP-PL4010 that are very highly rated on Amazon.

TP Link Powerline Network Adapters

Network Over Power Line Adapters

So this worked very well but there wasn’t much innovation here, I was just snapping together bits and pieces of hardware and software created by others to get my sprinkler system on my network and talking to my home automation platform. The next step was to leverage USB port of the BBB to put a cheap webcam on the network that my Zoneminder server could access. I was planning on using the excellent mjpg-streamer software package that had worked so well on my OpenWrt systems. Since Debian lacked this package for this platform, Google quickly located a great tutorial. I got a cheap UVC compatible USB camera from Fry’s for less than $10 and I was in business.

Garage Computer

The Latest Incarnation of Garage Computer

The camera server portion was pretty straightforward:

  • Buy a camera that is UVC compatible (List). See FAQ if unsure about your webcam (or just plug it into a Linux desktop and try to use it).
  • Build the mjpg-streamer source on the beagle-bone per the tutorial.
  • Make a startup script:
    export LD_LIBRARY_PATH=/usr/local/lib
    /usr/local/bin/mjpg_streamer -b -i "input_uvc.so -d /dev/video0 -r 1290x720 --fps 10" -o "output_http.so -p xxxx"

    I’m having trouble making my startup script run at boot but it works fine called post boot. Of course change xxxx to port of your choice.

I want to be able to know the position of the door so I can close it if I forget or have a script command it to an absolute position. The electronics to do this are pretty simple, I bought a simple magnetic reed switch from amazon for this purpose.garage_reed_switchInstallation was pretty straightforward, the magnet is mounted to the door so that the wired part does not have to move. In order to get alignment correct, I used generous portions of RTV to secure the wired portion to the garage floor. Then while the RTV was still not set, I closed the garage door allowing the magnet to push down on the sensor. This meant the sensor would be well aligned in close proximity to the magnet without any painstaking alignment on my part.

Reed Switch RTV'ed to Garage Floor

Behold the magic of RTV

Now all that is left is the code to glue the new sensor and actuator into my Home Automation system. Stay tuned for part 2.

Beagle Bone Black, garage computer, home automation, zoneminder

dsmoot

More posts by dsmoot

Related Post

  • Start Zoneminder Recordings with Vera Events

    By dsmoot | 4 comments

    In a previous post I explained how you could configure the security DVR software Zoneminder to trigger recordings from a network connection. While a neat trick, I never really explained why I set this up.Read more

  • Zoneminder Network Triggering

    By dsmoot | 4 comments

    I will be surprised if anyone actually reads this but I was surprised by the popularity of my previous Bluetooth posts, so here goes. Home automation is one of my hobbies and I currently useRead more

  • Home Automation: The Frontier of the “Internet of Things”

    By dsmoot | 1 comment

    Home automation is one of my hobbies that I use to entertain and enlighten myself when my day job is a little tedious (which lately has been quite rare). I think home automation is onRead more

  • Compiling ZoneMinder 1.25 from Source

    By dsmoot | 0 comment

    I have a nice MythTV setup in the house, which is an open source DVR software project.  I also have several IP cameras for security but haven’t been happy with the various software tools I’veRead more

Leave a Comment

Cancel reply

Your email address will not be published. Required fields are marked *

NextPrevious
  • Home
  • Expertise
  • Blog
  • About Us
Sparx Technologies, LLC. dba Sparx Engineering © 2009 - 2019 | All Rights Reserved
  • Home
  • Expertise
    • Software Engineering
    • Electrical Engineering
    • Chemical Products and Services
    • Biomedical Engineering
    • Mechanical Engineering
    • Production Management
    • Automation
    • Industrial Design
  • Blog
  • About Us
Hardware, Software & Product Development | Sparx Engineering