Close

Digital-to-Analog Converter (DAC)

A project log for The Electric Fish Piano

A DIY set-up to listen to, record, and manipulate the electrical tones produced by weakly electric fish!

Davis CatolicoDavis Catolico 07/03/2016 at 16:120 Comments

As I previously mentioned, I would be transitioning from the function generator to an Arduino Zero. The Arduino Zero has a digital to analog converter (DAC) which makes this possible. An Instructables article by ForceTronics explains more about what this means and how we can use the DAC to make a pseudo waveform generator. I modified the example code because I don't expect to work much with signals over 1000 Hz. My changes include changing the sample count to a set number (100), and allowing the user to simply type in the desired frequency (range from 100 - 1000).

With an oscilloscope, you can confirm that the frequency you input is actually being transmitted. The next step is to mimic the fish signal's voltage. The Arduino Zero emits a 3.3 V signal and the weakly electric fish typically emit signals closer to 10 mV. To attenuate the Arduino Zero's signal to this level, you can use a simple voltage divider.

Discussions