Chat here is you are connecting ESP-xx type modules to existing AVR based Arduino

Moderator: igrr

User avatar
By azamkamal
#91107 Having problems with the wire connection for the NodeMCU ESP8266 to the MQ-7 gas sensor and also the (GPS) module (GY-NEO6MV2, NEO-6M).[/b]

Hi. I am currently doing a final year project (FYP). My project is about detecting carbon monoxide gas leaks in the car and sending the location where the car is via a mobile application. I have included a schematic diagram for all my hardware connections for my project. I have tried to install hardware based on the schematic. But my NodeMCU ESP8266 cannot be detected in the computer if I connect the two sensors. If I only connect the MQ-7 gas sensor without the GPS module, my computer detects my NodeMCU. The pin that I just found to cause my computer not to detect NodeMCU is to connect the GPS module which is the GROUND pin. I want to ask here, what is my problem? Have a wrong wire connection or other problems?

https://imgur.com/a/Yl4s5yT

https://imgur.com/a/0wcKhPE

Thanks for the help :)
User avatar
By QuickFix
#91122 To make it easier for the rest of us, I've uploaded your pictures directly to our forum (also handy for future reference when the pics are deleted from Imgur).
cF3FeRW.png

HhxMdD8.jpg

Also, please show us some code if you want specific help: a piece of code says more than a thousand words. :idea:

  • Are you sure the data from the sensor is satisfactory?
    I ask this because the ADC of the ESP is not really suitable for accurate analog measurements, because it's very noisy.
  • D1 (connected to the TX of the GPS module) is GPIO5 on the NodeMCU and can safely be used.
  • D2 (connected to the RX of the GPS module) is GPIO4 on the NodeMCU and can also be used safely
For a GPS module to work, you don't actually need to connect the RX-pin of the GPS, only the TX would suffice (when you use the default 9600Bd speed of the GPS module).

Although the sharing of UART lines is not advisable (the USB -> UART convertor on the NodeMCU is hardwired to the UART of the ESP8266), you might get away with it when connecting the TX of the GPS module in parallel to the UART RX-line of the NodeMCU (D9 = GPIO3).

This way you don't need to use soft serial and use the actual hardware UART of the ESP8266, which is a plus.
But if you do want to go this way, you'll have to make sure that the GPS module is not powered when uploading new firmware or that will fail.
You do not have the required permissions to view the files attached to this post.