Gamoover

[move]Bienvenue sur Gamoover, portail francophone de l'arcade.

[Beta] - BackForceFeeder : feeder vJoy FFB pour racecabs

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

njz3

#112
Many thanks for the kind support given by Bandicoot ! ^-^

FR:
Après quelques tests aujourd'hui, j'ai de mauvaises nouvelles concernant le pilotage de la driveboard modèle 3 de mon Scud Race: cette configuration n'offre pas une large plage de couple (seulement 7 niveaux) et le retour haptique n'est pas vraiment bon par rapport à ma Lemans.
J'essaierai avec d'autres eeprom, et peut-être de contrôler directement la carte moteur (en bypassant la driveboard) pour obtenir une plage plus fine de contrôle du couple. Pour l'instant, je ne recommande pas de l'utiliser avec mon logiciel, ou uniquement en mode "Raw" (identique à m2pac) pour les jeux compatibles.

En parallèle, j'ai testé le décodeur du shifter en H, l'émulation du H avec le Up/Down et les sorties lampes sur supermodel (scud race). Ca marche très bien sur mon setup, mais faut éviter les relais mécaniques pour les lampes (ca fait clic-clic).

Du coup, je peux sortir la beta4. Attention, j'ai changé la communication du Serial avec PWM2M2 qui est désormais à 38400 bauds que ce soit pour le Leonardo ou le Mega2560 (le Mega a des soucis à 115200), veuillez vérifier que votre pro-micro est bien configuré avec le même débit en réception.

EN:
After some testing today, I have bad news regarding the piloting of the model 3 driveboard from Scud Race: this setup does not offer a wide range of torque (only 7 levels) and the haptic feedback is not really good compared to my Lemans.
I will try with other eeprom, and maybe to directly control the motor board (bypassing the driveboard) to get a finer range of torque control. For now, I do not recommand to use it with my software, or only in "Raw" mode (same as m2pac) for compatible games.

In parallel, I tested the Hshifter decoder, the Up/Down emulation and the lamps outputs. It works great on my setup. Avoid mechanical relays for your lamps, as they are noisy ("clic").

I can release the beta4. Warning, I changed the communication of the Serial with PWM2M2 which is now at 38400 bauds for the Leonardo and the Mega2560 (the Mega has problems at 115200), please check that your pro-micro has the same reception baudrate.

mentalmike

Haven't managed to work on my setup today, my wife managed to get a day off work (works for our health service so very busy!) so spent the day together.

I have a few questions for tomorrow when I resume!

Citation de: bandicoot le Samedi 02 Mai 2020, 22:30:27 PM
don't forget to connect ground of mini to ground of leonardo

Can I confirm if this is correct as I don't see it mentioned on page 1 or in any diagrams?


Citation de: njz3 le Dimanche 03 Mai 2020, 00:03:08 AM
I can release the beta4. Warning, I changed the communication of the Serial with PWM2M2 which is now at 38400 bauds for the Leonardo and the Mega2560 (the Mega has problems at 115200), please check that your pro-micro has the same reception baudrate.

aganyte can you confirm what rate the boards are set to and if I need to change them how do I do this? I'll google how to check / change as well but guessing you guys will be quicker!

Does anything need to be changed with aganyte's code from page 2 for use with PWM2M2 and beta 4?

Thanks everyone for your help and keep up the good work! ^-^

njz3

Hi Mike,
You need to have the same ground for Leonardo and PWM2M2 as only one wire (Tx<->Rx) is connected and you may have a floating ground introducing noise. I will modify the schematics.

Regarding the baudrate, you need to reflash your pro-mini with the .ino script given in page 2 with a slight modification.
I expect you already know how to compile and flash (since you did it for the Leonardo).
Simply open the Pwm2m2_ProMini.ino file with Arduino Editor, look for the line "Serial.begin(115200);" and replace it with "Serial.begin(38400);". Then rebuild and reflash your pro-mini.


mentalmike

Thanks njz3! All makes sense. I should've guessed it was a simple line of code to modify! I'll have to wait until Tuesday to try beta 4 as need to wait for a new FT232RL to be delivered. My last one was a hacked Nokia cable which last time I tried to use wouldn't work with Windows 10  >:(

njz3

Well, if you have a Leonardo as the vJoy gateway, you can also set back 115200 in the FeederIOBoard arduino script of the beta 4 (it is easier to flash than the pro-mini, and you don't have to wait for your FTDI cable !).
Leonardo handles 115200 just fine, while the Mega2560 has 2-3% transmission issues with such baudrate (clock issue).

To switch back to 115200 in the vJoy gateway, open the FeederIOBoard.ino script, go to "Config.h" file, and change lines 28-29 from
//#define PWM2M2_DIG_PWM_BAUDRATE (115200)
#define PWM2M2_DIG_PWM_BAUDRATE (38400)

To
#define PWM2M2_DIG_PWM_BAUDRATE (115200)
//#define PWM2M2_DIG_PWM_BAUDRATE (38400)


delo

Citation de: njz3 le Dimanche 03 Mai 2020, 00:03:08 AM
J'essaierai avec d'autres eeprom, et peut-être de contrôler directement la carte moteur (en bypassant la driveboard) pour obtenir une plage plus fine de contrôle du couple. Pour l'instant, je ne recommande pas de l'utiliser avec mon logiciel, ou uniquement en mode "Raw" (identique à m2pac) pour les jeux compatibles.

Déjà merci pour tes tests  ^-

Tu penses qu'en effet c'est jouable de directement piloter la carte moteur ?
Car ça serait pas mal  ;) Cela permettrait de se "débarrasser" de la driveboard (toujours ça de gagner) et qui à mon sens n'a qu'une fiabilité limitée (j'ai réparé les miennes à quelques reprises : une ram par-ci par-là)  :?

njz3

#118
Hier soir, en faisant pas mal de tests de commande et avec un oscillo, j'ai enfin compris le protocole de pilotage de la driveboard model 3 de scud, et j'ai aussi sondé la communication entre la driveboard et la motorboard pour voir ce qui transite et essayer d'en déduire un schéma de pilotage.

Bizarrement, je n'ai pas retrouvé les mêmes significations de codes de commandes de la driveboard que ceux donnés par SailorSat et BigPanik, ni ceux qui sont dans le code source de supermodel. Probablement qu'ils ont travaillé sur la base de l'eprom de Daytona 2, dont les code de commande sont visiblement différents de ceux de mon Scud Race.
A force de tâtonner, j'ai finalement pu obtenir une commande en couple assez propre, bien que non linéaire, mais suffisamment utilisable pour que mon soft puisse l'exploiter. Le seul inconvénient, c'est que la driveboard ne prends pas plus d'une commande toutes les 10ms, et qu'en plus le code de commande du niveau de couple n'est pas le même que le code de commande du sens de rotation. Donc pour inverser de sens, il faut presque 20ms ! C'est une éternité pour faire un asservissement ... donc les gains doivent être assouplis.

La commande de la motor board en direct (donc sans driveboard) est assez simple et plus rapide à mettre en oeuvre. En plus j'ai bon espoir que dans ce cas il y aura moins de retard. C'est probablement la solution la plus directe et la plus performante.

Pour ce qui est de la fiabilité, maintenant que je comprends mieux l'ensemble, il me parait assez simple de refaire une driveboard Sega sur base d'un Mega2560.
Le seul intérêt serait de pouvoir encore utiliser un stack, mais ce n'est pas ma priorité.

Aganyte

L'air de rien, c'est une super découverte car les driver board Sega sont connues pour tomber facilement en carafe, une solution de secours serait grandement appréciée par la communauté.

delo

+1  ^-

ça serait franchement bien d'avoir une commande directe de la motor board. De mon coté je n'ai jamais eu de souci avec car c'est en effet les drive board qui sont assez fragiles.

Merci pour le job  ^-^

mentalmike

#121
So I seem to be doing something wrong somewhere but can't work it out  :'(

If I turn on just the 100v I get a loud humming noise coming from the wheel.

I moved back to my L2M2 to check and silence when just the 100v is turned on. Connected the L2M2 to PC and works fine no issues. I switch back to the PWM2M2 - all that needed to be moved was 2 clutch wires, CW, N CCW and then connect the wheel pot and same outcome noise. As I changed nothing on the wheel or power side of the wiring and the PWM2M2 wiring to wheel is essentially the same as the L2M2 I can't work out what is causing this?

Have I messed something up trying to flash the pro mini?

Edit... could it be that I tried to flash at 3v? Just realised there a 3v and 5v pro minis? aganyte can you confirm the version please :)

If this is what I've done would this cause the problem I have?

Aganyte

Did you powered the Pwm2m2 correctly ? it is not recommended to connect 100 VAC without powering the Arduino. You must use 9 to 24 VDC to give power to the Pro Mini.

mentalmike

This is my current setup:


I've currently got the regulator set to 12v on the power input. The +100v is going to the wheel motor, negative to the CW/CWW middle terminal.

All this only started happening after I tried to flash the pro mini to set it to the new baud rate... I'll try again as it must be related - is it a 3v or 5v pro mini?

One other thing I noticed before I did this, should the green LED light up if nothing is turned on but the leonardo is connected to PC?

Aganyte

5v pro mini. Try to reflash it (press reset just before upload if you've any problem)

mentalmike

Tried flashing again but no change  :-[

Here is a video...


Aganyte

Did you move the wheel with your hand during the video ?

mentalmike

Yes - in the video the Leonardo isn't connected to PC and has no power, but behaves in the same way connected or not connected