vospascal / pedal-arduino

Arduino simracing pedals with gui calibration loadcell analog ADS
54 stars 12 forks source link

Load cell ADC issue #9

Closed Duce55 closed 1 year ago

Duce55 commented 1 year ago

Hi, I have issue when connecting load cell via amp made with LM324 as ins.op.amp. I changes inputs to ADC but with ADC1115 it is not working. When configured as analog input works but digital not. During calibration I notice that throttle is working and it is super sensitive and brake is showing movement but it is out of calibration range. I'm using beam load cell YZC-1B. Please can you help me with this issue, I assume that I need to change something more in code but I'm not familiar with Arduino coding. Thank you BR

@Attached I'm sending pedals picture. Pedals are made in my garage with hand tools!!!

69669bd2-2c19-4732-acb8-4a96f427d532

4d06c2df-bbb5-459a-a1d7-b703067fdab1

Duce55 commented 1 year ago

Hi, I succeeded by method changing some things connected to ADS and pedals assignment in code. Several mistakes but at final pedals are working in 16bit resolution!

vospascal commented 1 year ago

good job can you share a diagram how you changed it and how it works now so people can learn from it :) @Duce55 also your pedals looks awesome :) love the shine 👍🏻

Duce55 commented 1 year ago

Hi Pascal,

I'm very glad that you contact me, but unfortunately, I don't have good news and for last couple of days I'm struggling with coding.

Attached I'm sending you code that I use when I wrote „good news“.

What I did:

Pedalbox.ino file

I changed ADS inputs 2 for throttle (ADS A2 pin), 1 for brake (ADS A1 pin), clutch disabled.

Pedal.h file

Pedals.h file

And

Startup PedalFX calibrated pedals and throttle, brake pedal finally working!!!

I was not happy that clutch was working as same as throttle and analog pins was not as same as ADS pins, take solder and resolder analog pins to be same as ADS (A1 throttle, A2 brake, A3 clutch), plug in, start PedalFX calibrate and working like I expected (code attached ADS_PedalBox_1.4.1 and following files)

BUT!!!

Finally, I plugged pedals to my PC start game Asseto Corza Competizione and go to configure pedals in menu and when I try to bind pedals nothing. Start Project cars 2 binding pedals and game said that multiple inputs detected and I couldn't assign pedals.

Back to start!

Coding throttle as analog input, brake as digital and clutch as analog testing...both games assign pedals without any issue. I don't know about coding and assume that there is some catch in Pedal.h file to assign input signal for throttle int_channel=1 also for clutch channel 3 and for last couple of days I'm struggling to figure it out how to code this.

Regarding fact that I'm not familiar with coding maybe I'm on wrong path. Today just before I receive your mail I upload library from https://github.com/dmadison/Sim-Racing-Arduino and it is working but your is more refine and I would like to use your code.

I playing with this issue for few weeks now and I would really appreciate if you can help me, I think it is just the matter of coding.

Please be so kind and help if can and if you have time. I hope that you can help me to resolve this issue.

Thank you in advance.

Best regards!

Andrija

From: Pascal Vos @.> Sent: 5. rujna 2023. 18:58 To: vospascal/pedal-arduino @.> Cc: Duce55 @.>; Mention @.> Subject: Re: [vospascal/pedal-arduino] Load cell ADC issue (Issue #9)

good job can you share a diagram how you changed it and how it works now so people can learn from it :) @Duce55 https://github.com/Duce55

— Reply to this email directly, view it on GitHub https://github.com/vospascal/pedal-arduino/issues/9#issuecomment-1706980075 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ANMN6KPJCYHQFFYJXSGITNDXY5KZ7ANCNFSM6AAAAAA3RILKVE . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ANMN6KIQ243HS64D2Z5C5CTXY5KZ7A5CNFSM6AAAAAA3RILKVGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTFXZZOW.gif Message ID: @. @.> >