Has someone tried this invention ? http://littlebits.cc/projects/arduino-lo-fi-80s-drum-machine
After building according plans and uploading the sketch, there is a constant humming in the background.
The rhytm sounds come through but this buzzing is always there.
I’ve just recorded a sound snippet.
You can find it here : https://www.dropbox.com/s/u4y920w0lz80vht/beatbox.mp3?dl=0
Strangely enough, sometimes, when reconnecting the USB power or battery, this buzzing disappears. But mostly, it’s just there.
Other projects like this one, http://littlebits.cc/projects/arduino-voltage-corrector-for-the-i30-keyboard-bit , which uses also PWM work fine. I used both outputs (d5 & d9)
I’ve already cleaned the bitsnap contacts and used fresh batteries.
Can someone try this BeatBox project ?
Maybe someone with an oscillator?
I heard your sound snippet on dropbox, it is rather annoying…
I will give it a try this weekend to check the drum machine to see what’s happening…
- 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
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
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…
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.
Impressive follow through. Thanks @alexpikkert :bitstar:
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…
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 ??
Hi frank @Frankje,
Great solution !
To upload a picture use this
And follow instructions on screen…
Thank you @alexpikkert.
I uploaded the picture
Glad you have a solution, @frankje 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.
Thank you @JackANDJude
I’ve updated the youtube video inside the message
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
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
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:
Hello @alexpikkert, @JackANDJude, @pjd,
Thank you Alex for posting this filter module
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
I adder a delay bit behoren the speaker , fun fun fun
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.