Go Down

Topic: Someone Please Please Help Me with this.  (Read 1 time) previous topic - next topic

mattnelson521

Can someone please please help me with this. I have tried posting for help in topics already started as well as other sites and i cant seem to get anyone to help me with this. I know this has to be a simple fix, but i'm new to Arduino and i can't figure this out for the life of me.

I'm using a WT5001M03-23P and Arduino Nano.

Whats going on is when i turn it on nothing happens. There should be a start up sound. When i push the switch it should play the single shot audio file and it doesn't. What i have to do is pull the Neg speaker wire out and put it back in before it will make any sounds. (I have tried other speakers same thing). I'm not sure whats going on. Can anyone help me with this. The code im using is below. As well as the schematic, a link to the audio files that i'm using, and a video.





Link to the Audio Files im using as well as the code and Image
https://drive.google.com/folderview?id=0B8YDo-8oG-oHdXlxbzdLTm8xQVk&usp=sharing


Video of what it is doing
https://youtu.be/6on1nsOPHJE



The Code Im using

Code: [Select]

const int buttonPinFire = 7;   // FIRE

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
 
   // initialize the button pin as a input:
pinMode(buttonPinFire, INPUT);

// initialize serial communication:
   Serial.begin(9600);
   

   
   Serial.write(0x7E);
   Serial.write(0x03);
   Serial.write(0xA7);
   Serial.write(0x1F); //  volume max
   Serial.write(0x7E);
   
   // start sound
   Serial.write(0x7E);
   Serial.write(0x04);
   Serial.write(0xA0); // A0 for SD card
   Serial.write((byte)0x00);
   Serial.write(0x02); // track number
   Serial.write(0x7E);
   delay(3000);
   
   }
   
   void loop()
{
                     
   
 buttonState = digitalRead(buttonPinFire);
if (buttonState == HIGH) {

   Serial.write(0x7E);
   Serial.write(0x04);
   Serial.write(0xA0); // A0 for SD card
   Serial.write((byte)0x00);
   Serial.write(0x01); // track number
   Serial.write(0x7E);
delay(300);
}
 
         }


tmd3

In this post, you say:
I'm using a WT5001M03-23P ...
but your other two posts about this issue are attached to threads about a part number "WT5001M02-28P."  I'm going to guess that you actually have a "WT5001M03-28P," since I can't find anything about a "-23P," and it looks like an "M03" version exists.

I've found something that looks like a datasheet, or a usage guide, or something.  I'll warn you that the company that publishes this document seems to be a bit confused about its own name - the header seems to be for a Chinese company called, "Waytroinc," while the website calls itself, "waytronic," and seems to be based in Russia.  Plenty weird, so proceed with caution.  The website is in Russian, but Google's translation seems to be fairly readable.  The document is here:  http://waytronic.ru/docs/WT5001_modules.pdf.  Another document that seems to be more focused on the WT5001-48L, which appears to be the IC at the heart of this gizmo, is here: http://voice-chip.ru/docs/WT5001_chip_and_modules.pdf

It looks like your speaker is connected between pins 10 and 14, LOUT and GND, respectively. The documents don't show a configuration like that, nor do they support the notion that the GND pin is a reasonable place to connect a speaker.  The device doesn't appear to have a negative power supply input, so it's unlikely that it can develop a symmetrical voltage around GND to drive the speaker.  I think that maybe it provides the right channel on ROUT, and the inverse of the left channel on LOUT, each with a similar DC bias, making the current through the speaker be proportional to the sum of the left and right channels, and the making the sound the sum of the two channels.  Or maybe the other way round, or something like that.

Intuitively, from the description you post here, I suspect that the IC protects itself from what it sees as an excessive load by declining to power the speaker.  If I'm right about how it's configured, then it will likely see something flaky about the speaker circuit.  If it checks it on powerup, but not afterward, that may explain the symptoms you see.

Note, though, that I don't know anything about this Sino-Russian gizmo beyond what I see in some suspicious-looking datasheet-like documents, so all of that is pure conjecture.

In another thread, you say:
... by accident i noticed if i run my Speaker neg over the module then it will start playing files like it should.
That's not the same thing as disconnecting one of the speaker wires, as you mention in this thread.  What does, "run my Speaker neg over the module," mean?  Which thing really makes it work, or do both make it work?

If you want to discuss this further, it would help if you would tell us if you saw this connection scheme elsewhere on the web, or if you made your best estimate of the proper way to connect things in the absence of any reasonable datasheet.  If you found it somewhere online, the original publication might offer us a clue as to how this thing is supposed to work.

Unless you have a strong reason to believe that grounding one end of the speaker is a good idea, I'll recommend that you avoid it, since it may damage either the device or the speaker.

mattnelson521

Thank you for getting back to me. After taking a couple days off this project and then reading over your reply i have made some progress but its still not working correctly.

To start I apologize on the mix-up your correct i do have the WT5001m03-28P and I have looked over the document. you are correct about the GND issue. I seem to have figured that part out and going off what you said i was connecting that wrong. 

As for the last part of your reply below i have provided the links to what i was going off. I found this youtube video of the project im doing without any scheme to look at i tried to copy what i saw on the video. He has a short Arduino forum post but aside from the code he used there was no scheme. Since your Reply i have review the video again and made some adjustment to what i feel is the same exact layout he is using. Only difference is i don't know what voltage his is powering. I am using a usb power bank 5v 1amp. The project seem to be correct it boots up like it should and plays the sound. But its still wanting to continually repeat the Audio file it played last. Just to be make sure i have replace the sound board, Arduino Nano board, and with the resistor 10k as well. 

Any thoughts. Again thank you for helping.



Here is a video of my project updated. I also tried moving the POS over to the other side and tried holding the Fire button down during start up. Both were suggestions other people made.
https://youtu.be/i1Fxc7W_3f8



Here is the Video of the Project im trying to do
https://youtu.be/FaTS-hvRUFM

Here is a post on Arduino of his project.
http://forum.arduino.cc/index.php/topic,150535.0.html


Here are some photos of my project currently. I have not adjusted my code yet.














mattnelson521

so after spending the day on this i got it pretty close to what i want it to do. I read some of the other forums and made a few adjustments to the coding and it appreas to be a work around but i dont think its the correct way to do it. Even the guy says that who i got the fix from. (http://forum.arduino.cc/index.php?topic=384420.0)

The code im using is below. maybe someone could look at it for me? maybe help clean it up or figure out how i can run the code below without the Stop Sound being added. Also below the code is a link to how its currently working.

Thanks again tmd3 for helping me get out of my rut on this.


Code: [Select]
const int buttonPinFire = 7;   // FIRE

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
 
   // initialize the button pin as a input:
pinMode(buttonPinFire, INPUT);

// initialize serial communication:
   Serial.begin(9600);
   

   
   Serial.write(0x7E);
   Serial.write(0x03);
   Serial.write(0xA7);
   Serial.write(0x1F); //  volume max
   Serial.write(0x7E);
   
   // start sound
   Serial.write(0x7E);
   Serial.write(0x04);
   Serial.write(0xA0); // A0 for SD card
   Serial.write((byte)0x00);
   Serial.write(0x02); // track number
   Serial.write(0x7E);
   delay(3000);
   
   }
   
   void loop()
{
                     

   Serial.write(0x7E);
   Serial.write(0x02); //STOP Sound
   Serial.write(0xA4);
   Serial.write(0x7E); 

 
 buttonState = digitalRead(buttonPinFire);
if (buttonState == HIGH) {

   Serial.write(0x7E);
   Serial.write(0x04);
   Serial.write(0xA0); // A0 for SD card
   Serial.write((byte)0x00);
   Serial.write(0x01); // track number
   Serial.write(0x7E);
delay(100);
}
 
         }


A video on how its currently working

https://youtu.be/xXG-_I-XebQ

tmd3

I can't tell for sure, but it sounds like your primary complaint - that the device wasn't making sounds until you disconnected and reconnected the speaker wire - is solved.  Beyond that, I can tell that you're not completely satisfied with how it works, but I can't tell what's not working, or what you're trying to achieve.  You might get better results on the forum with a clearer description of what you're doing, what you expect, and what you're getting instead.  If you haven't read, "How to use this forum - please read," shown at or near the top of the subject listing for this part of the forum, please do, and pay particular attention to item #11, "Tips for getting the most out of your post."

I probably can't help further with this project, though - I don't have one of those doodads, and I have no experience with them.  Clearer descriptions of what's happening, and of what you want, will likely draw more responses from other readers.

mattnelson521

I understand. I think at this point i'll just mess around with it. At least i'm at a point where its working enough for my project. and i can go from there.  Thank you again for the information and help.

Go Up