2
\$\begingroup\$

I am using a 5V sensors (MQX Gas Sensors) that is connected to an RPi. This sensor is then connected to an ADC converter then to a logic level shifter. I just followed the tutorial I saw on the internet. Since the input varies from 0V - 5V, if I connect it to an logic level shifter, will the output vary from 0V - 3.3V as well?

\$\endgroup\$
4
  • \$\begingroup\$ Depends on the level shifter design. If it's just a resistor divider, yes. If it's more complex than that, probably not. \$\endgroup\$
    – Hearth
    Mar 17, 2019 at 21:04
  • \$\begingroup\$ I'm using this, will this work? \$\endgroup\$
    – LinkedRom
    Mar 17, 2019 at 21:09
  • \$\begingroup\$ No. I can't think of any type of bidirectional logic shifter that would work on analog signals. \$\endgroup\$
    – Hearth
    Mar 17, 2019 at 21:10
  • \$\begingroup\$ Is the logic level shifter between the sensor and the ADC, or between the ADC and the Pi? \$\endgroup\$
    – JRE
    Mar 17, 2019 at 21:46

1 Answer 1

5
\$\begingroup\$

Yes, it will vary from 0-3.3V but it won't do it in a "nice" fashion. It will be very nonlinear (that's a positive feature with digital circuits). So it might be 0V out with 2.1V in and 3.3V out with 2.2V in.

You probably need a simple op-amp circuit or just a voltage divider. But, as with any circuit you'll need to specify a lot more information such as voltage range (it's important if it has to go down to exactly 0V, and important if the output is not allowed to go a bit negative, for example) available power supplies, input impedance required, output impedance required, accuracy and bandwidth.

\$\endgroup\$

Your Answer

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

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