FreeJoy-Team / FreeJoy

STM32F103 USB HID game device controller with flexible configuration
GNU General Public License v3.0
704 stars 134 forks source link

freejoy and TH cougar grip #211

Open teeshq opened 11 months ago

teeshq commented 11 months ago

Hi i have some issue with working with cougar grip(if i connect it to virpil WARBRD its work so im sure shift register in grip is ok). after connecting grip some buttons work OK, some not at all, and other have multiple press(example pressing trim button up cause 3 physical buttons light up ). I also to some measurement and all data pins on warbrd give higher voltage like 0.8v, 3.6v, 2.6v . On freejoy pins assigned to latch data clk , give much lover value cant this make this behavior ?? some photos below also one short video.

thanks a lot

image IMG_20230801_150244 IMG_20230801_163750 IMG_20230801_163756 https://cdn.discordapp.com/attachments/1135602674973294622/1135650174258139177/VID_20230731_200651.mp4

yzhanping commented 11 months ago

I think your problem is on the expansion board. My expansion board can normally replace the Tumaster a10c /F18C grip, recognize 24 triggers; and can realize 128 triggers in series; They are like this 微信图片_20230803180653 微信图片_20230803180647

teeshq commented 11 months ago

HI thanks yes could be original thrustmaster shift reg board have some different logic (but still it use 4021 IC) and grip work ok with virpil base :/. probably i will just get my own pcb with HC165 image image

Edit : funny i just find out it work with mmjoy2 so there is somethings wrong with free joy 4021 logic.

image

vostrenkov commented 11 months ago

Arduino (and I guess warbrd also) uses 5V logic but STM32 has 3.3V logic CD4021 may have some issues with 3.3V logic when connected over long wires or having high connections capacity.

Using voltage level translator most likely would solve the isuue

teeshq commented 11 months ago

Arduino (and I guess warbrd also) uses 5V logic but STM32 has 3.3V logic CD4021 may have some issues with 3.3V logic when connected over long wires or having high connections capacity.

Using voltage level translator most likely would solve the issue

Hi thanks can u advise what translator to use im quite noob you mean somethings like that https://makershop.ie/CJMCU-0102 . or https://ie.farnell.com/texas-instruments/cd40109be/ic-level-shifter-quad-16dip/dp/3120902

ghawkgu commented 11 months ago

@teeshq Regarding the issue that multiple buttons being triggered. I had similar issue when I tried to wire up the cougar throttle.

179

However, the throttle grip uses a button matrix instead of a shift register. As CD4021's datasheet noted it is supposed to work well with 3.3v and 5v logic, https://www.ti.com/lit/ds/symlink/cd4021b-q1.pdf . I doubt there's some defect in the logic of reading physical button status.

TomHVR commented 5 months ago

see this firmware in my issue, it might solve your problem (and the change hopefully will be folded into a new version of freejoy)

https://github.com/FreeJoy-Team/FreeJoy/issues/222