FreeJoy - Controlador USB para joysticks e Cia.

Forum dedicado a Joysticks, HOTAS, Track-Ir, Freetrack, contrôles e cockpit's tipo "faça você mesmo", etc.
Post Reply
21_Sokol1
Veterano
Veterano
Posts: 15493
Joined: 01 Aug 2003 21:00
Location: Uberaba-MG

FreeJoy - Controlador USB para joysticks e Cia.

Post by 21_Sokol1 »

Outra opção ao MMJoy2 e ao enigmático EasyJoy (Chinês):

Usa como base o Arduino STM32, que custa ~$2 (dólar) na Aliexpress.
Exemplo.

Image

Para gravação (flash) do firmware precisa de um "dong" ST2-Link v2

Ou de um (mais barato) USB-UART converter.

Características do firmware:

Até 8 eixos analógicos (com resolução de 12 bits - 4.096 pontos)
Até 128 botões (por matrix ou shift register)
Encoder incremental
Suporte para o sensor magnético TLE5010/5011 (saída para eixos no formato digital).
Shift Register 74HC165 e CD4021
Função Axis to Buttons = até 12 botões por eixo.
4 POV HAT
Suporta "push buttons", "toggle switches", botões invertidos, etc.

Licença livre - Open Source GPL3.0, podendo ser usado em projetos comerciais desde que mantido o código aberto.

Página no GitHub: https://github.com/vostrenkov/FreeJoy/wiki

Firmware FreeJoy: https://github.com/vostrenkov/FreeJoy
FreeJoy Configurator (para definir os parametros usados, como eixos, botões, etc.) https://github.com/vostrenkov/FreeJoyConfigurator

Image
Detalhe, o FreeJoy Configurator requer o Microsoft NET Framework 4.5.1.
Como usar o FreeJoy Configurator:
https://github.com/vostrenkov/FreeJoyConfigurator/wiki

Instrução para a gravação (flash) do firmware:
https://github.com/vostrenkov/FreeJoy/w ... tart-guide

Autor: WG_Magners
Tópicos no forum do Bo'X'
Inglês: https://forum.il2sturmovik.com/topic/57 ... -on-stm32/
Russo: https://forum.il2sturmovik.ru/topic/128 ... %B0-stm32/
21_Sokol1
Veterano
Veterano
Posts: 15493
Joined: 01 Aug 2003 21:00
Location: Uberaba-MG

Re: FreeJoy - Controlador USB para joysticks e Cia.

Post by 21_Sokol1 »

O STM32F103C8T6 e o adaptador USB-UART tem no Mercado Livre por ~R$ 20,00 e 15,00.

EDIT - Um sujeito informou no Reddit/Hotasdiy que alguns STM32F103C8T6 que tem o botão de reset arredondando e metálico tem problemas para funcionar como USB - é o modelo na foto do configurador, acima.

O modelo testado e que funciona bem é o que tem o botão de reset retangular e alto, igual nestas fotos:

Image
https://images-na.ssl-images-amazon.com ... L1467_.jpg

https://i.postimg.cc/5tDQfBYm/image.jpg
Last edited by 21_Sokol1 on 10 Jun 2020 11:11, edited 1 time in total.
21_Sokol1
Veterano
Veterano
Posts: 15493
Joined: 01 Aug 2003 21:00
Location: Uberaba-MG

Re: FreeJoy - Controlador USB para joysticks e Cia.

Post by 21_Sokol1 »

Bom, apesar da aparente vantagem de 12 bits (sobre os 10 bots do Mmjoy2) isso é mais teoria do que prática.
O ADC do STM é "cheap" então gera muito ruído e a resolução de 12 bits é em 360 graus.

No final das contas a resolução prática acaba sendo menor que 10 bits do MMjoy2 - que pode usar resolução 12 bits com o ADC externo MCP320x, que trabalha em modo digital, praticamente sem ruído.
Além do MMjoy2 ser bem testado enquanto o FreeJoy é WiP. :P
User avatar
airwolf
Posts: 341
Joined: 22 Jul 2016 09:56

Re: FreeJoy - Controlador USB para joysticks e Cia.

Post by airwolf »

É bom ter mais alternativas.
Seria interessante que esse pessoal do freejoy permitisse que o software trabalhasse com o Arduino PRO Micro (ATMEGA32U4), em vez de limitar a um hardware diferente do que vem sendo usualmente utilizado.
Além das vantagens que vc citou, com o MMJoy e atmega32ua não precisa do dongle, fazendo-se tudo pela usb da placa.
Sokol, nas minhas pcbs com o tle 5010 tenho conseguido habilitar até 14 bits - a escala de leitura amplia quando modifico isso. Não sei se efetivamente fica preso nos 12 bits.
Mas, eu geralmente ponho para funcionar com 12 bits mesmo.
What remorseless emperor commands me
I no longer govern my soul
I am completely immersed in darkness
As I turn my body away from the sun

White whale!! Holy grail!!
21_Sokol1
Veterano
Veterano
Posts: 15493
Joined: 01 Aug 2003 21:00
Location: Uberaba-MG

Re: FreeJoy - Controlador USB para joysticks e Cia.

Post by 21_Sokol1 »

airwolf wrote: 25 Jan 2020 10:42 ..nas minhas pcbs com o tle 5010 tenho conseguido habilitar até 14 bits - a escala de leitura amplia quando modifico isso. Não sei se efetivamente fica preso nos 12 bits.
Mas, eu geralmente ponho para funcionar com 12 bits mesmo.
Sim, o MegaMOZG criou essa possibilidade de extrapolação da resolução real numa virtual para compensar a limitação de movimento dos gimbals.
A Thrustmaster faz o mesmo no Warthog/T.16000M, extrapola no fimware os 15 bits do Melexis MLX90333 para 16 bits.

Vamos esperar para ver o que o desenvolvimento deste Freejoy leva, por enquanto esta bem "WiP".
O bom é que involve a comunidade DIY russa, que é bem ativa, o Komaroff - que desenvolveu sensores contactless para a BRD esta testando o firmware do FreeJoy.
21_Sokol1
Veterano
Veterano
Posts: 15493
Joined: 01 Aug 2003 21:00
Location: Uberaba-MG

Re: FreeJoy - Controlador USB para joysticks e Cia.

Post by 21_Sokol1 »

Bom, o Freejoy esta avançado num bom ritmo, com várias pessoas testando dando feedback novas funções tem sido adicionadas, como suporte para "button matrix", que pode ser útil em alguns casos,ex. USB'rizar um Cougar TQS https://github.com/FreeJoy-Team/FreeJoy ... rator/wiki, que já tem a "button matrix".

O autor disse que a questão sobre o ADC interno ser fraco, é mais um caso de "não provei e não gostei" de alguns, que é ruim na caso das placas Blue Pill, que tem o botão reset metálico.

O projeto ganhou uma página no Github.

https://github.com/FreeJoy-Team/FreeJoy ... rator/wiki
21_Sokol1
Veterano
Veterano
Posts: 15493
Joined: 01 Aug 2003 21:00
Location: Uberaba-MG

Re: FreeJoy - Controlador USB para joysticks e Cia.

Post by 21_Sokol1 »

O desenvolvimento do FreeJoy continua em bom ritmo, se tornando uma alternativa ao MMjoy2, com mais e melhores recursos - vide 12 botões por eixo e o "radio button" sequencial, além do suporte ao TLE5010/11, suporte para o A5600 (angulo programável) e para o sensor HALL MLX90333 disponível na Aliexpress*, no modo SPI.
Foi adicionado suporte para vários tipos ADC externo, o que proporcional sinal mais estável nos eixos.


8 analog inputs (12 bit output resolution)
Axis configuration options: calibration (manual or auto), filtering, offset, deadband (center or dynamic), curve shapes
Axis to buttons function (up to 12 buttons per axis)
Buttons/encoders to axis functions
128 digital inputs (buttons, toggle switches, hat povs, encoders)
Digital inputs configuration options: normal/inverted button, 3 types of toggle switches, radiobutton sequential button
5 shift modificators
4 hat povs
16 incremental encoders
Shift registers 74HC165 and CD4021
Digital sensors TLE5010/5011, AS5600, MLX90393 (SPI interface only)
External ADCs ADS1115 and MCP3201/02/04/08
3 PWM channels for lighting
24 LEDs (single or matrix) bindable to button's states
Device name and other USB settings
User-friendly configuration utility
Updating firmware on USB
Saving and loading configuration from file


Instructions are available on wiki of github page of the project:
https://github.com/FreeJoy-Team/FreeJoy ... rator/wiki
https://github.com/vostrenkov/FreeJoy/wiki
21_Sokol1
Veterano
Veterano
Posts: 15493
Joined: 01 Aug 2003 21:00
Location: Uberaba-MG

Re: FreeJoy - Controlador USB para joysticks e Cia.

Post by 21_Sokol1 »

Novo firmware:
Release v1.6.0

Changes:

HID bootloader (improved software updating algorithm)
Buttons logic completely reworked
Timer functionality for buttons (delay before pressing and press duration)
Sequential non-latching buttons
Logic buttons inversion option
Button output disabling option
Axis trimming by buttons
Axis centering by buttons (helicopter-style trimming)
Axis prescaler
Combined axes activation by button
Prescaler activation by button
"Equal" function for combined axes
Encoders as axes sources
Encoders reading resolution settings
High-resolution (fast) encoder support
Improved ADC performance
Improved shift registers stability
Configurator GUI improvements
USB-communication improvement
Migrating from v1.5.x without a programmer device

Run old configurator v1.5.x and connect your device
Using Firmware Flasher upload Bootloader.bin file from the archive to the device. It should reboot and connect as FreeJoy Flasher
Delete old configurator and install the new one (v1.6.0)
Upload new firmware FreeJoy_v1_6_0bx.bin via FreeJoy Configurator v1.6.0 as described in wiki
If you have a programmer device you can flash .hex file as usual (bootloader is already included in .hex file)

Firmware - https://github.com/FreeJoy-Team/FreeJoy/releases
Configurator - https://github.com/FreeJoy-Team/FreeJoy ... r/releases
21_Sokol1
Veterano
Veterano
Posts: 15493
Joined: 01 Aug 2003 21:00
Location: Uberaba-MG

Re: FreeJoy - Controlador USB para joysticks e Cia.

Post by 21_Sokol1 »

Release  v1.6.0

Changes:

HID bootloader. The method of downloading firmware via the configurator has been changed, now flashing after uploading “beaten” firmware from the configurator does not require a programmer
Timers for buttons (delay before pressing and holding time)
Sequential_Button - Non-latching buttons toggle sequentially. Same as Sequential_Toggle, only wring out after triggering
Invert option for all logical buttons
Option to turn off status output to the system for all logical buttons
Trim axes with buttons / encoders
Centering the axis with the button (trim by helicopter)

Scale factor for axis output (1% to 255%)
Activating the combined axes function by button
Activate button axis scaling
The "Equal" function for joint axes. Equals the value of one axis with the value of the other, when used together with the activation of joint axes, the button gives the function "Dual ORE"
Encoders can now be used as full axis sources
Support for one encoder with high resolution (sampling frequency of several MHz)
Encoder read permission setting
Improved measurement accuracy of the built-in ADC 
Improved stability of reading shift registers
Configurator Interface Improvements
Improvement in USB communication
The process of installing the configurator has been improved ( after this version, you will not need to remove the previous configurator to install a new one). The configurator is installed by running the Install.bat file.
Important!

You can upgrade to this version from version v1.5.x  without using a programmer. To do this, perform the following steps:

Run the configurator version  v1.5.x  (old) and connect the controller
Using the firmware loader in the configurator, upload the Bootloader.bin file from the release archive to the controller . After loading, the controller should reboot and determine in the system as  FreeJoy Flasher
Install new configurator  v1.6.0
Through the new configurator, fill in the new firmware Freejoy_v1_6_0bx.bin according to the instructions
Those who have a programmer can just as before just flash the .hex firmware file (it already includes the contents of the Bootloader.bin file )

Firmware -  https://github.com/FreeJoy-Team/FreeJoy/releases
Configurator -  https: //github.com/FreeJoy-Team/FreeJoyConfigurator/releases
Post Reply