Waterproof, Digital Archival Hydrophone for Harbour Porpoises
Stacy DeRuiter's How To ALMOST Make Anything Final Project Presentation
Below you see a harbor porpoise (Phocoena phocoena) -- very little is known about their vocal behavior in the wild, and I am interested in investigating how (and how much) they use their echolocation capabilities to capture prey, as well as gathering data about other ways they may use sound for navigation and communication.
Below you see a harbor porpoise (Phocoena phocoena) -- very little is known about their vocal behavior in the wild, and I am interested in investigating how (and how much) they use their echolocation capabilities to capture prey, as well as gathering data about other ways they may use sound for naviagation and communication.
My ultimate goal is to make a small device that can be attached to a wild, free-swimming harbour porpoise (via a suction cup). It will have a hydrophone, and the audio data will be digitized and recorded at 400kHz for on the order of one hour (using Gbytes of memory). The tag will also float (and will have a VHF radio beacon attached) so it can be retrieved after recording is done. This circuit board is the first step toward engineering and building the harbour porpoise audio tag: Micro-Logger1.0.
Features of Micro-Logger 1.0:
When attached to a battery, the tag waits for its button to be pushed to initiate recording.
The LED turns on briefly, then recording begins; ADC output (from the ATtiny26L) is stored in flash memory. Another LED flash indicates that memory is full.
Then the device waits for another button push, the signal to begin offloading the data from flash memory (via wired serial port) to a separate computer. The LED flashes once more when data offload is complete.

This is some totally fabricated sample data - what I may hope to collect in the field.
-
This tag uses a small piezoceramic element to sense sound. I also had some success with a small electret microphone from RadioShack that had separate connections (wires) for the output, power, and ground (like one Jesse also used in a project this semester). The microphones from the MAS863 stock did not work for me at all - whether I wired them as their specification sheets suggestes or as Amon suggested, they did not give any output. It was not a problem of lack of amplitude of signal -- in one case, the signal was totally constant with time, and in the other, it started at Vcc and slowly drained to zero. In both cases, it was clear that the mic output line was not related to sound (at least the way I had them implemented in my circuit). For the class mics, I either had the power/output wire connected to Vcc with a resistor in series and a line (including a capacitor) going to the ADC pin between the mic and the resistor, or I had it connected to resistor-Vcc and to ground with the output line to the ADC pin in between the resistor and ground. Neither worked.
-
This logger has a 1M Atmel flash memory chip, which is only enough to store a very short sound clip (but it's enough for demonstration purposes).
-
The logger is powered by a 9V battery, regulated by a 5V regulator (for the ATtiny26 and most components) and a 3.3V regulator (for the memory chip, which will go up in a puff of smoke if given 5V for a bit).
-
The logger has a small red LED as a visual indication to the user that it's doing something (since it's otherwise impossible to know anything is happening until data offload).
-
The logger is inside an oil-filled sack (OK, it's a balloon) to waterproof it reversibly, allowing both underwater operation and wired data retrieval. I tried to waterproof the tag using peel-off plastic coating material, a technique that worked very successfully for a hello world 0 PCB. However, this chip includes several wires, and the plastic coating on the wires melts at about the same temperature as the plastic coating, so an attempt to waterproof an ML1.0 chip that way ended in ruin - wires shorted and the coated chip did not work. In addition, the coating was much harder to remove successfully from the mic logger than from the hello 0 chip, because there were wires and also because the traces were much thinner on the ML1.0 board. It might be possible to implement the "balloon" solution to waterproofing in a more elegant fashion by casting a sack for the logger in some flexible expoxy or plastic, then filling it with the tag and oil - I didn't have time to work on that for this iteration.
Caveats:
-
Does the Micro-Logger 1.0 really work???
I am uncertain whether the logger is actually recording sound. It definitely cycles through all the code I wrote for it with the appropriate number of loops (I checked by adding in some debugging code, asking the chip to send some serial data each time it completed a section of code). I am less certain whether it's actually writing to and reading from memory. The values come back as all zeros - am I really reading zeros from memory? Did I really write them there? If so, then the audio sensor is not working properly; if the zeros the chip outputs are not REALLY something I wrote to memory from the audio data, then there are problems with the serial communication between the ATtiny26 and the Atmel 1M flash. I suspect there are problems with the communication. I used the tiny26's universal serial interface function to talk to the memory, and I don't fully understand it (so code errors are pretty likely). However, I am happy enough that all my code is running and the chip is serially sending out its data (or at least sending out something)!
-
The Ginormous 9V battery
Obviously, to deploy on a 1.5m long porpoise, I will need a smaller, lighter battery. I had trouble programming the microcontroller with less than 5V, so I abandoned the nice little 3.6V button cell batter I was originally using for the 9V. It turned out that the battery was not the only problem with programming that iteration of the logger, since its circuit was basically wired up to fry the memory chip and deny all power to the ATtiny26. It should be possible to use a smaller, longer lasting (lithium?) battery.
-
The maximum possible sampling rate is <<<<<400kHz
This chip absolutely cannot record at 400kHz. To do that, I will need to add an ADC external to the Tiny26 (meaning more serial communication! Hurray!), since the internal ADC can not go that fast (and does not have the 16 bits resolution I would like). I also should have an anti-aliasing filter before the ADC conversion takes place, and clearly I need a larger memory to record for any amount of time (I think that the appropriate solution, according to someone who has made a similar logger, may be NAND flash, which is available in up to 8Gbit sizes).
-
There is no way to convert the ADC/logger output into Pascals (pressure units), because I don't know the sensitivity of this piezo disc. I will have to get one of known sensitivity or calibrate whatever one I end up using.
-
The LED is probably not a desirable feature in the final tag version (it might bother the animal, and it would be pointless, for example, to flash the LED when a deployed tag ran out of memory at sea). I think it's useful during development just so I can see when something is happening!
-
The attachment to the animal, flotation, and VHF beacon all need to be developed. I have collaborators who will help with the suction cup attachment. Flotation might be more likely syntactic foam (so it won't squish at 200m depth when a tagged porpoise dives) than styrofoam). I can buy a pinki-fingernail sized VHF transmitter to glue on if I opt not to try to build my own; I have not worried about this yet, since the first test deployments of the real tag/logger are likely to last only minutes or to be done on captive animals.
Details for the interested:
Schematic of ML1.0 (This is so ugly I might just die of embarassment if you look at it...)
ML1.0 Board(Not a single 0 Ohm crossover!)
ML1.0 Assembly Code (some non-working-yet features are commented out in the code, including for example SLEEP feature...)