Show Posts
Pages: 1 ... 7 8 [9] 10 11
121  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 15, 2012, 11:06:55 am
I really love you work, but I think the bug is in the source code, which I love to fix IF my sound module were working for me. Reading the manuals carefully, I read that after reset the board, you should wait a certain time to let the module to read the sd card. About 300ms. But I am not sure, If this time is always the same or depends of the quantity of voices stored in the card. This is why you should include the reading of the busy pin to know when the module is available to play the next voice. After that, every time you send a command, you should wait until is available for the next track. If not, you will be stopping the current voice. Have to test and debug a good library once I get my new memory card. Keep you posted but I must say u r doing an amazing job with that blaster.
122  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 15, 2012, 12:23:01 am
About the ad4 format, now that is working fine for you: were you able to try SOMO default ad4 files from their website?

About the speaker: A friend of mine loaned me one of those that usually are installed inside a light saber hilt, which I assume are 8 ohms 250 mw, but I am going to check that.

About the memory: 1 GB cards are almost at the border of the extinction, so they are not easy to get nowadays. Will track another brand to test.

About the sendCommand source code, I am not sure that code is perfect. Since my board is not working, I am not able to test it. Will be refining it once my board is working. And obviously will be sharing it here.

PS: Some asserts:
1-My speaker is 8 ohm 1w.
2-About the signal, this documents xplains very clear how should work:
http://www.embeddedadventures.com/datasheets/MOD-1007_hw_v4.pdf
123  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 14, 2012, 01:46:54 pm
No luck here, even using same pins as you did. smiley-confuse
124  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 14, 2012, 01:13:37 pm
Actually formatted them twice. With Windows and Linux in FAT16. Will try all over again and tell you.
125  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 14, 2012, 12:36:36 pm
Tried your very same code, modifying the pins #s, and your WAV files and nothing. Same erratic behavior. At this point I believe the module is not working or the sd card is not being read. Were you able to try my code?
126  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 14, 2012, 12:24:47 pm
I really appreciate your help. Yes, tried your code first, without the busy pin as input, and later added for debugging purposes. Downloaded your wav files and will test them right away. Using same pin out as you actually and the breadboard is brand new so I think that's ok. Keep you posted. And about your analog pins problems, will be very helpful to connect an oscilloscope to check the signals. smiley-wink
127  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 14, 2012, 11:54:59 am
Try again here:


and about the busy pin, the manual says that when the module is playing the voice/song the busy pin is in HIGH or 1. Was trying to know IF this little one was working or not.
128  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 14, 2012, 11:27:32 am
Only have more bad news. Changed the soldered pin from 3.3v to 5v. Reconnected everything, plus added the busy pin. Used the very same sketch you used and nothing. Later I modified the code to sense the busy pin, cause wanted to know what was going on there. To my surprise, after I reset the module, busy pin keeps HIGH for few seconds ( a bit too much). Later when I read LOW, I start to play the song #0001. I put a loop to play the song until BUSY is LOW and all over again. This is the code:

Code:
const int resetPin = 2;  // the pin number of the reset pin
const int clockPin = 4;  // the pin number of the clock pin
const int dataPin = 7;  // the pin number of the dataPin pin
const int busyPin = 8;  // the pin number of the busyPin pin

int busyPinState=LOW;

void setup() {
  Serial.begin(9600);
  pinMode(resetPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  pinMode(busyPin, INPUT);

  digitalWrite(clockPin, HIGH);
  digitalWrite(dataPin, LOW);

  Serial.println("Initializing module.");
  digitalWrite(resetPin, HIGH);
  delay(100);
  digitalWrite(resetPin, LOW);
  delay(5);
  digitalWrite(resetPin, HIGH);
  delay(100);
}

void loop()
{
  Serial.println("Reading busy pin state.");
  busyPinState=digitalRead(busyPin);
  if (busyPinState == LOW) {
    Serial.println("Start playing 0001.wav");
    sendCommand(0x0001);
    while(busyPinState==HIGH){
      busyPinState=digitalRead(busyPin);
      Serial.println(busyPinState);     
    }
    Serial.println("Stop playing 0001.wav");
  }
  else{   
    Serial.println("Module is busy.");
    delay(1000);
  }
}

void sendCommand(int addr) {
  digitalWrite(clockPin, LOW);
  delay(2);
  for (int i=15; i>=0; i--)
  {
    delayMicroseconds(50);
    if((addr>>i)&0x0001 >0)
    {
      digitalWrite(dataPin, HIGH);
    }
    else
    {
      digitalWrite(dataPin, LOW);
    }
    delayMicroseconds(50);
    digitalWrite(clockPin, HIGH);
    delayMicroseconds(50);
    if(i>0)
    {
      digitalWrite(dataPin, LOW);
    }
    else
    {
      digitalWrite(dataPin, HIGH);
      delayMicroseconds(50);
    }
    if(i>0)
    {
      digitalWrite(clockPin, LOW);
    }
    else
    {
      digitalWrite(clockPin, HIGH);
    }
  }

  delay(20);
}

This is the video I took from this little experiment:



In this video you can see the weird behavior of this board. I don't know If the microSD card is not being read, or the module spk output is dead, or nothing. Don't have a clue of what is going on.
129  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 13, 2012, 11:19:16 pm
I give up. Tried everything but change from 3.3v to 5v VDD. I am so tired of this board. I would love to see a video of it working, cause I hardly believe this is working anywhere but Italy dude. Have been 3 nights and nothing. Could at least, If you don't mind, upload a video or photo? I mean, It will be useful to check the busy led and the behavior.

Just to be clear, you changed from 3.3v to 5v, and you are NOT using any resistor for pin rst, dta or clk right? It is the only thing that remains to change in my configuration to give up definitely. It is so frustrating.
130  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 13, 2012, 03:53:16 pm
Encoded the attached file in 32Khz 4bit. It was a mono wav file before from Windows SO.
131  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 13, 2012, 03:14:17 pm
Try this application:
http://4d.websitetoolbox.com/post/show_single_post?pid=37039279&postcount=2

and the ad4 was DaftPunk song. smiley-wink
132  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 13, 2012, 01:57:02 pm
You mean the volume is so low? Cause I read that defaul value is 0 and most of the sketches I read set it 7 from from very beginning. Attached a ad4 in 32Khz made with the conversion tool. Could you test it?
133  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 13, 2012, 01:23:22 pm
I really appreciate your time. So, were you able to test "test" ad4 files from Somo website? Or they did not work for you and you created that wav file? And about the bit rate, I do believe than conversion tool will take care of that right? I did not use it yet.
134  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 13, 2012, 12:28:29 pm
According to the manual: Sampling rate from 6KHz 16KHz for WAV voice format

Just read Arduino UNO specs and they are labeled as analog inputs. Did not know they could be used as outputs. Makes sense If working for you and did not get any compilation or run-time error.

What about the busy light indicator?

PS: Good to know about the 5V, cause will solve a lot of problems for me too.
135  Using Arduino / Audio / Re: cheap sound module: what version is this? on: July 13, 2012, 12:16:41 pm
How is this working to you eludes me. Cause A pins are only inputs, no outputs. There is no way to Arduino UNO to set those as outputs. At least It is compiling to you. And the sound you mentioned, should be the same pitch audio tone I got.
Pages: 1 ... 7 8 [9] 10 11