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

How to modify phobia to support hw_100_250 #5

Open
willt20 opened this issue Dec 3, 2024 · 3 comments
Open

How to modify phobia to support hw_100_250 #5

willt20 opened this issue Dec 3, 2024 · 3 comments
Assignees

Comments

@willt20
Copy link

willt20 commented Dec 3, 2024

I would like to ask the experts, how to modify the hw_100_250.h file for sampling at the lower end of the resistor so that it can run the phobia firmware, because there is one difference, the positive and negative poles of the op amp are connected in reverse, the code in vesc is #define INVERTED_SHUNT_POLARITY, how should phobia modify it in the configuration file.

@rombrew
Copy link
Owner

rombrew commented Dec 3, 2024

You can specify negative amplifier gain in hw configuration file.

#define HW_HAVE_LOW_SIDE_SHUNT
#define HW_ADC_AMPLIFIER_GAIN		-20.f

@rombrew rombrew self-assigned this Dec 3, 2024
@willt20
Copy link
Author

willt20 commented Dec 4, 2024

好的,非常感谢您,我来试一下。

@artayasa
Copy link

I would like to ask the experts, how to modify the hw_100_250.h file for sampling at the lower end of the resistor so that it can run the phobia firmware, because there is one difference, the positive and negative poles of the op amp are connected in reverse, the code in vesc is #define INVERTED_SHUNT_POLARITY, how should phobia modify it in the configuration file.

I think if it bidirectional lik ina181 it no problem, like i usued onmy coustem vesc, its no defive inverted polarity, its working, sorry if i mistake, just share, i used mks 75100 schematic

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

3 participants