Hi!
I have been searching for the data specs regarding safe high and low logic levels for my 5 volt UNO. Vill 0.77 volt be read as a low logic level? I only have free analog input and I wish to connect 3 such signals. It is the output of opto couplers.
From testing done here, some time ago, 0V to 1.3V on a 5V UNO were detected as a LOW.
"I only have free analog input "
A0-A5 can be read as digital inputs too, or am I misinterpreting what you are saying?
Analog input is just another function added to a digital input.
D14 to D19 can be used for A0 to A5.
For a 5V Uno, max level for a valid low input is 0.3 x Vcc, so with Vcc pins at 5V that is 1.5V.
Min level for a valid high is 0.6 x Vcc, so with Vcc pins at 5V that is 3V.
Your Vcc may be less than 5V if powered from USB.
Thanks for Yor answer Larryd.
Oh, such a high voltage as 1.3 is recognized as low. Then I am safe. The opto coupler has a Darlington output stage but using "INPUT_PULLUP" the digital input has no problem reading a low.
My project is controlling a CNC. It has an I2C LCD, 3 analog pots for manual stepping, 2 I/O for high temperature alert communication and 3 steppers connected so D9, D10 and D11. So, not much left…
I got this part of the project working.
.77 to 1.3V (in my testing) is .53V, lots of head room, you'll be fine.
As Crossroads mentioned, a controller with 5V Vcc 'should' give anything <= 1.5V as a LOW.
I don't like the word 'should' .
Thanks CrossRoads.
Using A0 - A5 being named D14 - D19 is new to me. However that will not change the impact of I2C and other stuff connected to the A-inputs I assume.
I once got hold of the technical specs but today they seam to be hiding. Being an old TTL logic level fighter low levels around 0.7 volt looked questionable to me.
Summing up, thanks for Your time. Things look good here for the moment.
I'm now sure I'm safe.
I know thart "5 volt" is uncertain when using USB, as I do, but today it is 4.96 volt!
The place to look for this sort of thing is the microcontroller's datasheet. In the case of the Uno, you would find the ATmega328P datasheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/ATmega48A-PA-88A-PA-168A-PA-328-P-DS-DS40002061A.pdf
In that document, you find the information in table 30-1 that the maximum input low voltage at Vcc 2.4V-5.5V is 0.3*Vcc.
Thanks pert! That was what i found some time ago but now I couldn't. Using "worst case" data has made my constructions work in the past and I never drop the data in the specs.