Interfacing with MH-Z19B CO2 sensor

Hello,

I've got an MH-Z19B CO2 sensor. according to its datasheet, it uses UART at a 3.3v TTL level. and most of the articles that explain how to use it, they connect Tx/Rx pins without any voltage dividers. so is that okay or it may cause problems?

You can connect a 3.3V TX (output) to a 5V RX (input) without any electrical problems.

You should never connect a 5V TX to 3.3V RX without a logic level shifter, unless the datasheet clearly states that the 3.3V RX input is "5V tolerant".

Thanks for replying, sorry about this newbie question, but I decided to use this library ErriezMHZ19B and there's a "getting started example" with wiring, so I'm wondering about that connections and I don't want to make it without understanding.

Here is what the manufacturer's data sheet for that sensor states (as already posted). I am not sure what to believe, but it may be OK to connect the 5V Arduino TX to the 3.3V sensor RX.

Capture

The sensor is compatible with (UART) TTL level 5v. it's working fine for me.
and this website has a very good explanation.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.