25 meter HypeRail + eGreenhouse

Abstract: The HyperRail was modified to be used with the eGreenhouse, a sensor suite for real-time greenhouse monitoring. The system is about 25.5 meters long and is located in the Northwest Research Extension Center in Wilsonville, OR.

Deployment: The HyperRail has the standard setup of electronics, but in this iteration it includes a short range radio. This radio is used to upload the data from the sensors up to a google spreadsheet. Here is a link to eGreenhouse page that details the the setup of the sensors.

nRF Breakout boardnRF Breakout board

nRF Breakout board

The image above shows the RF chip breakout board that goes on the Feather M0. The image below shows the HyperRail + eGreenhouse deployed in the greenhouse.

HyperRail + eGreenhouse deploymentHyperRail + eGreenhouse deployment

HyperRail + eGreenhouse deployment

As light as a Feather

Abstract: We are trying to improve the capabilities of the HyperRail to have wireless communication with other sensors, and in order to do that we needed to upgrade the microcontroller. I’ve tested the Feather M0 LoRa with the HyperRail and it works. This post is a summary of the integration of the new microcontroller. 

Design: The code was made modular so that it could be used on any microcontroller that could handle delays in the microsecond range and serial communication. The program also doesn’t make use of any libraries for the HyperRail to work. The Feather M0 LoRa is a great option for the HyperRail’s wireless communication upgrade because not only does it do serial communication and can handle microsecond delays but it can also do radio communication. Here is an image of the new microcontroller: 

Feather M0 LoRaFeather M0 LoRa

Feather M0 LoRa

Here is the wiring diagram of this configuration:

Wiring diagramWiring diagram

Wiring diagram

With some minor changes in the code, I was able to get the system working with the new microcontroller. Although the changes were minimal, it took some time to figure out what to change. One thing that wasn’t working was the serial communication, this is essential for the system to work. What was happening is that the Feather was outputting the serial prints way faster than the serial port would open, so I had to put in some checks for the serial port communication to be established first before any print statements were executed. Another thing I had to change was the pins used for the communication to the stepper motor driver.


The upgrade to the new microcontroller went very well. I will now try to start sending commands to the microcontroller from another Feather and see how it responds. Here is a video covering the same points with a demo: 

HyperRail First Run

We took our first set of data of the pine seedlings using the HyperRail and hyperspectral camera. This post will be a summary of our setup for the data collection. 

Inform about our setup of the HyperRail and give an overview of the data collection.

We are using 9 meters of V-Slot (aluminum extrusion), a gantry set (rolling base), all the 3D printed parts located here, this attachment, an Arduino UNO, and the Big Easy Driver. The code is also located in the code section of the main page of this project. 

Data collection Steps

1. Upload the sketch to the Arduino Uno and connect the computer to the microcontroller

2. Run Processing sketch and wait for the list of ports to appear on the bottom of the IDE of processing. It will say something like, “/dev/tty…” or “com#”

Screen Shot 2018-03-07 at 12.50.40 PM.pngScreen Shot 2018-03-07 at 12.50.40 PM.png

3. Change the port that the microcontroller is connected to in the code. Note that the ports are enumerated starting at the index of 0. An example would be, ” /dev/cu.Bluetooth-Incoming-Port /dev/tty.usbmodem621″ you would select port 1. Here is an example of the change of the port: 

Port located at index 0Port located at index 0

Port located at index 0

Port located at the index 1Port located at the index 1

Port located at the index 1

4.Run the code again and wait for the IDE to say “GUI setup complete” and a single “r”. The “r” is very important because that means that the microcontroller is communicating with the application and is ready to receive a command from the application; the are stands for ready. After this step, the HyperRail is ready to go. Now we need to setup the hyperspectral camera. 

5.Insert the camera in the case and then bolt in from behind or put a strap on the front. The bolts or strap are there for extra safety, not really neccesary, but it is still good to have. 


6. Hook up the battery and turn on the camera.

7. Attach ethernet cable and start the data collection.

IMG_0305 2.jpgIMG_0305 2.jpg

8. Detach the ethernet cable. 

9. Star the HyperRail and wait for it to travel the rail. 


Here is an example fo the data collected from the hyperspectral camera:


The HyperRail is working well. We will now move to improving the GUI for more functionality and upgrade the electronics for autonomous operation. This means that the sensor will in charge of moving the HyperRail’s carriage to where the sensor needs to be. We will be implementing the Feather microcontroller from Adafruit to do this because it has a LoRa radio to be able to communicate easily between feathers. I also need to run validation tests for the performance of the HyperRail to verify the precision of the movement of the carriage.

Now that the GUI works, where do the electronics go? In the HyperDrive!

The GUI works and everything is starting to come together. One of the last things is the housing of the electronics. I designed an enclosure that will have the microcontroller and stepper motor driver directly mounted on the aluminum extrusion. 
I intend to give an update on the enclosure’s design and implementation of the electronics. I will also give an update on the GUI status. 
Here is a demo of what the GUI looks like in action!

The enclosure was designed around the dimensions of stepper motor driver and the Arduino UNO. I’m using a base that comes with the UNO so that swapping the microcontroller, if needed, will be easy. The stepper motor drive goes directly on the 3D printed piece. It also has a hole for the power inlet and another for the USB cable. Here is a rendering of what it should look like: 


Here is what the actual part looks like when it is assembled: 



Here are some other images showing it mounted on the aluminum extrusion:

#block-yui_3_17_2_1_1518467028277_76832 .sqs-gallery-block-grid .sqs-gallery-design-grid { margin-right: -20px; }
#block-yui_3_17_2_1_1518467028277_76832 .sqs-gallery-block-grid .sqs-gallery-design-grid-slide .margin-wrapper { margin-right: 20px; margin-bottom: 20px; }

I am calling this whole enclosure the HyperDrive. This is because it has all the components that are driving the stepper motor. This enclosure makes it easier to move all the electronics around compared to when we had the electronics flying all over the place. Moving on to the next design, I need to make an attachment for the HyperRail to go directly on the greenhouse structure. After that is designed, then the whole system will be ready for install. 

GUI or CLI for the HyperRail 🤔… why not both?

The HyperRail is currently being controlled by the Arduino’s command line interface or CLI. But it is quite the process to change some parameters and restart the program; this whole process is not user-friendly especially if you have never used the Arduino IDE or have any coding experience. To make it easier to use I created a graphical user interface or GUI. 


  • Create a GUI for the HyperRail so that the system is easier to use compared to using the command line interface.

For this part of the project, I am using Processing to create the GUI. This is an open source and cross-platform interface for writing code geared towards a visual processing of data and it has over 100 libraries that are readily available to make it easier for you to code. Another cool thing is that if you already use the Arduino IDE, then this IDE is going to look very familiar:

Screenshot of the two IDEs. Left is Arduino and right is ProcessingScreenshot of the two IDEs. Left is Arduino and right is Processing

Screenshot of the two IDEs. Left is Arduino and right is Processing

This is what the current GUI for the HyperRail looks like:

Screenshot of the HyperRail GUIScreenshot of the HyperRail GUI

Screenshot of the HyperRail GUI

I initially had the GUI controlling the Arduino using a library that the Processing software had already, but the problem came when I tried controlling the stepper motors from the GUI. What was happening is that the software does not have a delayMircroseconds() function making the controlling of the stepper motors very difficult. This is due to the fact that the function controlling the stepper motors is using microsecond-delayed pulses to move the motors. I think the reason it doesn’t have one is that it would not be able to communicate fast through the serial port. After doing more research online, I came to the conclusion that the best way of fixing this problem would be to have them be independent of each other, meaning that the Arduino would have control of the stepper motor and only be receiving triggers from the Processing. This also means that processing will be doing all the calculations to determine the total steps needed to travel the length of the HyperRail and conversion from velocity(mm/s) to RPM, this way the Arduino only is dedicated to moving the motor and not performing any calculations. 

What I ended up doing is having the microcontroller send a signal to the application and then, having acknowledged that signal, have the application send the option the user chose and numbers it calculated over to the microcontroller. The microcontroller will then parse the incoming string and extrapolate the values it got from the application to then use them to move the motor at the correct speed and direction. Here is a demo of what the GUI does:

The GUI’s basic functions are all almost operational. At this moment I need to finish the code on the Arduino side for the parsing. After that, I will be doing some testing to see it actually works and then finish up incorporating the slider bar for quick positioning and the “Go to location” option so that the user can input specific location along the length of the rail and make the carriage go to it. 

3 Meters of HyperRail!

After modifying the HyperRail’s winding system, I was able to get the line driving the carriage assembly to not wind up on itself. This used to cause the system to have very choppy movements, but now it works fine. I still need to do some testing for any slipping, but that will come next. I also fixed the deflection problem that we initially had by changing the distance between the supports. So now it should work with any length of aluminum extrusion. 


  1. Redesign motor mount
  2. Create modular system for any length of HyperRail 
  3. Fix deflection problem  

Quick Video Update:

Descriptive Update:

The old design had the tendency to break much at the little pins that were extruding from the top piece of the motor mount, and after they broke the piece would no longer be stable

Old motor mountOld motor mount

Old motor mount

The next image is the new design of the motor mount. This one doesn’t have any small pieces that have the potential to break off. 

New design for motor mount New design for motor mount 

New design for motor mount 

Actual installed 3D printed pieceActual installed 3D printed piece

Actual installed 3D printed piece

With this fixed, I then moved on to designing a better coiling system for the rail:

Old design for line spooling Old design for line spooling 

Old design for line spooling 

New design for the lineNew design for the line

New design for the line

The old design actually spooled the fishing line on the plastic piece, the new one only guides the line around piece plastic piece and moves it using tension of the line.

Old prototype with only a couple of windings Old prototype with only a couple of windings 

Old prototype with only a couple of windings 

New design with no windingsNew design with no windings

New design with no windings

With this new design, the rail should work with any length of rail. I initially was testing the 1.5-meter long rail and that worked fine with the original design, but this new design worked for the 3-meter design and it looks like it would work for any size. 

I will be testing the new design by doing an implementation of the rail in a greenhouse that is currently running some test on some plants:

Greenhouse where plants are being kept and implementation siteGreenhouse where plants are being kept and implementation site

Greenhouse where plants are being kept and implementation site

One advantage of setting up the HyperRail in the greenhouse is that it has a metal structure running over the plants where we can attach the rail to. This takes care of the deflection problem that we were having. The rail can have as many supports as needed and not have to worry about having any significant deflection because of this. 

Metal structure where the HyperRail will be attachedMetal structure where the HyperRail will be attached

Metal structure where the HyperRail will be attached

This will work if the installation site has a metal structure, but if it doesn’t have one then using the tripod system will also work. Instead of having the supports be at end of the rails,  I moved them towards the center by a quarter of the distance, this way the weight is better distributed and less deflection occurs as the carriage moves across the rail. 

New setup of the rail supports New setup of the rail supports 

New setup of the rail supports 

Significant progress was done with the new designs. One future minor change is to fix the line tie. This is where the line goes gets screwed into the carriage. It keeps on breaking. In terms of hardware for the actual HyperRail, I think, it is pretty much done. The only other thing will be making the attachments for the metal structure for the greenhouse. 

Line tieLine tie

Line tie