Applying artificial intelligence to practical operations such as greenhouse and manufacturing automation requires industrial-grade local controllers with the flexibility to connect to field devices and the cloud.
Finding ways to make manufacturing operations more efficient by combining advanced technologies with conventional proven experience is a passion for the Koidra system-integration team. To put our principles into practice, we have been following an approach of applying the latest artificial intelligence (AI) concepts to age-old agricultural practices, connecting the two approaches using Internet of Things (IoT) methods to optimize greenhouse control for maximum production. The resulting artificial intelligence of things (AIoT) is proving just how positive the results can be when these concepts are combined and applied.
Also read: PLC vs. Arduino or industrial control
With AIoT, we are working to disrupt traditional industrial automation practices with a new model, applicable to industries of all types. But to do so, we needed more advanced computing capabilities at the industrial edge. This is not for hosting or running the AI algorithms, but instead to work seamlessly with the higher-level computing systems. We applied a new class of industrialized controller to efficiently reach these goals and deliver value to our customers.
Future farming
The Koidra team could see the potential for AIoT—while recognizing some roadblocks with traditional technologies—and set out to fill the gap between the factory and higher-level computing. Factory automation is commonly based on standard programmable logic controllers (PLCs), local human-machine interfaces (HMIs) and in some cases distributed supervisory control and data acquisition (SCADA) systems. The results are reliable but are typically developed by plant engineers and technicians using specialized languages such as ladder logic. While ladder logic is an effective automated controls programming method, its dedicated nature is far less suitable for integrating with higher-level computing systems than more modern languages are. Traditional PLCs lack the agility, programmer productivity and development scalability needed for effectively interacting with sophisticated next-generation AI computing workloads, which are best deployed on the cloud. However, we discovered there are PLC solutions that can meet the need.
Software engineers working on advanced applications such as AI are most familiar with more modern programming frameworks. While providing powerful capabilities, this approach typically lacks some fundamentals needed for safely performing real-time control, such as hardwired I/O and fieldbus connectivity to field devices, always-on reliability and robust form factors.
As a proof of concept, the team targeted greenhouse control for the agricultural industry (Figure 1). This application was attractive for many reasons:
- Slower required response times made it easier to prove the technology.
- Many types of variables, including LED and HPS lighting, ventilation, humidity, irrigation and carbon dioxide, need to be monitored and controlled.
- Some physical aspects, such as plant spacing, require control.
- Different crops require a variety of strategies.
Advanced greenhouse control is an interesting test bed and involves a lot of physics and science, with many intertwined variables
Solution takes root
Unlike most other system integrators, Koidra was born as an AI company and as such wanted to apply resources mostly at a high level. However, getting the low-level electrical and mechanical details correct was essential. The AI would be used for macro control, and it would be based in the cloud to the greatest extent possible. However, local controllers needed to survive at the edge, connect with all field devices, execute strategies reliably and communicate with the cloud.
To avoid custom hardware development and experimentation, the team searched for a controller and associated ecosystem of products. There was a strong preference to use controllers such as Arduino or Raspberry Pi because they can host modern programming languages. However, few industrialized options were found, and those that were available were constrained by connectivity limitations and not supported by sufficiently established companies.
An additional complication is that many environmental sensor devices are not compatible with typical industrial control voltage/current levels or communication protocols. Two examples of the latter are SDI-12 and I2C, common for environmental sensors but not supported by traditional industrial control platforms. For greenhouse applications, data density is important—there is a need for many sensors, which also means they must be relatively low cost. Some sensors, such as those used to detect soil moisture, have no direct industrial equivalent.
Based on all these considerations, Koidra selected the AutomationDirect ProductivityOpen controller family to solve the field control needs. The controller is Arduino-compatible and is packaged in an industrial form factor and carries the appropriate industry ratings. It uses industrial I/O modules, yet it can also integrate with Arduino shields.
This controller and associated products provide the required real-time control at the field level, while giving developers the ability to program using familiar languages—such as C++.
Cultivating the application
Due to the physical size of a greenhouse, the team would need many small control panels distributed throughout the area. The AI systems would evaluate all data supplied by these control panels, then determine optimal setpoints and communicate them to the control panel so the controller could execute the PID loops and other control strategies as needed to drive equipment (Figure 2).
The team designed the controller into a standardized panel dubbed a “µcontroller,” which could be configured with wired I/O modules and/or serial ports as needed for local device connectivity (Figure 3). The hardware stack uses a combination of analog input and serial cards to collect sensor data from a mixture of research grade, automotive and industrial sensors at each of the many small control panels distributed through the greenhouse.
For each variable to be monitored, the ideal sensor was chosen to optimize cost and accuracy, instead of committing to a single product ecosystem. For example, an automotive CO2 sensor is integrated alongside industrial infrared thermometers and a research-grade photosynthetically active radiation sensor using analog inputs. Other environmental variables monitored include air temperature and humidity, net radiation balance between the greenhouse and outdoor environment, nutrient solution pH and electrical conductivity and soil moisture. The ProductivityOpen general-purpose input/output (GPIO) card allows use of the Arduino I2C (inter-integrated circuit protocol) and universal asynchronous receiver-transmitter (UART) interface for digital sensors such as the soil moisture sensors. Each panel is connected via Ethernet to the local greenhouse network for transmission of data to the cloud.
The benefits of the controller platform extended well beyond the hardware design because the entire programming team could use C++ and the software source control methods. This improved the development, tracking, executing, deploying and re-using of work.
The wealth of available and transmitted data gave the team the information required to create the visualization, analytics and reporting necessary for control and optimization of the greenhouse (Figure 4). Data dashboards were available via the Web and mobile apps. Using AutomationDirect’s controller and software stack enabled the team to deploy a new datalogging and automation project with relatively little deployment time and at low cost.
Advanced AI techniques for greenhouse automation can act on anomaly detection, local climate forecasts, pest/disease detection, prediction of plant traits, and much more in support of optimized autonomous growing.
Harvesting results
In early 2021, a win at the Autonomous Greenhouse Challenge (AGC) demonstrated the capability to detect growth parameters of a virtual lettuce crop and automatically determine setpoints to maximize the net profit. This will enable the team to compete in the physical growing phase of the AGC starting in early 2022. Another initial implementation has been for growing eggplants, and several other client trials are ongoing. The technology and concepts are applicable to many other types of crops, even those that are delicate or have special growing characteristics. Other good candidates are tomatoes, peppers and strawberries.
More importantly, the approach of using modern Arduino-compatible industrial controllers to easily integrate cloud-based AI with flexible and proven field automation technology is applicable to a wide range of industries beyond agriculture. End users have more choices for introducing IoT and advanced computing methods to even the most traditional automation applications. The IoT market is growing fast, and interoperable solutions will be key to accelerating adoption and creating advanced solutions.
About the authors
Quade Digweed is an engineer in training at Agriculture and Agri-Food Canada, where he supports controlled environment agriculture research and development. He holds a bachelor of engineering in mechanical engineering and a diploma in engineering technology from Lakehead University. Contact him at [email protected].
Leaders relevant to this article: