Gamoover

[move]Pour vous aussi la chipo ne sera jamais qu'un bootleg de merguez (c)sushy18 ? Alors soyez les bienvenus sur Gamoover ! [/move]

[Beta] - BackForceFeeder : feeder vJoy FFB pour racecabs

Démarré par njz3, Mardi 17 Mars 2020, 19:02:44 PM

Little_Rabbit

Salut,

@madein80 et njz3 : j'ai déporté vos échanges vers ce nouveau sujet ;).

A+
Recherche bornes dédiées ou PCB originaux: Miss Pacman, Dig Dug, Galaga, Mappy, Asteroids, Battlezone, Missile Command, Tempest, Star Wars, Donkey Kong (+ Jr), Mario Bros, Moon Patrol, Defender, Joust, Frogger, Gyruss, Pooyan, Space Tactics, Zaxxon, etc. Flip : Gottlieb des années 80 (Spirit, Amazon Hunt, ...), Baby Pac Man. Divers :  Ice Cold Beer => Trois fois rien quoi ! :D
Ma séance sur le divan : c'est grave Docteur ? :-\
Ma gaming room, ma storage room


leestow

Is it possible to connect a bts7960 driver to the mega2560?  If so, what is the pinout please.  Any help would be appreciated.  I would like to use the mega 2560 so I can use lamps with the uln2003

njz3

@leestow: the current Arduino code does not support the Mega2560 with fast PWM, only standard PWM@960Hz which means you will probably hear some noise. I did not spend too much time to support analog PWMs based control on the Mega2560, so it is not yet ready to work out of the box.

Current code for the Leonardo does support L620X based motor driver with 15,9kHz PWM (noise barely hearable), so something can definitly be done to support the BTS7960 module. Depeding on the number of buttons and lamps, and adapting slightly the arduino code for the Leonardo can maybe fit your needs.
Do you have the pinout for your module and a Leonardo to do some testing with current code ?

leestow

@njz3. Yes.  I have a Leonardo and the bts7960 module.  It has vcc, gnd, r_is, l_is, r_en, l_en, rpwn, lpwm pinouts.

njz3

I have to check for the wiring, normally it should be compatible with the current Arduino code very easily as I support dual PWM outputs for reverse/forward mode (BTS7960 and L620X both share the same dual PWM inputs logic).
How many buttons, pedals and lamps do you have on your setup?
It might be possible to connect them all on a Leonardo, which would definitly be better for the noise at this stage since I did not look how to increase pwm frequency on the Mega2560.

leestow

#614
10 buttons including the 4 speed shifter.  And 6 lamps.  It's a San Francisco Rush 2049 cabinet.

Edit:. I forgot.  It also has 3 pedals.

njz3

#615
Ok, then the Leonardo will not allow as many buttons and lamps to be controlled.
Anyway, let's try the Leonardo for at least the motor control, pedals and buttons (no lamps yet).

For the wiring, you shall do the following:
- connect L_pwm pin to D9 (Forward)
- connect R_pwm pin to D10 (Reverse)
- connect L/R EN(able) pins to D11
- connect your wheel pot to A0, your pedals to A1 through A3
- connect your buttons to D0 to D8 and D12 (10 buttons)

If you can, please try with a lab power supply where you can set a current limit to something like 1 or 2 amps to avoid burning your BTS7960.
Do not switch on your power supply yet.

In the BFF (latest 0.5 version), use PWM_DIR hardware. Stop the manager and tick the "Dual mode PWM (L620X)" checkbox. Restart the manager and click on "Commit eeprom&reset". Please see below where those options are:


Calibrate your motor first, then your wheel axis (same procedure) and your pedals axes, then check your buttons are detected in the buttons page.

Then enable your power supply with limited current, and use the Diagnostic mode to check if motor control works.
Hopefully it will work with no modification in the Arduino code.

Edit: corrected a few typos and mistakes in my message

nonosto

C'est vraiment le top, quel sont les driver utilisé pour les PC, y a moyens pour XBOX 360 (Daytona USA...) Merci

njz3

Le driver Windows est vJoy (c'est un joystick virtuel), ce n'est pas compatible avec une xbox 360.
Sauf peut être avec un Gimx mais je ne peux pas encore aider là dessus.

bandicoot

Mon pincab
https://www.gamoover.net/Forums/index.php?topic=23174.0
Excusez mes fautes d'orthographe , je tape vite et ne me relis qu'en diagonale , mais j'espère ne pas être le pire :)

nonosto

Citation de: njz3 le Mardi 13 Juillet 2021, 16:36:44 PM
Le driver Windows est vJoy (c'est un joystick virtuel), ce n'est pas compatible avec une xbox 360.
Sauf peut être avec un Gimx mais je ne peux pas encore aider là dessus.

Merci beaucoup pour le travail colossal, je sait que j'abuse un peu mais est il concevable d'utiliser les driver 360, car la version daytona USA xbox 360 est la meilleur ever.

njz3

Citation de: nonosto le Mercredi 14 Juillet 2021, 09:27:02 AM
Merci beaucoup pour le travail colossal, je sait que j'abuse un peu mais est il concevable d'utiliser les driver 360, car la version daytona USA xbox 360 est la meilleur ever.
Malheureusement si le gimx ne fait pas, je ne connais pas d'autres moyens.
Faut voir si un emulateur xbox 360 sait un jour faire tourner Daytona avec support pour vjoy.
En attendant tu as quand même la version arcade sur emulateur model2 qui tourne parfaitement avec le FFB.

leestow

Would it be possible to add another Arduino to just control the lamps?

njz3

It is technically possible, but not yet planned as it would make the software a lot more complicated since there would be dual serial port communication and synchronization, and make the overall process a lot more CPU hungry.
The simplest solution I was working on, would be to add an I2c chip to extend the IOs of the Leonardo with 8 or 16 more digital IOs. In your case, another solution would also be to configure higher frequency PWM for the Mega2560.
Please test first the Leonardo and give me your feedback.

leestow

Okay.  Thanks for your help!  I'll test it out as soon as I get some extra time.  Also, have you thought about using a raspberry pi?  Maybe to offload the the CPU processing to the pi?  Plus a lot of gpio pins.  I'm no expert.  Just curious.