NodeMCU v3 - analogRead() #5602
Replies: 1 comment
-
Posted at 2016-10-08 by @allObjects I suggest that you provide 0.00, 0.25, 0.50, 0.75 and 1.00 Volts and analog read each of them. You should get something linearly related to the voltage applied. If not, analog read is not doing anything for you... (anymore? ...may it is already be 'gone' due to having given it > 1 or 3.3V?) How to create these voltages?
I assume you have a multi-meter to measure the voltage produced by the voltage divider established by the resistors R1, R2 and R3. If not - but with decent tolerances of the resistors (2..5%) - you can guess by the position of the wiper about what voltage between 0 and 1 Volt to expect. Posted at 2016-10-08 by Aleksandrs Yes i have to LitiON battarey, have to input to my (DC-DC get 8.0V => Ouput 5.0V), i create from input with 2 resitors 0.49 volt. (10kOm and 1kOm) i need getting lition battarey voltage... Posted at 2016-10-08 by @allObjects I specified 3.3V to look at... not 8.0V. Grab 3.3V output from NodeMCU board, then you are safe. A single value is not good enough... use multiples. If you have only 10k and 1k resistors, play around with multiple combinations always making sure that A0 input is never above 1.00 V. Since the input impedance of A0 is so high compared to your resistors, the voltage is proportional to the resistance from GND to A0 over total resistance from GND to 3.3V. For example, with 10 K and 2 x 1 K: 3.3V x 2k / 12k = 0.55V; with 1 x 1 K: 3.3V * 1 K / 11 K = 0.3V; with 3 x 1 K: 3.3V x 3K / 13K = 0.76V; and with 2 x 1K parallel:
Posted at 2016-10-08 by Aleksandrs From my voltage divider i get not more that 1V.. every time 0.45-0.80 A input to 5 Volt input Attachments:
Posted at 2016-10-08 by @allObjects What are the analog read values for 0, .45 and .67 Volts? (0 volts: connect A0 to GND). Posted at 2016-10-09 by Aleksandrs Thanks all i found answer for my question Attachments: Posted at 2016-10-09 by @allObjects Great work... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-10-07 by Aleksandrs
By default if call analogRead();
i get
if i connecting 0.49v to analog input
Question how from this data i can restore 0.49v
Beta Was this translation helpful? Give feedback.
All reactions