Weekly Update 2-17-16 to 2-23-16

This week started with a big accomplishment, after around 2 weeks of troubleshooting I finally got the RTC to work properly and write data to the SD card. Both of these devices have been giving me a fair amount of trouble over the past month, but I had solved the problems with the SD and had isolated where the problem most likely was with the RTC. I will detail this process more in one of upcoming history posts. For this post all that you need to know is that the RTC and the SD reader would work independently of each other but not together. I had identified the problem occured when initializing the SD card library, and believed that the problem was mostly linked to the SPI data mode. I had tried to control for this by changing between the SPI mode need for the SD card (mode 0) and the mode needed for the RTC (mode 3). This was not working but I realised that I did not know where the SPI mode for the clock was declared. This led me to open the library for the RTC and discovering that the SPI mode specified in the library I was using was SPI mode 1. This error arose because I had been switching and testing different code libraries for the RTC in hopes of find one that would work well. I did not realise that the RTC could work with different SPI modes (the SD certainly can not), and that different libraries would use different modes. After fixing the SPI mode switching in the code, and cleaning up some typos in the code I was able to get the RTC to write the time to the SD card. This was successful with the exception of the year being recoded as 1916, not 2016. This is probably a fairly simple time setting bug that I will work on in the future.

After getting the RTC and SD to work fully and tested the accelerometer and temperature sensor, I determined that the hardware stage of this sensor was completed. So I applied heat shrink to the solder joints on the device. Here are before and after pictures of the wires on the device (I know the wires are a tangled mess but it works).

Before

After

Finally this week I began integrating the RTC and SD code with the code for reading the accelerometer and temperature sensor. Currently the code can read from the the sensors, the RTC and access the SD reader. The goal for next week is to get the output from the sensors to write to the SD, along with the time,. Assuming that I accomplish that without trouble I will start looking into getting the accelerometer to sample and store data during the time between accessing the SD card to write. The goal of this is to minimize the number of times the device writes to the SD card.

The Plan

The plan for this blog is to post weekly or bi-weekly updates on the progress made on my arduino animal tag research project. The purpose of this is to allow people to follow along with my research and to get a feeling for what it is like to work on a project of this nature. Additionally this blog will serve as archive of the trials and tribulations I went through during this project.

There is a problem with this plan, and it is that I have been working on this project for nearly nine months now. Since many things have happened during that time that I think are important to document, and for others to gain an understanding of this project. I will try to post a history of the project up to this point during the coming weeks.

I will also try to post short summaries or explanations of the science behind what I am doing. This is mostly to force myself to develop a deeper understanding of the system I am creating, since I have found it is very easy in this project to get things to work without any understanding of how or why they work. This lack of knowledge is something I want to overcome and I am hoping that by committing myself to write these blog posts about I will be able to muster the needed motivation. Additionally these posts can provided explanations for why I made some of the choices I did. These short explanations will mostly revolve around the electronics side of this project, some examples of what I may do are explanations of how real time clocks work, or what the I2C protocol is. As time goes on I may even dive into some of the marine science this animal tag will help study.

Finally I think it is important to put a brief disclaimer here at the beginning of this blog, and that is that I am not a marine biologist or an electrical engineer. I am a physics. I have not taken a biology class since high school and I am currently enrolled in my first analogue electronics class. I am self taught for nearly every skill I need in this project so please bare with me if my terminology is a bit off or if I am making ameture mistakes. This project is still very much about learning for me, in addition to the stated goal of creating a deployable underwater sensor system.

Hello world!

This blog will outline work done on the Arduino animal tag project. The project is a collaboration between the William and Mary Small Hall Makerspace, and the Virginia Institute of Marine Science(VIMS). The purpose of this project is create a small, cheap, and low power use sensor system to be used as an underwater animal tag in studying the detailed behavior of large fish in the Chesapeake Bay.