Mini Spy Bug Walkthrough

Designing a mini spy bug recorder

What we like most about [GreatScott’s] project videos is that he not only shows making them but also the calculations for selecting parts and the modifications along the way. This time he’s made a mini spy bug that records up to nine hours of audio.

His first task was to figure out if the ATmega328p’s ADC is suitable for audio sampling, but only after he explains how sampling works by periodically checking the input voltage from the microphone. Checking the datasheet he found that the ADC’s fastest conversion time is 13 microseconds, which works out to a sampling rate of 76.923 kHz. Good enough.

He then walks through why and how he decided to go with a pre-made amplifier circuit built around the MAX9814 IC. Spoiler alert. His electret’s amplifier output voltage was too low, using an off-the-shelf circuit instead of making his own kept things simple, and the circuit has automatic gain control.

At this point, he added the MicroSD card adapter. Why not just transmit the audio over FM as so many others have done with their hacks? Perhaps he’s worried about someone detecting the transmission and finding his bug.

His final optimization involved getting a good battery life. He measured the circuit’s current draw at 20 milliamps. With a 160 mAh battery capacity, that would be 8 hours of recording time. Removing the Arduino Pro Mini’s voltage regulator and two LEDs got the current down to 18 milliamps and a recording time of 9 hours. Better.

Those are the highlights. Enjoy his full walkthrough in the video below.

18 thoughts on “Mini Spy Bug Walkthrough

  1. Get a fucking grip of yourself, it’s entirely ok to build these things out of idol curiosity. If someone is going to build a bug to listen to something they’re going to do it and it’s not like there isn’t a multitude of information about this very subject.

        1. Irony that attacks no one, just points out the very obvious fact that some technology has predominantly sinister uses, gets met with unnecessary rudeness. Not fitting in any way.

  2. Next step: Shrink it down to the size of an actual bug. This thing here is more in the realm of a titan beetle… With a bit of smart firmware the run time could be extended quite a bit depending on the environment. Probably would need a little bit of extra hardware that can wake the controller out of a sleep mode when the mic picks up some noise. Usually the ADC is a pretty power hungry piece of a controller, so shutting that down when not needed would help a lot to extend run time.

    1. Depending on the usage, it may be important to know how much time passed during the quiet times. What you propose would result in all the sound being in one burst and losing all sense of time during playback. Maybe if you could reconstruct it later to add the silent parts back in… Perhaps an RTC to encode the amount of time between “tracks” into the stream. RTCs are quite low power. You would need to properly tune how sensitive the sleep mode is to make it worth it.

    1. The trick would be to make a large buffer in RAM and fill that up as much as possible, then only write in large batches to the card once that buffer is full. Writing does need a lot of current, yes, but they do have low power sleep modes too that usually draw only around 0.2mA (most cards go to sleep automatically if you don’t apply clock signals for a few ms).
      It’s one of the reasons i don’t like these 8-Bit Arduinos, they just don’t have enough RAM for large buffers, 2K on the ATmega328 is not nearly enough. A Teensy 3.2 with MK20DX256VLH7 controller offers 64K RAM, giving you much more space for buffered writes.

  3. Why not buy a usb recorder that has better performance and costs less? Unless you already had the pieces sitting around rolling your own here makes no sense to me. An interesting hack would me adding a larger battery to a usb recorder and perhaps a more upscale microphone element.

    1. +1

      They run on a 1.5v battery, has several hours of recording on a flash chip with a built in microphone and cost next to nothing.

      But he probably wanted to design and build something himself?

    2. Unless you can firmware hack the USB recorder and it has GPIO it is pretty useless, other than as a throw away product. This has actual use, other than just being a stupid/dumb spying gadget.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.