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

GPIO input with high 3,3 V #9

Open
dahlei opened this issue Jan 27, 2023 · 5 comments
Open

GPIO input with high 3,3 V #9

dahlei opened this issue Jan 27, 2023 · 5 comments

Comments

@dahlei
Copy link

dahlei commented Jan 27, 2023

image

I want to use 4 digital inputs for my 4 wastewater non-contact sensors, will need to levelshift from 5 V to 3,3. The inputs from RPi are positive 3,3 V, they trigger in Venus OS when they are connected to GND. Is it possible to invert the GPIO ?

@dahlei
Copy link
Author

dahlei commented Jan 27, 2023

image

@kwindrem
Copy link
Owner

Most configurations within Venus OS have an invert switch

@dahlei
Copy link
Author

dahlei commented Jan 27, 2023

I can invert from Open to Close in view, but GPIO to GND changes state. I want to use +3,3V to trigger change

@kwindrem
Copy link
Owner

The GPIO inputs used by Venus are programmed to have an internal pull-up active, expecting a connection to ground from the external device. You can override this pull-up with a smaller resistance externally.

You can also build a Device Tree Overlay that reprograms the inputs to have pull downs. I actually reprogram some of the pins that default to pull downs to pull ups so you can modify this as you like.

@dahlei
Copy link
Author

dahlei commented Jan 27, 2023

Yeah, I tried a 1K resistor and it is working. Thank you!

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