Page 18 of 19

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Fri Oct 12, 2018 1:18 pm
by hackerjoe
Ok thank you, João
I forgot all about eePe but then again I never used it to program anything initially I did it all on the radio

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Fri Oct 12, 2018 4:01 pm
by jhsa
Oh yeah, you can use eepe in some very nice ways to program your radio, believe me ;) :mrgreen:

https://www.youtube.com/watch?v=lmvIIV9OyLU&t=

https://www.youtube.com/watch?v=rpKlw9Yoicc&t=

have a look :)

João

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Fri Oct 12, 2018 4:45 pm
by hackerjoe
LOL remember to remove the propellers lol.
That was funny João

I am thinking about selling 2 of my modded 9X's but keeping a 3rd and getting a Taranis QX7
It doesn't look like a bad radio for $105ish from HobbyKing

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Fri Oct 12, 2018 6:46 pm
by jhsa
hackerjoe wrote:
Fri Oct 12, 2018 4:45 pm
LOL remember to remove the propellers lol.
That was funny João
It might sound funny, but it is a very serious advice. You don't want your model to take off from the table and hit your face or someone else's, if something goes wrong..
I am thinking about selling 2 of my modded 9X's but keeping a 3rd and getting a Taranis QX7
It doesn't look like a bad radio for $105ish from HobbyKing
It's not a bad radio.
João

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Tue Dec 25, 2018 9:07 am
by fxshoppe
Hi

Merry Christmas

Finally built this but no sound also when try to backup model the progress bar is not going ahead so can i assume sd card is bad.

What is the maximum sd card it supports as I have 32 GB ones apart from 1GB which am testing with.

Also using
r11 150 ohms instead of 10 ohm
r8 47K instead of 33k

Please help thanks in advance

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Tue Dec 25, 2018 11:41 am
by fxshoppe
The trims are working so assuming that firmware is working fine and the communication between atmega 128 and promini is working fine

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Wed Dec 26, 2018 2:05 pm
by jhsa
please post your radio's eeprom so we can have a look at it.
also, do you hear beeps when you move the trims for example?
Does the radio beep at all?

João

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Wed Dec 26, 2018 2:36 pm
by fxshoppe
Thanks no beep or anything as i had removed the stock beeper.

Only sound is the speaker puck when it powers up.

I will post eeprom once i am home where i have the USBASP to dump it. Though I have the radio and soldering iron and components so if anything needs to be done can do.

Thanks and regards

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Wed Dec 26, 2018 4:22 pm
by jhsa
did you connect the signal from the beeper to the ArduVoice board? You must do that to have beeps as well..

João

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Sun Dec 30, 2018 3:50 am
by fxshoppe
I have removed the beeper and the associated transistor and connected to the arduino. I am not able to backup, the backup progress bar doesnot goes ahead.

Cannot hear any beeps either or any sound on any change.

Thanks and regards,
Amit

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Sun Dec 30, 2018 10:45 am
by jhsa
Ok, so, if you can't hear any beeps the problem can be on the amplifier stage itself, and/or in the the audio configuration. Please let me get to my radio and check my config. Will post later.

João

Sent from my BLN-L21 using Tapatalk


Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Sun Dec 30, 2018 3:09 pm
by fxshoppe
Thanks for the reply.
Kindly find the firmware used,config file as attached.

My apologies the trottle trim is not working in the hw detect or in screen got confused with left and right side while inversing.

The things i have done is
removed the resistors from pin 27 and 28 and run direct wire from board to arduino with the diode in line.
Not sure if the beeper transistor is to be removed which i did so it is a direct feed to the arduino. removed both beeper and transistor.

Attaching the combined serial file I am using. Also can i have a usbasp and card reader module as connected with sd card removed to change firmware.

please advise where i am faulting

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Mon Dec 31, 2018 3:19 am
by jhsa
Please go to "Radio Setup / Audio Haptic" menu and set the "Sound Mode" to "MegaSound"
Then turn the radio off.
Now turn the radio ON while holding the left horizontal trim to the left.
Go to "Radio Setup /Hardware" Menu.
Enable the option "M'Sound Serial"

Now see if the voice module works

also, you might have some problem on the amplifier. Removing the beeper and transistor is correct. But you should have beeps as they have nothing to do with the arduino. If you don't have beeps, you might have made a mistake somewhere on the amplifier.. Please double check your connections

João

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Tue Jan 01, 2019 4:13 am
by fxshoppe
Thanks mate,

Happy new year.

Done all the config settings as told in forum and as suggested by you.

I have ordered components for amplifier and will rebuild as have checked each connection on amp board and apart from 10 ohm resistor to 150 ohm nothing changed. Only sound i can listen is puck sound from speakers during tx power up.

My question is even with amp disconnected shouldn't the trims work through arduino pro mini as trottle trim are not working even removed the resistors and caps from the trim side on the motherboars to avoid any possible interference.

My request is if whenever you get time please upload the working firmware and config file from your tx. My processor is 128.

I am attaching the wiring photo and combined hex file used for your reference.

Sorry for the trouble.

Thanks and regards,
Amit Kumar Verma

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Tue Jan 01, 2019 9:20 am
by jhsa
I thought tou might have some wrong configuration because the trims are not working..

I don't have an m128 radio, only an m2561 radio. Do you also have a display backlight installed, connected to the arduino? If so, does it work?

I think Mike posted an arduino file a few posts above that plays some file. This tests if the module is working. Perhaps you should flash your arduino with it.

I can't see the picture you posted at the monent. Will do later when I get to my PC.

João

Sent from my BLN-L21 using Tapatalk


Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Tue Jan 01, 2019 12:37 pm
by ReSt
I flashed your document.eepe file onto my radio.

This is what I did to get the voice running with your Eeprom setup:

Power on the radio in maintenance mode, that is, power on with left horizontal trim left (and released) . You will shortly see a message of "Hardware menu enabled"
In Radio setup - hardware - deselect "M'Sound Serial"
in Radio setup - Display - set Light switch to ON
in Radio setup - Audio Haptic - set Beeper to short and Speaker pitch to 1
in Radio setup - Alarms - set Battery warning below your actual battery voltage

If your switches THR and AIL don't work:
In Radio setup - Hardware - invert the "Frsky mod done"

These changes give me a running voice system.

You may later change any setting according to your preferences.

Reinhard

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Wed Jan 02, 2019 3:58 am
by fxshoppe
Thanks a ton for all your help,

I will try and get back to you once i am able to check it on my tx.

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Wed Jan 02, 2019 2:43 pm
by fxshoppe
Hi do not intend to connect a ftdi adaptor ever can i bypass the diode D1 between D0 and pin 28 of the processor and connect the wire directly to D0(RX) pin of the processor.

Why am suspecting the diode because sd card or module could have issue but atleast trims should work.

If need will ever arise i will disconnect the the 2 wires going to the arduino as I am planning to put a jst connector anyways.

Lastly I am using the default arduino fuses do they need to be changed. If you could provide me the values then i can validate.

Also i connected the beeper wire directly to amp circuit with no connection between arduino and amp board should i still hear any sound.

Also can i use the readymade lm386 board or pam amp board as used in https://www.youtube.com/watch?v=lm_5YS4xQqQ&t=6s

Since they have ground and channel input what changes need to done in schematics.

Really sorry for trouble,

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Wed Jan 02, 2019 4:27 pm
by fxshoppe
ReSt wrote:
Tue Jan 01, 2019 12:37 pm
I flashed your document.eepe file onto my radio.

This is what I did to get the voice running with your Eeprom setup:

Power on the radio in maintenance mode, that is, power on with left horizontal trim left (and released) . You will shortly see a message of "Hardware menu enabled"
In Radio setup - hardware - deselect "M'Sound Serial"
in Radio setup - Display - set Light switch to ON
in Radio setup - Audio Haptic - set Beeper to short and Speaker pitch to 1
in Radio setup - Alarms - set Battery warning below your actual battery voltage

If your switches THR and AIL don't work:
In Radio setup - Hardware - invert the "Frsky mod done"

These changes give me a running voice system.

You may later change any setting according to your preferences.

Reinhard
Thanks Reinhard, tried all the steps but no luck. Have reasons to believe the arduino not taking to mega chip as even backup not working.

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Thu Jan 03, 2019 3:54 am
by fxshoppe
Hi Mike,

Maybe off topic but when trying to compile the source from git hub https://github.com/MikeBland/mbtx/tree/master/amod i am getting these warnings.

Unfortunately cannot decode if these warnings can be ignored.

Since there are so many versions therefore giving it a shot. Also how can I get a combined hex file?

MAKE -f ..\makefile SPEED=16 SERIAL=1
avr-gcc -mmcu=atmega328p -Wall -gdwarf-2 -std=gnu99 -DF_CPU=16000000UL -DSERIAL_VOICE=1 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT amod328.o -MF dep/amod328.o.d -c ../amod328.c
avr-gcc -mmcu=atmega328p -mmcu=atmega328p -Wall -gdwarf-2 -std=gnu99 -DF_CPU=16000000UL -DSERIAL_VOICE=1 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT asmfunc.o -MF dep/asmfunc.o.d -x assembler-with-cpp -Wa,-gdwarf2 -c ../asmfunc.S
avr-gcc -mmcu=atmega328p -Wall -gdwarf-2 -std=gnu99 -DF_CPU=16000000UL -DSERIAL_VOICE=1 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT ff.o -MF dep/ff.o.d -c ../ff.c
../ff.c: In function 'sync_fs':
../ff.c:829:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
ST_WORD(fs->win+BS_55AA, (UINT)0xAA55);
^
../ff.c:830:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
ST_DWORD(fs->win+FSI_LeadSig, 0x41615252);
^
../ff.c:831:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
ST_DWORD(fs->win+FSI_StrucSig, 0x61417272);
^
../ff.c:832:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
ST_DWORD(fs->win+FSI_Free_Count, fs->free_clust);
^
../ff.c:833:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
ST_DWORD(fs->win+FSI_Nxt_Free, fs->last_clust);
^
../ff.c: In function 'check_fs':
../ff.c:2122:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
if (LD_WORD(&fs->win[BS_55AA]) != 0xAA55) /* Check record signature (always placed at offset 510 even if the sector size is >512) */
^
../ff.c:2125:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
if ((LD_DWORD(&fs->win[BS_FilSysType]) & 0xFFFFFF) == 0x544146) /* Check "FAT" string */
^
../ff.c:2127:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
if ((LD_DWORD(&fs->win[BS_FilSysType32]) & 0xFFFFFF) == 0x544146)
^
../ff.c: In function 'chk_mounted':
../ff.c:2219:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
if (LD_WORD(fs->win+BPB_BytsPerSec) != SS(fs)) /* (BPB_BytsPerSec must be equal to the physical sector size) */
^
../ff.c:2222:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
fasize = LD_WORD(fs->win+BPB_FATSz16); /* Number of sectors per FAT */
^
../ff.c:2223:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
if (!fasize) fasize = LD_DWORD(fs->win+BPB_FATSz32);
^
../ff.c:2233:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
fs->n_rootdir = LD_WORD(fs->win+BPB_RootEntCnt); /* Number of root directory entries */
^
../ff.c:2236:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
tsect = LD_WORD(fs->win+BPB_TotSec16); /* Number of sectors on the volume */
^
../ff.c:2237:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
if (!tsect) tsect = LD_DWORD(fs->win+BPB_TotSec32);
^
../ff.c:2239:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
nrsv = LD_WORD(fs->win+BPB_RsvdSecCnt); /* Number of reserved sectors */
^
../ff.c:2258:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
fs->dirbase = LD_DWORD(fs->win+BPB_RootClus); /* Root directory start cluster */
^
../ff.c:2277:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
fs->fsi_sector = bsect + LD_WORD(fs->win+BPB_FSInfo);
^
../ff.c:2279:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
LD_WORD(fs->win+BS_55AA) == 0xAA55 &&
^
../ff.c:2280:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
LD_DWORD(fs->win+FSI_LeadSig) == 0x41615252 &&
^
../ff.c:2281:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
LD_DWORD(fs->win+FSI_StrucSig) == 0x61417272) {
^
../ff.c:2282:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
fs->last_clust = LD_DWORD(fs->win+FSI_Nxt_Free);
^
../ff.c:2283:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
fs->free_clust = LD_DWORD(fs->win+FSI_Free_Count);
^
avr-gcc -mmcu=atmega328p -Wall -gdwarf-2 -std=gnu99 -DF_CPU=16000000UL -DSERIAL_VOICE=1 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT fmmc.o -MF dep/fmmc.o.d -c ../fmmc.c
avr-gcc -mmcu=atmega328p -Wall -gdwarf-2 -std=gnu99 -DF_CPU=16000000UL -DSERIAL_VOICE=1 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT ymodem.o -MF dep/ymodem.o.d -c ../ymodem.c
avr-gcc -mmcu=atmega328p -Wall -gdwarf-2 -std=gnu99 -DF_CPU=16000000UL -DSERIAL_VOICE=1 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT ff_lfn.o -MF dep/ff_lfn.o.d -c ../ff_lfn.c
avr-gcc -mmcu=atmega328p -Wl,-Map=amod_lastSer16.map amod328.o asmfunc.o ff.o fmmc.o ymodem.o ff_lfn.o -o amod_last16Ser.elf
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature amod_last16Ser.elf amod_lastSer16.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex amod_last16Ser.elf amod_lastSer16.eep || exit 0
avr-objdump -h -S amod_last16Ser.elf > amod_lastSer16.lss

AVR Memory Usage
----------------
Device: atmega328p

Program: 24472 bytes (74.7% Full)
(.text + .data + .bootloader)

Data: 1413 bytes (69.0% Full)
(.data + .bss + .noinit)


Thanks for all the help

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Thu Jan 03, 2019 9:46 am
by MikeB
Yes, you may ignore all the "dereferencing type-punned pointer" warnings.

Mike

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Thu Jan 03, 2019 10:54 am
by fxshoppe
MikeB wrote:
Thu Jan 03, 2019 9:46 am
Yes, you may ignore all the "dereferencing type-punned pointer" warnings.

Mike
Thanks mike, Sorry for trouble how can i create a combined firmware with both bootloader and serial voice together.

My current build bat file is what needs to be added more

cd C:\OpenAVRc\amod\obj
Path C:\OpenAVRc\AVR-GCC\bin;C:\OpenAVRc\AVR-GCC\utils\bin
MAKE -f ..\makefile clean
MAKE -f ..\makefile SPEED=16 SERIAL=1

Regards
Amit

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Thu Jan 03, 2019 2:57 pm
by MikeB
I created a combined file by editing the hex file of the application and pasting the bootloader hex on the end, removing the end of file record from the application data. If you download a previous combined file you will see what to do, and also get the bootloader hex code to copy.

Mike

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Fri Jan 04, 2019 12:57 pm
by fxshoppe
Just to add what is being tested

Amp working fine connected ground to beeper point and signal to pin 3 of lm386 -- working
Card reader connected to nano with same pin connection as promini,uploaded a sketch TMRpcm library --- card reader working
Fed the output of nano sound input to amp output --working

now connected a usbasp and ftdi only to promini
uploaded the custom optibootloader and trying to upload finalserial16.hex @ 38400 speed -- fails after few percentage max reached 83%
uploaded the optibootloader and trying to upload finalserial16.hex @ 1152000 speed -- passes each time
compiled optibootloader with mike's git repository after change to 16mhz and upload hex @ 38400 speed -- fails after few % max reached 58%
avrdude.exe: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude.exe: stk500_cmd(): programmer is out of sync


If i put arduino bootloader and upload finalserial16 @57600 --- passes every time

Strangely both card had a empty folder named models to assuming the data transfer happens but dies down, serial communication @ 38400 or promini is the culprit which causes serial communication failure.

Thinking is it a possibility the er9x atmega128 communication happens at 1152000 so that the optiboot and final serial can work or the finalserial16.hex could be installed on top of arduino bootloader communicating @ 57600.

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Sat Jan 05, 2019 1:11 pm
by MikeB
er9x uses 38400 baud to communicate to the serial voice module.

Do you have the module connected to the radio when trying to upload the firmware at 38400?

Mike

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Sat Jan 05, 2019 7:28 pm
by fxshoppe
MikeB wrote:
Sat Jan 05, 2019 1:11 pm
er9x uses 38400 baud to communicate to the serial voice module.

Thought So

Do you have the module connected to the radio when trying to upload the firmware at 38400?

Nothing 6 pairs of wire connected between arduino and ftdi
Mike
At times it gets frustating but new territories learnt have compiled amod and otiboot afresh with your specific mod.

make atmega328 AVR_FREQ=16000000L BAUD_RATE=38400 LED_START_FLASHES=0

Next thing is use a different make pro mini or use a nano with 1k resistors removed between ch340 and 328p processor

fresh optiboot loader and last serial attached for reference

If you/someone get an opportunity please flash and confirm if files ok. couldnot merge as trying to figure serial upload.

regards
Amit

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Sat Jan 05, 2019 9:52 pm
by MikeB
It's been some time since I did anything with this, and I've only ever used the Megasound board, not the Arduvoice build, and I run at 12MHz.
When you put the optiboot bootloader on, are you changing the fuses to set the boot size to the smaller size?

Mike

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Sun Jan 06, 2019 1:30 am
by fxshoppe
MikeB wrote:
Sat Jan 05, 2019 9:52 pm
It's been some time since I did anything with this, and I've only ever used the Megasound board, not the Arduvoice build, and I run at 12MHz.
When you put the optiboot bootloader on, are you changing the fuses to set the boot size to the smaller size?

Mike
Yes please I have set the fuses to

low_fuses=0xff
high_fuses=0xde
extended_fuses=0x05


upload.protocol=arduino
upload.maximum_size=32256
upload.speed=38400

bootloader.unlock_bits=0x3F
bootloader.lock_bits=0x0F

These are the fuse bits being used though not sure if correct.

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Sun Jan 06, 2019 5:41 am
by fxshoppe
Rather naive questions but is it a possibility that

1 connect the pin 27 of atmega128 to D1 of promini & pin 28 of atmega128 to D0 of promini - no diode in between
2 Burn only the finalserial16 hex to the promini not install the optibootloader
something likehttps://openrcforums.com/forum/viewtopi ... 300#p48603
3 Buy a readymade amp module and connect r8,r9 to input and connect r10,R2+r3 to ground i will only loose volume control

What fuses need to be set for promini for both with optiboot bootloade or without any bootloader

The reason I am asking such questions is because my 9x stock Pcb will not be able to survive another cpu swap soldering and last thing i would to do is illegally import a radio board in India and dodge the customs and getting the wpc clearance for legal import is almost impossible.

Regards,
Amit

Re: ArduVoice-9x Voice Module with Arduino for the 9x Radio

Posted: Sun Jan 06, 2019 6:52 pm
by MikeB
The required fuses are described in the "instructions.pdf" file on Github for the amod.

1. The '128 is running at 5V. What voltage is your promini running on? If 5V, with a level converter to the SD card, then these connections are OK.
2. OK, but make sure the fuses don't then try to start in the bootloader.

If we can get the trims switches working, then we can get the amp side working later.

Mike