Friday, June 30, 2017

First Day Adding Dye!

We worked hard on lighting...

With reflections
Optimized for no reflections in the sand
We learned that our solution on the high side did not have enough flow to become well-mixed quickly.  We'll be working on that next week.  Marbles to reduce water in side column? a pump in the tube?  More holes in the PVC? a spinny toy?  It's looking promising....

No injuries today? 

Thursday, June 29, 2017

Day 14: almost there!

Day without accident: zero

Sheiny: 3, Andrew: 2, Ethan: 2 (most epic!), and Dr. Stonedahl: 0.
We went to Menards to get more supplies and duct tape before lunch. Then we had a nice lunch with all of the other students and it seems like all of the groups have made very nice progress.

Ethan is almost done with the flossy. He attached the pressure sensor to the support, which holds it to the glass wall, and he also attached the arduino and the power outlet to the wall.

Since Andrew is now done with the small system and got the pump working wonderfully, he is now creating more program to average hundred pressure readings to come up with shift value, so our sensors, both A and B, will hopefully match!

We found a paper about the "wall effect", basically the probe cannot be to close to a wall of any container. The paper was testing it on a metal container which is the opposite of the effect in glass and plastic. Now that we have seen the effect of it in glass and plastic (and we have a really nice graph), next Sheiny will focus on the metal and the sand if it will react with the salt solution for long period of time.

This is fun!
Making a bed for the arduino
Ethan the sand master
Got the arduino safe and sound!
What a beauty!
Serious time
If you look closely you can see metal on the left has more flare (react with the solution)


Update: We tried running the pump on flossy and we found after about 20cm in height, the water pressure was too much and started shifting the sand in the middle. It was like an avalanche, all we got to say was "WOAA"!

Wednesday, June 28, 2017

Goals/tomorrow's to-do list

1) can be done immediately, 2) depends on some #1 task or ranks lower than other #1 tasks

1) Andrew:  Reattach the lose wire from the sensor
2) Andrew: Get a threshhold code ready, which uses both sensors in Flossy
3) Andrew: Look at Calibration Data from today and make a decision about size of moving average (1,3,5...) and shift (or shift function).

1)  Ethan: Get the red dye out of Flossy, rinse with tap water
2) Ethan:  Figure out how to secure Arduino, extra outlet, etc.  Where it can reach Flossy and won't get wet or fall
2) Ethan: Fill about a quarter full with water, then SLOWLY scoop sand into Flossy's sand compartment.
3) Ethan: Secure sensors to holders
4) Set-up Over flow funnel

1) Sheiny:  We need the buckets your solution is in for Flossy, probably tomorrow. Get solutions into other buckets.  Reattach the pieces you took off those buckets, hopefully you remember how they were attached before.
2) Sheiny: Help Ethan or Andrew if either needs help with anything.
3) Sheiny: Work on the salt water metal/silicone/sand measurements.

SOMEONE: get ready to talk at Lunch, not Andrew's turn this week.
EVERYONE: trip to menards, probably, unless I get enough of the items on my way in tomorrow... We need buckets and a C clamp before much can happen...

I'm really excited, hoping we can see some fluctuating flow tomorrow.... (which might mean we could try a real dye experiment Friday (except stuff will probably go wrong).


Day 13: Quick addition!

Regarding the coding problems, I wanted to give some details.

After working with Dr. Forrest Stonedahl today, a solution for getting other machines to work with the Arduino we're using (which is a BottleLogger v2.0.0) was found. We took copies of the Arduino installation in Program Files(x86)\Arduino, and everything in appdata\local\Arduino15 from Dr. Susa Stonedahl's computer, and placed them on the machines we want to use with the Arduino. Previously, we hadn't copied the appdata folders, but this seems to have cracked the problem.

There was an additional complication, where the first laptop we tested this solution on continued having problems getting the Arduino to do what it was programmed to do. It's been determined that the laptop has an issue powering the Arduino, however, it compiled and uploaded the program to the Arduino without any major issues. A possible solution to this problem is to use a powered USB hub while using that laptop. Then the hub provides the power, and not the laptop.

Another issue we came across, although it may be related to that laptop's electrical problem, is that when things power on on the same circuit as the Arduino, an error occurs when communicating over the serial port. It is believed that using a strong surge protector (which is a good idea to use in any case) might be a sufficient solution for this problem.

The great news is that I am now able to use my own machine for compiling code and uploading to the Arduino, and (hopefully) all future deals with this particular Arduino can be managed with whatever (Windows 7+) machine is needed.

One last technical issue before we closed out the day: One of the pressure transducers came loose from the Arduino. I'll need to bring my small electronics toolkit with me tomorrow to reattach it.

Day 13:

Today we got the pleasure of working with Mr. Dr. Stonedahl. He helped us with some coding/computer problems. We also took apart the middle divider on the antfarm (the old sand vessel) because it did not silicone properly in place. We cleaned Flossy(the new sand vessel) and put some more silicone on the bottom part of the middle divide because it seemed to be loose. We were also able to find a way to hold the pumps on flossy with out them moving. To solve the siphoning problem we took a 2 inch piece of PVC pipe to have the pump flow into. We also cut four small holes in the bottom to try and let the water out at the botton in a controlled way constant speed and wont allow disturbance in the water. We also improved the safety of flossy by duct-taping all of the sharp edges. We also made a new divide for the antfarm so we can hopefully get it working soon.
Dr. Stonedahl helping with our code.

Getting the pumps put in place so they cant move.

EC meters are giving exciting results.

Tuesday, June 27, 2017

day 12: exciting...

So, there's a discrepancy in the USRI calendar, some information is missing from the calendar. We are scheduled for a hike tomorrow, but it seems like there's going to be rain so Dr. Stonedahl, Ethan, and Andrew planned another hike to Credit Island today at 7pm.

We wrote a blog post for the USRI blog.

Ethan is done with the tank divider, and now working on the sand grid maker. Andrew did some debugging on the library code, and the good news is that it seems to be working perfectly. The bad news is it only works on Dr. Stonedahl computer and won't upload from any other machine. Sheiny got a beautiful graph from her experiment that shows it doesn't matter if plastic or glass medium is being used. And more importantly that there's a consistent fraction creating error at each diameter.  She'll try the saltiest solution tomorrow, but it looks promising so far. We found that after approximately 7 cm, the readings are accurate.


Working hard
working pump!
waiting for the tank to cure!
testing the sand dripping with the dye!

Monday, June 26, 2017

Day 11

Today I started working on the  divider as well as the overflow gutters for the main sand vessel. First the gutters got sealed with silicone to the tank and, held by clamps to let dry. Later I began constructing the middle divider out of sheet metal. The metal we got at the store is to large to use with the saw, so I used an electric cut off saw to cut the metal. Right before lunch we got to silicone the middle divider on as well as work on the other two dividers that will be used for extra support. We also found out that the tank was not quite put together properly, so now I am working on making another sand divider to better fit our tank. I am making this in solid works and should be able to 3D print it tomorrow.

Day 11: A day of troubleshooting

I spent today troubleshooting the BottleLogger v2. I started with running the Trujillo demonstration code that I thought worked, confirming that it worked, even without any delays. After an hour of running, there were no errors on the SD card, and all of the data logged like expected.

While the Trujillo demonstration ran, I looked at and modified the sinewave program that we really need. I viewed more example code from Northern Widget's website, and so that they use goToSleep_if_needed() rather than sleep(), so I slotted that into my program. Their example programs also sandwiched sensor readings between logger.startAnalog() and logger.endAnalog(), so I rearranged some lines of code, and made sure to read pressures and temperature between those two lines of code. Other than adjusting scalars and constants for today's water temperature and air pressure, those were the only significant changes I made.

Once I ran the modified sinewave program, immediately the outlet started to make clicking sounds, and it did not work. Removing logger.endAnalog() (while keeping logger.startAnalog()) fixed this issue. I'm not sure what effect that has on the BottleLogger v2, but I will look into it. For now, it's staying out, because it's clearly breaking the program.

After 15 minutes of running sinewave_testing (with an additional 2 second delay between iterations), there were no issues, the SD card remained error free, and all of the data logged like expected. So I removed the 2 second delay and let it run for another 30 minutes, ending with the same results. A fairly positive result. Unfortunately, looking at the time stamps on the data collected, goToSleep_if_needed() adds a 3 seconds delay between iterations in the program.

Tomorrow's tasks are:
* Look at what goToSleep_if_needed() does, and try to cut down the delay.
* Install and test the Arduino software on more computers.

I'm sure more tasks will come up, should I complete those quickly.

Day 11: time sure does fly

Day without accident: 2

Today we all did a different thing. Today I tested the theory by comparing if the glass container and plastic container will have a difference in EC reading. Guess what, it's not! We are happy with the result, it really does make a good graph and it also proves the neither plastic nor the glass does anything to EC meter whatsoever.


We tested using 9 different diameters container of plastic materials and 7 different diameters of glass materials. Test with the meter while the water level is close to the surface and we got pretty consistent reads. We also mixed some salt solutions to be used tomorrow.


Plastic graduated cylinder with different diameters. 

Tap water measured with different containers



Day 10: Late update!

Last Friday

At the end of the day, we hit a snag. My agenda for the day was simple enough:

* pick a new scalar for the PSI to cm conversion based on water density by temperature
* Turn program into several programs, one for each function
* Comment the code
* Shorten the loop to 1 sec if possible

In terms of modifying the code, all of these tasks were complete by 11 AM. Even further, with the help of Dr. Stonedahl, I simplified parts of the code that are expected to be modified in the future in a way that anyone could manage to make small changes without breaking the program.

//CHANGE THESE NUMBERS FOR DIFFERENT SINE FUNCTIONS
float amplitude = 5; // cm
int period = 120; // sec
float shift_up = 2; // cm
//STOP CHANGING

//CHANGE THESE NUMBERS FOR DIFFERENT MEASUREMENT CONSTANTS
double water_density = 997.608; // kg / m^3 at 22 celcius
double gravity = 9.8061579; // m / sec^2 at 177 m altitude
float sensor_shift_up = 0; // cm
//STOP CHANGING

We wanted the code to be tested and debugged before running tests on Monday, so we loaded up the sinewave program, removed the delay at the end of the code, and let it run. Without the delay, the code is iterated through quickly, as a result the outlet for the water pumps rapidly switch on and off to follow the curve. Along with the rapid switching, the Arduino eventually stops printing to the console we're running, and corrupts data on the SD card.

Both printing to the console and writing to the SD card use the Serial class. My best guess is that something is happening with the Serial class, causing the both problems. Our list of possible sources of this issue are as follows:

* There may be too many computations between iterations, so reduce computations where possible.
* The delay might be required for proper functioning, so play around with different delay values.
* The rapid state change on the output pin to the power outlet might be changing too rapidly, so also play around with larger margins of error if adding a delay isn't enough

Continuing the debugging, we stuck a 2 second delay back in the code, however, eventually we'd run into the same issue. We were left to revert to the code for the Trujillo presentation. That ran without issues, but it still had a 2 second delay. I don't recall if removing the delay led to any issues, so I currently have the Trujillo demonstration code running without delays now.

Unlike the sinewave program, the Trujillo demonstration uses constants as thresholds for changing the on-off states of the outlet. If the water level is at 10 cm or below, turn on the pump, else if the water level is at 20 cm or higher, turn off the pump. So, if it runs without issue, without any delay, that may strengthen the hypothesis that the rapid state change of the output pin is related to the issue, and not simply iterating through the program without delays.

Both the sinewave and the Trujillo demonstration programs access the SD Card to open a file, write a few data points to the file, then close the file with every iteration. Perhaps accessing the SD card so frequently in a short period of time is what's corrupting the SD Card. The only way I can think to rule that out is to run the Trujillo demonstration for a moderately long period of time, then checking the SD card.

Friday, June 23, 2017

Day 10: Ethan

Today I began by working on cleaning the old sand vessel, to try and add the divider I made yesterday. After that I worked on creating the overflow gutters for the new sand vessel. For the second half of the day we got to see the engineering camp kids race their CO2 cars. We also went to the aquarium store to get the new sand vessel. Once back from the aquarium I used silicone to add the middle divider to the old sand vessel.

We finally got the sand vessel!

Day 10: need to go out early


Like it was mentioned before, I am trying to figure out what caused the drop in electrolytic conductivity in previous experiments. By accident today, I found out that the diameter of the container affected the reading on the EC meter. The narrower the container, the bigger the drop. So we put just tap water into 7 containers with different diameters.  We found that the data hit a plateau after it hit more than 5.5 cm. We need to try this again with more containers to fill in the gap and better understand the shape of this curve.



Note to self: aluminum container definitely messed up the reading. (we through out that data point)
We haven't done the experiment with the sand, but we are still interested if the sand or the aluminum play a role in changing the reading in EC meter.

We also want to try the many diameters with a salty solution, closer to what they used in the previous experiments.

Thursday, June 22, 2017

Day 9: Some Explaining to do

Days without Injury: 1

The work day started frantically. We had just arrived at work, and we found out another research group was coming to see our work. We had less than 15 minutes to design and implement a demo, so the pressure was on. Buckets were placed, water pumps thrown into place, and a wild rewriting of some functions were underway. 30 minutes later, our demonstration was up and running, and the group coming to see us were later. Lucky break. By the time they arrived, everything was working smoothly.

We took our turns explaining each of our parts of the project, while the sound of water pouring methodically played in the background. On, then off. On, then off. Some time passed, we finished explaining our project, then the other group left to get a demonstration of the other groups' projects.
Dr. Opar doing stuff and things to the "ant farm" with Ethan

Dr. Opar came to our room to help Ethan with putting plastic in the base of the old "ant farm" so that it will no longer seep blue dye around the bottom. Dr. Stonedahl confirmed the SD card is working again. Sheiny measured and diluted the dye, and took "before" weight measurements of the sand as preparations for tomorrow's experiment. I worked on making different versions of our program to make it more usable, without having to worry about commenting and uncommenting sections of code to get the desired results. We then broke for lunch, where all of the SRI groups met to discuss progress on their respective projects with one another, in a formal-but-informal presentation.

Sheiny preparing the dye for tomorrow
After lunch we collected two more sets of data points with our sensors in our glass jar of water. We took care to note the air pressures between measurements on the first run, and we took measurements every cm for the second run. Unlike our previous runs, we did not allow the door to open during our data collection. The door opening causes a change in air pressure in the room, which alters our measurements.

MORE DATA!
Shortly after, the dean stopped in, and we presented our project for the third time in a day. I'd say we have had a lot of practice presenting. That will be useful later on.

We took another field trip to Menards to pick up more supplies for our experiment. Now we should have everything we need to hold our sensors in place in our "ant farm" during the main experiment.
Saving Big Money

That wraps up our day!

Wednesday, June 21, 2017

Day 8: Star party is today!



Days since last accident: f̶i̶v̶e̶  zero
It's been a beautiful day! In the afternoon, the temperature dropped from the drizzle we had, and our progress has come along nicely. Our pump is working, and we re-assembled the pressure sensor testing system with the sliding ruler.

We have just finished recording more readings from zero depth to 30 cm depth in water. Andrew has more coding to do tomorrow, but for now he is comfortable with what has been completed so far. Unfortunately, we got unexpected issues with the SD card, but hopefully it can be fixed soon.

Ethan was having a field day cutting metal rods, and making a new sheet metal divider for our second tank. We had a field trip to the Galvin basement to use the workshop, where all the cool pieces of machinery are. As of now, Ethan is still going back and forth to Galvin Hall to cut another 1 square inch piece of sheet metal for tomorrow's experiment.

You guessed it folk, today's accident was experienced by Sheiny! This gives her 2 points, and Andrew 1 point, while Ethan and Dr. Stonedahl are still at zero points. Anyway, Shieny will do the experiments with the sand to hopefully figure out wich of the variables are responsible for making inconsistencies in our electrolytic conductivity readings.

Ethan assembling the new divider
Ethan the metal bender!
He uses the tool like he was born with it. 
Filing away
Another filing session
No hose no problem!

Tuesday, June 20, 2017

Day 7: In the beginning it was dark.

In the beginning we did more testing of the pressure transducers. We tried increasing the number of digits, but it didn't help. We then did more testing of the programs with the pressure transducers using five gallon buckets to pump water into one another. We put pressure transducer A in a bucket with a constant level of water over it. We then put water in a second bucket with a pump and continuasly pumped water into a third bucket, where pressure transducers B and two pumps were located. Andrew got the program to be able to control the pumps and make the pumps turn on when the water level in the third bucket got over a certain height. We looked at an article we got from an interlibrary loan. We also got the EC meter out and we got it to start working. Later, we also brainstormed ideas to be able to hold the pressure transducers in place during the actual experiment rather than having them taped to the side. We came up with an idea to take small metal pieces and hang them over one side of the glass. We also started looking into why the water's electrolytic conductivity was not as high as expected in a previous experiment.
measuring the sand 

Finally got the pumps and sensors to work.
Proud of his coding


Monday, June 19, 2017

Day 6: Monday's Happy! Blues

By blues, we mean matlab blues. Ethan decided to learn the "language" and I would say he's getting the hang of it.

Proud Coders

Sofar,
We tried to fix the discrepancies between the sensor (to no avail yet), adding the delay time in the reading did not improve the data. Right now we are emailing Northern Widget and see if they can help us on fixing it.

as can be seen, the difference in sensor A and B in three-run cannot be determined yet.
We hooked up a lamp (which is going to be replaced by the pump to test if it will work. The theory is when the sensor recognizes the difference in water pressure it will turn the pump on and off.

lamp is hooked up!
Andrew fixed some bugs that were in the code, and he got the sine wave working to simulate water cycles. In the meantime, we are trying to figure out why the lamp hooked to Adruino keeps flickering on and off during each loop.









Friday, June 16, 2017

Day 5: Data Woes, pt 1

The day began with a hitch when trying to get the BottleLogger to work with my personal computer. After giving up and moving on, the rest of the day was spent collecting data points with our pressure sensors submerged in water. Our first set up for the day led to unreliable data, so we went back to the drawing board and came up with this little beauty.

Look at this tall drink of water right here
I am confident  this "new" system limits environmental variables, and gives consistent measurements. Our sensors, however, disagree.

This is from the "old" system. The correct image to be placed in later.


After a few trials with this "new" system, our data does not match. Each one deviates further from the linear relationship we expect at different depths of the experiment. At this point, we're not sure what's causing this deviation, but our current speculation is that it is a variable unaccounted for with the sensors. Perhaps there's an air bubble involved, or maybe the sensors need to soak for awhile. We don't know. When we return to the project next week, we're going to have to spend our time diagnosing this.

On a positive note, the programming for the project is coming along nicely. I believe I nipped a memory leak in the bud before it became an issue, and we're ready to develop functions for controlling the water pump. On an abstract level, we're nearly ready to run our main experiment.

Here are some bonus photos of Ethan and me building our sensor testing vessel.


Thursday, June 15, 2017

Day 4: The sand vessel is out of our hands

We began the day with more cleaning of the glass to help get the sides completely clean of silicone. We also tried a new solvent, acetone, but the effects were minimal and acted more like Windex. Then began using Arduino and programming it to average three readings continuously. To be able to test the pressure sensors we made a good system to measure and keep the pressure sensors at the actual depth and to keep it level. We then took those averages and made graphs to see how far the pressure sensors are off and, how accurate they actually are. When we were talking as a group we decided that we would not want to put the sand vessel back together because of the large risk of leaking or breaking. So we called up some experts in building fish tanks at Aquatic Environments and they told us that they should be able to finish the sand vessel in about a week. To confirm that they would be able to make the sand vessel we took another field trip to the aquarium store and showed them how the vessel actually assembled and they said there should not be a problem.



This is the system we created to work on the pressure sensors 



At  Aquatic Environments 

Wednesday, June 14, 2017

Day 3: Library morning and progress on Arduino

Good things happened and some bad things happened today. In the morning we learnt how to search for sources and literature pertinent to our group's experiment. That continued with a mystery lunch, just because no one knows who ate what for lunch. A good thing is our new solvent we bought from Menards works great! A bad thing was that Andrew cut his hand on the razor (which did really good job in scrapping the silicone out of the glass). 

Arduino hooked up, pressure sensors are on top of bucket!
We got the setup for arduino (for the automatic pump) working, found some discrepancies between sensor A and sensor B and we graphed this. Fortunately the graph looks to be linear. We compared the measured depth based on the pressure read by the sensor to the actual depth where we placed the sensor.
Graph comparing depth from pressure vs. measured

Too bad the website we needed was down today. But hey! Andrea is here!!! and she really made the difference in moving us along! thanks Andrea!!

Working together sure is fun

To do list for tomorrow: 
Call Adam wondering if he can help us build the tank.
FREE LUNCH WOOO!