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] Allow reconfiguring I2C pins as ADC #294

Open
totosolat opened this issue Feb 14, 2023 · 1 comment
Open

[Feature request] Allow reconfiguring I2C pins as ADC #294

totosolat opened this issue Feb 14, 2023 · 1 comment

Comments

@totosolat
Copy link
Contributor

Hi,

I am using a VESC V6 edu for robotics applications and I would need one extra ADC for a torque sensor analog output (I already use the two available ADCs for SIN/COS control)

I noticed the two pins "SCL MOSI TX" and "SDA NSS RX" could be used as ADCs. When I2C is not used, we could make 2 extra ADCs available.

Do you think it could be done?
Do you think it would be an interesting feature for everyone or a too specific mod?

Thank you

@Teslafly
Copy link
Contributor

It could be done. But making it universal to all vescs Is the hard part as not all have the same connections to those pins.

The particulars of vesc adc scanning can also be complicated to make universal as each hardware defines its own adc scan list. I have been thinking that you could probably change it so the stm32 always scans all the adc pins and just doesn't use some readings. Especially if the pin isn't in adc mode. This would make adding additional analog inputs easier.

But it still requires hardware config knowledge that is not universal.

I have the use case using the RX/TX pins where I want to use those adc's for a sin/cos encoder so I do not clobber the analog throttle input.

This is probably a long time coming though. So in the short term I would encourage you to edit the firmware and implement it on your own. Or use an external microcontroller.

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