Italy
Offline
Full Member
Karma: 3
Posts: 137
|
 |
« Reply #15 on: July 12, 2012, 01:33:33 pm » |
mine is not working too maybe i connected it wrong to the arduino or maybe it doesnt support 5volts or maybe the skecth i used was wrong, or maybe the files must be mp3. There are very few informations on this module combined with arduino. i used this scheme (except for the 5v power) to connect it to analog A3 A4 A5arduino pins  
|
|
|
|
|
Logged
|
|
|
|
|
Argentina
Offline
Full Member
Karma: 4
Posts: 158
|
 |
« Reply #16 on: July 12, 2012, 01:38:13 pm » |
Will try that this night. I am using these audio files already converted to ad4 http://www.4dsystems.com.au/downloads/Audio-Sound-Modules/SOMO-14D/Docs/AD4-sample-files.zipTried mp3 control mode, as I told you via pm and did not work cause the module is hardwired to work 2 serial line mode. I am also using "kingstone" micro sd card brand. I am pretty sure they are fake, but vendor told me that any brand will be fine.
|
|
|
|
« Last Edit: July 12, 2012, 01:40:30 pm by the-rebel-agent »
|
Logged
|
|
|
|
|
|
|
Argentina
Offline
Full Member
Karma: 4
Posts: 158
|
 |
« Reply #18 on: July 12, 2012, 01:45:42 pm » |
What about the busy light? What about its behavior?
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Full Member
Karma: 3
Posts: 137
|
 |
« Reply #19 on: July 12, 2012, 01:48:24 pm » |
i dont remember, i tested weeks ago
we must test all kind of files: wav, ad4, mp3
should connect also the led blinking status on the module to see if it's working
we should know if the connection scheme as showed above is correct (connected to the analog pins of arduino) and if the skecth test is ok
that means we need help
|
|
|
|
|
Logged
|
|
|
|
|
Argentina
Offline
Full Member
Karma: 4
Posts: 158
|
 |
« Reply #20 on: July 12, 2012, 01:52:10 pm » |
Will test all this night, but I am pretty sure this module will only play certain ad4 and Wav files encoded in the right rate. As read in other websites, this one and somo-14d shares the same IC so connection diagram should be fine, even the sketch program should be correct. Your problem was the Vcc and mine the connection. Keep you posted. We are in the same boat. And If anybody have this working, we will really appreciate any help.
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Full Member
Karma: 3
Posts: 137
|
 |
« Reply #21 on: July 12, 2012, 01:54:31 pm » |
from the link above i downloaded also this test program, next time i will try this /* Control Arduino Wave */ int RST = A3; int CLK = A4; int DAT = A5; void setup() { pinMode(RST, OUTPUT); pinMode(CLK, OUTPUT); pinMode(DAT, OUTPUT); digitalWrite(RST, HIGH); digitalWrite(CLK, HIGH); digitalWrite(DAT, HIGH); digitalWrite(RST, LOW); delay(5); digitalWrite(RST, HIGH); delay(300); }
void loop() { send(0x0000); delay(60000); send(0x0001); delay(60000); send(0x0002); delay(60000); while(1); } void send(int addr) { digitalWrite(CLK, LOW); delay(2); for (int i=15; i>=0; i--) { delayMicroseconds(50); if((addr>>i)&0x0001 >0) { digitalWrite(DAT, HIGH); //Serial.print(1); } else { digitalWrite(DAT, LOW); // Serial.print(0); } delayMicroseconds(50); digitalWrite(CLK, HIGH); delayMicroseconds(50); if(i>0) digitalWrite(DAT, LOW); else digitalWrite(DAT, HIGH); delayMicroseconds(50); if(i>0) digitalWrite(CLK, LOW); else digitalWrite(CLK, HIGH); } delay(20); }
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Full Member
Karma: 3
Posts: 137
|
 |
« Reply #22 on: July 12, 2012, 02:14:56 pm » |
Will test all this night, but I am pretty sure this module will only play certain ad4 and Wav files encoded in the right rate. As read in other websites, this one and somo-14d shares the same IC so connection diagram should be fine, even the sketch program should be correct. Your problem was the Vcc and mine the connection. Keep you posted. We are in the same boat. And If anybody have this working, we will really appreciate any help.
i used the somo tool to create the ad4 file http://www.4dsystems.com.au/prod.php?id=74
|
|
|
|
|
Logged
|
|
|
|
|
Argentina
Offline
Full Member
Karma: 4
Posts: 158
|
 |
« Reply #23 on: July 12, 2012, 06:13:54 pm » |
Checking the diagram I noticed that A0, AX, etc are only inputs for arduino. How will this woork that way? I do believe that theconnection diagram is wrong and you should use other pins as outputs.
|
|
|
|
|
Logged
|
|
|
|
|
Argentina
Offline
Full Member
Karma: 4
Posts: 158
|
 |
« Reply #24 on: July 13, 2012, 07:58:52 am » |
Did all the test using almost every code available and got a few conclusions. A pins are only analog inputs, so you should use any other digital output ( example: 2,3,4 for reset,clock,data). When I turn on the WTV020-SD-mini-16P, the busy light blinks quickly and after a second of so keeps on. I connected the reset, clock and data and reset the board at the setup portion of the code. You should put the rst pin for 5ms down and later wait 300ms before send any command. I noticed that this guy, was able to do something with the WTV020-SD-20s board: http://www.vduenasg.blogspot.com.ar/2012/03/wtv020-sd.htmlHe modified the clock timing, from 200us to 50us to make it work. So, basically I am pretty sure that now is a software problem with the data and clock pins, since I believe the rst function is working. A out the 3.3v problem, the manual states that you can connect two N4007 diodes in serial from a 5v output power. Did not test it yet. Will be playing with this modified 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 = 2; // the pin number of the clock pin const int dataPin = 3; // the pin number of the data pin const int resetPin = 4; // 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(5); digitalWrite(resetPin, HIGH); delay(300);
sendCommand(VOLUME_7); }
void loop() { // play "0000.ad4" sendCommand(0x0000); delay(1000);
// play "0001.ad4" sendCommand(0x0001); delay(1000);
// stop playing sendCommand(STOP); delay(1000); }
void sendCommand(unsigned int command) { // start bit digitalWrite(clockPin, LOW); delay(2);
// bit15, bit14, ... bit0 for (unsigned int mask = 0x8000; mask > 0; mask >>= 1) { if (command & mask) { digitalWrite(dataPin, HIGH); } else { digitalWrite(dataPin, LOW); } // clock low digitalWrite(clockPin, LOW); delayMicroseconds(50);
// clock high digitalWrite(clockPin, HIGH); delayMicroseconds(50); }
// stop bit delay(2); }
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Full Member
Karma: 3
Posts: 137
|
 |
« Reply #25 on: July 13, 2012, 10:12:54 am » |
at this point i am not even sure wich one is Pin 1 A or B? 
|
|
|
|
|
Logged
|
|
|
|
|
Argentina
Offline
Full Member
Karma: 4
Posts: 158
|
 |
« Reply #26 on: July 13, 2012, 10:40:17 am » |
Def A is pin # 1. That's the way I tried.
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Full Member
Karma: 3
Posts: 137
|
 |
« Reply #27 on: July 13, 2012, 11:31:15 am » |
then my wiring wrong was wrong now i turned into A i loaded the sketch http://yapan.googlecode.com/svn/trunk/arduino/examples/SOMO_14D_Test/SOMO_14D_Test.pdei changed variables into analog const int clockPin = A4; // the pin number of the clock pin const int dataPin = A5; // the pin number of the data pin const int resetPin = A3; // the pin number of the reset pin i loaded the wav files 0000.wav 0001.wav i turned on the board and i could listen a sound, very short, distorted and not as original. but it's a step forward. Now i will try to change wave formats
|
|
|
|
« Last Edit: July 13, 2012, 11:54:25 am by onesky »
|
Logged
|
|
|
|
|
Argentina
Offline
Full Member
Karma: 4
Posts: 158
|
 |
« Reply #28 on: July 13, 2012, 11:46:24 am » |
Hurray, good for you. I just heard a small noise. What do you mean you turned the pins to Analog? Are you still using A pins as clock, rst, and dta? You were using Arduino nano right? Ask you this cause since I am using UNO, will have to put some resistors between rst,clock and dta pins. Cause UNO high value is 5v and I think WTV020-SD-16P is 3.3v.
|
|
|
|
« Last Edit: July 13, 2012, 11:52:15 am by the-rebel-agent »
|
Logged
|
|
|
|
|
Italy
Offline
Full Member
Karma: 3
Posts: 137
|
 |
« Reply #29 on: July 13, 2012, 12:11:03 pm » |
i am using the analog pins on Nano as the scheme above
|
|
|
|
|
Logged
|
|
|
|
|
|