Soil platforms update

with No Comments

So far this semester I have been working on creating spectral standards for the near-mid IR range, using soils of known composition, and the Chemistry department’s FTIR spectrometer. These standards will be used to calibrate the SCIO for field use. The FTIR’s range is significantly farther out in the IR range (smaller wavelengths) than the SCIO. We will compare the SCIO and FTIR spectra by looking for correlated peaks in the respective regions using something like partial least squares regression or support vector machine regression. The SCIO doesn’t make its raw spectral data open, but the SCIOlab software does create a plot of the data. I am going to try to extract the data from the plots using a software called engauge that Kristin has just installed on hopper. Engauge traces the lines in images of plots and outputs the data to csv. It’s all very sneaky.

I am also working on altering the design for the field soil platform flask in OpenSCAD (the field platform will measures temperature and moisture) to be slightly larger and more robust in order to accommodate a BLE shield. It will also need a small cylindrical housing with a cap for the IR temperature sensor.

The organic content transmission laser sensor rig is under construction. I am working with Charlie (and possibly Nic) to prototype it in LEGO. I encourage anyone who likes building things or LEGO to work on this with me, because I am relatively inexperienced with all things LEGO.

I have decided that the BNC sensors for pH and conductivity that I worked on restoring last semester are a lost cause (they are old models, no longer supported or well documented). Charlie is suggesting we reconsider using the lusterleaf with a few small hacks. I am also planning on using pH strips. We can automate the comparison of the measured color to color standards for PH with the RGB platform we will have on hand for measuring the Munsell color profile of the soil.

The Munsell color platform could be part of the same platform as pH and conductivity (science in a box) or could be stand-alone, depending on if we use the Luster Leaf are not. It will basically consist of an RGB color sensor and connected to an Arduino and a python program that converts the RGB values to Munsell values (a linear transformation).

To-do: Figure out to-do list

with No Comments

This week Kristin, Charlie, and I met a few times to figure out how to best utilize the Kanbanchi drive app for keeping track of progress on projects. Charlie made sure we had a solid framework of common terms to work with:

project – the level right underneath ‘Iceland 2016’, for example ‘soil sensors’, ‘ambiance’, ‘field day’, ‘bird survey’.

list – the columns in the kanbanchi layout. The different lists within each project are determined at the project level.

cards – the individual items within a list. Broadly speaking, cards are like tasks. They can be assigned to anyone shared on the document. They can contain documents, checklists, and tags. Cards can be given a ‘flag’ that is named by the user. Cards can be given a color. We decided that green will signify tasks we are working on actively, yellow will signify tasks we have not yet started, red will signify tasks that were started but then ran into some sort of trouble (no supplies, something broke etc), and grey tasks we have completed (cards also have a ‘done’ checkbox, for the extra satisfaction factor).

Here is a picture of my kanbanchi layout for the soil sensor platform:

Screen Shot 2015-12-06 at 7.59.21 PM

Sensor-wise, I am working on debugging the ph and conductivity probes. I have not been able to get any serial output from them but arduino isn’t given me any errors. My goal this week is to figure that out and to get the soil moisture sensor and photo-resistor hooked up and working with basic sketches.

 

Things are working!

with No Comments

This week I was able to get the IR sensor wired up and working with a basic sketch. Right now it just reports the temperature in degrees C and F every second on the serial monitor. I tested it with different temperatures and it seems to work well.

Screen Shot 2015-11-29 at 5.50.46 PMScreen Shot 2015-11-29 at 7.09.04 PM

Above left: the output from the IR sensor sketch. Above right: a basic layout for a possible casing for the sensor. I’m imagining it encased in a 3D printed tube with a cap. The tube would be the diameter of a soil corer. After a core sample is taken, the cap could be removed and the tube could be inserted into the soil to take a measurement. The IR sensor measures the temperature of a 90 degree view field.

I was also able to hook up the 5mw red laser with an on off switch over the break. I haven’t been able to test it out with a photo-resistor yet.

The PH and conductivity probes have so far been uncooperative with the UNO, but I am working on debugging the issue.

Initial Sensor Testing

with No Comments

Right now I am working on wiring up each sensor individually and testing out Arduino sketches.

I have the IR temp nearly sensor wired up, just waiting on a capacitor set Charlie ordered this week. I have found found Arduino libraries that should give me everything I need to control the sensor over a serial connection. Charlie and I decided in the HIP meeting on Wednesday that I should hold off on integrating the sensors with a BLE shield until he has BLE set up on the Android/Field Day side. In the meantime I will figure out how the Arduino should package data onboard to send to Field Day.

I have started working with the pH and conductivity probes from AtlasScientific. I’m really excited about the quality of the documentation on the website and it has been easy to move forward so far.

The next steps are wiring up the laser in the laser mount and beginning building the optical density rig with Lego. I also want to look into the cheapest way to carry out the Munsell color test. I’ve found this simple visible light spectrometer that uses an Arduino board and has pretty detailed calibration options already built into the software. I’m looking more into that along with laser wiring this week. Yay spectroscopy!

Here’s a little demo film of the spectrometer. We wouldn’t use it for substance identification like he does, but for something much simpler – color detection!

Spectrometer_demo

Sample Volume and SCIO

with No Comments

On Saturday Charlie and I talked about what the maximum number of samples we could reasonably process in the evening with bench-top sensors would be. We decided that 20 would be the upper limit. In the evening we will be collecting pH, conductivity, munsell color, fertility and organic content data. The most time-intensive test is organic content, which requires the sample to settle in water for up to 30 minutes so that the organic content can rise to the top. It will be very important for us to test the bench-top sensors with a large volume of samples before we take it into the field.

This week, the SCIO was ordered. I have been looking through the developer blog to see if anyone has used the SCIO for applications like ours. So far I have found that there is an interest but most people don’t have access to higher-caliber IR spectroscopy technology for calibration. However, we are fortunate enough to be working right down the hall from Mike Deibel. Mike has offered to let us use his Fluke portable FTIR to calibrate the SCIO. The developer SDK workflow has three steps, using the SCIO itself, the ‘development model’ web app, and the mobile developer package. The developer web app offers control of the algorithms and statistical methods that the SCIO uses to determine the composition of a sample. Using the spectra generated by the FTIR I think we can definitely ‘teach’ the SCIO to recognize the chemical signatures of different nutrients. The mobile app SDK is open and will ultimately allow Field Day to communicate with the SCIO.

From ‘Blink’ to BLE

with No Comments

This week I am getting acquainted with Arduino. I started with this basic guide – ‘install software, plug in board, make it do a thing with a sketch in Arduino. I played around with some other sketches and basic searches. When I had success with that I moved on to  connecting the BLE shield to the arduino uno and getting it to work. I followed these simple instructions to setting up the RedBear Labs libraries and getting the shield to talk to the stock android tablet available through the app store.

Screenshot_2015-11-02-15-27-37Screen Shot 2015-11-02 at 3.41.57 PM

Next I will be trying to get the IR light sensor to work with the BLE shield. I will need to decide sampling frequency as well as how to transport data packets to ‘Field Day’.

 

 

 

 

BLE shield and laser diodes have arrived! New options for fertility spectrophotometry.

with No Comments

BLE Shield

The Makershed BLE shield I ordered arrived this week! My plan right now is to use this shield on the temperature/moisture sensor designed for use in the field. The field sensor will look a lot like soil platforms we have used in the past with the addition of an IR sensor for measuring temperature of the soil. I have ordered a small IR sensor that I am expecting to arrive soon. To test it’s accuracy I will use a fluke IR thermometer as a benchmark.

Screen Shot 2015-10-26 at 4.07.56 PM

I am pretty new to Arduino development so I have been reading up on how to interface a BLE shield with an android application. I downloaded the BLE libraries for Arduino. Now I am trying to think about how my sensor will interface with Field day. I want a reading to come up on the screen as it is taken so that the user can confirm data is being recorded in the app.

The next thing to consider is the casing for the platform. I think the 3D printed ‘flask’ idea from the first Iceland trips is pretty solid and I would like to do something like that again. I would also like to case the outside of a plastic case with rubber to make the flask more impact resistant if it is dropped.

Laser Diode

The laser diodes arrived this week. I will begin prototyping the optical density sensing rig this week in lego.

Screen Shot 2015-10-26 at 4.16.35 PM

Spectrophotometry

There are some interesting commercial solutions for near IR component analysis. One is the Scio – a kick starter project that has now gone into production. The Scio goes into the near IR range and comes with a developer SDK that would allow us to test it on soil and interpret the spectral results based on known soil composition and Mike Deibel’s more advanced IR sensors. There is another option called Tellspec but it seems much more closed-source.

Spectra and Soil

with No Comments

This week I met with Mike Deibel regarding soil fertility measurements. One of the primary accepted ways to measure soil fertility is the combustion method. We don’t want to do that. Other alternatives are spectroscopy of the soil directly (requires infrared electromagnetic range) or of a soil solution after a reaction (can be done in the visible light range, but requires reagents and possibly a flow-injection system). For the munsell color test, a visible-range spectrometer that uses fiber optic cables to transmit signal could be used.

NIR spec focuses on the infrared region of the electromagnetic spectrum. Building a NIR spectrometer is tricky because a lot of things absorb infrared wavelengths and because I would have to build some sort of detector that scans through individual wavelengths very precisely. This isn’t impossible, but it isn’t trivial – so I’m still looking into it. There are a large number of DIY spectrophotometers projects out there but few of them dip very far into the IR range, precisely because it is so difficult.

There is a nice DIY solution for flow-injection analysis (a stream of reagent is merged with a stream of sample and the mixture is analyzed). [3D printed syringe pump] [Nitrate quantification]

For the munsell color test, things are a lot simpler because we only need to deal with the visible light range. Reverse-engineering a visible light spectrometer like this one is not at all an unreasonable thing to do.

Building, Bluetooth, and Boards

with 1 Comment

These week I focused primarily on what I need to start actually building the for-field-use soil moisture/temperature sensor platform, as well as selecting a bluetooth shield for communicating with our field science app, and picking a board to actually build the platform on.

I tracked down circuit schematics for the Infrared temperature sensor. So far I think it will work for our purposes, and at around ~$3 a unit I see no reason not to try it out.

Screen Shot 2015-10-05 at 2.42.31 PM

We already have several moisture (and temp – a useful calibration for the IR measurements) sensing platforms laying around so I will probably cannibalize one of those for it’s sensor. I just need to figure out which one…

Screen Shot 2015-10-05 at 2.43.00 PM

My next order of business is selecting the best bluetooth shield for this project. I’m looking at Bluetooth LE (low energy) because we don’t want it to die in the field. The LightBlue Bean that Kristin found for the Ambiance platform looks promising – it has extra functionality built in that might not be necessary for bench-top applications but could be useful out in the field. Even though the ambiance platform will have a LightBlue Bean sending back temperature and accelerometer data, it might be nice to have this data associated with a sensor value on the ground as well. Also the onboard battery is very nice. I’ve been looking at other shields but I think I need a second set of more knowledgeable eyes to discern which ones might work best for bench applications.

Up until now we have primarily used the Arduino Yun for field sensors because of it’s wifi capabilities, which are handy for in-field debugging. Now that we are moving towards bluetooth, this is no longer necessary. I was thinking about using the Arduino UNO. This seems to be the flagship board from Arduino, and is advertised as being the best for beginners (which I am). I also know we have lots of them around already, which will make it easier to get started right away.

Lasers! (And also other sensors)

with No Comments

Scanning optical organic matter sensor

Organic content can be measured in a variety of ways. The most accurate tests involve measuring the amount of combustable carbon-based matter in a sample by putting it in a chemical oven. In a test like the one pictured below, soil is allowed to sit undisturbed in a falcon tube for a period of time in which the available organic matter floats to the top.

organiccontentlaser

I would like to use a combination of a laser and a photometer to make a scanning optical device that moves upward from the bottom of the tube. An arduino would log the values of intensity of the light that permeates the tube. The intensity would be reduced for the section of the range that is obstructed by organic matter (or mineral matter at the bottom). I will write software to measure the length of this band and then calculate the volume from this value (thickness*pi*r^2). This method would be faster and more consistent than measuring each band individually by eye.

Screen Shot 2015-09-28 at 10.08.55 AM

 

Electrical Conductivity & PH Sensing Platform

This platform will also be designed for bench top use because soil samples need significant time to stabilize before accurate readings can be collected. I am focusing on sensors that connect via BNC because they seem to be the cheapest option for arduino interfacing.

The PH interface will be based on this implementation from Sparky’s Widgets (a great all around resource for electrode sensing applications).

SW_pHi_project_group1

 

I will try to build this interface for the pH probe first and then see how easy it is to modify to read EC. Sparky’s Widgets offers an integrated solution for purchase, but I would like to reengineer it myself if possible.

Temperature and Moisture Field Sensor

This is the only sensor platform I am designing for field use. Right now I am thinking I will design the temperature portion of the sensor to be used right after the soil core sample is taken. I am planning to use infrared sensing in the resulting ~10cm hole to measure soil temp. There are a lot of options out there for infrared sensing – here is a sparkfun sensor I am looking into. I need to get an idea of what precision is necessary for this application.

For moisture I am planning to use a very robust sensor from Adafruit that has been used by students in the past. Building the circuit for this sensor might be a good place to start since I have models to work off of.

 

NPK and Munsell Color Optical Sensor

A lot of soil nutrient tests involve chemical reactions leading to color changes. I am interesting in using RGB sensors to find a precise value for the color of a solution so I can determine it’s nutrient density. Munsell color test is the official color metric for soil research. I am now researching ways to use RGB LEDs and photosensor to test color of an object. A sensor capable of detecting color could be used for both bench-top NPK tests and Munsell color testing.

 

1 2 3