Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request Ability to add 16 bit ADC #73

Open
moezzasif opened this issue Nov 22, 2024 · 3 comments
Open

Feature request Ability to add 16 bit ADC #73

moezzasif opened this issue Nov 22, 2024 · 3 comments

Comments

@moezzasif
Copy link

Please add the ability to use 16 bit adc for FFB software

@ranenbg
Copy link
Owner

ranenbg commented Nov 22, 2024

Hi, first of all, if you want me to even consider implementing anything in the firmware/software, you'll have to be much more specific about your request.

The firmware already supports ADS1015 (12bit) and ADS1115 (16bit) ADC chips. To enable the 16bit one, you just need to comment 1 line not to use the 12bit one and uncomment the other one for ads1115. But it's not so simple, as only X and Y axis are 16bit in HID, and others are 12bit. X-axis is already used for encoder and Y axis is reserved for load cell brake wich has 24bit HX711 chip, or can be set to pot and arduino 10bit analog input is used or ads1015 12bit. Another downside of using ads1115 is that it is very slow. It will slow down the entire loop, making all other inputs to run slow, including reducing the FFB frequency to something about 100Hz or so, depending on how many inputs you want to read from it. This is why I didn't compile a HEX with such an option.

Just out of curiosity, which ADC did you have in mind? There are many available with various comms, i2C, SPI, i2S. Which axis or axes do you think need to be associated with this 16-bit analog input? Why do you need 16-bit input for pedals? If you need just 3 axis for pedals, you can use joystick.h library and make your own small code that will read 3 inputs from ADS1115, it's super easy and quick to do. This arduino you can use alongside another one with my firmware that will provide FFB by using optical encoder for X-axis.

@moezzasif
Copy link
Author

moezzasif commented Nov 22, 2024

thanks for the help . i was unknown about the fact that this software support 16 bit ADC . as iam new to coding and dont have much experience . as
iam planning to build my first diy project of sim .
by the way again thanx for the details help

and one more thing as i was curious that will this project support smt32 board black pill in future rather than leonaro
as i have heard from many people on the internet that the smt32 is better alternative than leonardo .

@ranenbg
Copy link
Owner

ranenbg commented Nov 22, 2024

Yes, I can see that, however, one has to start from somewhere. You are welcome.

Porting my firmware to any stm32 is a huge amount of work. It requires completely rewriting most of the code from scratch and I have no plans of doing that. Modified USB core files for Arduino are the holy grail, and that is insanely difficult to make. We all are just using stuff that was done before by others and improving on that. No one is doing USB HID protocol for FFB from scratch.

There is plenty of available FFB firmware for stm32F407 MCU, such as MMOS, EMC, VNM, or OpenFFBoard. The last one I strongly recommend, as it is the most advanced of all and one can use it even to make a direct drive wheel, once paired with the special motor driver board done by the same guy. Chinese company MOZA most probably took his firmware and is selling it nowadays with some modifications including their DD wheel software and hardware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants