Saturday, October 12, 2013

Arduino : How I got sucked in to the vortex

In the grand world of Aquaponics there are quite a few things that need to be monitored on a regular basis: pH, ammonia, nitrites, nitrates, water level, flow rates, pump status and on and on the list goes.

That's a lot to keep track of, so what to do?  Bernard Baruch is quoted as saying that "If all you have is a hammer, everything looks like a nail".   In my case, as a career computer programmer and IT guy, that means I should be able to cobble together some electronics, networking gear, programming and the Internet to do some of this for me, right?   Definitely.  So I got out my "hammer" and started pounding.

My first thought was to use an old laptop and plug various sensors in to it and push the data to the web.  Easy and convenient.  Did I do that?  Naaaah!   Too easy!  I have mentality that is best summed up by another quote, this time from Michelangelo: "I am still learning".  I had heard about the Arduino microprocessor and thought that this might be a good 'simple' project to get my feet wet.   It's open source?  Cool - I love me some open source.  Ever since the early days of Red Hat Linux the concept of free, useful stuff that lots of people develop to make better, without having to pay a bunch of money all the time to purchase and upgrade, has been really attractive.  Sure, there's always rough edges, but the price is right.

Before I go too much further I must confess to being cheap.  My boss is nice and says I'm 'frugal'.  My friends are more direct and much closer to the point when they say "You're just cheap!".  It's true, and I'll wear it. Proudly. This is one of the reasons the laptop based system was canned.   It just seemed like overkill and too expensive to waste a perfectly good laptop to keep watch over a couple of temperature sensors.  Yeah - I know that I've got several old laptops sitting in the cupboard that are never going to see productive life again, but if the Arduino is as good as they say, knowing how to build and use one looks like a valuable skill to have.

Being cheap, as previous established, I scoured the internet and ended up at YourDuino.com, bought a Starter Set and got to work.  Here's a big plug for the guys at YourDuino.  They're a small operation, but their products work, and Terry really know his stuff.  Check out his tutorials if you are bumping up against the learning curve brickwall.  Their pricing is right too.

It wasn't long before I had an LCD screen connected and was measuring temperatures.  The little black component on the breadboard in the photo is the LM35 analog temperature sensor.

Well, that's pretty impressive. Not bad for a rookie. Not bad at all.

That particular Arduino board was used in a precise timer application for a relative who didn't want to pay hundreds of dollars for a professional unit and wondered if I could come up with something. That sounded like a pretty simple project.  Count some milliseconds, and turn a relay on and off.  Yup - even a micro-controller beginner like me should be able to work that out.  The programmer in me didn't take long to code up a basic user interface with three buttons and an LCD screen.   It worked.  Sort of.  Until it didn't...

Hey, this stuff is fun.  But there was a niggling issue in the back of my brain.  At $30 a throw, these Arduino boards were still too expensive. If I looked around I could probably buy obsolete laptop computers for that much and save myself the headaches.  Surely there is a cheaper way of doing this.  Ah - there is, but you're going to have to get your soldering iron hot and your hands dirty to do it.  Arduino, being open-source hardware, can be built from electronic parts, cheap parts as it turns out.

Some Googling time later I found this: Perfboard Hackduino Instructable

And that's when I heard the angels sing.








No comments:

Post a Comment