-
Update: June 6th, 2017
06/07/2017 at 03:57 • 0 commentsSo I keep coming back to this project because it's still a dream of mine to have a business (I'd settle for side hustle) of selling hydroponic produce, but not having a background in development among other distractions had been getting me down. Also I realize I don't need any of this fancy sensor jazz, but c'mon, gotta have it. Nonetheless, I've slowly been chipping away at it and with this update I'm happy to post that I've made some decent progress!
I've probably scrapped my code 4 or 5 times along the way, there were many times where I struggled to grasp fundamental concepts of AVR programming and had to take some steps back to see how I was really trying to accomplish my goal of using this hardware. This while also juggling JavaScript / Node / MongoDB for the first time as a Windows sysadmin was kind of driving me mad, but it's paying off I think? I dunno, I ain't quitting my day job just yet, and I can't go intern as a junior dev cause I got bills to pay.
Anyways I'm digressing quite a bit here, check out what I've got if you're interested.
This project is really only two parts so far, the AVR sensor side and the NodeJS backend hooking up to Thingspeak.
The board I'm developing on is the TeensyLC because it's crazy affordable for having 3 serial ports, each one dedicated to its own sensor (pH, ORP, and EC). And from the Teensy it's transmitting data from each sensor over Serial so that it can be read on /dev/ttyACM0 on my Node server using SerialPort. And from there it's pretty simple, it'll parse each line as they're received and assign the data to an appropriate variable which is then uploaded and graphed on Thingspeak.
I'll post some more updates with photo, details on the program, and plans for the future. This was more of a 'oh shit it's actually working like 2 years later' update and I'm pretty excited!
-
9/30/15 Update
09/30/2015 at 18:19 • 0 commentsSo I had a major setback for this project, about a month ago I had to move! And let's just say it was a disaster as far as this project is concerned. I considered for about a week what it would take to pack everything up and get it moved into my new (much smaller) place, but to keep my sanity I ultimately decided against it and scrapped the whole thing. I threw out my wooden frame, still have my (empty) 55 gallon tank, gave the fish / tomatoes away, but that doesn't mean I'm giving up! I'm planning on recreating the whole project with more of a focus on aesthetics and practicality rather than volume, I think I'll continue to add updates on "AAG 2.0" here as much of what I'm trying to do still applies even though I'm downsizing.
On the positive side of things I learned a lot about what I did wrong with this first attempt, namely my carpentry skills need some improving because it's not fun handling such a large volume of water when leaks are almost guaranteed and I'm at work for most of the day. I'm also going to take a different approach with sensors, I've got my eye on the GrovePi shield for the Raspberry Pi and I'll be looking into that as a solution. And now that space is such a scarce resource I'll be trying out some ideas for utilizing vertical space for growing, I'm hoping things in my life will calm down soon and I can get a proof-of-concept out within the next month.
While I haven't been working on this project for a little while I have been looking in to what it would take to sell produce to restaurants and at farmer's markets. In setting my own expectations I'll probably be doing only the latter since I won't have nearly enough produce to do anything besides sell a couple dozen heads of lettuce, but if I even get that far I'll be extremely happy.So here's to a fresh start, I'm honestly taken aback by how much attention this project has gotten here and am very grateful and inspired to get back to building!
-
Update
06/21/2015 at 04:56 • 0 commentsI thought I might post a bit of an update here, I've made some slow progress and with some motivation I hope to be able to have something to show here pretty soon. I've created a Github page here: https://github.com/jvshens/AAG in trying to get 3 sensors working on Teensy-LC I've taken the test code from AtlasScientific's page and sort of cobbled it together here with the SerialCommand library written by Steven Cogswell http://awtfy.com/
It's been a lot of fun reading up on all of this, I've never attempted anything like this before so it's tough but very rewarding. The code I have posted on Github doesn't actually work yet, it's sort of just a cobbled together mess of the probe's demo code and my interpretation of how SerialCommand works. Ideally I want to be able to send commands to the Teensy over the usb Serial connection which will then perform the defined functions, e.g. PH ON or PH OFF. There will be 3 sensors and only 1 monitor so I'll need a way to switch between them, and that's what this is for.
-
We have a reading!
05/25/2015 at 23:22 • 0 commentsIt took less than 24 hours for Atlas Scientific to respond to my question about why I couldn't get the thing running, it turns out I have an older model that requires a 38400 baud rate (opposed to 9600 in some documentation) which is awesome because that's an easy fix (and props to them for replying so quickly). After applying that and uploading it to the Teensy-LC I was able to get a constant stream of readings out of the buffer solutions. Assuming that the buffer solutions are correctly advertised I'm a little concerned that the readings may be off. For example, while calibrating I had the probe in the 7 pH buffer and it was reading 7.25 rather than 7. It could be that the buffer is a bit old, they have expiration dates for 2016 and I've had the kit for nearly a year. The company does say that there are quite a few variables involved that can affect a reading, I can see this as being an issue for anyone needing scientifically accurate readings but in my situation a ballpark reading will probably be fine.
I used Teensyduino on my Windows machine to configure the Teensy-LC with a basic program provided by Atlas Scientific, once it was set to output continuously I plugged it into my Raspberry Pi and was able to read the pH levels with cat /dev/ttyACM0. I suppose now if I enable SSH I could remote in to the RPi from anywhere, provided I can access my home's LAN, and check what the pH levels are. While that's sort of cool I don't think it's all that useful, but it does sort of pave the way for additional sensors.
My next step will be to see if I can figure out how to take the output from /dev/ttyACM0 and use it in a script or program. I'm presuming I'll need to assign the output / device to a string which can then be called on. I also haven't figured out how to send arguments to it either, some forums suggested trying to echo a character to the device like this: echo "E" > /dev/ttyACM0
That should have stopped the continuous readings but nothing happened, if I want to change what the sensor is doing I have to connect it back to my desktop and send the arguments through the Arduino IDE serial monitor. Will update again if I make any more progress, thanks for sticking around!
-
Still no pH probe
05/25/2015 at 00:04 • 0 commentsMy Teensy-LC came in the mail (thanks guys!) and I immediately soldered some pins onto it for breadboard testing. After some light reading I got everything up and running inside the Arduino IDE and was ready to test my Atlas pH probe, unfortunately there wasn't much testing to be done since I immediately ran into the same problem I had with the Raspberry Pi. Despite having the correct wiring as per Atlas Scientific's documentation I'm unable to get any sort of response from the probe over UART, I even threw it onto a Mega 2560 just to recreate their documents exactly and got the same results. I'll be contacting their technical support and hopefully I can get this resolved, in the meantime I'll be doing some research on other sensors and getting more savvy with writing programs.
-
Teensy-LC, could it be?
05/13/2015 at 22:32 • 0 commentsMaybe! We'll see.
At least for me... Okay enough of that.To be blunt, I don't have a lot of hardware experience but I've always had an interest. I'm using aquaponics as my "excuse" to learn how to use computer hardware in order to automate some of the processes and output readings so I know what's going on. In short, I've got 2 or 3 variables in my garden that I would like to have accurate readings for using a couple of different sensors. Being able to read things like pH, nitrate levels, dissolved oxygen, C02, and flow rate are the first things I need to figure out before any additional automation can happen.
I don't have the expertise to do anything in the way of customized PCB, so I've been looking into Raspberry Pi and Ardunio boards for i/o over serial connections. I've had some success but I think that the Teensy-LC would be perfect for this while keeping the overhead of costs and power down. Having three serial connections in such a small package is awesome. I was considering buying a more expensive Arduino 2560, but after learning about this it could be exactly what I need at half of the cost. If possible I would like to set this up with multiple sensors, have it output to an RPi and push that information on to the internet where I can keep track of everything on my phone while I'm away. If I get to the point where this is all up and running the next step would be controlling it remotely, features like changing the water pump timing, light control, flow rate control, feeding times and levels, C02 release, and an emergency shutoff.
So you know, big dreams and lots of work ahead!
Bonus Garden update:When I was having issues with leaks I wasn't running the pump as much, seriously stunting the growth of my new tomatoes. However since my last update 2.5 weeks ago they've almost doubled in height, my tallest plant (closest to the window) measured in at around 12-14 inches last time and now it's up to 23! I'll be trellising them up on the ceiling which should look pretty cool in about a month, I honestly may be in over my head here (puns win hackaday contests, right?). I don't have sensors at the moment so I have no idea what the nitrate or ammonia levels are like, but apparently it's working.
-
UPDATE: April 26th, 2015
04/26/2015 at 19:28 • 0 commentsI've been pretty busy lately with other projects and work, but I'm not going to let this one fall into the aether!
If I had known how awful vinyl hoses and plastic couplings are to work with when I started experimenting with aquaponics I would have steered clear from the beginning. The most recent change I made to my system was replacing my leaky drain hoses with much more reliable bulkheads and water potable pipes.
Here's what it looked like before, it's a mess of vinyl, silicone, bondo (was getting desperate), and when it all failed I had plastic liner to catch the leaks. I wasn't using proper bulkheads with rubber seals and instead relied on holes drilled through the bottom with silicone to prevent water from leaking around the edge of the hose. As it turns out, silicone doesn't like to bond with smooth HDPE liner, because of this I had tons of leaks to deal with on a regular basis.
Here's the new stuff, getting to the hardware store is pretty inconvenient for me and of course you can't make just one trip and expect everything to fit. Or at least in my case, I guess measure twice cut once hasn't resonated with me yet. But since I didn't want to go back I did some improvising with a hacksaw and gorilla glue, so far it's working well!
I have to say, investing in a GOOD set of hole saw bits would have saved me from a lot of frustration. I actually broke the guide bit and bent one saw from trying to do a quick job. But at least I got it done, it still doesn't scream 'designer asthetics' but compared to what it used to be it's muuuch better in form and function.
And just an update on what I'm actually growing, the kale is growing at a steady pace and my tomatoes have shot up surprisingly quickly. I'd like to start logging growth tracking correlations with environmental factors (C02, ammonia levels, more daylight with spring etc) once I can get some sensors working. As for right now I may just start keeping track of size.
Tomatoes after about 1.5 months:
I threw an aloe plant in just to see what would happen, I'm really a novice gardener and don't know anything about most plants. But that's what makes it fun, right? I thought that it might be similar to a cactus where too much water could kill it, but from what I can tell it's thriving and quite plump.
And finally, I'm getting closer with my Raspberry Pi PH sensor kit from Atlas Scientific. I've got it all wired up and ran some Python scripts, unfortunately with all of the documentation out there I can't seem to get it to read properly. I've got it in UART mode and I can control the LED (off and on) but beyond that no dice. I'm following this guide here so I'm not sure how accurate it is, I may just need to contact Atlas and have them help with the troubleshooting: http://www.instructables.com/id/Atlas-Scientific-and-Raspberry-Pi/?ALLSTEPS
I'm still only about 75% satisfied with my system, if I had the time I'd build another one from scratch with everything I've learned. With the automation I'd like to get pH readings, dissolved O2/C02, and flow rate. There's also some hydroponics company out there who developed application software specifically for reading this kind of stuff, I'm blanking on the name but will update as soon as I remember. I bought a ton of LDPE liner to replace the HDPE, it's much easier to work with and will still get the job done. I'll be rebuilding the trays pretty soon here to ensure that there won't be any leaks, seeing as I'm on the second floor of an apartment (that I don't own) I get pretty anxious about the thought of dropping gallons of water on the floor while I'm not home.
-
TO-DO List
03/11/2015 at 20:27 • 0 commentsMarch 11th, 2015
- Raspberry PI configured with Atlas Scientific PH monitor
- Automated fish feeder
- Nitrate / ammonia monitor
- Automatic RSS/live Twitter updates from PI board
- Change the tray draining method, far too often there are leaks due to the silicone coming loose