UPDATE : thanks to some EXTREMELY useful and positive feedback, I have made revisions to the pippyg design and the results are remarkable. I can now detect no "SD writing noise" at all when using Samsung EVO 64GB SD cards, which were previously unusable as they generated so much ultrasound, It's now clear that these SD cards were much more electrically demending, and the current surges were causing the decoupling capacitors attached to the SD card interface to behave like pizeo speakers. I'll post an additional comment below once I have stuff to share, but I can't thank enough the people who commented below and pointed me at the correct combination of decoupling capacitors, it's a game changer.
So, having read that, I will leave the below untouched for historical accuracy and to remind myself to not jump to conclusions on a subject in which I am not entirely expert! Shortform - SD cards do in fact generate ultrasound - it's just that the levels are nothing like as high as I believed, and their sound was drowned by the noise generated by my incorrect choice - driven by cost - of the ceramic capacitors.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
My design pippyg is the most cost-effective static bat detector available. Pre-assembled and tested units are available from Smith Robotics in the UK at £40, and the device can be assembled from parts for well under £20 when 10 or more units are built.
At this price point certain compromises are to be expected, in particular the signal to noise ratio of recordings is lower than that of "pro-level" devices, but is similar to recordings made by AudioMoth. However, one of the compromises of this very compact device was entireley unexpected.
I relatively recently discovered that microSD cards generate ultrasound when data is written to them. I assume they flex microscopically when current surges through them whenever they do something particularly taxing - like writing big chunks of data for example - but whatever the physical reason, they definitely generate ultrasound. I had spent more than a year iterating the design of my pippyg and π•pistrelle detectors to attempt to eradicate what I thought was electrical noise associated with the microSD card, and in the first few design iterations there definitely WAS electrical noise caused by current surges to the microSD card disturbing power supplies and ground references, and that electrical noise was much reduced. But whatever I tried, pulsed noise continued to appear on recordings, and it is now clear that the majority of this residual "SD write noise" is acoustic in origin, and is originating in the microSD card itself.
My pippyg design - just like the AudioMoth that inspired it - has a microphone very close to its microSD card interface. The MEMS microphone is soldered to the same PCB as the microSD card interface, so the microphone and the SD card are strongly acoustically coupled, both by proximity (air transmission) and by mechanical coupling through the PCB itself, a rigid and very acoustically conductive medium. Depending on the brand of SD card, the "write noise" appears in 384kHz recordings to a greater or lesser extent. (When downsampling to 48kHz for bird recordings these noises are filtered away).
To attempt to address this I have just prototyped a "Remote Microphone pippyg", which splits the pippyg into 2 circuit boards, a microphone board and a digital board. The digital board contains the microSD card interface and the Raspberry Pi Pico - the noisy stuff. The microphone board contains all the analog circuitry - the microphone, the op amp, and the discrete Rs and Cs that form the amplification / filter circuit to generate a signal suitable for injection into the Raspberry Pi Pico ADC. The two PCBs are connected using a simple 3.5mm stereo aux cable. By amplifying close to the microphone, the signal passed down the cable is at a much higher level than it would be otherwise, so is inherently more noise immune.
Attached are sonogram images from a pippyg and the new "remote microphone" pippyg, to illustrate the difference. Both devices were sort-of equidistant from a MacBook Pro which was synthesizing a Noctule echolocation call, and occasionally synthesizing a Common Pipistrelle social call. These sounds were chosen because they have peak energy at around 20kHz, so MacBook speakers can reproduce the fundamental tone of these sounds. The sonograms are shown at minimum contrast so the write noise is shown as clearly as possible. Also visible are the "self noise" energy bands generated by the Raspberry Pi Pico, one the quality compromises mentioned above. Although these bands are much stronger than you would see in much more expensive recording equipment, these are much less important from a species ID perspective, as they are very unlikely to be misinterpreted as bat calls. The SD write noises can confuse species classifiers. In particular, when interpersed with Serotine bat calls they can look remarkably like Barbastelle calls and result in false positives.
The image shown here for the single unit pippyg recording is a particularly bad example to illustrate the problem as clearly as possible. SanDisk microSD cards are much quieter than the Samsung I have used here for illustration, and depending on the region of the microSD card being written to, the noise will grow and fade in an unpredictable manner. Putting the microphone at a distance from, and acoustically shielded from the microSD card generates better recordings all the time.
Moving forward I will work on a design for a waterproof case (or cases) for the remote microphone pippyg. Placing a standard pippyg into an enclosure tends to trap the SD noise within the enclosure and result in noisier recordings, so a waterproof solution for the remote microphone design should provide an excellent - and VERY inexpensive - solution for unmanned bat field recording.
The remote microphone pippyg, just like the single unit, can be assembled for under £20.


4 October 2024 12:15pm
Pretty cool!
Phil this can be used as a normal USB microphone can it not ? I thought I read you mention that.
Kim
4 October 2024 12:36pm
Is it possible that the noise is coming from the decoupling cap of the micro SD card? Usually I'd use a 0603 or 0805 X5R in the micro Farad range, but these are piezoelectric, so a better choice might be a 0805 C0G of maybe 10 nF in parallel with a tantalum.
4 October 2024 12:45pm
What is the time of the interval between spikes here ?
Looks a lot like spikes I've seen due to DC-DC conversion electronics. This looks like 5 Hz. I've seen exactly 10Hz spikes when using a UPS power hat before. I've noticed that power banks also often generate regular spikes. Some worse than others. This is really spread spectrum. Like ticks or pulses.
Perhaps decouple the local electronics relating to power distribution and try feeding in a really stable power supply from a linear power supply or something. Just to see if it points to that part of the electronics maybe.
I saw similar sorts of spikes when developing my sound recording system with different power sources and power banks.
5 October 2024 8:12pm
Interesting discussion. I would like to add another aspect, particular the observation that putting mic near to SD card. Even if there is no direct electrical connection, there is electromagnetic coupling. Writing to SD card is done with some MHz clock rate, which is shortwave. Even if the cables,traces are short and therefore no good antenna, there is the potential of electromagnetic coupling. The build-in preamplifier (e.g. FET) may pickup these EM and any non-linearity (including contacts) my rectify the additional energy and modulate the power supply. I'm fighting with similar issues, where the (underwater hydrophone) recorder on the bench works as expected, but as soon it is put into the pressure housing bending the sensor connection cables too close to MCU and uSD card, I can see the writing process in the acoustic data. Obviously, piezo sensors and pre-amps are outside pressure housing.
Kim Hendrikse