0

I am working with GPIO where I want to read a vacuum sensor's output voltage. Using a voltmeter from the output to the pi's ground, I measured the voltages.

  • ON State: 21V
  • OFF State: 15V I know that GPIO is designed to only receive 3.3v for input. How can I wire the pi so that it can receive the vacuum sensor's output without damaging the pi?

Here is a related link that I looked at: Connecting 15V to GPIO w/o dividing voltage

If there are any components that I have to purchase to make this work, please let me know.

Thank You!

4
  • Might be easiest to use a voltage divider to reduce the voltage and a ADC chip to read the analogue voltage.
    – CoderMike
    Jul 30, 2023 at 19:18
  • what is preventing you from supplying the vacuum sensor with lower voltage?
    – jsotola
    Jul 30, 2023 at 19:47
  • jsotola, The vacuum switch is rated 10.8 to 30 VCC. We are currently supplying it 24V. We could supply it less voltage, but it would still be over 3.3V.
    – Danny
    Jul 30, 2023 at 22:54
  • This is not a Pi question but about designing a circuit to connect to an unspecified source. If the device ACTUALLY returns those voltages it would difficult to detect the 7:5 change in value without some external electronics. I expect the voltages you measure are an artefact of the circuit and would vary with loading.
    – Milliways
    Jul 31, 2023 at 4:02

1 Answer 1

0

The pi is very sensitive when it comes to the tension on the GPIO. When you are working with higher tensions, be very careful.

I would use an opto-coupler to protect my Pi.

enter image description here

Your zener would be somewhere above 15V. The resistor on the led-side of the opto-coupler depends on the zener value and the opto-coupler that is used..

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.