PLC-controlled LED Lighting Gantry Robot

PLC-controlled LED Lighting Gantry Robot

By: Lacey Hunt    Email:

Home Town: Coeur d'Alene, ID    High School: Coeur d'Alene High School, 2020

Major: Computer Science, Mathematics-App Computatn Opt
Department: Computer Science
College: College of Engineering

Abstract — Programmable Logic Controllers (PLCs) are tools that often act as an area where mechanical engineering and computer science partner to further research in the field of industrial automation. The application of industrial automation techniques to precision agriculture is an area of large importance for researchers and farmers, allowing for technology and automation to improve the profitability and sustainability of modern farms. The University of Idaho Computer Science department, in order to contribute to this research, purchased and assembled two automated farming robots (FarmBots). One of these FarmBots has been successfully autonomously growing crops indoors using light from a temporary lighting system. This project aims to design and implement a PLC-controlled six-panel LED (light-emitting diode) lighting gantry robot with variable heights to replace the aforementioned temporary lighting system in collaboration with a team of mechanical engineering students. This new lighting gantry robot will have the ability to ‘grow’ with the crops to accommodate for multiple types of plants that have specific lighting needs and avoid collisions with the main FarmBot gantry. A Python control module will be built to communicate with the FarmBot using API (application programming interface) requests to the online server and read/write to the PLC using Modbus TCP. Once tested and implemented, this application of industrial automation techniques to precision agriculture will act as a launchpad for continuing mechanical engineering and computer science research.

An automated farming robot (FarmBot) purchased thanks to a donation by John Stone to the Coeur d’Alene Robotics Fund has been successful in autonomously growing crops indoors using light from a stationary, temporary lighting system since January 2022. FarmBot operates using a web-based application hosted by the parent company. Its gantry navigates the raised garden bed using cartesian coordinate system​, has a camera and interchangeable heads for specific applications​, and allows for custom regimens for autonomous plant care.

Operational FarmBot with temporary lighting setup
FarmBot web-based application

This project aims to design and implement a PLC (programmable logic controller)-controlled LED (light-emitting diode) lighting gantry robot to replace the current lighting setup. This will allow FarmBot to grow different types of plants at varying stages of maturity, accommodating for the specific lighting needs of the plants. This new lighting gantry robot will consist of six LED grow light panels suspended above the FarmBot raised bed, lowered and raised by servo motor pulleys powered by the PLC. In order to avoid collisions with the main farming gantry, communication with the FarmBot brain (bypassing the web-based application) must be established.

Sketch of the new lighting system gantry robot

Originally, the transfer the operation of the FarmBot from a web-based public server to a private server was planned. This would allow for direct communication with and software modification to the FarmBot brain to detect potential collisions with the new lighting gantry robot. Upon research, this transfer proved to be more complicated and expensive than expected and was not feasible given the allotted time available. API requests to the remote FarmBot server, however, seemed to be a viable alternative solution, allowing for communication to the FarmBot that bypasses the web-based application. Postman was initially used to receive an authentication token to be used to establish a connection with the FarmBot brain.

Sample authentication token on Postman

In order to integrate the lighting gantry robot PLC into the existing FarmBot software, a control module will be built in Python programming language to allow inadvertent communication between the PLC lighting gantry robot and FarmBot. The Python control module will communicate with the PLC using Modbus TCP. This communication link allows for values relating to the lighting gantry robot to be read from and written to ( R and W, respectively). These variables include the limit switch values (R, tell if the light panels are out of the way of the FarmBot gantry), and the height of each panel (R and W). These variables are used to control the height of each panel and create a safety net to avoid collisions. The Python control module, in addition to communicating with the PLC, will send commands to the preexisting FarmBot cloud server using the aforementioned API requests. This communication structure will manage the movement of the lights so FarmBot will be able to continue autonomous plant care as normal and avoid collisions between the light panels and the main FarmBot gantry.

Communication structure with Python Control Module implemented

Currently, the Python Control Module has the ability to control the FarmBot main gantry using FarmBot’s Python API wrapper. The next step is to transport the lighting gantry robot up to Coeur d’Alene from Moscow for installation, which is scheduled for May 2nd. During this time, the Modbus TCP connections will be added to the Python Control Module for testing, and last-minute adjustments will be made.

Sample Python Control Module Program to move FarmBot main gantry

Thank you to the Mechanical Engineering students who worked to design and build the lighting gantry: Robert Carne, Senami Hodonu, and Kathryn Reece. Thank you to Garrett Wells, a CS masters student for his help researching the API request aspect of the communication structure.​

The original FarmBot was purchased by a donation made by John Stone to the Coeur d’Alene Robotics Fund, and the latter lighting gantry research and assembly was funded by an OUR award Spring 2023.

About Lacey Hunt

I am a fourth year student pursuing my Bachelors in Computer Science with a minor in Mathematics. I have some background in Mechanical Engineering and Physics, which has encouraged my interest in robotics. I am currently working for the University as an Undergraduate Researcher at the Center for Intelligent Industrial Robotics in Coeur d'Alene. Here, I have been given the opportunity to work with graduate CS students observing and assisting with various projects in the fields of Precision Agriculture and Industrial Robotics. I enjoy tutoring in mathematics and engineering physics, and find myself most engaged when I am in a position where I get to learn something new.


Products Produced:

Type: Title: Date Published/Presented: DOI:
Poster PLC-controlled LED Lighting Gantry Robot

Additional Project Information:

Year in College Project Started:  Junior

Faculty Advisor:   John  Shovic

Faculty Advisor Email:

Faculty Advisor Website:  

Funding Source:  Office of Undergraduate Research

External Link to Project Information:  

Project Location:   Coeur d'Alene, Moscow