Wired or Wireless?

Electricity replaces the sun, wind, and some natural processes as the dependency for plants to grow indoors.  

Starting a Smart Indoor Garden

The first glaring problem with the typical indoor garden is that extension wires are annoying and a potential safety hazard.  On the other hand, wireless communications can lack the reliability of the wired variant.  Going further, should the system be available to the local network or should it be connected to the Internet?

Since plants do not need Internet access in order to grow then we are potentially creating an additional dependency that the plant doesn’t want. The Internet is useful for providing access to your system, but security is questionable, how much control or data should be available?  A connection to the Internet can become another dependency if the system cannot operate without communication to a cloud-based or otherwise remote server. If something can fail; we should plan for the eventual occurrence of that possibility as best as possible. If a long electrical outage were to occur it would be prudent to have a backup generator, or solar rechargeable battery storage system.  If we can have better reliability with a wired connection, then it makes sense to use a combination of wired and wireless.

Next:  Getting Wired and Wireless

Communication options such as i2c, which is great for communicating with another microcontroller or Raspberry Pi and the many wireless options: WiFi, bluetooth, etc.

  • Remote Control using a RF 315MHz / 433MHz
  • Lightweight Bluetooth ( nRF24L01 )
  • Bluetooth ( HC-05 )
  • WiFi Module ( ESP8266 / CC3000 ) etc.

More Info:

Please share with friends and follow to receive a notification when I publish a new article.

 

Why Arduino when you can Pi?

Arduino
Arduino ProMini, Uno, and Nano on expansion board.

Why Arduino?

The greatest advantage to using the Arduino family of microcontrollers for DIY electronics projects, is that they are ubiquitous.  Since they are so available, they are inexpensive and you can find open-source software to get started.

If you’ve ever had the opportunity to work with an Arduino Uno microcontroller board, then you’ve probably executed the flashing LED example.  Going further, you might attach a button, or switch, to trigger the LED or to turn it off making the project interactive.  There are many sensors that could be connected to the Arduino Uno and setup to trigger events, such as the LED flashing, using threshold values that we would need to experiment with in order to figure out what settings work best for creating the effect we want.

While the examples that come with the Arduino software and the examples included with libraries are an excellent start to a project; the Arduino family of microcontrollers is often grossly underutilized in many projects.  Sure microcontrollers are limited in how many instructions they can run; hitting the program size limit doesn’t take very long when you want to control more than a few blinking LEDs.  Even with creative variable handling and custom libraries, eventually, there is a need for another microcontroller or to move to a larger one, even a Raspberry Pi.

In my Alien Invasion Slot Machine project, I tried to push the Arduino closer to its limits.

Time Management and state and trigger flagsf0zk2etiagml1az-medium

At its most basic, a microcontroller loops through a set of instructions handling each action with the focus of The Red Eye of Sauron from Lord of the Rings.  There are a few interrupts that can be configured should an event be so important to receive the full attention of the microcontroller.  Using some form of time management creates a state machine. If x amount of time has passed since x event, then do something and so on…

“The behavior of state machines can be observed in many devices in modern society that perform a predetermined sequence of actions depending on a sequence of events with which they are presented. Simple examples are vending machines, which dispense products when the proper combination of coins is deposited, elevators, whose sequence of stops is determined by the floors requested by riders, traffic lights, which change sequence when cars are waiting, and combination locks, which require the input of combination numbers in the proper order.” https://en.wikipedia.org/wiki/Finite-state_machine

There are rare instances where: RTOS, AI, neural networks exist on microcontrollers, but that’s best left to software-oriented systems such as a Raspberry Pi.

After trying many different timer and time management libraries I felt they were either too much or not enough of what I was wanting in my timers.  A set of timers that are easy to set, keep track of their own state, and each have their own trigger flags.

Button assumptions

buttons

Interacting with an electronics device such as a microcontroller or computer system is relatively easy and typically provided as an example for developers looking to use the device in their project.  Press a button and an LED illuminates. A button or switch may seem like a simple sensor input, but it’s not.

The device’s system resources are consumed waiting and watching for a button press. When we use a button in a project we typically think of it being activated when pressed.  Then what? What should happen if the user holds the button in the active position? Will the button be counted as pressed once, or is the program going to count each second, or x amount of time, as another button press?  Does the program need to know that the button has been released?

Hardware and wiring

wiring harness

Rather than using the Arduino Uno and a protoboard or breadboard for this project, I’m using the Arduino Nano on an expansion board.  Keep it simple using common wiring colors, keep it modular so connections can be made with ease, keep your project sustainable; a part can be replaced rather than the entire system.  The DuPont wire connectors that come with prototyping starter kits makes it easy to create your own custom wiring connections. The wires are easy to solder when a more permanent connection is needed.  I make custom wiring harnesses for neater, cleaner, and more easily connectable modules.

 

Raspberry Pipi3

The latest version of the Raspberry Pi v3 uses a Linux OS and is a computer that can do so much more than an Arduino Uno, why not just use it for everything?  While it is possible to do many of the same tasks as you would do with the Arduino Uno or variant, it’s not always best.  The Arduino Uno and variant microcontrollers are best for doing the same actions, over and over again, such as reading a sensor and doing something with the value.

As I mentioned previously, you can do a lot with a Raspberry Pi, and depending on how much you are doing, it won’t take too long before you discover it has limits.  When the Pi overheats, it will either freeze or shutdown, hopefully, the processor has a heatsink.

More Info:

Please share with friends and follow to receive a notification when I publish a new article.

Maintaining your Indoor Garden

What needs monitoring?  What needs to be done to make sure plants grow well?

Research your plant’s needs.  Many cool weather plants typically enjoy temperature​s in the day of ​70°-­75°F​, and night ​55°-­60°F​ with a relative-humidity​ of ​40%-­60%​ for most growing plants.  A water and nutrient solution system should have a temperature between ​18­-21°​C (​64­-70°​F).  These factors vary depending on variety, selection, phase of growth that the plants are currently growing, and hardiness, some plants can tolerate stress better than others.

Ongoing Garden Maintenance

  • Keep Environment Clean​: Helps prevent contaminating plants and a clean space is easier to  work in.
  • Check for plants for signs of insufficient light,​ e.g. sparse, spindly foliage or foliage that is being shaded by other plants.  An indicator that the plants are too close to the lights will be signs of​ ​leaf burn ​on foliage closest to the lamp. Check height of lights​ compared to the height of the plant, maintain lamps ​12-­36 inches​ above plants! Rotate or turn plants​ as needed to get uniform growth and check top and underside of leaves​ for likely signs of disease, insects or nutrient deficiency. bugPrune regularly.​  Promptly remove and dispose of any dead, dying or diseased foliage in the growing area​.​ Conduct any necessary shaping, training, or stressing of branches and ensure foliage is properly supported (via string, netting or stakes) optional foliar spraying and apply optional additives, e.g. compost tea.
  • Check Lights are operating properly and timer is correctly programmed for the given phase of growth and electrical connections/plugs to make sure they are connected properly and not in danger coming into contact with water.
  • Air Circulation and Ventilation​: Proper circulation will prevent dead zones of bad and/or cold  air at lower levels and hot layers of air near the ceiling. Ventilation and oscillating fans are covering all foliage, especially those closest to the lamp.
  • Check Ambient Temperature and Relative-Humidity;  Check walls and ceilings regularly for mold or  condensation.
  • Check roots​/medium at various points for signs of disease, rotting or molding materials,  insects or over/under watering.

hydroponics systems: image08

  • Check nutrient solution temperature.
  • Check for plumbing leaks​; pooling in trays/channels/pots.
  • Check drainage​ and/or feed outlets (drippers) are not being blocked by roots.
  • Check pumps and timers​ to ensure they’re working properly. Ensure nutrient schedule  appropriate for the current phase of growth.
  • Check pH​: Ideal pH for ​most​ plants is between ​5.5​ and ​6.5
  • Check/adjust ​Electrical ​­​Conductivity.​  Add top­-up water​ as needed. (​Use EC meter to measure the strength/concentration of the nutrient solution to keep adequate concentration level.)  ​Discard and replace old nutrient​ every 7-­​14 days.​

plant-needs-chart

More Info:

Please share with friends and follow to receive a notification when I publish a new article.