- Posts: 268
- Forum
- News, Announcements and Feedback
- Feedback & Questions
- PB, request for code review and merge back(2)
PB, request for code review and merge back(2)
- suvsuv
- Topic Author
- Offline
PhracturedBlue wrote: FYI, there is no circuit for the speaker driver.
It is MCU GPIO->p-fet->piezo speaker
PB, could you also figure out which GPIO pin controls the vibration motor?
Please Log in or Create an account to join the conversation.
- ej189
- Offline
- Posts: 7
Please Log in or Create an account to join the conversation.
- suvsuv
- Topic Author
- Offline
- Posts: 268
Thanks, buddy. You should be right based on existing devo10 connetion info listed below.ej189 wrote: I think motor control is from PD2.
I will get the vibration work today
GPIOD:
0-1: LCD Module
2: ??? Push/Pull output default low
Please Log in or Create an account to join the conversation.
- dc59
- Offline
- Posts: 799
suvsuv wrote:
Thanks, buddy. You should be right based on existing devo10 connetion info listed below.ej189 wrote: I think motor control is from PD2.
I will get the vibration work today
GPIOD:
0-1: LCD Module
2: ??? Push/Pull output default low
what a good news it is !
Vibration will work ~~~~~
Thanks!
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
PhracturedBlue wrote: Sorry, I should have said duty-cycle, not pulsewidth. All documentation I can find says that max-volume occurs at 50% duty-cycle, and reduces as the duty-cycle is reduced (or increased).
Maybe it will work if add resistor between FET and piezo speaker. Piezo speaker is really a capacitor that charged and discharged by FET and its internal diode.
RC (time constant) = T / 4
R = T / (4 * C)
where:
R - added resistor (Ohm)
C - capacitance of piezo speaker (F)
T - average period of sound impulses (sec)
But it requires the hand work.
Please Log in or Create an account to join the conversation.
- ej189
- Offline
- Posts: 7
Please Log in or Create an account to join the conversation.
- suvsuv
- Topic Author
- Offline
- Posts: 268
The vibrating motor feature is also checked in, it works in my devo10 as well. It seems all features are there in the devo10 now.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Sounds good. I'll look everything over and try to get it synced up sometime today.suvsuv wrote: PB, My yesterday's codes has a bug causing volume control not work。 I got it fixed and verify that volume control is working in my devo10(still need to use ej189's sound.ini to achieve louder volume), please have it verified in your devo8.
The vibrating motor feature is also checked in, it works in my devo10 as well. It seems all features are there in the devo10 now.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
The connection is actually:
5V->buzzer->17ohmR->NPN (8505)->GND
I hooked up my scope, and see that the time-constant is around 50us. This is well below the duty-cycle we're currently using, which explains why there is no volume control, but also indicates we're already at maximum volume. So the only way to get additional volume will likely be to get closer to the resonant-frequency.
I'll try to use a pulse-width nearer to the time-constant, and see if I can get any volume control.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
I think I've merged everything from your tree.
I've removed all the quickpage key-config stuff, so you can sync that stuff from my repo.
I made several changes to how the vibration/music code works, but it all seems to work fine for me on both devo8 and devo10
Volume control now works, but it sounds tinny at low volume. I don't think I can do anything about that.
If you think I missed anything, let me know.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
PhracturedBlue wrote: So here are some buzzer findings:
The connection is actually:
5V->buzzer->17ohmR->NPN (8505)->GND
I hooked up my scope, and see that the time-constant is around 50us. This is well below the duty-cycle we're currently using, which explains why there is no volume control, but also indicates we're already at maximum volume. So the only way to get additional volume will likely be to get closer to the resonant-frequency.
Is it a piezo speaker? At that case the piezo speaker (capacitor) charged by NPN transistor (BJT), but is not discharged by anithing (only by leakage current). No change in voltage = no sound out of the peizo. Maybe adding any resistor (500ohm) at parallel to piezo speaker will increase the volume?
+5V->--buzzer-->17ohmR->NPN (8505)->GND
+5V->-resistor-+
Please Log in or Create an account to join the conversation.
- FDR
- Offline
+ Building 'devo8.elf'
c:/mingw/stm32/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/bin/
ld.exe: devo8.elf section `.data' will not fit in region `rom'
c:/mingw/stm32/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/bin/
ld.exe: region `rom' overflowed by 544 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [devo8.elf] Error 1
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Yeah, it was bound to happen.FDR wrote: The code won't compile, we have run out of ROM:
+ Building 'devo8.elf' c:/mingw/stm32/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/bin/ ld.exe: devo8.elf section `.data' will not fit in region `rom' c:/mingw/stm32/bin/../lib/gcc/arm-none-eabi/4.7.1/../../../../arm-none-eabi/bin/ ld.exe: region `rom' overflowed by 544 bytes collect2.exe: error: ld returned 1 exit status make: *** [devo8.elf] Error 1
Compile with TYPE=prd
Please Log in or Create an account to join the conversation.
- suvsuv
- Topic Author
- Offline
- Posts: 268
1) Fix display bug in chantest_page.c: the main menu won't show characters for non-english language if the channel monitor is set as a quickpage
2) Set the default volume to 10
3) Change timers' hotkeys to R/L , because the timers are easily false triggered or reset with EXT/Up assigned
Please Log in or Create an account to join the conversation.
- sbstnp
- Offline
- Posts: 649
suvsuv wrote: Some minor update:
3) Change timers' hotkeys to R/L , because the timers are easily false triggered or reset with EXT/Up assigned
I think timers should be reset with either:
1. Long-press down
2. Long press EXT
R/L are not good options because we basically can do 2 sets of quickkeys:
1. Long R/L
2. Short R/L - quick use, I would probably restrict these to one page bound to R and one bound to L, with any key reverting to main page.
Devo 10 + 4in1
FrSky Taranis + TBS Crossfire
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
We've had lot sof discussion about the quickkeys. For this release, they will stay as long up/down on the dveo10 (and short R/L on the Devo8).sbstnp wrote:
suvsuv wrote: Some minor update:
3) Change timers' hotkeys to R/L , because the timers are easily false triggered or reset with EXT/Up assigned
I think timers should be reset with either:
1. Long-press down
2. Long press EXT
R/L are not good options because we basically can do 2 sets of quickkeys:
1. Long R/L
2. Short R/L - quick use, I would probably restrict these to one page bound to R and one bound to L, with any key reverting to main page.
I'll work on making them configurable in the future. When that happens, I'll actually make all main-page keys configurable so you can set them how you like. For now though, they won't be.
Please Log in or Create an account to join the conversation.
- sbstnp
- Offline
- Posts: 649
PhracturedBlue wrote:
We've had lot sof discussion about the quickkeys. For this release, they will stay as long up/down on the dveo10 (and short R/L on the Devo8).sbstnp wrote:
suvsuv wrote: Some minor update:
3) Change timers' hotkeys to R/L , because the timers are easily false triggered or reset with EXT/Up assigned
I think timers should be reset with either:
1. Long-press down
2. Long press EXT
R/L are not good options because we basically can do 2 sets of quickkeys:
1. Long R/L
2. Short R/L - quick use, I would probably restrict these to one page bound to R and one bound to L, with any key reverting to main page.
I'll work on making them configurable in the future. When that happens, I'll actually make all main-page keys configurable so you can set them how you like. For now though, they won't be.
Good to hear, fully configurable would be amazing.
Devo 10 + 4in1
FrSky Taranis + TBS Crossfire
Please Log in or Create an account to join the conversation.
- suvsuv
- Topic Author
- Offline
- Posts: 268
1) In the Expo&DR page ,when pressing down/up key quickly and continuously, there are big chance letting the TX reboot. It is because the page is very complicated , if the GUI is busy on refreshing, the watchdog won't be fed. Currently, I remove the bar graph that is really unnecessary, and also improve view refreshing logic. The issue is not fully resolved but mitigated a lot.
2) TX won't alarm when countdown timer reaches 0
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- suvsuv
- Topic Author
- Offline
- Posts: 268
I am working on moving handling of the view refreshing into GUI_RefreshScreen() 。 If this solution works, we don't need to move the watchdog into ISR as moving watchdog requires comprehensive testing not only in devo10 but also devo8.PhracturedBlue wrote: We can move the watchdog into the interrupt handler,
Please Log in or Create an account to join the conversation.
- Forum
- News, Announcements and Feedback
- Feedback & Questions
- PB, request for code review and merge back(2)
- Home
- Forum
- News, Announcements and Feedback
- Feedback & Questions
- PB, request for code review and merge back(2)