Hi i've a big problem with my project. I realized a simple project with Arduino Uno: i've attached interrupt to pin 2 to read water flow. If I power on Arduino from 5v usb all works as expected: my water counter (showed on an lcd) increase only if water pass trough the sensor flow.
But if poweron arduino with external 12v, the interrupt start immediately, also in no water passing trough sensor and also if i remove phisically the sensor from the circuit!!
Any suggest?
Flow sensor has 3 pins: vcc, gnd, data.
Data pin goes to pin 2 (interrupt), vcc to arduino 5v, and gnd with arduino gnd.
pinMode(pin, INPUT_PULLUP);, then report back if it worked – chrisl Jul 31 '21 at 14:14