Buzzing sound in the background

Hi Frank @Frankje and Jude @JackANDJude,

I heard your sound snippet on dropbox, it is rather annoying… :scream:
I will give it a try this weekend to check the drum machine to see what’s happening…

Hi @alexpikkert and @JackANDJude,
I’ve done some research this evening on the project and this is what I’ve found out :smile:
In the circuit diagram of the w6 arduino module in the PWM diagram around W6U6:

  • The humming is not present at pin1of the OP AMP W6U6
  • The humming is noticeable at the output 4 of this IC
    So, this humming must be produced around this circuit.
    I’ve connected a resistor of 1M between pin 1 and ground, and the humming disapeared completely :sunglasses:
    So, what I think happens here, in the sketch they use a frequency of around 22KHz to modulate the PWM. Maybe the capacitors around the input circuit of the OP AMP form a resonant circuit and this will be amplified.
    Can you try this also and share your thoughts ?
    Now, I ask myself, how can we mount this resistor on the Arduino module :flushed:
1 Like

Hi frank @Frankje and Jude @JackANDJude ,

This is a real nice beatbox ! it sounds just like the Commodore 64 I owned in the past…
I found two possible causes regarding the unwanted buzzing sound.
First you could check your filter on the breadboard. I experimented a little with different capacitors, when they have a lower value (i tried 0.01 uF) then you can hear the buzzing sound from the PWM signal.
When you remove the GND connection from the filter, then you can really hear this buzzing sound.
Then I found something strange… :joy_cat: :scream:
First I used the P1 power bit with a 12V wall wart. The beats sounded 100 % OK. No disturbances at all.
Then I removed the P1 power bit and replaced it by the P3 USB power bit. Then the buzzing sound appeared ! As you also noticed, it shortly stops at the end of each beat.
I used a USB wall wart and I used the USB outlet on my PC, and it made no difference at all.

See posts below, it was caused by the VCC voltage level, as discovered by @Frankje.
My P3 USB power bit has a slighter higher voltage than my P1 power bit.

1 Like

Impressive follow through. Thanks @alexpikkert :bitstar: :star2:

1 Like

Hello @alexpikkert and @JackANDJude !
Following Alex’s findings, I powered the arduino module via an external power supply. After reducing the 5 Volts to 4,7 Volts, the humming stops.
It seems like a have to make a littlebit module which reduces the power supply. Could this be a design flow around the opamp?
PS How do you embed a YouTube clip in your message ?
I made a little video about this :


Hi Frank @Frankje and Jude @JackANDJude,
Thanks Frank, you found the real reason !
I checked my P1 power bit and it delivers a voltage slightly under 5 Volt (4.91 Volt).
My P3 power bit is much stronger and makes 5.1 Volt.
Indeed the buzzing sound disappears below 5 Volt in my setup.
So that’s the real reason…
Maybe it can be solved without tinkering with the hardware but instead by diving into the software. Next step…

1 Like

Hello @alexpikkert and @JackANDJude,
I just made a protobit with in series with the 5V a Schottky diode BAT85, which drops the voltage by 0.40 Volts. Just enough for the circuit to operate without distortion. Across the output, I mounted a capacitor of 220uF to smooth the 4.60 V. Everything works fine now.
The circuit ( with volume turned fully up ) consumes about 40mA which is safe for the BAT85.
This diode can forward a current of 200mA.
The center output connection is also feeded by this 4.60V ( white wire in the picture ).
Of course, when more modules are added, a better regulator is needed.

How can you add a picture ? I don’t see the the symbol in the edit tab ??

1 Like

Hi frank @Frankje,
Great solution !
To upload a picture use this

And follow instructions on screen…

1 Like

Thank you @alexpikkert.
I uploaded the picture :grinning:

Glad you have a solution, @frankje :slight_smile: To embed a video on the forum, give the youtube link a row all to itself. Try editing your post above until you get it embedded. :thumbsup:

Thank you @JackANDJude
I’ve updated the youtube video inside the message :smile:

Interesting and deep analysis, folks! I had problems with noise in littleBits audio circuits before. Turns out, it was the switching power supply (adapter) that was causing the noise. I started using a non-switching supply (an old Yamaha PA-3b) and the noise went away. I use the P1 power bit.

Even with clean power, my design is noisy. I tried using the same design with voice samples and never could tune the buzz/noise away.

So, I’ve got a better design using a Microchips MCP4921 DAC via the SPI pins on the Arduino module. The good news is that the design is less sensitive to noise. The bad news is that the MCP4921 solution requires a few more low-cost components and you must solder six header pins to the Arduino module.

Here are links at my web site that should help you out:

I eventually completed the SPI DAC project, but haven’t had a chance to post the project to the littleBits site.

All the best – pj


Hi Pj,
First of all, congrats on your fantastic project aka BeatBox.
I’ve read your article and it would indeed be fun to upgrade the arduino bit !
I have just a question about changing sounds and drumkits in the sketch.
I have a few audio samples of drums in wav format. How do you convert these in decimal form, separated by comma’s, so that they can be put in the sketch ?
Which software can be used for that and how do you do this ?
Which bitrate and sample frequencie must be used ?
I could put these in the forum here for other Littlebits lovers :wink:

1 Like

Hi Frank @Frankje, Jude @JackANDJude and Paul @pjd,

The BeatBox is a real nice gadget to practice programming of the Arduino…
Even with a switching power connection I cannot hear buzz/noise behind the beats.
My arduino is now working on 4 Volt instead of 5, going lower then some beats disappear…
I made a littlebits filter, based on the breadboard version:


Hear my Beatbox in action with two speakers (more audiopowerrrr) and the Littlebits low pass filter on D9:

:grinning: :musical_score:


Hello @alexpikkert, @JackANDJude, @pjd,
Thank you Alex for posting this filter module :smiley:
I would like to add a power reduction bit to the cool circuit of Pjd.
Thanks to the LittleBits Hatdware Development Kit, it is possible to make permanent usable bits. And perf board is perfect usable.
I used perf board with copper lanes and use a small drill to cut tracks.
So, here is some info and pictures of the power and filter module :slightly_smiling_face:

I adder a delay bit behoren the speaker , fun fun fun :grinning:


Hi folks –

Those are very nice modules! Your work is well-beyond my craft level and I’m quite impressed!

I wrote up a description of how I developed, translated and represented the drum instrument waveforms for the Beat Box. The write-up is at my site:

Frankje, the short answer is 22,050Hz, signed 8-bit, mono. I wrote each waveform to a RAW audio file – no header, just samples. Then, I converted the RAW audio file to C language with a program that I wrote (raw2c.c). The page at my site has a link to a ZIP file containing the source code.

It’s very exciting and gratifying to see what you have accomplished! Thank you.

– pj

1 Like

@frankje I think it would be cool if you uploaded this to and link to @pjd 's original post in your description. While you’re at it, perhaps you’d like to change up the code to use react to input Bits?

Hello @JackANDJude,
Well, right now I’m working on this project to add fresh sounds and drum loops. I might as well add a few more functions in the sketch.
When completed, I will upload this to littlebits inventions with permission of @pjd. He was so kind to share his Project as open source.
I will do my best :blush:


Hi @Frankje @pjd @JackANDJude,

great alternative BeatBox, this Mini Pops !
I built this little machine and found two really funny things:

It worked without the extra voltage drop bit. Huh? …
I checked with my multimeter and it worked on 5.05 Volt.
How to explain…

The new pulse output for an additional sequencer on D1 did not work in the beginning, I added my oscilloscope and saw very small pulses. So I added a little delay in the ino program (2 msec for the gatePin) and voila, the sequencer started… Use 10 msec and you get a different sound)
As a consequence the maximum beats per second dropped, but you can’t have everything… :joy:

See the result here, with a sequecer and a micro sequencer with in total 4 different sound combinations:

(4 out of a zillion possible sounds !) :musical_score: :musical_score: :musical_score: :musical_score:
Great !


Hi @alexpikkert

Cool, dude!

WRT your second observation, I suspect that the sequencer as some timing requirement on its gate signal. I can’t remember if I passed this suggestion to the littleBits folks, but it would be great if they published the timing requirements for the gate signal. This bit of info would eliminate a certain amount of trial and error. It would also help to publish a set of requirements and guidelines for using the Arduino buffered outputs (D5 and D9) with everyday digital circuits. The OP AMP slew rate affects timing when driving CMOS logic.

All the best – pj

1 Like