- Posts: 706
Voice alerts test build
- magic_marty
- Offline
Please Log in or Create an account to join the conversation.
- mwm
- Topic Author
- Offline
But the point is moot unless we can find an audio module with an SPI interface. Anyone got one?
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- magic_marty
- Offline
- Posts: 706
Please Log in or Create an account to join the conversation.
- blackmoon
- Offline
- Posts: 402
Please Log in or Create an account to join the conversation.
- Fernandez
- Offline
- Posts: 983
1, supports sampling rates (KHz): 8 / 11.025 / 12/16 / 22.05 / 24/32 / 44.1 / 48
2, 24-bit DAC output, support dynamic range: 90dB, SNR support: 85dB
3, fully supports FAT16, FAT32 file system, maximum support 32G TF card, support U disk to 32G, 64M bytes NORFLASH
4, a variety of control modes are available. IO control, serial port, AD button control mode
5, radio spots language function, you can pause the background music being played. Advertising finished playing background sound continues to play back
6, the audio data is sorted by folder, supports up to 100 folders, folders can be assigned to every 255 Tracks
7, 30 level adjustable volume, six adjustable EQ
See point 4, is it not allready possible?
Please Log in or Create an account to join the conversation.
- magic_marty
- Offline
- Posts: 706
Please Log in or Create an account to join the conversation.
- mwm
- Topic Author
- Offline
We're currently using serial mode. It needing a serial IO pin is the issue we're trying to work around.
AD Key mode uses the voltage levels on two analog inputs to simulate 10 different keys on each pin. That lets you play 14 tracks, but requires both pins to do so. It needs two DAC output pins rather than one serial pin. This makes things worse, not better.
IO mode is just two pins that play the next track and the previous track, respectively. You could make this work with one digital IO pin, but implementing soft serial seems like a better idea.
The eemart board - similar to the dfplayer, but using a different player chip - has a "two-line serial" mode that uses a clock and data pin. It's close to I²C, but apparently not close enough to use the I²C pins - meaning you have to bit-bang the values out. Looks like it needs two or three pins as well.
The bit-banging approaches seem like a worse option than SPI, as they are slower protocols and hence you wind up spending more time sending the message.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- mwm
- Topic Author
- Offline
You'll notice four different modules listed. There's a 16P version about the size of the dfplayer. There's a U version about twice that size with a USB connector. Far down the page you'll find a 28P version that's just a bit smaller than the U version, but no USB connector. Finally, there's a programmer module. The 28P version just exposes more IO pins for more flexible operation, and isn't really of interest to us. The programmer has a socket for the 28P or 16P version and a USB connector, giving them the same interface as the USB version. Downside is that the USB interface doesn't seem to be a flash drive, but some magic interface that they expect you to use their software with. Upside is that the interface has been hacked, so we can potentially run it on the Tx, meaning you won't need to access the module to upload voice data into it. You will probably need their program to prepare the data, though.
Timing issues: The existing buzzer audio already does a lot more SPI IO than this would do. When it plays a sound, it opens the sound.ini file and reads it from the SPI flash card to get the beep sequence to play. My code avoids that, just telling the audio module "Play file #". Data logging also happens to the SPI flash drive. However, this uses a different SPI interface than the RF modules. I'm not sure how much difference this makes. One possibility is that we might be able to use the flash SPI lines for this instead of the RF module one, but that might create problems for data logging instead of the RF modules.
I'll probably order the USB version (since it can also use the flash interface) later this week to play with.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- phantom8
- Offline
- Posts: 109
BTW, I think we may have an unused serial TX pin on the Devo 10. PB's Devo 10 Wiki says GPIOD Pin 8 (PD8) is used for LCD, but I couldn't find any reference in the code. Can this be a typo on the doc? If it's available, PD8 can be used as USART3_TX.
Please Log in or Create an account to join the conversation.
- mwm
- Topic Author
- Offline
PD8 is a data line in the STM32's external memory controller, which is used to talk the LCD controller/memory. So it wouldn't be mentioned explicitly, but instead via references to the FSMC hardware.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- phantom8
- Offline
- Posts: 109
Thanks for clarifying the PD8 pin on the Devo 10.
Please Log in or Create an account to join the conversation.
- victzh
- Offline
- Posts: 1386
The problem with WT588 - SPI enabled sound module - is its implementation of SPI.
We started using SPI sharing for RF modules and SPI flash memory for devices without its own memory or small memory - Radiolink AT9 and Devo F series. This works because memory uses high speed clock and short packets - in microsecond range. We use simple strategy - disable interrupts for memory access while CS is low. RF modules use timer interrupts for their workload, so they can't be interrupted, while delay because of memory operations is negligible.
While it's true that WT588 does not require long transfers - one byte only - this byte can be very long. Recommended timing is a 2ms delay after CS goes low and then 60us per bit clock rate. If we use the same interrupt disabling strategy, it requires us to hold the radio packets for up to 2.5ms, which can be problematic - there are protocols with packet period of 4ms.
So, I'm aware of the need to extend TXs I/O but need to think about it a bit more. This timing is quite surprising, I only looked at the WT588 specs yesterday.
Please Log in or Create an account to join the conversation.
- mwm
- Topic Author
- Offline
There are two different goals here. One is to have an alternative extra module that will work even if PPM is in use. The other is for adding something to the 4-in-1 deviation module. I haven't been able to find a description of that, but I'm wondering if it's going to include an mcu on it? And if so, which one? In particular, does it have a spare usart so we could use one of chips with a serial port connection, and there are a number of interesting choices. Beyond that, is it really feasible? The dfplayer (probably the best stand-alone module option so far) will drive a small speaker. Can that kind of functionality be integrated into your board? If not, then is there any point in trying to do this. V
The only good option for getting away from the trainer port seems to be SPI. We could use a digital IO pin and bit-bang seriat out on it, but that seems like it would have worse problems than a proper SPI implementation.
The only other audio chip I've found that could do SPI is the VS1000. Pluses: Plays ogg vorbis & mp3s, so even a couple of MB's should be fine: my original alerts used less than half a meg as .ogg files. I've already got one, as it's what the adafruit audiofx board uses. MInuses: some of the formats are licensed, which drives the cost up, so there aren't any small, cheap modules for it. Getting SPI out of it will require custom firmware on the module. I'm not sure this is worth the effort just to save the trainer port.
And a final question: if we can hook the WT588 up into the SPI bus used by the flash disk, could we drop the requirement that it disable interrupts for that 2ms interval? Would it be worthwhile to turn on CS for the WT588 and then set a timer interrupt and do the write when that interrupt happens? The only other thing on that bus is the SPI flash, which means it could interfere with data logging.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- Deal57
- Offline
- Posts: 857
The finished boards (e.g. DFPlayer) use these lines for Flash memory but they don't expose them to the connectors. If they are too slow for our purposes that would be unfortunate.
Deviation Devo7e 3way switch mod, A7105, NRF24L01
Devo6s 2x2 switch mod, trim mod, haptic, multimodule, A7105, NRF24L01, CC2500
Devo12e 4-in-1 with voice mod -- it speaks!!
Please Log in or Create an account to join the conversation.
- victzh
- Offline
- Posts: 1386
Currently design of the add-on board verified in AT9 and worked on by Phractuedblue for Devo F is based on discrete logic.
I thought of using an MCU, but this complicates it a lot, so we first implemented the simple one. I'll publish it soon.
So far adding a slow SPI or serial or any other device seems to require an MCU.
Please Log in or Create an account to join the conversation.
- mwm
- Topic Author
- Offline
The VS1000 lets you rewrite the chip firmware, so we could fix that on those.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- mdmbc
- Offline
- Posts: 19
Please Log in or Create an account to join the conversation.
- silpstream
- Offline
- Posts: 244
On the u7e, I'll stick to the MCU pin solution that phantom8 has provided as PC10/11 is now part of the switch matrix, but for the other devos, relocating switches could be easier than looking for i2c/spi or even bit banging solutions. Just my 2 cents.
Also, I was wondering, does dfplayer need both tx/rx? What functions do we loose using only tx? Thanks!
Please Log in or Create an account to join the conversation.
- mwm
- Topic Author
- Offline
I looked for and didn't find any free I²C pins. That actually takes more pins than the serial or the SPI options, because we don't have any I²C going on, so have to find all the pins for it. Well, except for the F12E, which uses i2c to talk to it's lcd. Rather than trying to do a bridge, I there are chips/modules that have an I²C command interface.
As for relocating switches - yeah, we could do that. But we'd have to support both versions, and - well, it gets ugly. Sufficiently so that just living with not being able to use voice alerts if you're using PPM input or output is probably the better alternative. I do have a plan (I have to many plans, so many will probably never happen) to try moving switch config info into hardware.ini. If we did that, then relocating a switch would be a matter of editing hardware.ini instead of a custom build. That would make it possible to relocate the switch if you wanted to, with no software support needed. Ditto for adding switches, buttons, and all the stuff going on for the u7e build.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- silpstream
- Offline
- Posts: 244
I want to look at the hardware.ini stuff too, first block for me was the sequence that it gets loaded, which you already know about. Gotta find some time to look at that, then it might be easier configuring pins from there.
Thanks for the info about the tx/rx in the voice mod! Now waiting for a dfplayer in the mail.
Please Log in or Create an account to join the conversation.
- Home
- Forum
- Development
- Builds
- Voice alerts test build