Jump to content

FreeJoy. OpenSource joystick controller on STM32


Recommended Posts

Posted (edited)

Hello,

1. I don't see problems with shift register schematics except of the fact that inputs Px doent have pull-up or pull-down resistors. It should not be a problem when you use it with SPDT switch, but might be a problem when left unconnected.

Does shorting inputs Px to gnd or vcc works correct for you?

 

2. Please check your axis settings tab. Have you set up all axes correctly to different ADC channels? I believe that the issue that you have is software related because schematics look good

 

3. Such sticks usually just integrates 2 pots and a button inside. So it seems right to connect vrX and vrY to analog inputs and SW to digital input with pull-up (button). If it doesn't work I'd check connections.

Screenshot_20230430-110044.thumb.png.47fcdf743ad82fbda9cb1386146a047c.png

The only thing you must use 3.3V from bluepill instead of 5V in this circuit 

Edited by WG_Magners
Posted (edited)
On 4/30/2023 at 11:04 AM, WG_Magners said:

Hello,

1. I don't see problems with shift register schematics except of the fact that inputs Px doent have pull-up or pull-down resistors. It should not be a problem when you use it with SPDT switch, but might be a problem when left unconnected.

Does shorting inputs Px to gnd or vcc works correct for you?

 

The center pin goes to VCC and the outer to D0-D7 on the 74HC165. Isn't this correct. Anyways, I found out that I have massive ground distortion on the board when moving the hand over it. Probably because I thought it would be better to use a copper pour but now I know it's no good whis this layout becaue the layer is too close to the wiring. I desoldered the 74HC165 and everything seems to be fine. So if I would connect a SPDT directly to the BluePill, do I need diods or can I solder directly pin to pin? I assume it doesn't matter if I use the middle pin for VCC or GND, or?

 

 

On 4/30/2023 at 11:04 AM, WG_Magners said:

2. Please check your axis settings tab. Have you set up all axes correctly to different ADC channels? I believe that the issue that you have is software related because schematics look good

 

Thank you. You are absolutely right. I simply ovelooked and forgot to select the ADC channels, when doing so everything is working but I have a lot of micro movements/distorsion when I'm not moving/touching the potentiometer. Is that what the filter slider is for? On this, when testing I'm using east cheap 10 linear pots. Will CTS or Alps pots make any difference here?

 

 

On 4/30/2023 at 11:04 AM, WG_Magners said:

3. Such sticks usually just integrates 2 pots and a button inside. So it seems right to connect vrX and vrY to analog inputs and SW to digital input with pull-up (button). If it doesn't work I'd check connections.

Screenshot_20230430-110044.thumb.png.47fcdf743ad82fbda9cb1386146a047c.png

The only thing you must use 3.3V from bluepill instead of 5V in this circuit 

Understood.

Edited by Stout
spelling
WG_Magners
Posted
15 часов назад, Stout сказал:

 

The center pin goes to VCC and the outer to D0-D7 on the 74HC165. Isn't this correct. Anyways, I found out that I have massive ground distortion on the board when moving the hand over it. Probably because I thought it would be better to use a copper pour but now I know it's no good whis this layout becaue the layer is too close to the wiring. I desoldered the 74HC165 and everything seems to be fine. So if I would connect a SPDT directly to the BluePill, do I need diods or can I solder directly pin to pin? I assume it doesn't matter if I use the middle pin for VCC or GND, or?

 

 

 

Thank you. You are absolutely right. I simply ovelooked and forgot to select the ADC channels, when doing so everything is working but I have a lot of micro movements/distorsion when I'm not moving/touching the potentiometer. Is that what the filter slider is for? On this, when testing I'm using east cheap 10 linear pots. Will CTS or Alps pots make any difference here?

 

 

Understood

If you are using direct connection (not matrix) there are no diodes needed. 

If you going to use SPDT switches there are no pull up/pull down required, but I d added them not mounted to the PCB for the case with other switches.

 

Good power supply and it's layout matters much more than pots quality in static. Expensive pots would better perform in dynamic and also they have longer life period 

  • 1 month later...
Posted (edited)

Concerning the KY023. I don't get it to work as a joystick. I connected VrX to A7 and VrY to A6 and assignem them as buttons, as suggested. Yes I do get two buttons but that's just it, two buttons, not a X & Y movement but a 9 & 12 o'clock movement. So what am i missing here as the function should be like in this video?

 

https://youtu.be/n7IS-WgrNC8?t=50

Edited by Stout
Posted (edited)

In FreeJoy, is it possible to connect a RGB LED to a momentary button to be able to change from red to green when using the button as a shift? (just like VKB Gladiator and other joysticks with shift mode)

 

Is it possible to make two mono LED's lit constantly with an on/off switch. So if I switch to A one LED is lit and switch to B the other is lit and the first are off and vice versa?

Edited by Stout
Posted

@Stout can you please draw your connection schematics and make photo of it's implementation?

Also please save your config into file and attach here

Posted
13 hours ago, WG_Magners said:

@Stout can you please draw your connection schematics and make photo of it's implementation?

Also please save your config into file and attach here

 

Do you mean the PCB Schematics?

I will attach the configs tomorrow. I'm using two Bluepill boards so I'll attach both.

  • Like 1
Posted (edited)

Hello!

 

First sorry for my bad english. ?

 

I'm working on "ultimate" warthog grip with these features :

* Ajustable handle heigh

* Twist Z axis like VKB system

* PCB

 

The joystick work well :

https://www.youtube.com/watch?v=q50qMTX9bM4

 

 

Now I would like to add a  trackpad or a trackball for good navigation on map like in elite dangerous ? It is possible with freejoy? 

 

Thank you!

Edited by calagan57
  • 3 weeks later...
Posted (edited)

Hello! 

 

My last post ?...

 

I just finished my joystick! It work well but I'm look for add deadzone on the center of axis like setting available on eletie dangerous? There is this setting on freejoy?

 

Thank you!

20230712_143938.jpg

20230712_150048.jpg

Edited by calagan57
Posted
1 час назад, calagan57 сказал:

There is this setting on freejoy?

Yes, you can set a deazone for each axis in freejoy. Refer to Axis Configuration section of FreeJoyWiki:

Скрытый текст

Dinamic Deadband - setting for the axis of the dynamic deadband. The dynamic deadband value is indicated in the Deadband field below. In this case, changes in the value of the axis n will not be taken into account by a value not exceeding the value of the Deadband field. To eliminate axis jitter, it makes sense to gradually increase the values of the dynamic meter zone (not forgetting to write the configuration to the controller each time the value is changed) until the values of the logical axis cease to change spontaneously in the absence of movement of the physical axis. When the “Dynamic deadband” box is unchecked, the specified deadband size is applied to the central deadband;

 

If you need deadzones at the edges of the axis range just use calibration section to adjust minimum and maximum values a bit towards center

Posted (edited)

Post deleted ? 

 
Edited by calagan57
Posted (edited)

Sorry for the delay. I found out I didn't need two Bluepills so I rebuilt the whole unit and waited for some new parts (two pin bi-LED) from AliExpress (still waiting for new batch with PCB STM32 boards). Anyway it's up and running now .

I figured out how to deal with the LED configuration. I mounted dual red/green leds and configured the momentary buttons as toggle buttons and two LED inputs on the same Button, one normal and one inverted. Now everything seems to work as I want it to. BUT, tonight when I started to configure the shift modificator part, all LEDs went bezerk. They are flickering or rather flashing. All of them! They are fast pulsing with intesive light, very bright. When I disable the shift modificator (set it to zero), everything are back to normal. I inserted one more resistor to every LED just to check if anything changed, they dimmed but the pulsing/fast flickering is still there.

 

I have a matrix with 16 LEDs on the PCB with 200 Ohm resistors connected to the four columns on the cathode side, just like the Mono LEDs Connection on FreeJoyWiki.. At the moment I have only 8 LED connected to the PB2.0 sockets. Could that be it and if so why is they behaving like that when using the shift mode? They are flickering unshifted and with shift 1 activated. 

 

One more thing when I'm on it... should MCP3208 be set as 12-bit in the Axes section? Does it make any difference as default in FreeJoy is 16-bit?

 

EDIT: Uploaded a video with the flickering LEDs. On the Video they are both pulsing and flashing at the same time.

https://youtu.be/a2_eRPgUaH0

Edited by Stout
Posted
11 часов назад, Stout сказал:

Sorry for the delay. I found out I didn't need two Bluepills so I rebuilt the whole unit and waited for some new parts (two pin bi-LED) from AliExpress (still waiting for new batch with PCB STM32 boards). Anyway it's up and running now .

I figured out how to deal with the LED configuration. I mounted dual red/green leds and configured the momentary buttons as toggle buttons and two LED inputs on the same Button, one normal and one inverted. Now everything seems to work as I want it to. BUT, tonight when I started to configure the shift modificator part, all LEDs went bezerk. They are flickering or rather flashing. All of them! They are fast pulsing with intesive light, very bright. When I disable the shift modificator (set it to zero), everything are back to normal. I inserted one more resistor to every LED just to check if anything changed, they dimmed but the pulsing/fast flickering is still there.

 

I have a matrix with 16 LEDs on the PCB with 200 Ohm resistors connected to the four columns on the cathode side, just like the Mono LEDs Connection on FreeJoyWiki.. At the moment I have only 8 LED connected to the PB2.0 sockets. Could that be it and if so why is they behaving like that when using the shift mode? They are flickering unshifted and with shift 1 activated. 

 

One more thing when I'm on it... should MCP3208 be set as 12-bit in the Axes section? Does it make any difference as default in FreeJoy is 16-bit?

 

EDIT: Uploaded a video with the flickering LEDs. On the Video they are both pulsing and flashing at the same time.

https://youtu.be/a2_eRPgUaH0

Hi, most probably this is firmware issue, I know that shifting part is not good enough.

Unfortunately I can only suggest not to use shifting for now.

 

16bit resolution is okay for MCP, this setting is only needed for rare situations when you need to decrease your resolution 

Posted (edited)
1 hour ago, WG_Magners said:

Hi, most probably this is firmware issue, I know that shifting part is not good enough.

Unfortunately I can only suggest not to use shifting for now.

 

That's a pity :( Spent a lot of time building this box with lots of light sources because I thought I finally could abandon MMjoy2 and especially Joystick Gremlin/VJoy for good.

 

Here's my config if it will help in the future developing of an otherwise excellent application/tool. I really appreciate the things you've done. ?

 

BlacBox.cfg.zip

Edited by Stout
Posted (edited)

Is it possible to use LED PWM on pin B4 at the same time as using SPI MISO for MPC 3208? Or is it only possible to use MISO devices as there's only one (visible) option to choose on B4?

Edited by Stout
Posted
18.07.2023 в 23:26, Stout сказал:

Is it possible to use LED PWM on pin B4 at the same time as using SPI MISO for MPC 3208? Or is it only possible to use MISO devices as there's only one (visible) option to choose on B4?

You can only use one option at the same time. So you need to choose between SPI and PWM

  • 4 weeks later...
Posted
On 7/26/2023 at 5:32 PM, WG_Magners said:

You can only use one option at the same time. So you need to choose between SPI and PWM

Thanks for the reply and clarification. 

Coming back to the previous problem with flickering LEDs. What causes this? It's only there when using shift.

 

I would really like to eliminate the flickering/flashing. 

Posted

Hi just playing around with freejoy at them moment, Can freejoy/STM32 be connected to sim hub for leds ? i heard you can make stuff connect with PID/VID but maybe im doing something wrong

Posted
22.08.2023 в 22:28, keith115 сказал:

Hi just playing around with freejoy at them moment, Can freejoy/STM32 be connected to sim hub for leds ? i heard you can make stuff connect with PID/VID but maybe im doing something wrong

There is an engineering version of fj by @Reksotiv which can work with simhub

You can find it in russian branch of freejoy topic

  • 1 month later...
Posted (edited)

I've been playing around with Freejoy in IL-2 Sturmovik for a while now. I am wondering if anyone here is using Freejoy without any issues?

 

I lose connection to the STM103 intermittently. It just happens. When it's happening I have to disable the USB and re-insert it to get connection again. It doen't matter which USB port I use. This happens every time I play IL-2 (the only game I play) and can happen one time/night or several times in an hour.  

 

Anyone?

Edited by Stout
  • 6 months later...
Posted

just wondering why the usbd+ - are not used and grayed out, can they be used? Can I use them to connect something else like a screen or another module like it's a USB hub?

  • 6 months later...
Posted

Is Freejoy abandoned or will there be an update?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...