goom Registered: 03/11/09
Posts: 6
|
|
|
Reply with quote | #1 | I recently bought a SOMO-14D with the objective of developing sound modules for RC model boating. Unfortunately I have failed to actually get it working. I have tried bit-banged SPI via a PICAXE-18X, using my own code and also that posted by tristronics (with minor adaptation to suit my microcontroller). I have also tried reverting to the key-mode mode, all to no avail. My setup is: power - 5V regulated through 2 x 1N4001 diodes 2GB micro SD (SNK2GB0906, TAIWAN) from a Blackberry. Reformatted in FAT16, just to be sure 3 files 0000.ad4, 0001.ad4, 0002.ad4 of 1, 2 and 30 seconds respectively. I have read back these files and reconverted them to .wav. They are then playable on my PC, so conclude that the .ad4's are good. 32 Ohm speaker across pins 11 and 12, or an audio amp. on pin 14.
After sending a command (serial or key mode), the SOMO-14D responds with a high on the BUSY line of about 1/2 second, but does not play the sound file. I do hear a faint couple of clicks, but that is all. I have also played with the volume, play/pause and stop commands with the same result. So, I conclude that data is being received, but the sound file is not being retrieved and decoded. The faint clicks would indicate that the sound output pins are active. Could the micro SD be incompatible for some reason?
Any help or suggestions would be most welcome.
|
| |
4dTechSupport
Moderator
Registered: 23/02/09
Posts: 61
|
|
|
Reply with quote | #2 | Hi, What sampling rate did you set? Have u tried any other card? Try different make/size SD card.
-Bilal
|
| |
goom Registered: 03/11/09
Posts: 6
|
|
|
Reply with quote | #3 |
Quote: Originally Posted by 4dTechSupport Hi, What sampling rate did you set? Have u tried any other card? Try different make/size SD card.
-Bilal
Thanks for the response. Sample rate of .ad4 files is 12000. Does it matter? I can try different rates if you think that it may help. What rate do you recommend? I do not have another SD card, but will try and find one and give it a go. Is it a known issue that some cards will not work with the SOMO-14D? |
| |
tristronics Registered: 29/10/09
Posts: 3
|
|
|
Reply with quote | #4 | If you post your code, I'd be happy to take a look at it. I suspect you're either missing a clock bit or sending the data too fast..... the comms rate to the Somo is vvvveeeerrrrryyyyy ssssslllloooowww by normal standards !
PS to 4D: Any info yet on avoiding the audio clicks and the minimum timing questions as per my posting??
Regards |
| |
Atilla
Moderator
Registered: 18/03/07
Posts: 580
|
|
|
Reply with quote | #5 |
The clicks are on the list, we'll be looking at those very soon. In the mean time try a 470uF cap on the voltage supply pin, see if that helps. __________________ Atilla |
| |
goom Registered: 03/11/09
Posts: 6
|
|
|
Reply with quote | #6 | tristronics, thanks for the suggestions and offer to help.I have been playing with my code some more, and have simplified it so that I am 95% sure that it is being sent correctly, and slow enough. There are definitely 16 positive going clock pulses (verified with a counter), and I have experimented down to 333 Hz clock, and with various delays to ensure the data line it established before clocking. I have also failed to get anything to play in pushbutton mode. If I send a file address, the SOMO-14D responds with a BUSY signal for about 1/2 second. I also get a low level click at the beginning and end of the BUSY signal, and a faint squeal in between. Other commands do not result in a BUSY signal, but do generate two clicks in quick succession. A capacitor across the power pins does not make any difference to the clicks. I have concluded that instructions are being sent and received correctly, but the audio files on the micro SD card are not being read. I have tried different audio sampling rates and have verified that the .ad4 files are good by reading them off the micro SD, converting them to .wav's, and playing them. I purchased a second micro SD (Kingston brand), also 2 GB (hard to find a lower capacity), with exactly the same results. Both cards are definitely FAT 16 formatted. I have not tried a lower capacity card since they are difficult to find now, and will be increasingly difficult to source in the future. Even 2 GB may be going the way of the dinosaur soon. Could 4dTechSupport please verify that there are no issues with reading 2GB cards. Any other ideas/suggestions? Could the unit be defective? I have run out of ideas to try. I will have to abandon my plans to create a product based on the SOMO-14D if I cannot find a solution. |
| |
4dTechSupport
Moderator
Registered: 23/02/09
Posts: 61
|
|
|
Reply with quote | #7 | Hi,
There are some AD4 files available here. These files were used to test the SOMO Module under following configurations,
SD card: Sandisk Size: 2GB Mode: Key mode Speaker: 8 ohm 1W (Not recommended), 16 ohm 0.5W, 32 ohm 0.25W AD4 files: From the hyperlink as above Connection diagram: Applications diagram
SD card: Kingston Size: 1GB Mode: Key mode Speaker: 8 ohm 1W (Not recommended), 16 ohm 0.5W, 32 ohm 0.25W AD4 files: From the hyperlink as above Connection Diagram: Applications diagram
Under both settings, the module worked fine. There were no click sounds. There were no other problems. We will soon post some sample codes to operate the module in serial mode.
See if you can identify a problem in your setup using the details provided above. Please try the AD4 files from the link above. If the problem persists, you may want to provide us complete details of your setup which will help us diagnose the problem.
-Bilal
|
| |
ESPsupport Moderator
Registered: 27/01/09
Posts: 100
|
|
|
Reply with quote | #8 | Sometimes when you convert the file to an AD4 file it gets corrupted if you try to change the data rate. This can give the impression of clicks. Convert the file back and see if it still sounds OK.
Here is a small picaxe program I wrote, there were no clicks when I ran it.
Code:
' SOMO demo program for picaxe 18A
'
' Attach a keyboard to the picaxe as per the documentation for KEYIN
'
' + Increases the volume
' - Decreases the volume
' Pause Pauses the sound
' Power Stops the sound
' 1 plays 4 files in sequence (see below)
' any other key plays the file with a name based upon its scan code
' eg a -> 0x28 -> 40 (dec) -> 0040.ad4
' b -> 0x32 -> 50 (dec) -> 0050.ad4
'
' plays the file represented by the
'
' connect Output 0 (pin 6) to Somo sdata
' connect Output 1 (pin 7) to Somo sclk
' Connect Input 1 (pin 18) to Somo Busy
'
' Dummy simple exists to enable a short delay to be created
'
'
symbol sdata = 0
symbol sclk = 1
symbol dummy = 2
symbol busy = 1
low sdata
high sclk
b0 = 7
main:
'get the keyboard hit
keyin
if keyvalue = 121 and b0 < 7 then ' +
b0 = b0 + 1
lookup b0,($80,$81,$84,$85,$82,$83,$86,$87),b1
keyled b1
w6 = b0 + $fff0
gosub SendSOMO
else
if keyvalue = 123 and b0 > 0 then ' -
b0 = b0 - 1
lookup b0,($80,$81,$84,$85,$82,$83,$86,$87),b1
keyled b1
w6 = b0 + $fff0
gosub SendSOMO
else
if keyvalue = 225 then ' pause
w6 = $fffe
gosub SendSOMO
else
if keyvalue = 55 then ' stop
w6 = $ffff
gosub SendSOMO
else
if keyvalue = 22 then ' 1, a sequence
w6 = $ff
gosub SendSOMOWait
w6 = $fe
gosub SendSOMOWait
w6 = $fd
gosub SendSOMOWait
w6 = $fc
gosub SendSOMOWait
else ' play pressed key
w6 = keyvalue
gosub SendSOMO
endif
endif
endif
endif
endif
' debug b1
goto main
SendSOMOWait:
gosub sendsomo
swait:
pause 5
if pin1 = 1 then swait
pause 5
return
'
'
SendSOMO:
low sclk
pause 2
for b7 = 1 to 16 ' number of bits
w5 = w6 & $8000 ' mask MSB
low sdata ' data low
if w5 = 0 then skipMSB
high sdata ' data high
skipMSB:
pulsout dummy,100 ' 100us delay
pulsout sclk,200 ' pulse clock for 200us
w6 = w6 * 2 ' shift variable left for MSB
pulsout dummy,100 ' 100us delay
next b7
high sclk
pause 2
return
|
| |
4dTechSupport
Moderator
Registered: 23/02/09
Posts: 61
|
|
|
Reply with quote | #9 | Hi, Continue from previous post: The test results posted in the previous post were based on speakers. There are no click sounds on the speaker output. However, recent test with the audio line output revealed, there is a noticeable click when there is no sound file playing and you click Next, Previous or Play. To eliminate click sound from the AUDIO-LINE output, try the circuit attached here,
-Bilal
Attached Images:
|
| |
goom Registered: 03/11/09
Posts: 6
|
|
|
Reply with quote | #10 | Thanks again for the suggestions. I have already tried these, except for using the download audio files.
I went right back to basics (again). Setup exactly as Figure 4 of the datasheet (Stand Alone KEY-MODE) Momentary switch to ground from pins 1,6,7,10 LED from pin 5 to ground through 470 Ohm resistor 32 Ohm speaker across pins 11 and 12 (and also pin14 to an audio amp). Power supply - exactly as Figure 2 (5V regulated supply and 2 x 1N4001 diodes). Tried with and without 10uF and 0.1uF bypass/smoothing capacitors. Audio files - downloaded from link provided and tried on two separate 2GB micro SD cards.
Result: Grounding any of the four input pins momentarily produced a short busy output (maybe 1/2 second), and no file played. Audio click as BUSY LED illuminates and turns off. Same 1/2 second busy signal on power-up
I can only conclude that the unit is defective. I do not see anything else to try. I am 99% sure that I have not abused it (outputs shorted, overvoltage, static disharge, reversed power etc.). The fact that there is some response (busy signal and audio clicks) indicates that it is not completely dead).
Should I return it (to Scorpion Technologies Ltd.) for a replacement? |
| |
4dTechSupport
Moderator
Registered: 23/02/09
Posts: 61
| |
goom Registered: 03/11/09
Posts: 6
| |
westaust55 Registered: 30/10/09
Posts: 2
| |