Right now I'm trying to understand how I could (easily) power the heater of my MQ-9 carbon monoxid and gas sensor.

Here is the datasheet: http://www.haoyuelectronics.com/Attachment/MQ-9/MQ9.pdf

It needs 5V for some gases, so I thought I could maybe power the heater via the 5VIN pin (while plugged via usb), since the other output pins have a max. voltage of only 3.3 V?

And to control the power, I could then add a relay switch, which would cut the circuit between heater and VIN (if I only want to measure the gases)?

Or am I completely wrong?

P.S: And no - I don't want to add a 5V power supply additional to the normal USB plugging on VIN :)

1 Answer 1


The VIN pin is NOT directly connected to the USB's 5V supply as it is an VIN PIN for powering the MCU from an external source other than the USB - this means the pin cannot be used as a 5V supply output.

  • Never ever connect VIN to a power source AND connect the USB plug. That can destroy the USB port in your computer. There is zero back-powering protection on the MCU board.

According to the datasheet the sensor (heater) needs upto 350mW which IMHO makes powering via an extra power board (which can also power the MCU) a necessity.

  • I see, thanks!! Commented Apr 20, 2020 at 7:23
  • actually VIN (on non lo-lin nodeMCUs) is connected through a diode, so there's a voltage drop on the usb voltage, and heavy loads will heat the diode. 350mw is only 70ma, and that should be fine for the diode, as long as the heater doesn't mind 4.3v it will work.
    – dandavis
    Commented Apr 20, 2020 at 19:34

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.