Pages: 1 2 [3] 4 5 ... 12   Go Down
Author Topic: cheap sound module: what version is this?  (Read 36461 times)
0 Members and 1 Guest are viewing this topic.
Argentina
Offline Offline
Full Member
***
Karma: 5
Posts: 160
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Italy
Offline Offline
Full Member
***
Karma: 3
Posts: 153
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i tested other wav files lower quality and it works fine. Now i must understand the exact max quality wav format.

where did u read that analog pins can be only input?
with these commands they work as output

pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  pinMode(resetPin, OUTPUT);


i confirm also that the 5volts soldered pin works fine too.
« Last Edit: July 13, 2012, 12:23:56 pm by onesky » Logged

Argentina
Offline Offline
Full Member
***
Karma: 5
Posts: 160
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: July 13, 2012, 12:30:55 pm by the-rebel-agent » Logged

Italy
Offline Offline
Full Member
***
Karma: 3
Posts: 153
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

according to ebay description
"can play WAV/AD4 format 6K ~ 32K sampling rate of audio, comparable to 44KHz sound quality MP3 format;"

but the manual and ebay dont say the bit rate, just the KHz

the busy led of arduino blinks 3 or 4 times then stop.

you can test the audio board if it's working connecting a led to the Pin16_VDD (+) and Pin15_P06 (-)

i attached the wav file that worked on mine, i still have to find out the right format

* 0000.wav (8.36 KB - downloaded 52 times.)
« Last Edit: July 13, 2012, 01:19:38 pm by onesky » Logged

Argentina
Offline Offline
Full Member
***
Karma: 5
Posts: 160
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Italy
Offline Offline
Full Member
***
Karma: 3
Posts: 153
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ad4 dind work, maybe sample rate was not ok

now i am experiencing a problem, the board doesnt play anymore wav files, if i connect the led to the board it plays but very very slowly

something went wrong but i dont understand what.
Logged

Argentina
Offline Offline
Full Member
***
Karma: 5
Posts: 160
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

* 0006.ad4 (3504.09 KB - downloaded 56 times.)
Logged

Italy
Offline Offline
Full Member
***
Karma: 3
Posts: 153
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i mean slow speed

i loaded your file, i can listen a sound but i don't understand what is it..? seems a buzzz from a walky talky

these are the features on the v1.3 manual

◎Support 1GB SD card max. or SPI flash 64MB max.
Support 4 Bit ADCPM format files.
◎Sampling rate from 6kHZ to 36KHZ for AD4 voice format.
◎Sampling rate from 6KHz~16KHz for WAV voice format
◎16 Bit DAC / PWM audio output.
« Last Edit: July 13, 2012, 02:58:47 pm by onesky » Logged

Argentina
Offline Offline
Full Member
***
Karma: 5
Posts: 160
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Try this application:
http://4d.websitetoolbox.com/post/show_single_post?pid=37039279&postcount=2

and the ad4 was DaftPunk song. smiley-wink
Logged

Italy
Offline Offline
Full Member
***
Karma: 3
Posts: 153
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

files must be 4bit encoded in AD4 format too
Logged

Argentina
Offline Offline
Full Member
***
Karma: 5
Posts: 160
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Encoded the attached file in 32Khz 4bit. It was a mono wav file before from Windows SO.

* 0511.AD4 (166.66 KB - downloaded 52 times.)
Logged

Argentina
Offline Offline
Full Member
***
Karma: 5
Posts: 160
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Italy
Offline Offline
Full Member
***
Karma: 3
Posts: 153
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i wouldn't give up rebel-agent, the module works, just check again all connections, pins, code used and i would change the soldered pin to 5volts

i am not using any resistor

what i understood of this board:

1. seems it doesnt play the 0000 named file (starts playing 0001)
2. if i connect to analog pins of arduino it plays some sounds fine while other doesn't play correctly
3. if i connect to digital pins of arduino it plays sounds fine
4. it needs around 1 second of delay at startup.
5. needs to add the exact lenght time of each track using "delay" command

video test here:

code used on the video test:
Code:
/*
  SOMO-14D Test
  Control a SOMO-14D module to play sounds

  Reference
  http://www.4dsystems.com.au/prod.php?id=73

  Created 20 October 2009
  By Shigeru Kobayashi
 */

const int clockPin = 6;  // the pin number of the clock pin
const int dataPin = 9;  // the pin number of the dataPin pin
const int resetPin = 3;  // the pin number of the reset pin

const unsigned int VOLUME_0 = 0xFFF0;
const unsigned int VOLUME_1 = 0xFFF1;
const unsigned int VOLUME_2 = 0xFFF2;
const unsigned int VOLUME_3 = 0xFFF3;
const unsigned int VOLUME_4 = 0xFFF4;
const unsigned int VOLUME_5 = 0xFFF5;
const unsigned int VOLUME_6 = 0xFFF6;
const unsigned int VOLUME_7 = 0xFFF7;

const unsigned int PLAY_PAUSE = 0xFFFE;
const unsigned int STOP = 0xFFFF;

void setup() {
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  pinMode(resetPin, OUTPUT);

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

  // reset the module
  digitalWrite(resetPin, HIGH);
  delay(100);
  digitalWrite(resetPin, LOW);
  delay(10);
  digitalWrite(resetPin, HIGH);
  delay(100);

  sendCommand(VOLUME_7);
}

void loop() {


  delay(1000);

  // play "0001.wav"
  sendCommand(0x0001);
  delay(4000);
  
    // play "0002.wav"
  sendCommand(0x0002);
  delay(4000);
  
  
    // play "0003.wav"
  sendCommand(0x0003);
  delay(6000);
  
    // play "0004.wav"
  sendCommand(0x0004);
  delay(6000);
  

  // stop playing
  sendCommand(STOP);
  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);
        //Serial.print(1);
      }
    else
       {
         digitalWrite(dataPin, LOW);
        // Serial.print(0);
       }
    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);
}

now, since on my project all the digital pins are busy, i must find out why on analog pins doesn't perform well

any idea?


as stated on arduino site they can be used as digital output as well
Quote
While the main function of the analog pins for most Arduino users is to read analog sensors, the analog pins also have all the functionality of general purpose input/output (GPIO) pins (the same as digital pins 0 - 13).
Consequently, if a user needs more general purpose input output pins, and all the analog pins are not in use, the analog pins may be used for GPIO.
http://arduino.cc/en/Tutorial/AnalogInputPins
« Last Edit: July 14, 2012, 02:02:05 pm by onesky » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8975
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

as stated on arduino site they can be used as digital output as well
Quote
While the main function of the analog pins for most Arduino users is to read analog sensors, the analog pins also have all the functionality of general purpose input/output (GPIO) pins (the same as digital pins 0 - 13).
Consequently, if a user needs more general purpose input output pins, and all the analog pins are not in use, the analog pins may be used for GPIO.
http://arduino.cc/en/Tutorial/AnalogInputPins

One odd quirk you may come across is that on the SMD versions of the ATmega processor where you get A6 and A7 pins, those two CAN'T be used as digital pins.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Italy
Offline Offline
Full Member
***
Karma: 3
Posts: 153
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

as stated on arduino site they can be used as digital output as well
Quote
While the main function of the analog pins for most Arduino users is to read analog sensors, the analog pins also have all the functionality of general purpose input/output (GPIO) pins (the same as digital pins 0 - 13).
Consequently, if a user needs more general purpose input output pins, and all the analog pins are not in use, the analog pins may be used for GPIO.
http://arduino.cc/en/Tutorial/AnalogInputPins

One odd quirk you may come across is that on the SMD versions of the ATmega processor where you get A6 and A7 pins, those two CAN'T be used as digital pins.
yep, i knew that
i use these anaolog pins:

int RST = A3;
int CLK = A4;
int DAT = A5;

i dont' understand why with digital pins the sounds are played correctly, while with these analog pins some sound files are truncated after 1 second or doesn't play at all and stop the board to work.
Logged

Pages: 1 2 [3] 4 5 ... 12   Go Up
Jump to: