Trouble Using VS1053 Record_Ogg Example

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
CaptainEater
 
Posts: 4
Joined: Mon Nov 17, 2014 5:26 am

Trouble Using VS1053 Record_Ogg Example

Post by CaptainEater »

Hi, all!

I am trying to use Arduino Mega 2560, Adafruit vs1053 (Adafruit VS1053B AUDIO V2) and Adafruit MAX 4466 to record some voice.
When I set up the testing environment according to the record_ogg example, I got many 1KB Ogg files after running the example sketch.
The problem is I can't open these Ogg files (It said corrupted files, unexpected BOS packet) on my computer(64-bit Win 7, foobar2000, which can play other Ogg files). What should I do? Is the format different from Adafruit and conventional one?
Also could anyone tell me how to connect the Mic MAX 4466 to vs1053. VCC -> 3.3V is clear, and I think the OUTPUT should be connected to MIC+, for GND to MIC- or AGND?
Thanks very much!

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: Trouble Using VS1053 Record_Ogg Example

Post by adafruit2 »

1kb isnt long enough, are you sure you're letting the ogg vorbis encoder run? if you have a button sometimes the button is noisy. it sounds like it isnt actually getting to the recording step!

User avatar
CaptainEater
 
Posts: 4
Joined: Mon Nov 17, 2014 5:26 am

Re: Trouble Using VS1053 Record_Ogg Example

Post by CaptainEater »

Thanks for your reply. There is no button in my circuit, I just use a wire to connect pin 7 and GND as "Switched On" State. I don't know how does it like to have ogg vorbis encoder run, I just loaded the example sketch and let it run to see what could I get. It's my first time to use VS1053, and I got the library from the website:
https://learn.adafruit.com/adafruit-vs1 ... l/software.

User avatar
CaptainEater
 
Posts: 4
Joined: Mon Nov 17, 2014 5:26 am

Re: Trouble Using VS1053 Record_Ogg Example

Post by CaptainEater »

Besides, I have done my test with Arduino Uno again, and I got the same result. To make a bit clearer, I have copied the img file to the SD card in both experiments. I have uploaded a recorded file also, because the .ogg files can't be uploaded, so I change the extension to .txt. You can change the extension back to .ogg to have a look.
Thanks!
Attachments
RECORD01.txt
This the file that I got recorded on the SD card, plz change the extension to ogg
(1 KiB) Downloaded 202 times

User avatar
CaptainEater
 
Posts: 4
Joined: Mon Nov 17, 2014 5:26 am

Re: Trouble Using VS1053 Record_Ogg Example

Post by CaptainEater »

Could anyone help me with this? Thanks very much!

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: Trouble Using VS1053 Record_Ogg Example

Post by adafruit2 »

Hi, not sure whats happening with your setup, it seems like it starts recording. maybe replce the button with a switch and post the output from the serial console

User avatar
ParallaxMoon
 
Posts: 11
Joined: Mon Sep 08, 2014 1:47 pm

Re: Trouble Using VS1053 Record_Ogg Example

Post by ParallaxMoon »

I just started using this breakout, and had initially had this problem(especially since I too wasnt using a button). The problem is that the buttonState is true for an extended amount of time, as opposed to a momentary switch button, therefore the VS1053 will record,then stop recording,then record, then stop recording.

My fix was to just be wicked fast at unplugging then replugging the wire that was acting as my switch, but you could also throw a delay(1000) after the first button state to make sure you dont accidentally trigger the stopRecroding.

I hope this helps 5 months late :P

User avatar
zakhounet
 
Posts: 11
Joined: Tue Jul 30, 2013 10:37 pm

Re: Trouble Using VS1053 Record_Ogg Example

Post by zakhounet »

Hi,

Same problem here. Above the debouncing issue, I just can't record (properly) more than one recording at the time. After the first recording all other are at 1Ko size. I found that, if you reset the arduino in between each recording than you can record several good recording into the SD Card. Conclusion I just can't record more than one at the time without having to reset the arduino.

@ParallaxMoon, I wondering if you succeed to get more than one good recording wiythout having to reset the board ??

User avatar
zakhounet
 
Posts: 11
Joined: Tue Jul 30, 2013 10:37 pm

Re: Trouble Using VS1053 Record_Ogg Example

Post by zakhounet »

Hi,

The only, i found so far to get more than one good recording in arow, is to add the pluggin loading instruction within the void loop :

Code: Select all

void loop() {  
  if (!isRecording && !digitalRead(REC_BUTTON)) {
    Serial.println("Begin recording");
    isRecording = true;
    musicPlayer.prepareRecordOgg("v44k1q05.img");
    
    // Check if the file exists already
    char filename[15];
...
@Adafruit, did you succesfully recorded, whithout having to reset the board, more than one recording in a row during your test ?

User avatar
ParallaxMoon
 
Posts: 11
Joined: Mon Sep 08, 2014 1:47 pm

Re: Trouble Using VS1053 Record_Ogg Example

Post by ParallaxMoon »

zakhounet wrote: @ParallaxMoon, I wondering if you succeed to get more than one good recording wiythout having to reset the board ??
Alas, I've only just started using the BoB, and actually hadn't realized it wasnt recording more than one file each round, until it was mentioned here >.<

//currently about to implement the preparation of the .img into the loop()

User avatar
zakhounet
 
Posts: 11
Joined: Tue Jul 30, 2013 10:37 pm

Re: Trouble Using VS1053 Record_Ogg Example

Post by zakhounet »

At least CaptainEater and I are not the only one dealing with this problem. ;)

Hopefuly someone from Adafruit will check and confirm if whether or not there is a bug in the VS1053 library ...

User avatar
ParallaxMoon
 
Posts: 11
Joined: Mon Sep 08, 2014 1:47 pm

Re: Trouble Using VS1053 Record_Ogg Example

Post by ParallaxMoon »

Hey, So i just got multi-recording to work thanks to the loop() implementation(hooray!),

But.

It seems like my recordings have hiccupps! Perhaps do to clipping, the problem was reduced when turning off the on board Auto Gain Control(as I'm using the MAX9814 with built in AGC).

Anybody else facing this problem?

User avatar
zakhounet
 
Posts: 11
Joined: Tue Jul 30, 2013 10:37 pm

Re: Trouble Using VS1053 Record_Ogg Example

Post by zakhounet »

@Adafruit

Just for info I am using the V2, and I saw on the web site that the current version is V4. Is there any majors difference between those two version ?

Does the V4 has the same problem with recording ??

User avatar
zakhounet
 
Posts: 11
Joined: Tue Jul 30, 2013 10:37 pm

Re: Trouble Using VS1053 Record_Ogg Example

Post by zakhounet »

Same proble than ParallaxMoon. When i play the the OGG file every 2-3 secs no sound for 2 seconds ....

This BoB drive me crazy.

Any support please ?

PS :
rename record00.txt in .ogg and Max volume if you want to hear the sample attached.
Attachments
RECORD00.txt
ogg file recorded with a V2 bob
(475.5 KiB) Downloaded 212 times

User avatar
ParallaxMoon
 
Posts: 11
Joined: Mon Sep 08, 2014 1:47 pm

Re: Trouble Using VS1053 Record_Ogg Example

Post by ParallaxMoon »

Hi All!

So I took some sparetime to look over some of the documentation regarding OGG recording: http://www.adafruit.com/datasheets/Vorb ... er170c.pdf

Here's some things I found on pages 11-12:

Regarding the need to restart each recording can be confirmed:
. If you want to restart recording, you have to completely reload and restart the
recording application.


Regarding the VS1053 creating faulty 1 byte files:
You can get extra side information while recording Ogg Vorbis data to see whether
VS1053b is still working.

...

You can read the recording time as a sanity check that VS1053b is working: if the
register contents don’t change every second, you’ll have to take protective measures.

...
a note on page 12 under monitoring signal levels
Note: Constant reading of side information causes load on
the VS1053 and may cause unexpected crackles in sound.
so theoretically, after the start recording you can check the recording time 1 or 2 seconds in, to see if its recording properly...and if not...restart the process so it can.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”