I’ve recently embarked upon a project that I’ve wanted to do for a while. My overall plan is to have 3 planting shelves; each will have its own soil moisture sensor, water pipe and LED lighting. The basic premise of the project is that the LEDs will turn on for a certain amount of time each day; this is the simple part of the project. However, the second part of the project is to read the soil moisture sensors periodically, and then water each tray if required. Watering will be done via relay activation for an individual tray if the moisture level is too low.

After some research, I learned there is no built in analogue input on the raspberry pi. This led me here - to a device that looks perfect for my project.

I am aware that this project may be better suited for an Arduino, or a device such as the NodeMCU as the computational requirements are not too demanding, it doesn’t require WiFi and is far easier to get analogue inputs. However, I have virtually no experience with programming in C, but have much more experience in Bash scripting. In other words, the availability of a familiar programming language drives the decision to use the Raspberry Pi.

Here are the parts I am going to order:

Below, I have attached a schematic of how I think it should all be wired up at the moment. I would really appreciate it if someone could look over the diagram and let me know if it looks okay. One of my main concerns is whether it will be okay to run 3 moisture sensors off the same 5V out pin.

Wiring diagram

  • 1
    Welcome. I removed your "p.s" since invitations to brainstorm on a range of tangential topics do not suit our format. To understand better, please take the tour and read "What types of questions should I avoid asking?".
    – goldilocks
    Jun 26 '18 at 15:29
  • 1
    Casual note: "an Arduino such as the NodeMCU" -> The latter is not any sort of the former, perhaps you meant "or a" instead of "such as the".
    – goldilocks
    Jun 26 '18 at 15:31
  • @goldilocks Thanks for your replies and your edits. Apologies for the P.S. section, I wasn’t aware of that but I’ll have a look over the guidelines for future reference. Sorry just assumed the NodeMCU was a type of arduino as it is programmed from the IDE... goes to show my lack of experience with arduinos!
    – Tom
    Jun 26 '18 at 15:40
  • To clarify NodeMCU a bit: It's actually more firmware than device. The microcontroller it runs on is an ESP8266, which, using the normal firmware, does have an Arduino IDE interface. However, NodeMCU does not; it runs a lua interpreter. Because there are ESP8266 packages with NodeMCU installed sold as NodeMCU boards (to which you can flash any firmware you want), and these tend to be nicer units than a lot of ESP8266 boards, I think there is a some confusion about this online.
    – goldilocks
    Jun 26 '18 at 16:14
  • 1
    Your diagram would be best portrayed using the "Schematic Tool" provided - it's the icon at the top of your edit box just to the left of the "Ordered List" icon (1---2---3---).
    – Seamus
    Jun 26 '18 at 18:33

The proposed wiring appears okay.

I can't comment on the P.S. about the e-ink display as I have no experience of their use.

  • Thanks for looking over the wiring! Do you think it would be alright to power the 3 sensors off the same 5v our pin then? (No worries about the display, I’ll do some more research)
    – Tom
    Jun 26 '18 at 15:36
  • The devices don't declare their current usage so no guarantee. However I'd be surprised if they needed more than a few milliamps each so there should be no problem.
    – joan
    Jun 26 '18 at 17:16
  • Okay thank you for your help! I’ll do some searching around online to see if other, similar, moisture sensors declare their current usage
    – Tom
    Jun 26 '18 at 17:22
  • 1
    The proposed Arduino relays have 05VDC markings, and may not work with Pi 3.3V GPIO signal levels. If you experience relay issues, your chosen vendor does have 3.3V relays (see "FeatherWing").
    – OyaMist
    Jun 26 '18 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.