The first half of this week was dominated by soldering the new device prototype together. This was a very slow and tedious process since I was dealing with pretty small connections in a tight space. Additionally I released that it would be pretty difficult to go back and fix any mistakes, this means that I had to test things as I went. After about two days of soldering and a little bit of trouble shooting I got the device operational with the SD card, real time clock (RTC), accelerometer, and gyroscope. There are connection points for the temperature and pressure sensors but they are not attached. I from this process I learned that I did not do the designs in the most intelligent way. As you can see in last week’s post I laid out the connections from a top view, however the connections go on the bottom of the board not the top so when I was actually working the board was flipped over and the connections were mirrored from the design. Next time I’m going to take this mirroring into account and make designs form a top and bottom view. In the end though it turned out well. You can see some pictures of the device while it was in progress and the finished product below. Not to toot my own horn too much but I think this is the best looking prototype to date.
I did make a mistake with the orientation of the gyroscope in this prototype, it is 90 degrees off the proper orientation. While I did this on accident it would have had to be done this way anyway to keep the form factor needed for the prototype enclosure we are using.
Once I confirmed that the device was operational I began work on creating code to import the data from it into MATLAB. I thought this would be fairly simple to do, since all that was needed was to tell MATLAB to read 3 more columns for the x,y and z gyro data. This part was easy to implement but while doing so I found a logic bug in the data time interpolation for the data which I had to fix.
With the data imported into MATLAB I began to research into how to integrate the accelerometer and gyroscope data together to get device orientation and remove acceleration due to gravity from the data set. I did a fair bit of research into this but realized that it would be best to kick this part of the project over to Ben, so I passed off my notes and will let him discuss it in his updates.
Ben in returned passed something off to me. He had been working on code that would right data to SD card in binary instead of as text to hopefully decrease write time with the SD. He asked me to look at under the scope to see if it really had decreased SD write times. Also I had to look at the new device under the scoop to see how much adding the gyroscope to the system negatively impacted our power usage. I found that reading the gyroscope in addition to the accelrometer adds about 16ma to the reads. Additionally we found that the binary SD write does not decrease the SD write time but increases it. This was a surprising result and it is controlled for us writing more data to the SD due to the gyroscope.
Next this week I did a lot of research into batteries for the device and worked on some initial waterproof enclosure designed for deployment. This was very preliminary research for the most part and this post is already long so I will discuss it later. What is not preliminary is the first test enclosure. There are sharks in captivity at the eastern shore lab right now (see Ben’s post) and we need something to attach to them. For this I am just throwing together some PVC pipe to put the device in without the pressure or temperature sensor. I will hopefully be able to show this exiting tube next week once it is done.
Finally this week I have been working in Eagle to design my own PCB boards for the device. The idea of this is to put multiple components together on one board that is the size of the Arduino. We will probably be able to fit everything on two Arduino sized boards, we can then stack the boards on top of the Arduino, like standard Arduino shields, to get a very small form factor for the device. This is going to be a long term process since this sort of PCB board design is a slow process.