Audio (voice) - Stock 9X PCB

er9x is the best known firmware. It has a superb range of features and is well supported by the community. Well worth trying out.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Audio (voice) - Stock 9X PCB

Post by MikeB »

Edit: IF YOU ARE STARTING READING THIS THREAD HERE, MAKE SURE YOU READ ABOUT THE NEWER DESIGN THAT DOES NOT USE THE EMARTEE MODULE.
MORE RECENT EMARTEE BOARDS DO NOT PERFORM AS WELL AS THE ORIGINAL ONES, THE NEW DESIGN PERFORMAS MUCH BETTER THAN EITHER, AND HAS EXPANSION POSSIBILITIES.

I'm actually making some progress on adding voice output to er9x. I have a test circuit working, with an AtMEGA88 driving the emartee (WTV020) board. I have a 2Gb SD card in the audio board with 6 audio files on it (AD4 format files). I have a button connected to the M88, and each time I press it I get the 'next' audio file played.

My proposed plan for implementation is to use a suitable AVR processor connected to the serial output port of the M64 (shared with the FrSky telemetry) and this extra processor drives the audio board. This way, all the main M64 needs to do to play an audio file is to send a single byte to the new processor. This will give over 250 different sounds.

I'll post some circuits over the next few days. Obviously, there is a requirement to be able to program this extra processor. It may be possible to use one of the arduinos, but due to the requirement for a 3.3V power supply to the audio board, and level shifters for the interface signals, we need some extra circuitry.

For myself, I shall knock up a circuit on some stripboard and prove the functionality. The simple solution is as outlined above. A more sophisticated solution would be to include a USBASP programmer in the extra processor, with the ability to use this programmer as a bootloader to update the operating program in the extra programmer, as well as to flash the main M64. This would need a larger processor than the simple solution. Then we could also include the level shifters for the telemetry connection to the FrSky module, and also provide two places on the extra processor for the two switches that need to be moved, thus avoiding the need to connect these to the M64 processor pins. Or is this getting too complicated? To do this properly would really need a PCB made, and while I can design one, I'm not in a position to get any made.

How many people are interested in doing this upgrade? (and just the simple audio only version, or all the bells and whistles!?).

Mike.

Edit: I'll use this to hold 'interim' files while this is all tested:

How to do the mod (updated 26-Jul-2012 00:15):
VoiceHowTo.pdf
(188.63 KiB) Downloaded 5759 times
Codes for sounds:
sounds.csv
(737 Bytes) Downloaded 1698 times
Test versions of er9x:
er9x.hex
14-Jul-2012 23:00
(174.4 KiB) Downloaded 829 times
er9x.hex
17-Jul-2012 00:05
(172.35 KiB) Downloaded 687 times
er9x.hex
20-Jul-2012 00:30
(173.88 KiB) Downloaded 912 times
Zip file of sounds (8-Jun-2012):
sounds.zip
(56.91 KiB) Downloaded 1846 times
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: Audio (voice)

Post by Rob Thomson »

I think it is a grand idea - but at this point am looking at using the sky9x board for all my future flying.

But the solution is very clever!
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Audio (voice)

Post by MikeB »

We should be able to use the same audio files and command structure for both er9x and ersky9x, so it is a development for both.

Mike.

Edit: To carry this over into ersky9x, I could do with some code to convert from the AD4 (ADPCM 4-bit) files back to something the ARM processor can send to the DAC. If anyone finds any it would be useful.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: Audio (voice)

Post by Rob Thomson »

So.. essentially on the arm board it uses the built in DAC, and on the stock/gruvin boards.. you could use the add-on module?

Nice!
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice)

Post by jhsa »

Mike, you're the man.. yesterday at the club I mentioned this mod and some ears went up.. After a while I found out that another guy there has er9x telemetry but never said anything because of the other people..
Count on me for testing.. My knowledge in electronics is not very advanced ( I left when the transistor came in ;) ) but I will help in all I can..
I do like the idea of making the telemetry mod easier as far as the soldering those 2 pins is concerned.. and the possibility of adding more switches and Pots?? ;-) I've just got a second 9x and will now wait before I do the telemetry mod on it, so I can test whatever you need.. Should I order the sound module now? or are you still not sure about that one?
Thanks again
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Audio (voice)

Post by kaos »

How difficult is it to convert the numerical data to actual electronic voice and hooked to a ear phone? I would imagine there is some voice conversion board/circuit out there already. It would be really useful/fantastic when an alarm goes off you actually hear in the earphone what is warning and then the data ie: "low battery - 10.4 volt left" "high temperature - 110 degree"
Is it possible to make this kind of conversion into a small module and with some simple connection onto the main board and has an ear phone output? since the numerical data is already there.
I would love to have something like that than just different tones of beeps.
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Audio (voice)

Post by Kilrah »

That's what the $10 emartee board is for. You plug an SD card in it with the sound files, then just tell it to 'play file #123' and it does.
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Audio (voice)

Post by ReSt »

Now it's time to decide if we want a 'simple' audio voice solution that hopefully is simple, but only can play voice files stored on the SD card or

if we want the powerful solution with a co-processor that adds further possibilities like added functions, simplifying telemetry and so on.

In both cases, the main cpu has to send two bytes of data to the module (or co processor) to play a single file.

this post http://www.rcgroups.com/forums/showpost ... ount=13643 shows how far I got with my tests at that time.

The simple solution can play max 511 files (because they have to be in the root directory and that's the maximum number of files in the root directory)
You can combine playing of several files, if you check the busy line of the module and select the next file when the actual file terminates. But there wil be a short break in between ( of let's say half a second) because the module needs some time to start playing a file.
And sometimes the module stopped playing a sound a short time before the end of file, cutting off a part of the voice. (That may depend on the compression scheme of AD4 and the content of the sound, but I did not really find when and why that happened)

I for myself would be happy with the simple solution.

Reinhard
User avatar
cre8tiveleo
Posts: 1434
Joined: Tue Dec 27, 2011 6:13 pm
Country: -
Location: Ontario,(GTA North)
Contact:

Re: Audio (voice)

Post by cre8tiveleo »

Simple solution is the best. You could also then allow users to assign snd files to certain events. eg: Alarm 1 = 001 (wich calls file 001.ad4) and so on.
:D
It also alows the user to define their own sounds for each file. so someone could have a snd file that says 'Hello Pilot, I'm ready to do your bidding' or anything they choose, they could just have three files, or up to 511 if they so choose.

Just make is simple, basic, and allow the end user to create their own masterpieces.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice)

Post by jhsa »

You could also make the vario sound playing different files for different values on one side of a switch, and when this switch is flicked could give you altitude for example.. but that's another story.. that is software.. Like ReSt says, the first step is to choose how do we want the hardware to work.. the simple Idea does what I've been requesting for many months, but, I do like the idea of simplifying the telemetry mod, possibility adding more switches or pots, and maybe some more stuff that I can't even think of now..
I'm just predicting that we do the simple way now and then a couple months later when the audio is working the community starts requesting for the other things that could have been added from the beggining.. then is the triple of the work..
if there is a safe way to make the telemetry mod easier without compromising the the most important functions regarding model safety, I would say that we should go for the full mod.. there are many people just learning how to use the soldering iron and it would make easier for them to have telemetry.. soldering those 2 pins on the mega is not a begginer's task..

just my 2c

EDIT: But if you guys think that might be too complicated to do the full mod, I'll be very happy with the simple one as well..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice)

Post by jhsa »

watching a friend of mine from the club flying with his monster vario in is glider, with a radio receiver hangging of his neck to receive the audio and saying that it was really cheap (250€ second hand) really made me laugh.. and then I told him about the possibility of the 9x doing it much cheaper and better.. Well, that made him laugh and make fun of this entire community saying that this is always in DEVELOPMENT unlike his Futaba.. that got me angry, and now I want my radio to insult him when the inactivity alarm goes off.. It's personal now :mrgreen: :mrgreen:
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
cre8tiveleo
Posts: 1434
Joined: Tue Dec 27, 2011 6:13 pm
Country: -
Location: Ontario,(GTA North)
Contact:

Re: Audio (voice)

Post by cre8tiveleo »

I'm sorry, but all the manufacturers are always developing, his comment is very under educated.

If Futaba and spektrum weren't always developing, how would there be new radios, newer firmwares.

Our community is one of 'hackers' and modders. we're always modding our radios. Anyone could use the current flavour of er9x or open9x firmware and be happy with that, and keep it. Heck, one of my 9x's is running a firmware from January, and it's stable, and I am not changing it. I know it works, and voila, it still works.

You can remind him too, that companies like Futaba, Spektrum, watch our communites and take our ideas and make them real too. What a bone head.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice)

Post by jhsa »

Exactly, I fully agree with you.. But when people are stubborn, even if you show them it's like talking to a brick wall..
And it's because of the under educated comments as you call them, that I say that this is now personal :mrgreen:

I'll probably end up kicked out of the club, cos he's the president :mrgreen: :mrgreen:
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Audio (voice)

Post by kaos »

there are end users - who just want to use it
there are hobbyist - who want to do some mod work
there are show-offer - just want to show off their stuff
there are hackers - who want to do incredible things
there are Nerds - who want to do something nobody understands :)

when different groups of people talk to each other, there won't be any common language. People like me - bybrid talk to everyone. ;)

now back to the audio. The way I look at 'SIMPLE'
1. Any parameter is reached at the predetermined value, it should 'speak' through an earphone (I can hardly hear my timer beep in the field when some wind is blowing) - 'Warning! hight xx is reached'
2. with a flick of a switch, it should say all the parameters' current value for me to hear
I never liked any of the current telemetry system except the OSD, don't want to look down the little screen search for data while flying
3. has to be able to hook up fairy simple that it can be done with this :)
download/file.php?id=847&mode=view
4. has to have a ear phone jack for ext audio hook up - so if someone want to hook up a 500W amp /spk to play the warning " put me down you NERDs" , they can :)

5. the not so simple that you can program it any way you want
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice)

Post by jhsa »

With a little amplifier that someone posted on these forums a while ago using a LM386 I think, that could be achieved easily.. it can drive a little speaker or headphones, or both with a switched jack plug.. that´s not a problem.. I´d personally go for the 500W amp. :mrgreen: :mrgreen:
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Audio (voice)

Post by ReSt »

WT020-SD20SS module (AD4 player with SD card) has built in audio amplifier to drive speaker with 0.5W 8 Ohm.

Reinhard
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice)

Post by jhsa »

That´s even better. it should be enough. is that the one that Mike referred to??
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Crucial
Posts: 581
Joined: Tue Dec 27, 2011 6:56 pm
Country: -
Location: SE WI, USA

Re: Audio (voice)

Post by Crucial »

http://emartee.com/product/41928/MP3%20 ... d%20Module

I think that was the one Mike referred to. I assume it is the 2 line mode version of the card?
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Audio (voice)

Post by MikeB »

I've done some more experimenting. The sound module, with the free WAV to AD4 converter for the SOMO, does some odd things.
All the AD4 files I get are either 1K or 3K long, never 2K!
If the sound is short enough, it is in a 1K file, but may get slightly cutoff at the end. Longer sounds, in a 3K file, seem to include some repetition, e.g. I tried the word 'hundred' and it comes out as 'hundred hun', and the word 'feet' comes out as 'feet fee'. The original WAV file contains just the single word. I'll try modifying the files, see if that works any better.
There is a 0.3 to 0.5 second delay before a sound is played, so I think we will still need the stock beeper for button press beeps or the sound will come out too late.

Rest: We only need two bytes if we want more than about 250 different sounds, and I think that may be enough given the M64 has to generate this many different options.
My module does not need a special 12mS wait, 2mS works fine.

At the moment, I'm inclined to the very simple. This just takes the serial data from the M64, and drives the sound card. It will have to ignore any telemetry data that is sent from the M64 to the Tx Module. It could run from 3.3V, as does the sound module, so the only level shifting required would be on the serial line from the M64.

To handle the two switches using the addon processor requires the ability to send data back to the M64. To do this almost certainly requires the serial port on the addon processor to send data back to the M64, which means the addon will need to intercept the telemetry data from the Frsky module, and relay that to the M64 so the addon can insert its own information in the serial stream. To do this needs two serial inputs.
I'm actually close to having working firmware for the simple addon version, to do more will require quite a bit more firmware development.
For a simple version, I think I'd choose an ATTINY2313 (20 pin) processor, not too big and has a proper serial port. It would fit on a piece of stripboard about 2.1" by 1.4" (55mm by 35mm) plus the sound module.
A complicated version would need more flash, so I'd probably go for a ATMEGA88 (28 pin, or 168 or 328). A board for this would be larger.
We could go for the larger version, but just put the firmware for the simple version in, to get started. The hardware is still more complicated to handle level shifting. More design work would also be needed now, to make sure it would be useable for more things later. I think, if you really want more functionality later, then you probably need to consider fitting the ersky9x or Gruvin replacement main boards.

Just had another thought, go for the simple, but disconnect the backlight signal from the M64 pin 17. This pin has an easy to use circular pad beside it. Use a couple of serial commands to turn the backlight on and off, getting the addon processor to do the actual switching. Then re-use pin 17 as in input from the addon to relay the two moved switches back to the M64. This way the moved switches could be connected to the addon. It is still more complicated though.

I think, we just assume you already have the telemetry mod done and go the very simple route, then we get voice working quite quickly. We put in 'standard' alarms, but also allow 'custom' sounds where er9x/open9x has a configuration value of play custom sound X, and the user creates their own voice file for X, then Jhsa can record his own insults so he can insult himself :mrgreen:

Crucial: Yes, that is the module I have, takes a standard size SD card.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice)

Post by jhsa »

You bet I will.. just can´t wait to insulting myself :mrgreen:

So, are you actually going to try both versions? I´m asking because I have one tx with the telemetry mod already in it and a new one still stock..

I do like your last option using the pin 17 as we can still control the backlight that way. also, as I understand would avoid soldering the M64´s pins for the telemetry mod..
and also if I did understand correctly, either way we will need another chip.. so, I guess, soldering an Atiny or an Atmega on the strip board, the work is the same? and as difficult as..... ;) :)

Joao
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Audio (voice)

Post by MikeB »

Stripboard is fairly easy to use, with an AtTiny in a dual in line package, pins go through the holes in the board and are on a 0.1" (2.5mm) pitch. The biggest problem, for some people, is going to be programming it.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice)

Post by jhsa »

Another thought.. If you do decide to go for the most complicated version (with the pin17) could the people that already did the telemetry mod just leave the wires connected to the mega 64 pins and these be used as extra inputs for switches?

I know, shut up João.. :D
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Audio (voice)

Post by kaos »

if you are using the SD card version, why not use the micro sd version : http://emartee.com/product/41540/MP3%20 ... 0SD%20Card
that will make it smaller. most sd stuff are in Micro SD now, they cost about the same too.
if they have the same capability.
Last edited by kaos on Tue May 29, 2012 5:13 pm, edited 1 time in total.
User avatar
Crucial
Posts: 581
Joined: Tue Dec 27, 2011 6:56 pm
Country: -
Location: SE WI, USA

Re: Audio (voice)

Post by Crucial »

MiniSD or MicroSD? The description says Mini but the picture shows a Micro.

I just ordered the larger version before you posted the link to the other. If the other is a microSD and works the same it would be a lot smaller.
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Audio (voice)

Post by kaos »

I think mini is micro depends on who is writing it. ;) I don't know there is a 3rd size in SD. Just the SD and the mini/micro SD.
User avatar
Crucial
Posts: 581
Joined: Tue Dec 27, 2011 6:56 pm
Country: -
Location: SE WI, USA

Re: Audio (voice)

Post by Crucial »

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Audio (voice)

Post by kaos »

wow, never saw a mini before. learn something new everyday. I would use micro though, smaller and is readily available every where (in US , at least). I don't think I have seen a mini in the regular store. Actually, I have seen ads that use mini as the name for micro in general store. May be mini is a regional thing (europe, asia).
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Audio (voice)

Post by MikeB »

I actually have the version with the standard sized SD card sound module, so this is the easiest for me to implement and test. Once I publish a circuit and stripboard layout for it, maybe someone else will sort out using the micro SD card version as well.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Audio (voice)

Post by jhsa »

I downloaded the tool to encode the wav files.. is there any way to listen to ad4 files without having the module??
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Audio (voice)

Post by Kilrah »

I'll order a couple of the microSD version modules.
Along with an Arduino nano 3.0: http://emartee.com/product/42006/Arduin ... 0ATMEGA328

These use a '328, operate on 5V, and have USB (OK, via an FT232, but still convenient)... they sound good for everything, including flashing of the main CPU, don't they?

Post Reply

Return to “er9x”