Store › Forums › Audio Hacker › Bugs/Problems › Audio Hacker board problem – does not play audio
Tagged: audio problem
- This topic has 1 reply, 2 voices, and was last updated 8 years, 5 months ago by Michael.
-
AuthorPosts
-
June 21, 2016 at 1:33 pm #8279ace2_mlParticipant
Hi,
I have an Arduino UNO with Audio Hacker shield, and I’m trying to use this setup on Win XP. I bought the Audio Hacker shield already assembled.
The first problem I had was the inability to program the UNO while the shield is connected; this got fixed by attaching an external power supply to the UNO (currently set at 9V, the AC/DC adapter says it provides 500 mA max, but it is unclear whether this current is the one supplied when the adapter is set at 9V).
At this point, I can have the shield connected, and “burn” every example from File/Examples/AudioHacker on the UNO successfully (at least from the perspective of Arduino IDE/avrdude)
I am using an output from a small radio as analog input for the shield, and another small radio AUX input as the destination for the OUT of the shield. I can confirm that sound from the input is audible on the output when the BYPASS switch is active (i.e. it is bypassing the shield hardware). However, once the BYPASS switch is inactive, so shield hardware is utilized, I cannot hear any sound as expected for the examples.
Here is a brief overview of what I have tried:
File/Examples/AudioHacker/Sampler_8bit – I have uncommented
#define DEBUG
, compiled and uploaded the program on the UNO. When I start Serial Monitor in Arduino IDE at 115200 baud, all I get is:sample rate = 42000 Hz, recording sample rate = 2
As far as I can see from the code, this printout should be completed with “
Hz
” after therecording sample rate = XXXX
message, however, it is clear here the printout has been interrupted; I’m not sure if the program has somehow crashed on the UNO or not.File/Examples/AudioHacker/Sampler_12bit – I have uncommented
#define DEBUG
, compiled and burned the program on the UNO. When I start Serial Monitor in Arduino IDE at 115200 baud, I get this:even cycsample rate = 44100 Hz, recording sample rate = 22050 Hz even cycles remaining = 65 odd cycles remaining = 65 even cycles remaining = 65 odd cycles remaining = 64 even cycles remaining = 65 odd cycles remaining = 64 even cycles remaining = 64 odd cycles remaining = 64 even cycles remaining = 65 odd cycles remaining = 65 even cycles remaining = 64 odd cycles remaining = 64 even cycles remaining = 64 odd cycles remaining = 65 ...
… with the
even cycles remaining...
line being printed every second or so. When I start pressing the S1 (record) button, the messages change to:... even cycles remaining = 419 odd cycles remaining = 129 even cycles remaining = 419 odd cycles remaining = 129 even cycles remaining = 419 odd cycles remaining = 129 recording time = 2611 ms even cycles remaining = 65 odd cycles remaining = 65 ...
… which means something at least happened during the recording – but when after that I press the S1 button for playback, I get these numbers:
... even cycles remaining = 290 odd cycles remaining = 618 even cycles remaining = 290 odd cycles remaining = 618 even cycles remaining = 290 odd cycles remaining = 618 even cycles remaining = 290 odd cycles remaining = 618 ...
… until I release the S1 button – however, there is nothing but silence on the output.
If I hack the ISR code with these debug messages:
... #ifdef DEBUG if (evenCycle) { timer1EndEven = TCNT1; } else { timer1EndOdd = TCNT1; } Serial.print("pb "); // ADD Serial.print(playbackBuf); // ADD Serial.println(); // ADD #endif ...
… I can see a printout like this constantly:
sample rate = 44100 Hz, recording sample rate = 22050 Hz pb 2043 pb 2042 pb 2043 pb 2042 ....
… regardless if I have S2 (playback) pressed or not, or if I have made a recording with S1; since we’re in 12-bit mode, accepted values are between 0-4096, which means that values around 2043 represent the analog audio “zero”.
File/Examples/AudioHacker/EchoEffect –
#define DEBUG
is already uncommented here, compiled and burned the program “as is” on the UNO. Program prints out something like this in Serial Monitor:sample rate = 22050 Hz echo delay = 341 ms even cycles remaining = 108 odd cycles remaining = 124 echo delay = 304 ms even cycles remaining = 108 odd cycles remaining = 124 echo delay = 287 ms even cycles remaining = 108 odd cycles remaining = 124 echo delay = 281 ms even cycles remaining = 121 odd cycles remaining = 124 ...
… however, there is no audio output.
So, I am wondering – what could possibly be the problem? Is there anything else I could try, to see if I can get sampled audio output? Could it be that some of the chips (ADC, DAC or memory) got destroyed due to electrostatic discharge?
I find it especially strange that the 8-bit sampler just crashes – while the 12-bit one appears to work – except it always reproduces “zeroes” on the output…
Thanks in advance for any suggestions…
June 27, 2016 at 8:38 pm #8287MichaelKeymasterace2_ml,
I’m so sorry for the slow response — I’m supposed to get an email for every post but did not see anything for your post. So sorry for this awful delay.You’ve done plenty of experimentation but it sounds like there is never any audio produced by the shield. I personally assemble and test every shield, so I know it worked when it was shipped. I am guessing that one of the chips is loose. Perhaps the ADC or the DAC. I assume you’ve turned the volume knob all the way up (clockwise). The volume knob has no effect in bypass mode. I always use the 12-bit sampler for testing. The debugging output looks right. I would not expect serial output during the ISR to work at all (looks like it did…?) because this ISR is firing 22050 times per second, and there is not time to do that much serial output, but those values of 2042, 2043 look right and represent silence.
If you are still having problems, please Contact Us with your order number and I’ll work with you on a replacement.
-
AuthorPosts
- You must be logged in to reply to this topic.