Voltage value of moteino digital I/O pin..

Started by SanG, March 14, 2018, 11:24:20 AM

SanG

Hey  guys,
Just want to figure out the voltage values of HIGH and LOW levels of digital pins of moteino? I am working on monitoring soil moisture (model: EC5) whose excitation wire is connected to one of the digital pins (D5 in my case). Its analog out wire is connected to A0 and another to ground of monteino. I want the D5 to output HIGH (2.5V) periodically at every wake-up. I checked the voltage value but it is giving me weird numbers: sometimes ~2.2V and sometimes 200mV or 250mV etc..Is there a way to make the digital pin to output a certain HIGH value (2.5V)?

Thanks

LukaQ

#1
Quote from: SanG on March 14, 2018, 11:24:20 AM
I want the D5 to output HIGH (2.5V) periodically at every wake-up.
No you can't,  digital pin has 2 states, one is Vcc minus some drop if you have some current flowing, other state is GND and again as before, just a bit above it with current.
Don't know where you got 2.5v, since moteino doesn't work at that voltage, but it does on 3.3v. Based on that, you have this voltage on output pins when set high.

If you have any other voltage, you are (maybe) doing something wrong and can damage moteino. max current for any pin is low, 40mA max, 20mA recommended.

How do you use that sensor, since it has 4-20mA output range?
Oh I see, this is special version...

10 to 40% of excitation voltage, which can be 2.5v or 3v... You have it on D5, which would be about 3.3v
Did you measure this voltage in any other way apart from moteino?

SanG

Never mind, I figured it out myself. You are correct, it is either ~3.3V or ~0V. Thank you for the help anyway.