Entire Suite Working on the Uno

Author: Lars Larson

A successful Monday – got the entire sensor suite running properly.

One notable – and very easily preventable – issue that I ran into: I had wired the RTC into a ground rail that didn’t tie back to the Arduino’s ground.  Always double-check your grounds!  It’s easy to overlook, but it can cause a lot of confusing data problems.  A teachable moment, at least.

Moving forward:

Testing in the greenhouse begins this week.  I’ll replicate the previous study’s conditions as much as possible to see what kind of correlation we find.

Lars

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. 
 

Success on the Uno!

Author: Lars Larson

The CO2 sensor problems from earlier this week were due to a faulty breadboard which left insufficient current for the sensor.  After swapping the whole array to a new board, the CO2, temp, RH, and SD card are up and running.

Average values in the OPEnS Lab today:

CO2: 835 ppm, temp: 23˚C, RH: 45%

Next steps: coordinating with Elad to set up a more rigorous testing protocol, and wiring in the luminosity sensor when it arrives.

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. 

Preliminary Testing on the Uno

Hi all,

Sensor testing has begun.  I’ve wired up everything to match Elad’s configuration, excluding the problematic O2 sensor.  MicroSD, SHT31-D temp/RH, and DS3231 RTC are initializing successfully. However, the code is getting hung up on the K-30 CO2 sensor startup process.  I’ve isolated the CO2 sensor and will run test code on this sensor only.

Lars Larson

Beginning Researcher

A Review of SLA Printed Bag Caps To Improve Sealing Over FDM Bag Caps

Abstract:

An important feature of the OPEnSampler is the ability to seal the collected water post-sample such that evaporation and contact with the air has a negligible impact on concentrations of minerals and isotopes in the samples. We’ve tried many different options but solid resin-based 3D printed caps proved to be the best option.

This post was drafted but unfinished in late 2017. Because it is still relevant and the conclusion still valid, I finished and posted it with the pictures I took but it is lacking in pictures of the setup and testing.

An SLA Bag Cap, unprocessed, printed by OSU’s Robotics Lab.

The Problem:

Most water samplers leave the sampled bottles open for evaporation and contamination of the samples due to contact with air results in the reduced quality of samples of volatile compounds. To address this weakness, we connected the sample bags through solenoid valves that close to seal the sampled water from outside conditions. As it turns out, this is quite difficult to achieve: FDM printing using spooled filament causes many small defects that result in microscopic holes in the otherwise solid plastic component.

 

The Causes:

There are many causes of defects in a print. In FDM the most common ones are varying filament thickness, filament that has absorbed moisture from the air, and poor layer-to-layer adhesion.

Filament is created by heating up plastic and pulling it out in a line. How consistently it is heated and pulled directly affect the thickness of the final product. Manufacturers of 3D Printing filament have ways to control for changes in thickness over a certain tolerance, but the tolerance is usually +-3% [source]. Filament with lower tolerances cost significantly more. A change in filament diameter results in a change in extrusion thickness and height, which can impact the way subsequent layers adhere to one another. This variability in extrusion rate can create relatively large holes and cracks in the part, or very thin areas in the wall.

Absorption of moisture from the air is the hardest factor to control. ABS plastic in particular can absorb up to 2% of its weight in water per day [source]. The moisture trapped in the plastic expands rapidly when the filament is heated as it passes through the nozzle. This can cause any size of defect in the form of bubbles on the surface or interior of the component and is unpredictable. We store all our filament in a sealed container with desiccant, but any amount of moisture in the filament is capable of causing microscopic holes or weak points in the final product. These holes are rarely visible and can persist even after heavy vapor-finishing.

To check for microscopic holes, a printed bag cap would be heavily treated with acetone vapor. The cap would be set out for a day to solidify and then attached to a partially filled bag. The bag would be turned upside down. After several seconds, most caps would not show signs of leaking. Many, however, would produce slow drips of water from a seemingly solid surface of the cap, and no hole would be visible. The explanation for the phenomenon was that microscopic holes in the surface allowed a very small amount of water, when under pressure, to pass through the interior of the component and out of the side surface.

Lastly, poor layer-to-layer adhesion can be the result of any number of settings and calibration failures as well as the mechanical failures caused by quality defects described above. Often the biggest factor is a significant temperature gradient across the part as it is built up. This can be seen most frequently when the printer’s bed is not covered. The cover acts to protect the part against drafts and insulates the interior to maintain a consistent temperature well above room temperature. A temperature gradient across the component causes cooler areas to contract while the top layer being printed on is still very hot, warping the print inward and causing the nozzle to print on a non-level surface.

Additional causes of poor layer-to-layer adhesion include rapid cooling of the layer before the next is deposited, large layer heights, or a poorly calibrated printer.

An FDM Printed Bag Cap with an NPT x Compression Fitting attached. It has been post-processed with acetone vapor to smooth the outer surface.

The Solution:

Many solutions were tried. Progress was made in some but the only solution that completely sealed the sample bags was to print the caps on the Form2 (shoutout to OSU’s Robotics Lab!)  in a resin-based Stereolithographic (SLA) 3D printer.

SLA-printed components reduce the inconsistencies caused by heating filament because they do not melt plastic in the process. Instead, a laser with a specific UV frequency polymerizes the liquid plastic in layers, linking chains of plastic molecules together (Formlabs.com). Additionally, solid components are created as truly solid parts rather than solid walls with interior mesh as in FDM printers.

We asked the Robotics Lab at OSU to print us several caps with the same design as those that had been printed on our own FDM printers. To test each bag cap, a bag was filled with water and a cap was screwed on. The through-hole was tapped and an NPT x barbed fitting was screwed into it while a short length of tubing was attached to the other end of the fitting. The tubing was folded and pinched off with a small clamp and the bag was turned upside down and squeezed.

Three FDM bag caps were tested and each leaked through a different position. Four SLA bag caps were tested and only one leaked through the threaded interface between the cap and bag. The leaking SLA cap was found to have significant chipping, almost completely eliminating one-third of the O-Ring groove responsible for sealing this interface.


One of the first bag caps printed had major defects in the O-Ring groove, showcased in the red box.One of the first bag caps printed had major defects in the O-Ring groove, showcased in the red box.

One of the first bag caps printed had major defects in the O-Ring groove, showcased in the red box.

To solve this issue, the remaining 21 caps for the device were printed on their sides (also by the Robotics Lab).

 

Further Considerations:

While the SLA-printed caps were effective at sealing the bags, they introduced new problems. One of the major issues with SLA caps are how brittle they are – a huge setback when any defects need to be fixed with post-processing. Additionally, the brittle plastic breaks easier when shipping: one cap broke at the interface with the extruded aluminum when the device was flown to the AGU fall conference.

Labs are also less likely to have access to an SLA printer, and even if they did it is a more time consuming process that requires additional post-processing. The cost of resin is also significantly higher than plastic filament.

 

Conclusion:

SLA bag caps were 3D printed in a successful effort to eliminate leaking found in the FDM alternatives. A Form 2 SLA printer was ordered for the lab and the remaining 21 caps were printed by the Robotics Lab in time for the AGU conference. In the future it could be worthwhile to refine the design and processing of the bag caps such that FDM printed caps seal the bags, but in the meantime this is an effective, repeatable solution.

Author: Mitch Nelke

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

 

 

 

eGreenhouse back online for 2018

Hi all, 

I’m Lars, ecological engineering student at Oregon State University, and I’ll be collaborating with Elad to push the eGreenhouse project forward.  

Next Steps:

  • Wire sensor suite and test previous code 
  • Port Arduino Uno code into Adafruit Feather (much smaller, lighter, more efficient)
  • Implement 2-way communication with the OPEnS Lab HyperRail for dynamic data 

Looking forward!

 

Lars Larson, Beginning Researcher

 

Redesigning the Bottle Trays

Abstract:

A tray to hold 12 ISCO bottles was previously designed without considering the weight of water when they are filled. The plastic tray was redesigned using Fusion360’s sheet material modeling and static stress simulation tools.

Introduction:

I was recently made aware that the design of the ISCO bottle trays did not consider the weight of the filled bottles (thank you, Azad, for noticing that)! Stresses in bent sheet materials are quite difficult to calculate by hand, so the design process for the new tray, under load, is as follows:

1. Initial Design

2. Perform Computer Simulation

3. Check results for low safety factor and high stress points

4. Redo Steps 1-3 until I am confident in the design

 

Design:

Let’s go over the initial design:


Screen Shot 2018-01-17 at 10.34.49 AM.pngScreen Shot 2018-01-17 at 10.34.49 AM.png

The ISCO bottles are split into two trays of 12. The constraints are as follows:

– No longer than 740mm long

– No wider than 160mm

– Flat Pattern cannot exceed 2” x 4” dimensions of stock sheet plastic

– Must hold 12kg (about evenly distributed along bottom face)

– Material is .04” (~1mm) PETG

The problem is the open face of the tray. By holding the shape of the tray by two pieces of aluminum extrusion, nearly all the weight of the bottles stresses two sets of M3 screws. Even with washers, the plastic would likely stretch or tear. The design was modified to address these issues.


The new design uses a PETG sheet folded into an open-ended rectangular prism with an overlapping face. This overlapping face includes 6 holes for M3 machine screws and will also be glued together. Two kevlar straps for holding the device, connected on the bottom of the tray and tied with room at the top, are not shown. They will be located 1/3 of the length from either end.

 

The straps and glue are especially important because they aren’t included in the simulation. Because of them, I can assume that the safety factor for stresses on the sides and top of the tray can be lower than would be otherwise acceptable, since the straps will pull the device from the bottom face.

 

Simulation:

I performed a Static Stress simulation with a 120N distributed weight along the bottom face. The top face was constrained as “fixed”, and 6 ~M3 bolted connections were added on their respective holes, simulated as pinned connections, to hold the overlapping sides together.


Screen Shot 2018-01-16 at 2.19.30 PM.pngScreen Shot 2018-01-16 at 2.19.30 PM.png

While the result of the simulation appears catastrophic in the above picture, it is important to know that Fusion360 greatly exaggerates displacement by default! The actual displacement should be about 13mm which will look much better. The addition of kevlar straps will likely have a negligible effect on this bottom displacement. Notice in the image below that the max stress is located at the bottom corner of the tray. Because the Yield Strength for PETG plastic is about 47MPa, a stress of 64MPa as shown would lead to stretching and possibly tearing along the edge. However, distributing the weight via kevlar straps along the bottom will minimize the stress along the edges of the tray, greatly improving the safety factor shown in the subsequent image.

Safety factor is the ratio of applied stress over acceptable stress. A SF of 1 or lower means that under static conditions, the component will start to exhibit failure. This will improve greatly by the addition of glue in between the bolted flanges in addition to adding kevlar straps. However, if the tray was accidentally carried from the top face it would potentially break.

 

Iteration:

To account for additional stresses and accidental carrying methods, I decided to add an additional flange on the bottom that is the same length as the side flange, as shown below.


Screen Shot 2018-01-16 at 2.30.27 PM.pngScreen Shot 2018-01-16 at 2.30.27 PM.png

The results of the new simulation are much more promising:


Screen Shot 2018-01-16 at 2.57.44 PM.pngScreen Shot 2018-01-16 at 2.57.44 PM.png


Screen Shot 2018-01-16 at 2.58.27 PM.pngScreen Shot 2018-01-16 at 2.58.27 PM.png

With the new flanges, the maximum deflection is slightly reduced and the safety factor is well above what is necessary. Because straps will be used rather than holding the tray from the top, the actual safety factor is likely much higher, but the tray is unlikely to break if accidentally picked up by the plastic.

 

Conclusion:

The new bottle tray was simulated with promising results. Larger safety factors and smaller displacements show that it is less likely to break under greater load, and the addition of straps to support the weight from the bottom will reduce the stress in the sheet plastic and provide the user with a more optimal carrying method.