Close

We have a reading!

A project log for AAGriculture (Automated Aquaponic Garden)

An ongoing attempt to subsidize my foodly needs and maybe provide a template for others to use for their own homes.

justinjustin 05/25/2015 at 23:220 Comments

It 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!

Discussions