Wavetooeasy serial volume

Hi Ivan Sorry for delay just testing different combination out. Might have found something out that will help you.
I formatted the SD card still the same.
With the speakers_volume = 10 im getting this what sounds like resetting thing. `

1 With the speakers_volume = 10 in INI send command to play wav once and it doesn’t play at all.

2 With the speakers_volume = 10 in INI send the command twice with a 5 sec delay between commands to play the wav and it plays but repeats as if i had it looped set which i don’t as far as i’m aware. Which would explain the what we though was resetting because i was sending command every 5 seconds and you was repeating on a loop for some reason ?

3 With the speakers_volume = 10 not added send command to play once and it doesn’t play at all.

4 With the speakers_volume = 10 not added send command twice with a 5 sec delay between commands to play the wav and it plays but repeats 5 times then a delay then 3 times with a delay and then once. The number of time it can pay over and over before a delay can vary. Then after about between 4 to 8 play it stops and this is with out the while loop sending the command twice to make it play.
So it’s only playing on a second command and then repeating with out being told too ?
I hope this makes sense

Thank you for testing. We are truly surprised about the kind of issues you are finding. Here is a list of questions and suggestions we put together:

  1. Is the power supply to WaveTooEasy controlled by the PIC board somehow? Like in, when the PIC program starts it turns on the WaveTooEasy board?

    I ask because there should be a couple of seconds from power-up for the board to be operative (the bootloader waits 1 second for commands on serial port).

    If so, please add a delay of 2 or 3 seconds before sending any command. Ideally, the command CMD_HELLO is used to check if the WaveTooEasy is operative.

  2. Is there a way to tell if the PIC is somehow resetting by itself?

  3. I see from the pictures that the TX pin of the WaveTooEasy is connected. Perhaps the PIC doesn’t like the answers the board is sending. If you are not checking for answers right now, perhaps disconnecting it is a good idea to try.

  4. To rule out some hardware or communication problem I suggest to use the PC test program. This program has all the available commands for you to test the board. It requires a connection to a PC with a serial port. Please note that the signals on the WaveTooEasy are TTL, so don’t connect it directly to a RS232 port and use a level translator.

    This is the program we use to validate the software/hardware. I put the program binary here if you can’t compile it from sources.

  1. Do you have an oscilloscope? I think it could be useful to check what’s happening on the RX pin of the WaveTooEasy board. Also I am not familiar with PICs or mikrobasic, so I can’t tell about the performances of a serial soft port or if effectively the data are being output on time and not being buffered, etc.

Hi Ivan
Thanks for all your help mush appreciated i shall look into your suggestions over the week end and let you know how i get on. Have a good weekend.

Hi I have checked what you considered and here what i found.

  1. The PSU is not controlled they both are connected and come on together.
    I added an extra second before i try to communicate with wavetooeasy and that has sorted out requiring two commands the wavetooeasy wasn’t ready.

2 The pic is resetting as i turned on a green led on and off at swtitch on and this is pulsing as it repeats under these circumstances.

3 If i have the Speakers_volume = 10 in the INI file then send the play command it resets.
But If i send the volume command even though its not working then the play command it doesn’t reset.

So to stop it rebooting i need the speakers_volume in the INI file for some reason.

I put the scope on the TX and RX lines the TX line from the pic is 5 volts but the RX line is only 2.6 Volts coming from the wavetooeasy for some reason even whrn i disconnect it from the pic.

What i have also notice with more test is that my TX line after transmission line which is at 5 volts is getting pulled down by 2 volts after it sends the data, I’m not doing anything with the receive commands so not sure why the pic is resetting when i don’t send the volume command. ?
Thanks

I still believe that’s maybe a power supply problem. Perhaps you can see a glitch in the power lines with an oscilloscope when audio starts playing. The issue may be explained that when speakers_volume = 10 then the board will consume more by playing audio louder. Perhaps you are sending the volume command with 2db and that’s not enough to make it reset. So because of this perhaps you see a difference between “sending the command” and “setting volume in INI file”.

Try this:

  • Set spearkers_volume = 2 and see if it resets
  • OR send the volume command with value 10 and see it it resets
  • OR try to power WaveTooEasy with an independent power supply.

Disconnecting the serial signal you are not using right now (TX from WaveTooEasy) may be still a good idea to discard data reception problems in the PIC.

In any case, we’ll prepare a new board that I will test personally regarding volume and send it to you.

For serial lines, check if you don’t have a shortcircuit in the WaveTooEasy TX and RX lines. That’s the only thing that can explain those voltages and “lines pulled down”,

Hi Ivan
At the moment i’m not sending the volume command and it’s resetting the pic.
If i change the speakers_volume = 2 then it doesn’t reset.

I have scoped the 12 volts line going to your wavetooeasy board and when it plays a sound it’s putting audio ripple on the 12 volt line. MY pic runs on 5 volts but it must be effecting it causing a reboot even through the 5 volt line look smooth.
I have placed a 33uf Cap across the 12 volt supply going to you wavettooeasy board and this seems to have stopped the ripple and now the pic is not rebooting.

When i change speaker_volume from 10 to 2 you can just about hear a slight difference in volume.
Am i right is saying that the speakers_volume command over rides any volume command i send?

I did try changing the volume with the pic with and with out the speakers_volume in the INI file but it didn’t see to change change.

I checked across the TX and RX line but it’s in the Meg ohms no short, The RX line is still reading low at only 2.6 volts coming form the wavetooeasy board even if i disconnect it from the pic ?
thanks

OK. The PIC isn’t resetting anymore and that’s great news. I suggest using a stable power supply and using 5V too, since all the audio works at 5V anyways and there is no performance gain and it’s better for dissipation. Using the 5V pin bypasses an internal power supply and can make the circuit less “noisy” or less subject to noise.

The speakers_volume setting in INI file just sets the initial volume at startup (here you can actually see what the WaveTooEasy firmware is doing).

If you later send a command to set the volume again, it will take over the value from the INI file.

If speakers_volume in INI file is missing, then the board will set 0dB. If you send the command later with 2dB, the difference in volume might be minimal. I can hear a difference from 0 to 10dB.

The 2.6V on serial signals is strange… we measure 3.3V in our boards.

Hi Ivan I’m now running the wavetooeasy from 5 Votls the same supply as the pic and it’s not resetting now even with out the cap which is good. The power supply rail is much cleaner now when check with the scope now i’m not using the 12 volts to supply the wavetooeasy board. The RX signal is now 3.3V now its running on 5 volts.

The INI speakers_volume changes the volume ok now i set it at 15 sound pretty good.
I then send to commands to play the wavs at different volumes below one after the other after a delay.

0x7F 0xAA 0x0F 0x02 0x00 0x14 0x00 0x84 0x2E which i think is 2db
0x7F 0xAA 0x0F 0x02 0x00 0x1E 0x00 0x4F 0xC1 which is 3 db
0x7F 0xAA 0x0F 0x02 0x00 0x32 0x00 0xC4 0x82 which is 5 db
I think i can hear a slight change in volume but
the above are a lot quieter than the INI speakers_volume = 15

Please could you tell me what i would need to send as in code to give a sound level around the 15 level as set by the speakers_volume that would be great. As i cant seem to get the volume anywhere near 15 level.
Thanks

That’s great! If you can supply it with 5V, go with it

Regarding volume, the kind of values you can set in speakers_volume are exactly the same you can send with commands. It’s a value in dB. If speakers_volume is 15dB and you like how it sounds, then sending the volume command with 15dB will yield the same result.

There is a note in the manual about the values you can set. I quote it here:

This means that when you send a command with (or set in the INI file) 2dB the WaveTooEasy software knows that the amplifier doesn’t support it and it will select 1.5dB. When you use 5dB, WaveTooEasy will select 4.5dB. And that’s the reason why you hear little difference.

You don’t need to set the volume for every file you play. The volume configuration is kept until you send another volume command with a different volume value, but if you have different audio files that you need will need volume adjustments, you can either:

  • Edit them with some audio software and increase the volume before copying them to the SD
  • Use “channels”. You can configure the volume per channel (command CMD_SET_CHANNEL_VOL) and play specific WAV files on specific channels. The only drawback is that volume for channels is done digitally by the WaveTooEasy software and it might clip if the volume/waveform is too high.

Hi Ivan Thanks for all your support looks like it working now as we want it.
Looks like the main issue was running the board from a 12 volt power supply and the wavetooeasy putting noise on the power rails when it plays the audio. Not had an issue since i put it on 5 volts.
Thanks guys.
David

Hi @dave777.

Sorry for the late reply. I’m glad everything is working now. Let me know if you need more help.

Ivan.