alfadriver
alfadriver MegaDork
1/27/17 1:19 p.m.

So given my dislike of working on my iPhone, and not wanting to make my own computer, this may be a little odd of a thread to start...

I've mentioned my hydroponics garden, more than once. With that, it would be really nice to have a computer running it....

In stages:

-running two pumps independently.
- measuring pH, EC, and temp in the water, as well as tower temps.
-Tell me the above, somehow.
-alter the control of the pumps based on the inputs
- add chemicals (5) and water to my tank.

A friend of mine suggests using an Arduino Mega to do that- as it's quite powerful. And I may go down that path.

But back in 2011, I collected a bunch of parts to make a data acquisition system for my racecar. That didn't happen for a number of reasons- the biggest being that I stopped racing. But either way..

I have a Paralax Propeller Prototype board, an 8 channel I/O chip and some other stuff from that project.

Seems like I should be able to do the basic controller using that.

Has anyone else played with one of those Propeller proto systems?

RossD
RossD UltimaDork
1/27/17 1:37 p.m.

I'd do a Raspberry Pi. Nice and cheap. It has GPIO built in, direct interface with the programming, rather than plugging the Arduino into another computer. Plus, you can have a computer around you garden for some web browsing when you're trying to figure out when to harvest this or plant that!

Then I'd start looking at adafruit for the sensors and how to use'em

alfadriver
alfadriver MegaDork
1/27/17 1:45 p.m.

In reply to RossD:

I get the idea of getting something new.

But before I want to go down that path- bird in the hand here- I've got that parallax board that should work, I think.

alfadriver
alfadriver MegaDork
1/27/17 2:01 p.m.
RossD wrote: I'd do a Raspberry Pi. Nice and cheap. It has GPIO built in, direct interface with the programming, rather than plugging the Arduino into another computer. Plus, you can have a computer around you garden for some web browsing when you're trying to figure out when to harvest this or plant that! Then I'd start looking at adafruit for the sensors and how to use'em

But... a little looking on line, and now I'm really confused. One wonders why I don't want to build a computer... LOL

What I don't understand is why Raspberry Pi vs Arduino?

One project on line uses a R-pi plus two Arduino uno boards. I see someone doing a stand alone arduino system for themselves, and my quick looking makes me think I can make the Parallax board work.

What's the difference between the systems? Can I actually drive 8 outputs and have 5-8 analog inputs with a Pi system?

It looks to me, all systems require some kind of interface with a computer. The one major advantage, I think, appears that the Pi set up is already set to talk to my phone.

So many options, so many confusions.

RossD
RossD UltimaDork
1/27/17 2:11 p.m.

The RPi is a computer with an operating system that can have a monitor, keyboard, mouse, most USB devices, and wifi connected to it. The Arduino is a microprocessor. The RPi can program an Arduino.

The Raspberry Pi was developed for school kids to learn stuff like this. https://www.raspberrypi.org/resources/

Now, I have a RPi but I've only used it for a computer and as a NES emulator. I've not controlled any GPIO pins yet. So take my posts with a grain of salt. Also, I've never played with a Arduino. So if someone says something contrary to what I said, they are probably right. Either way take a look at the RPi link. Here's another good link for projects for both of the Arduino and RPi https://blog.adafruit.com/

bluej
bluej UltraDork
1/27/17 2:16 p.m.

This another option? https://getchip.com

I bought one on a whim but haven't had time to play yet.

alfadriver
alfadriver MegaDork
1/27/17 2:20 p.m.
RossD wrote: The RPi is a computer with an operating system that can have a monitor, keyboard, mouse, most USB devices, and wifi connected to it. The Arduino is a microprocessor. The RPi can program an Arduino. The Raspberry Pi was developed for school kids to learn stuff like this. https://www.raspberrypi.org/resources/ Now, I have a RPi but I've only used it for a computer and as a NES emulator. I've not controlled any GPIO pins yet. So take my posts with a grain of salt. Also, I've never played with a Arduino. So if someone says something contrary to what I said, they are probably right. Either way take a look at the RPi link. Here's another good link for projects for both of the Arduino and RPi https://blog.adafruit.com/

That last I found a project for what I'm doing- but they moved on. It's 3 arduinos and one Pi- which seems to be way too much.

And I like the idea of one computer doing the whole thing.

RevRico
RevRico Dork
1/27/17 2:20 p.m.

Have you checked the forums at ICmag or rollitup(if rollitup is still around)? Hydroponic gardening is hydroponic gardening regardless of the end product, and I'm willing to bet at least one inventive stoner has logged his automated grow. But you probably don't want to go to those sites at work.

I remember talking to a guy that made automated hydroponic setups for disabled patients at his dispensary back in 2012, but I doubt that the shop is still around and I know I don't have a phone number for him direct. Controlled everything except putting clones into their spots and the final harvest or any infestations, but could handle lights, AC, water chiller, nutrients, and CO2 from a tablet or computer.

alfadriver
alfadriver MegaDork
1/27/17 2:23 p.m.

In reply to RevRico:

Lets put it this way- I'm not busy at work. So, no, I've not been to those sites. Kinda restricts what I can find.

Although, many of their video are why I'm doing one experiment, which isn't related to the controller.

codrus
codrus SuperDork
1/27/17 2:34 p.m.

The Pi and the Arduino are worlds apart in terms of complexity. The Pi is a 64-bit ARM processor running around 1GHz, with a gig of ram, and typically runs Linux booting off an SD card as big as you want it to be. The Arduino is an 8-bit micro controller running at 16MHz, with 2K of ram (or 8K in the mega) and 1K of eeprom. The Arduino is TINY compared to the Pi.

That doesn't, necessarily, mean that the Pi is always better, it depends on what you want to do. The fact that the Arduino is tiny means that it is simple. All of the code on it is code that you wrote (well, plus small libraries you install for specific functions), whereas the Pi is running an entire Linux kernel's worth of code. The Pi takes something like 15-30 seconds to boot after you turn it on, and can fail to boot if the filesystem on the flash card is messed up. An Arudino, OTOH boots effectively instantly, and absent hardware failure is pretty much guaranteed to always do the same thing.

The Arduino offers more I/O pins, and has both digital and analog inputs. The Pi has fewer inputs built-in, and they're all digital. You can add more inputs to the Pi (including analog ones), but you'll need external chips. If you want to connect it to the network and build an "Internet of things" type of device, the Pi is the right choice. If you just want to read some sensors and control a few devices with something that should be invisible, then the Arduino is better.

I have projects running on both an Arduino and a Pi. The Pi is running as a sprinkler controller using some open source software & hardware (opensprinkler.com), so I can schedule my sprinkler using a Google calendar. The Arduino is in my Miata, receiving data from the Megasquirt over a CANbus interface and displaying it on an LCD display in the dash. The Pi sprinkler code is in Python, the Arduino code is all in C.

HappyAndy
HappyAndy PowerDork
1/27/17 3:06 p.m.

In reply to RossD:

I'm going to check out those links for a possible solution to a problem one of my clients is having.

He has an older, highly specialized, electric forklift that has an obsolete interlock logic board. It was rebuilt by a reputable repair company, but failed again. If these devices can run on DC, it may offer a solution.

It needs, I think, 7 on/off inputs to drive 2 outputs, one with a time delay. I know there are some analog signals in there too, but I don't think they are required for the interlock.

Stefan
Stefan MegaDork
1/27/17 3:13 p.m.

If you need sensors or I/O devices for your device, check out SparkFun

There's also Instructables

And Hackaday

Lots of neat microcontroller and coding projects available on those sites whether to copy directly or to gain inspiration from.

BoxheadTim
BoxheadTim MegaDork
1/27/17 3:16 p.m.

The Arduinos - being microcontrollers - aren't necessarily that smart, so a lot of people use the RPi to control the Arduinos. The Arduinos then take care of the specialised stuff.

Another option I would like to throw out are the Onion Omegas. They kinda sit in the middle between Arduinos and RPis. That's all I can tell you about them right now as I haven't managed to actually do anything with mine.

alfadriver
alfadriver MegaDork
1/27/17 9:40 p.m.

In reply to Stefan: LOL- half of my data acq system came from Sparkfun. And one project that's on both instructables and hackaday is one major driver for this project. Great stuff, no question about that!!

alfadriver
alfadriver MegaDork
1/27/17 9:46 p.m.

In reply to codrus:

That's a very good description, and is kind of very helpful.

But I still am not that sure of how to make a Pi work. That may not matter- as I've found a few more projects like I want to do with Pi than for Arduino.

It's not so much an IoT thing, it's more of an ease for me thing. I can get a full fledged Pi that someone has made a project for about $35, or a Arduino Mega for $15 (not a real one, but a good copy). And the work to make the project seems the same in amount- just different.

For someone that's done nothing with computers other than basics, it's a pretty uncomfortable, but exciting decision. If that make sense.

alfadriver
alfadriver MegaDork
1/27/17 9:47 p.m.

In reply to BoxheadTim:

Have to look much more into that. Thanks!

codrus
codrus SuperDork
1/28/17 12:12 a.m.
alfadriver wrote: It's not so much an IoT thing, it's more of an ease for me thing. I can get a full fledged Pi that someone has made a project for about $35, or a Arduino Mega for $15 (not a real one, but a good copy). And the work to make the project seems the same in amount- just different. For someone that's done nothing with computers other than basics, it's a pretty uncomfortable, but exciting decision. If that make sense.

As far as comfort goes, we're not talking about huge investments of money here, so you could just buy both, try it on both, and then use whichever one you decide you like best when you're done. That would certainly be one way to learn the differences! :)

Given what you've described above, I think the data gathering and control aspects would be easier with the Arduino, in particular if you're going to try to meter chemicals into the hydroponics in an "open loop" mode (that is, by timing how long the valves are open without any feedback on how much of the chemical has actually passed through the valve). You probably don't even need a Mega for it, an Uno is probably plenty. The harder part about it is the "tell me about it" side of things. Arduinos are too small to effectively run IP, so your notification system is basically limited to printing stuff on the USB/serial port. This is where the hybrid model of adding a Pi is useful, the Arduino can print status to the serial port, the Pi can read the serial port, interpret that status, and do things like create a web page with info on it, store it in a database so you can analyze historical trends, or email or text you if something needs attention.

alfadriver
alfadriver MegaDork
1/28/17 8:08 a.m.

In reply to codrus:

The comfort thing has nothing to do with money. It's the intimidation of programming- which I have not done at this level for close to 35 years. While I can read code- writing it, making sure that I have all of the right headers and footers for it to keep running- that's the uncomfortable part. Which is why ease is important.

Working a little with my friend- the amount of I/O I would eventually do rules out the UNO. 7 outputs 17 inputs (if I close loop the flow of pretty much everything, which is important for a system using so little water) plus output to another board so that it can broadcast information to me, and finally include solar battery charging. That's also where I run into trouble with the Pi- but my old project has some parts I can use for that- an 8 channel A/D, and my outputs are largely binary.

So I come full circle back to which is easier for me to program and modify.... That's the most intimidating part. (the second most- figuring out which module can do that little of I/O- as it's not clear for many of them, even the sensors are not that bad- there's a great page on a very simple DIY EC meter using a standard US 120V plug- $6 instead of 65-90).

Doc Brown
Doc Brown Dork
1/28/17 9:56 a.m.

I'm a big fan of the Arduino series of micro controllers. They are cheap and easy to learn.
The Chinese knock off's are somewhat problematic in that they use a different USB driver. For a beginner, it it worth the extra few bucks to get a genuine Arduino.

Whether you go with the Arduino or the raspberry, its advisable to purchase the accessories from a reputable source such as Sparkfun or Adafruit. The reason is the suppliers will provide documentation, libraries, and sample source code. Sometimes the cheapo stuff on ebay requires hours of research to configure correctly.

alfadriver
alfadriver MegaDork
1/29/17 7:45 a.m.

Opportunity is making the choice for me. There's a guy out in Jackson who has a Mega and an Uno for sale for $15. Done. We go from here.

Well, assuming we hook up.

You'll need to log in to post.

Our Preferred Partners
NpBmJmkwEqVRq7xG8lOkpcYFtVBFI8lW9mX5ZxiUmZ1lTNoY1Nlmdb0FSQ0duyek