Posts

Sending Sensor Data to Smartphone over Bluetooth LE (Part 2: Hardware Design and Arduino Sketch)

Image
  In the first part of this article (" Sending Data from Multiple Sensors to Smartphone over Bluetooth LE (Part 1: Open-Source Mobile App) "), I explained how you can build a mobile app to receive data on your smartphone. In part 2, I am going to share details of a hardware setup (electronics) and Arduino sketch that read sensor data and send to the smartphone over Bluetooth LE. Electronic Hardware (Reader) The electronic hardware used here is almost identical to the one described in article below: DIY Reader with 128x64 SSD1306 OLED for APAS T1 Soil Moisture Sensor (Part 1: Electronic Hardware) You can reuse the design; however, you need to make the following changes to the circuitry to be able to use it as a Bluetooth LE device: Instead of the Adafruit M0 Basic/Adalogger, use the Adafruit Feather M0 Bluefruit LE . You do not need an OLED display, because the Arduino sketch sends sensor data to your smartphone instead of the OLED display.    Arduino Sketch The sketch th...

Precision Crop Water Management Using Computer Vision

Image
  Over the years, I have come across several publications describing the use of RGB and multispectral imaging to determine crop coefficient based on canopy cover percentage and relating it to crop water use. In almost all of those studies, the authors have described camera setups that are only used to manually capture images. The images are processed later in the lab. I yet to see an affordable automated system that exploits this concept.  In my opinion, there are two fields that can heavily exploit this: plant breeding (in high-throughput phenotyping) and controlled environment agriculture. However, the jump from manual in-field measurements to the solve-every-problem-using-AI approach has overshadowed simpler, more useful concepts like this one. This is partly because, most data scientists breath, drink and eat Python (or other programming languages), statistics, and ML/DL so heavily that there is no room for basic physics and crop physiology concepts.  This is partly b...

Agronomists' C++ Toolkit: CWSI & Transpiration Biophysical Models

Image
  This post offers a starting point for sharing my embedded software code ( GitHub repository: https://github.com/envitronicslab/CWSI_Function ) in C/C++ used in a system you can learn more about here . While the full codebase needs some cleanup, I'm excited to share this initial, modular piece that calculates plant transpiration.     𝗞𝗲𝘆 𝗙𝗲𝗮𝘁𝘂𝗿𝗲𝘀  𝗖𝗮𝗹𝗰𝘂𝗹𝗮𝘁𝗲𝘀 𝗮𝗰𝘁𝘂𝗮𝗹 (𝗧𝗮) 𝗮𝗻𝗱 𝗽𝗼𝘁𝗲𝗻𝘁𝗶𝗮𝗹 (𝗧𝗽) 𝘁𝗿𝗮𝗻𝘀𝗽𝗶𝗿𝗮𝘁𝗶𝗼𝗻: This code uses biophysical models to analyze microclimate and plant canopy surface temperature data to determine transpiration rates.  𝗖𝗿𝗼𝗽 𝗪𝗮𝘁𝗲𝗿 𝗦𝘁𝗿𝗲𝘀𝘀 𝗜𝗻𝗱𝗲𝘅 (𝗖𝗪𝗦𝗜): Ta and Tp can be used further to calculate CWSI, an indicator of plant stress.  𝗠𝗼𝗱𝘂𝗹𝗮𝗿 𝗮𝗻𝗱 𝗿𝗲𝘂𝘀𝗮𝗯𝗹𝗲: The code is well-organized with equations grouped within a class for easy integration into other projects.  𝗘𝘅𝗮𝗺𝗽𝗹𝗲 𝗮𝗻𝗱 𝘁𝗲𝘀𝘁𝗶𝗻𝗴 𝗰𝗼𝗱𝗲: Additional code snippets are includ...

Cultivating Confusion: How AI Research is Misguidedly Transforming Agricultural Innovation

Image
Years ago, the editor of a prominent U.S. agricultural journal showed me a manuscript he intended to reject solely because it focused on applications of "artificial neural networks" in agriculture. He expressed weariness at the influx of such papers, particularly from researchers in developing countries. At that time, machine learning research was virtually nonexistent within our department. Ironically, I recently received a manuscript on the same topic for review, co-authored by the same individual. Today, a significant portion of the research papers I review in agriculture focus on the applications of machine or deep learning. However, a notable shift has emerged: a substantial increase in submissions from computer scientists or electrical engineers. While I acknowledge their enthusiasm, I often find these papers lack a deep understanding of the unique challenges and complexities of the agricultural domain. It's perplexing to me how researchers with primary expertise in...

Data Privacy Risks in 5G-Enabled Agriculture

Image
The 5G revolution is sweeping across sectors, and agriculture is no exception. High-bandwidth 5G enables live streams from farm cameras, drone footage, and the seamless flow of data to the cloud. This sounds promising – AI-powered analytics, precision farming, and even robotic farmhands! But beneath the surface lurks a familiar concern: data privacy. The allure of 5G lies in its potential to unlock unprecedented insights. By feeding farm data into sophisticated AI models, the promise is of hyper-efficient operations, maximizing yields, and minimizing waste. But this efficiency comes at a cost. The data, often collected by a handful of tech giants, could become a valuable commodity, potentially used for purposes beyond the farmer's control. Enter "edge computing." Unlike traditional cloud computing, where data is processed in remote data centers, edge computing brings processing power closer to the source – the farm itself. This reduces latency, enhances security, and cruc...

Real-Time Monitoring of Data from Multiple Sensors on a Webpage using Node-RED

Image
  In this article, I will explain how to display real-time data from different sensors on a web page using Node-RED in a few easy steps. I will also cover how to save incoming real-time data on a 'csv' file. I will provide a link to the GitHub repository holding the source code (JSON script) at the end of the article so you don't have to worry about writing any lines of codes. You can run Node-RED on pretty much any platform supported by Node-RED including your local computer, or single-board computers such as a Raspberry Pi or BeagleBone . So, please feel free to pick wherever you want to run Node-RED. For the purpose of this tutorial, however, I'm going to install Node-RED on Windows 10 on my computer. The content of this article applies to all platforms, so continue reading.     To keep my post short, I have avoided detailed explanations on how different components of Node-RED work, and instead provided link to some of the available resources. Update: I have a ...