Episode: 2170
Title: HPR2170: soundtrap.io
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr2170/hpr2170.mp3
Transcribed: 2025-10-18 15:14:55

---

This is HPR episode 2,170 entitled SoundTrap.io and is part of the series' inter-news.
It is hosted by Ken Fallen and is about 33 minutes long.
The summer is a low-cost open source acoustic logger for my own diversity and environmental monitoring.
This episode of HPR is brought to you by AnanasThost.com.
Get 15% discount on all shared hosting with the offer code HPR15, that's HPR15.
Better web hosting that's honest and fair at AnanasThost.com.
Hi everybody, my name is Ken Fallen and you're listening to another episode of Hacker Public Radio.
A while back I put a blog post up on my website asking for an open source mosquito-locator.
One of the people put me in touch with David Zilli and from the Hobbog project.
And that was released as HPR1894 back in 2015.
As part of that, David recommended that I call it contact Alex Rodgers, who is basically Alex.
Can you tell us what you're doing?
Yeah, so I'm a professor of computer science at University of Oxford and I'm interested in acoustic monitoring
for some more biodiversity and environmental monitoring.
And one of the things we've been doing is building an open source acoustic logger.
So a device that you can put in the environment that will record sounds.
And the clever thing is we want to try and put some intelligence on the device.
So have the device make decisions as to whether a particular sound is interesting and only make
a recording if it is interesting.
What was the project called again?
The project is called soundtrack.io.
And what's interesting by your definition?
So it depends on the application. So we've been doing some trial deployments this year looking
for the new forest cicada. So that's a very rare insect, which only lives in the new forest
in the UK. And it sings at 15 kHz, which is probably outside of the range of most adults hearing.
Children can still hear it, but the insect is actually very loud, but the challenge is that most
people can't hear it. So what we've been doing is making devices that can automatically detect
that frequency, recognize it as the song of the cicada and make a recording if they hear that.
And you have made an open source hardware device.
Why did you decide to do that and not just go with a smartphone or something?
Yeah, so we did a for the previous two or three years, we've done a citizen science survey
trying to get people to use smartphones. That has some challenges you need people to go to
particular areas at particular times. So I'm a big fan of using some citizen science and
smartphones, but there are some applications where you'd like to be able to deploy things and
record maybe overnight. So if you look at the bats recording overnight, if you're doing a long
term survey, you want to collect regular recordings from a particular place. So there's sort of a gap
for a low-cost device that you can deploy and then come back and collect later on and collect the
data from. So commercial devices in this space cost about £1,000, typically because it's just a
very small market. So we wanted to make an open source, open hardware device so that we can
exploit an online maker, so PCB assembly and enable people to forward these devices, assemble
them and use them themselves. So there's a picture of this on your website. I want to give you
us a quick rundown of what it looks like. Yeah, it's about the size of a credit card.
It's got the moment we power them with three AAA batteries. So that's about the size of the
device. So it's a basically a single-sided printed circuit board that sits on top of a battery mount.
We use a very small smartphone microphone, which is very sensitive, and we record to a micro SD card
and then the whole device is ran by a very low power microcontroller. So there are a few
sort of ralsy pie-based approaches, but a microcontroller allows you to be much more energy-efficient
and have the device lasting much longer with with very small battery pack. How long will that last?
So for the secada deployment, we have the device waking up every five seconds. It listens for
about 200 milliseconds, analyzes that sound, decides whether it wants to make a recording,
and if it does it then makes a 30-second recording. And the devices we deploy it, we allow them to
make up to 50 recordings a day. And then with the three AAA batteries, that device would last
probably about 10 weeks. Okay, that's actually pretty good. I've seen here on your website that
you put in a plastic bag and just cable-tighted to a tree. Yeah, so the challenge with sort of
small, low volume manufacturing tends to be the enclosure. So it's typically very easy to
outsource PCB manufacturing. So you can have PCB manufactured. You can have PCBs assembled.
So there are lots of online companies which will take your plans, take your bill and materials,
and just supply you back with completely assembled printed circuit boards. The challenge is
typically how to get a low-cost enclosure. So in this case, we needed a waterproof enclosure,
but also we needed sounds to be able to travel through the enclosure. And it turns out that a cheap
plastic bag is the easiest way to do that. Can you tell me roughly what the cost of this would be?
Yes, we're going through some different emissions and each revision we sort of try and take out some
of the cost. But at the moment, if you ordered 100 at a time, you could probably have them assembled
for probably about £20 each. So why would that be better than a pie zero, which is like a tenor?
So the challenge for the pie zero is really the power. So as soon as you're running an operating
system, you're very limited in what you can do in terms of stopping the processor and going to sleep.
So these microcontrollers allow you to at any point in time stop the processor, change the clock
frequency of the processor. And also you can do lots of processing whilst you're actually asleep.
So the processor stops, but we can still take samples from the microphone and pass them into
memory even with the processor clock actually stopped. So these microcontrollers are very much
more energy efficient. So we're down to operating power is milliwatts. And then when you do include all
duty cycles, your average consumption is less than 1 milliwatts. Oh, that is quite impressive actually.
Yeah, so that's really the challenge. So a battery power device, the amount of energy you have
in a battery is very limited, which is sort of why we have to charge our mobile phones every day.
So if you want something that you can deploy, you really need something that can
operate on a very low duty cycle, just power down completely and then just wake up when it has to
do something. And that's the challenge with any embedded system with an operating system,
because you've got to maybe you've got to wake your arse with high-goot each time.
All right, Devils advocate here. If I go down to the pound shop, I can buy one of these LED
outdoor lights for a pound or so. Could you not just have a solar panel and a battery,
just power up something like a pi-zero one and go all that way? That would be cheaper.
Yeah, so when you look at the cost of a commercial, a printed circuit board, having
that assembled with a PV panel attached and a charger, all those components add up.
It's often quite deceptive, you know, if you're going to be building something in runs of sort of
a hundred or a thousand, your costs are significantly more than a small Chinese manufacturer,
which is turning out millions of solar power LED lights. So it's often sort of quite deceptive
as the cost of something that you can just fire on the street and something that you're going
to have assembled with a particular application. And the key thing is we don't want, if you're going
to deploy a hundred of them, you don't want to be spending a lot of time assembling them yourself,
because that's a huge cost, you know, you can save a little bit of cost on the material,
if each one takes you half a day to put together, that's a huge cost that you have to bear.
So the idea is that we're trying to look at solutions, which you can just order,
they come assembled, they're single PCBs, but that means that you're doing it in typically
sort of small volume. So you have to be careful about the components that you can put on the device.
Yeah, I guess as all the pi doesn't have a microphone, nor does it have, you still have the
power supply, are they keeping them dry? Yeah, when the power supply is cheap, because they
make 10 million of them. So you get good prices if you're going to build that many devices.
True or no? So do you need to set up beforehand when you're recording this, what the type of species
it is that you're going to want to listen to, or will this just work out of the box for anything?
So what we're looking at is sort of making it configurable. So the source code will be open,
so anyone can you can do what you like with it. We want to try and provide some basic tools,
because many sort of ecologists and conservation biologists aren't going to be happy writing,
firmware for a device in C. So we're going to provide a sort of a basic configuration script,
which allows you to determine things like the sampling rate, what frequency you want to sample,
what frequency you're particularly looking for in order to trigger the device. And we've been
doing experiments with BAPS, so for this recorder, we sample at 48,000 samples a second,
which is sort of like a CD quality recording. You need to record BAPS, you need to be able to
detect audio frequencies up to 80 kilohertz, so you need to sample much faster.
So all of that needs to be sort of configurable, and that depends on what type of
species you're looking for. And then the recordings, what do you do with those?
So there's a growing sort of community sort of looking at doing automatic species recognition
from audio recordings. So that means if you collect a recording, it can you then once you've
got that data back, use more processing power to try and automatically label the recording,
detect what birds are singing, what insects are singing. So that's quite a powerful way of
deploying a device that can maybe wake up, record the dawn chorus, and then provide you with
automatic analysis of what birds are singing. There's also a lot of interest in trying to
measure more general things about the environment. So these are people developing acoustic indices.
So these are sort of measures of the complexity of the sound, which might not tell you what
species of bird is singing, but it will tell you, okay, there's birds on. And that would allow you
to deploy these devices and get some measure of the biodiversity in the environment. And there's
sort of interest in that space for things like monitoring the green roof. So many building regulations
now stipulate that you should do something for biodiversity, and that often means having a green
roof on the top of your building, having plants on the top. But there's no real sort of ongoing
way of actually measuring whether that's having any impact on birds and insects actually coming
and using that space. So this would provide a very low cost way of monitoring that type of deployment
and seeing whether it's actually having any impact.
What made you decide to do this open source?
So it's really as soon as you try and do something commercially in this space, because it's such a
small marketplace, selling devices becomes very expensive. So if you look at the commercial
devices that people sell, you know, they're perfectly competent electronics engineers and the
firmware is great and the software support is great. But all of that development and support comes
at a cost. And that typically means that any commercial device you sell in that space is going
to be very expensive. So we're particularly interested in users who don't have the funding or don't
have the capacity to go off and buy, you know, several tens of thousand pound commercial loggers.
So we've been doing some work with some scientists in Kenya where they can their electrical engineers,
they can assemble these things, but they don't have access to the funding that would enable them
to go and buy the equivalent number of commercial devices. So it's really sort of exploitable to
that sort of online maker community, all the stuff around sort of as we pie is an Arduino's
to try and enable people to build their own devices.
And how do you, where are they? Under what licenses is the first start?
So this would just be completely open. So we're probably, what we're doing at the moment is where
we're on our sort of final revision of the hardware that we so far kept closed because we don't want
to, we don't want to be changing things too quickly and having to having people using
versions that we've decided we don't want to take forward. So the trial version that we're sort of
finalizing at the moment, that will be just as an MIT license and, you know, we don't mind what
people use it for. Not very good. And the idea would be I could make this like on a
PCB, get the print of myself or make it on a breadboard or something.
Yeah, so assembling yourself is a little bit challenging, probably just because of the
the MEMS microphones that we use. I mean, it's perfectly possible. So I typically have
all the PCBs and then I have a little pizza oven at home that I can use to as a
reflow oven to solder the devices on. That tends to get a little bit crudely and if you're
assembling a lot of them it's often not worth it because a lot of PCB manufacturers will offer
assembly services as well. So you basically you send them the the Gerber files which is sort of
the standard for describing a printed circuit board. You send them your bill and materials which
are just the list of components and they send you back the printed circuit board with all the
components on it. And there's a number of sort of online services so circuit hub is a very
interesting one where you can post your bill and materials and your your Gerber files and then
anyone can go to circuit hub and order those devices and then connect it to circuit hub. There's
another thing called group gets which allows you to specify maybe you want a batch of 100 devices
and at that point it becomes quite cheap but you can't find individual people who want
to buy 100 of them but group gets allows a group of people to come together a bit like Kickstarter
where everyone orders a certain number and when you get to that threshold then the order is
is sent to circuit hub and group gets will deal with the distribution. These are really good ways
of enabling individuals to get their devices out there without them actually having to be in the
loop of ordering them and posting them off to people. Okay now the question you've been dreading
when has it got to be released? Yeah so we're now we've got a final version that we're just sort of
we've gone through a couple of iterations on the printed circuit board at the moment we change
the processor so we've gone for a slightly more powerful processor which we hope will give people
a little bit more flexibility and we've also increased the memory capacity of the device
from the version that we've been using now. So our aim is probably for sort of January or
February to to have all of that up there so that you can go to group gets and order it or you can
go to you can download all the files yourself and just assemble them yourself if that's what you
want to do. Fantastic. So then you have this thing you put it in your garden, your record
in my case I want to record mosquitoes. Is there any way of getting the data off in a real-time
fashion if that was what I wanted to do or would it be better off just using the microphone?
Yeah so we've been sort of that's a thing that we'd like to try and address. It's challenging
because audio files tend to be very big so the minute of audio, run, compressed, wave file is
probably about six megabytes which is for a wireless network you're going to use quite a lot of
power trying to transmit that off the device but it would be possible so we have looked at maybe
using Wi-Fi modules and having a device that you could put into your garden which would stream the
audio back and I think if you're clever about making decisions about what data you actually want
to transmit then you can do it and have a reasonable energy consumption so that you don't need
too big a battery pack to do that. There's some interesting internet of things, radio protocols
which are low power but they tend to be very low bandwidth as well. So audio has this challenge
that the file size is tend to be quite big and that's often a challenge for ecologists and
conservation biologists who are trying to do acoustic surveys in the sense that they deploy these
existing devices and they end up with terabytes of data and there's a challenge. There's a
challenge for developing some tools there to enable you to look through terabytes of audio data
and look for interesting signals within all of that data. Yeah they've done some work
enough for the graviton stuff. Yeah and so it's sort of a well we're quite interested in maybe
doing some sort of garden, citizen science type surveys where people could upload the data,
send it back to us. When we've looked at doing that you begin to worry about people's upload speeds
even from their broadband network so often a SD card in the post is a very negative way of transmitting
data. Yeah IP over pigeon. Yeah so there's also the whole physical thing of if you're doing this
in a forest you need to go around and gather these cards and update them and change the battery
so it's like that sort of management function as well I guess. Yeah so when we do this
to card a survey we deploy them and then come back after a month, check they're still running,
take out the data and have a look at the data. That's there's no that is a challenge. So one of
the things that we're a parallel project that we're looking at is this is for forestry sort of
protection in tropical countries so we're working with some colleagues in Belize looking at can we
detect gunshots and chainsaws in real time using acoustic sensors and there what they need is some
sort of a lurking system so there's a range of station and what they'd like to have is a real
time alert that okay there's some gunshots there seems to be some hunting happening in this part
of the protected area. So there you can use these low power forward spectrum radio networks
sort of the sort of emerging the internet at things type applications because there you're not
really trying to send back all of the audio you're just trying to send back a alert that I care
of detected something and I I think it was a gunshot so I think it was a chainsaw.
Very good like an ideal one for all one of those interdata things mesh wireless networks as all.
Yes yes so then so if you look at things like Laura you know they which is sort of a sort of
emerging low bandwidth but long range low power network in a tropical forest we're going to try and
do some trials next next spring but we'd expect to be able to transmit you know at least sort of
five or six miles maybe more so it so that allows you to sort of form quite an effective network
without having too many too many base stations or too many sort of booster stations.
Yeah that's pretty impressive. I can imagine in that sort of case a some sort of seismic
sensor or something might be also useful for you know bulldozers going past through that sort of
thing how easy is it to add and modify the board itself. Yeah so one of the things that we're
sort of quite interested in doing is looking at how we can make the acoustic sensor into something
that would sort of plug into a more modular type of sensing board so you can there are a few sort
of internet of things sensing boards available which are designed maybe they provide a temperature
measurement or an air quality measurement. What we'd like to try and do is sort of take the some
of the technology that we've developed on this board and actually turn it into a sort of a modular
board that you could plug into some environmental sensing board so then we'd we'd make our our device
do all of its clever energy management so deciding on when it should wake up when it should be
sleeping but then actually just provide an alert back to this other board that maybe there's
some interesting data that needs to be uploaded or maybe there's just an alert that needs to be passed
on so that's the thing that we really keen to do and certainly for the tropical forest setting
you know we don't need to reinvent the wheel by doing all of the radio network and all the
all the charging circuitry if we have solar panels on there you know there are existing sort
of environmental sensor boards but what we'd like to be able to do is make our acoustics an add-on
for that type of device and what makes you your board acoustic wise so different from just having
a regular on microphone and gone like that so it's really just the fact that the audio goes
straight into a microcontroller and then sample by sample we can analyse the sound at that level
so when we're looking for the cicada basically we we use a thing called the Gertz allow rhythm
which allows us to do a bit like a discrete fast barrier transform but rather than looking at
every frequency we can just measure the energy in a particular frequency band so every time we get
a sample from the microphone so 48,000 times a second we do a small calculation we keep track
of how much energy we've seen in that 14 kilohertz band and then after a certain number of windows
we stop and say okay well looking at that 200 milliseconds of sound that we've processed
do you think there was something interesting in that and should we make a recording or is
do we think that there's nothing of interest at the moment so we can go back to sleep for another
five seconds and then wake up and have a look a bit later so the key thing is that because we've
got this sort of microcontroller that's right down at the very low level sample by sample we can
begin to make decisions as to whether the sound is interesting or whether we should recall it or
whether it's something that we should raise and alert about so that and that's the sort of thing
that you want to be able to do on your very low power device rather than sending all of that
audio to a Raspberry Pi and having to power up the Raspberry Pi to make that decision.
Yeah and that will be an awful lot of data gone through all the time 24, 7 listening for
everything and then having to process that. Yeah and it's tend to be surprising things that take
power so writing to SD cards in our device is the most power-consuming activity so the less we
write to the SD card the longer the battery is lost so listening and doing some computation
is much more energy efficient than recording sound to an SD card basically just because the
current it takes to write to an SD card so surprising things tend to use the energy and as soon as
you put a Wi-Fi network on there typically it's the radio network that then uses all the power.
But in order to repurpose the device or in order to use the device you would need to know beforehand
what it is your target species or you know chins always. Yeah yeah so I mean there is some scope
for sort of doing reconfigurable hardware and that's sort of a that's a really sort of emerging
area that's very interesting so actually using an FPGA so feel programmable device so that you can
change the hardware to look for a particular device. So there's some really interesting sort of
hobbyist boards emerging in that space so there's a device called MyStorm which allows you to
connect a Raspberry Pi up to this field program or Gatorade and then you can program the device
so you're programming the hardware and so you could program the hardware to look for a particular
frequency and then have the hardware very energy efficient hardware doing that as opposed to your
microprocessor doing that. So how then do you set the frequencies that you were interested in on
your devices that is that set one time and done? So it's in the firmware of the device so it's
all software on the microcontroller so basically the microcontroller determines what the frequency
rate that you sample from the microphone is and then the code that we write that runs on them
on the microcontroller does the analysis and makes that decision so that's all changeable but
you need to be able to if you wanted to make radical changes to that beyond the the configurable
stuff that we put into the existing firmware you need to be able to you need to be comfortable writing
C and changing the firmware on the device but that's not a you know the people who are playing with
Arduino's are doing that type of coding all the time you're writing C that's going to run on
a microcontroller. Yeah but I'm thinking for a forest if this year they're interested in one
thing that they can gather up the devices at the end of the year reprogram them and redeploy them
next year for some other project. Yeah so the key thing is that you don't have to change the hardware
it's just it's just be flashing them updating the software and you can do that through the USB port
so they all have all these devices typically have a bootloader so the device has a USB port
that we use to configure it to tell it what the time is when it should be making recordings
but you can also use that port to update the software on the on the microcontroller.
Okay very cool. Did you actually find any stickers this year? No we didn't so but that doesn't mean
it's not there so we've been looking for sort of four four years now so it is the only site in the UK
where it's ever been recorded and no one has recorded or there's been no confirmed sighting since
about 1992 so there was a possibility of a sighting around 2000 but it has disappeared for
significant amounts of time in the past as well so last time it was sort of rediscovered around
the 60s it hadn't been seen for 40 years so it's the the best sort of advice is that it's likely
to be there are likely to be colonies somewhere in the New Forest but we just don't know where they
are yet. Very good. And what other projects are in the pipeline for this? So bats are very
interesting so we're keen to try and produce a device hopefully just using the standard device
that we've got that can be used for a sort of a citizen science bat survey so we've been talking
with a colleague professor Kate Jones at UCL he's probably the leading person in terms of using
devices for for monitoring bat populations and we're working with her to sort of try and sort of
see what we'd need to do a large scale citizen science bat survey using these types of devices.
And what would the plan be their ship that devices out to people or? Yeah so one of the interesting
things I've in previous projects I've used the mayor as well of distributing devices so you
people sign up on a web page they are they are sent the device by post they can typically they
can deploy it for a certain amount of time and then just send the device back to you and that allows
you to recycle the devices and with a with a limited number of devices do quite a lot of
a large scale deployment so that's sort of quite an interesting model that we that we probably
want to try and sort of exploit in this case. And also get over the data. Yeah so so what we haven't
so what we haven't really tried yet is sort of what would be the typical sort of
amount of data that we'd end up with from a useful survey so there's some work to do to sort of
figure out where you'd want to do these surveys what would be a useful amount of time to get some
meaningful data and then look at how much how much how many gigabytes of data that is and then
sort of see okay well how how willing would people be to use their home for band to upload that
much data and how long would it take because no typically we we get these sort of 10 mega mega
bit per second deals but that's download and the the upload speed is very much less than that.
So may well be that post and just sending your SD card back with the device by post is
not only easier for people but faster as well. Yeah more efficient and less chance of the
breaking halfway through. Yeah I mean certainly sort of you know if it's going to take you a
day to upload the data that you're you know a desktop or laptop tied up for the day
so compared to just putting it in an envelope and posting it back it may well be that may
well be the least time consuming thing to do. Yeah there's quite a lot of limits on the UK so
as well most people have bandwidth limits. Yes so it's sort of it I mean it's quite sort of a
is it disappointing in this world of digital technology that actually mailing SD cards turns out
to be the most efficient way of sending data back to boards but that maybe how it is for well.
Yeah true for you. So any other stuff that we missed on the interview or that we should be
covered? No I think that was that was pretty comprehensive. So what's your plan when you release the
the devices themselves are you going to update the web page where's the best place that we can
keep track of what's going on? Yeah so if you keep track of the the sound track.io website
and what we do is we'll obviously refresh our website when that when we release the device but
then we'll also sort of link to get hub where we're host all the code and circuit hub where you'll
be able to order devices from and who gets as well. So that will be the sort of first place to
look but we will then link off to these sort of standard places where people can access all of the
the extra information. So will you be also supplying the firmware? You know this is the back
firmware this is the Bosque firmware this is this. Yeah so we're we'll the first version of the
firmware will be a scheduled recorder so with with the option of triggering on particular
frequencies. So by default you'll be able to configure your device to wake up at 6am every morning
and record for three hours if you want to say to capture the the dawn chorus or you wanted to
deploy it at night and only make recordings if it detects a significant signal at 860 kilohertz
something like that. Yes. Okay so that is that's pretty much it from me. What we will do is we will
keep an eye on the website here and as soon as you're going live we'll make an announcement on
the community news for all the shows that we do once a month alerting our listeners to the device
being on board. Okay that's great. Perfect thank you very much for taking the time sorry it
took so long to organize and good luck with the with the project in the future. Okay great thank you.
Okay folks tune in tomorrow for another exciting episode of Hacker Public Radio.
You've been listening to Hacker Public Radio at Hacker Public Radio. We are a community podcast
network that releases shows every weekday Monday through Friday. Today's show like all our shows
was contributed by an HBR listener like yourself. If you ever thought of recording a podcast
then click on our contribute link to find out how easy it really is. Hacker Public Radio was
founded by the digital dog pound and the infonomicon computer club and it's part of the binary
revolution at binrev.com. If you have comments on today's show please email the host directly leave
a comment on the website or record a follow-up episode yourself unless otherwise status today's
show is released on the creative comments, attribution, share a like, 3.0 license.
