I’m new here. I just hooked up my 3-pin (5V, GND, Analog Out) XGZP6847020KPG pressure sensor right on my Arduino pro mini (at first it was not working, then I added a 10 kOhm resistor in parallel with the analog out to ground).

enter image description here

I wrote the code and read the analog value (0.67 V) off my serial monitor, as I applied pressure the analog value also changed which seemed okay. But since the sensor will be monitoring my water tank level it means I will have to connect the sensor at least 20 meter away from the controller. After connecting the cable I turned on the serial monitor but the value remained constant (at 0.42 V). What could be the cause of this?


simulate this circuit – Schematic created using CircuitLab

  • 1
    \$\begingroup\$ show us the whole circuit. How have you connected the pressure sensor? It should share the 0V and 5V with the Arudino \$\endgroup\$
    – Kartman
    Aug 30, 2021 at 11:54
  • \$\begingroup\$ the sensor is not expected to be run via a 20m wire. You might want to reconsider your choice of sensor or your physical design. \$\endgroup\$
    – Kartman
    Aug 30, 2021 at 11:58
  • \$\begingroup\$ The sensor works with longer distance. I think I just didn't connect it properly. I connected pin 2 to Arduino RAW pin, while pin 1 goes to GND and pin 5 goes to Analog pin A0. Lastly, how do I post pictures here in the comment section (if it's possible)? \$\endgroup\$ Aug 30, 2021 at 15:56
  • \$\begingroup\$ Pardon me, but I can't seem to figure out how to post pictures/schematics here in the comment section \$\endgroup\$ Aug 30, 2021 at 16:43
  • \$\begingroup\$ you can't. edit the post \$\endgroup\$
    – Ilya
    Aug 30, 2021 at 17:23

1 Answer 1


Datasheet, page 6:

Other handling precautions

▼That using the wrong pressure range or mounting method may result in accidents.

The only direct pressure medium you can use is dry air. The use of other media, in particular, corrosive gases (organic solvent based gases, sulfurous acid based gases, and hydrogen sulfide based gases, etc.) and media that contains moisture or foreign substances will cause malfunction and damage. Please do not use them.

EDIT: to make it clear, your device can't work in water and may very well be already dead

  • \$\begingroup\$ I didn't immerse the sensor in water, I only connected a dry pvc hose to the sensor and used the pressure applied by the level rise of the water to increase air pressure in the hose. So there is no physical contact between the sensor and the water \$\endgroup\$ Aug 30, 2021 at 15:48
  • \$\begingroup\$ so what exactly is its purpose? It can't measure anything useful for you; as for why it doesn't work, please, present full schematic. With module pins and power. \$\endgroup\$
    – Ilya
    Aug 30, 2021 at 16:03
  • \$\begingroup\$ Its purpose is to control water level. Theoretically, increase in the water volume/height also increases the air pressure in the hose linearly which the sensor senses and transfers the analog reading to the Arduino \$\endgroup\$ Aug 30, 2021 at 16:15
  • \$\begingroup\$ alright, I think I got what you mean. Maybe your idea will work. In any case, present full schematic. It could be something with power too. In fact, it most likely is. I would measure voltage on power rails of the sensor module. Also, it shouldn't matter much because the sensor uses very little current, but a wire of that length has noticeable non-zero resistance. And capacitance. You might want to put a resistor right on the output pin. Some 1k or 10k, because sensors don't like driving capacitive loads \$\endgroup\$
    – Ilya
    Aug 30, 2021 at 16:18
  • \$\begingroup\$ Please how do I post pictures/schematics here in the comment section \$\endgroup\$ Aug 30, 2021 at 16:41

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.