My current project is for a PAR (Photosynthetically Active Radiation) Logger. PAR is a specific spectrum of sunlight (400-700 nanometers) and is an important measurement for marine biology and ecology. The sensor I use as part of my research is a Li-Cor Li-193 Spherical Underwater Quantum Sensor. I've been happy with the sensor, but the Li-Cor logger is not the best fit for my research needs. My goal is to design a logger for this sensor that meets the following requirements: Compact- I want the logger to fit into a small underwater housing to reduce buoyancy and for ease of deployment Low battery draw- Lower amp draw equals less batteries used per deployment Real Time Clock- Need a RTC for Time Stamps, and potentially for controlling sampling protocols and instrument sleeping Data Logging- the whole point of a logger! I'm a fan of a simple csv file on a removable SD card LED- visible through housing to insure logger is running A time stamped data logger is a staple for any monitoring project, so I'm happy to start off my blog with this one. So here is what I have so far- Equipment List: Board- The brain of the logger, I'm going with an Arduino Pro Mini. After being burned by the more common Arduino Uno and it's heavy amp draw, I've switched to using these smaller boards for all of my battery powered projects. Not all Arduino's are equal, and not all Pro Mini's are equal. I've noticed a lack of quality with some of the cheaper boards I've picked up, so I've been using the original SparkFun Pro Mini. But my absolute favorite board so far is the power stingy Rocket Scream Mini Ultra, mainly for the fact that this board has an awesome power regulator and draws incredibly low amps. But also because the A4 and A5 pins (used with the RTC) run along the edge of the board, as opposed to inset on the SparkFun board. SD Card- I'm using the SparkFun SD breakout board. It's a straight forward SD card board, and I've been happy with the results so far. RTC- I'm using a DS3231 RTC. This is the RTC I've been using for a while now, so I'm comfortable with it. I'm not a huge fan of this particular model, but I've got a code library for it and it's been pretty reliable for me so I'll stick with it for now. Universal Transconductance Amplifier (UTA)- I need a signal amplifier to increase the sensor signal for use with the 3.3v logic on my board. Li-Cor makes an amplifier that will work for my needs, but I came across this great article on a similar PAR logging system which is where I found out about the UTA made by EME systems. I decided to go with EME systems as its a great product and the owner was very helpful in explaining to me exactly how to set up my UTA. A picture is worth a thousand words, so here is a breadboad mockup of what my logger ended up looking like: Pin Layout: SD CD -> Pin 5 SD DO -> Pin 12 SD GND -> Common GND SD SCK -> Pin 13 SD VCC -> 3.3v SD DI -> Pin 11 SD CS -> Pin 10 RTC GND -> Common GND RTC VCC -> 3.3v RTC SDA -> Pin A4 RTC SCL -> Pin A5 UTA Red -> 6v Batt UTA Green -> Pin A2 UTA Black -> Common GND UTA Black/ Blue -> Yellow Dot Pin on PAR sensor UTA Brown/ Green -> Opposite Pin on PAR sensor LED + -> Pin 3 LED - -> Common GND (through 1K resistor) The above drawing lays out the all the equipment used and how it is connected. I'm going to hold off fitting all the above components into a waterproof housing until I've had a chance to bench test this set up vs. a certified sensor. But as of now I've got the above components soldered together on a PCB prototype board and so far the logger gives me values within the expected norm. Arduino Code: The code I wrote for this is pretty simple for now. For other projects I've done I usually put my boards to sleep when not in use. And this makes even more sense with this project as no one is concerned with PAR values during the middle of the night (spoiler....... it's just a lot of zeros). But for now the code runs 24 hours a day. Even over a time frame measured in seconds, PAR can vary greatly depending on environmental conditions (cloud cover, turbidity, ect), so I've chosen to use an averaging routine to log the data. Ultimately I'll choose to log the data once per minute, with each logged data point representing the mean of 60 measurements (60 seconds per minute). But the included code logs data every 10 seconds as I didn't want to wait that long when troubleshooting my code.
Above: The housing sled for mounting all of the electronics Below: The logger in a water proof housing ready for deployment Future Goals:
The above code is pretty basic, and as I mentioned I'd like to add a sleeping function to it. I'd also like to add the option of using a LCD screen to display real time PAR data. The LCD would not be used when logging data due to power constraints, but would be helpful to use in hand held lab situations.
0 Comments
Leave a Reply. |
AuthorAn electronics enthusiast looking for a place to gather his thoughts, ideas, diagrams, and code Archives
October 2016
Categories |