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

Successful readings on the HyperRail!

Author: Lars Larson

Great progress today – we got CO2, lux, temp, and humidity to transmit to the hub while the HyperRail moved the sensor package in specified increments. Video posted below.

The HyperRail GUI now allows for specification of the travel length, speed, and distance between stops. When the sensors get to each new location, the hub tells which sensors to take readings. Once the readings are complete and the hub receives the data, it moves the package down the rail to the next sensing location.

Next, we’ll add a box to the GUI that allows the user to select which sensors to take readings from, without having to hard-code it. Also, the user will be able to select the time interval between runs down the rail and make it automatically loop throughout the day.

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.

Conclusion:

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

Abstract:
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. 

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

Setup
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. 


IMG_0286.jpgIMG_0286.jpg

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. 

DEMO VIDEO:

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


preliminary_data_spectralsignature.pngpreliminary_data_spectralsignature.png

Conclusions:
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!

Abstract:
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. 
Objective:
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. 
GUI:
Here is a demo of what the GUI looks like in action!

Enclosure:
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: 


HyperDrive_Case_Assembly_2018-Feb-12_08-53-11PM-000_CustomizedView13984810623_jpg.jpgHyperDrive_Case_Assembly_2018-Feb-12_08-53-11PM-000_CustomizedView13984810623_jpg.jpg

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


IMG_0236.jpgIMG_0236.jpg


IMG_0238.jpgIMG_0238.jpg

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; }

Conclusion: 
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?

Abstract:
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. 

Objective:

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

Design:
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:

Conclusion:
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!

Abstract: 
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. 

Objective:

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

Quick Video Update:

Descriptive Update:

Design:
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 

Conclusion:
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

 

 

 

An Update on the HyperRail

Abstract:

The last post was about getting the HyperRail working with basic code. I have now improved the coding to give the user more control. The user can now control RPM and I have added some other functions.

Objective:

I intend to give an update on the programming of the HyperRail and new features the new code has.

Materials and Methods:

All was done using the Arduino IDE and all the code used for in this iteration can be found here.

Results:

HyperRails are Working!

Abstract:

I have gotten the first prototype of the HyperRails working. I will be discussing the parts and setup.

Object:

This post is intended to update and inform about the progress with this project. 

Materials and Methods: 

We are using the V-slot aluminum extrusion and carriage system from openbuilds. All other parts were previously discussed in the last post about the HyperRails. These are the ones that are 3D printed in the lab. 

All of the pieces were assembled according to the CAD. This step was pretty straight forward, the one that took more time was rolling up the line on the spool and tightening it on the carriage. This took more time due to the fact that the line would tend to get loosen up and some times tangle up while coiling up on the spool.

Results and Discussion: 

Here is a video of the system in action:

The system works very well, we can see the movement of the carriage is very smooth.

Here are the links to the electrical components and code.

Test Code

Motor

Motor Driver

The main consideration for the next iteration is to make the system be able to work with all lengths. The main problem with this system is that the length of line needed for the system to work covers almost the whole surface of the coiling spool. After the line starts to overlap, the programming will have to be more complex to account for the decrease or increase of the diameter of the spool. This is the next problem to address with the next iteration. Our current system can only spool about 1.5 meters of line, and this system has to be designed to work will all lengths. One other consideration is the stretch of the line. When we were testing the system, in some cases we over extended the line and it would stretch a lot. I will need to find another fiber that has a very low stretch.

Modeling at HyperRail Speed!

Abstract:

We have decided to go with the 20x40mm V-Slot aluminum extrusion for the rail version of the hyperspectral mount. It balances strength, function, and price. Here is an update of the CAD model of the design. 

Objective:

To design the whole system to have a visual and have all parts ready for printing when the aluminum extrusion, boards, and motors come in. 

Materials and Methods:

I will be using Fusion360 to CAD the model and design all the parts that will be 3D printed. Some parts already have models from the manufacturer, so theses will only require assembly in the model.

Results:

The following are the assemblies of the parts and the designs of the parts to be 3D printed. Most of the HyperRails will be straight forward to assemble, this is because the extrusion is made for linear motion systems. The pieces that will be 3D printed will be the motor mount, string roll, extrusion connectors, tripod connectors, and rope guide. 

This is the assembly of the whole system with the major pieces.