So I am trying to power an arduino to measure water flow. It works fine when I am powering it with laptop, but when I directly power it with 12V 1.5A adaptor the reading take a second to come...why is that?
Before taking the readings I am switching on a motor which is also directly connected to the adaptor just like the arduino.
Edit: Would adding a voltage regulator that steps down 12V to 9v between arduino and adaptor help?
How do you know? Where does your reading show? Serial monitor? LCD display? Something else?
It sounds like your Arduino resets when you switch the motor on. Is the motor controlled by the Arduino or do you have a simple on/off switch. A schematic will be useful.
Add an indication in your code so you know that the Arduino is running setup(); if you see that indication, you know that there was a reset.
Basically this below is the block diagram. I just don't understand. It works fine when I power Arduino through laptop, but when its 12V into VIN, its being naughty, the pump starts but the readings on the LCD screen takes a few seconds to start, which leads to overflow.
addition: I've also just noticed that sometimes mid flow the readings hang for a moment and then start again