Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By pomelo
#40043 Hi Guys,
i just mad a simple program .

Code: Select allloop()
{
int adcvalue = 0;
 adcvalue = analogRead(A0);
serial.print("VALUE: "+String(adcvalue));
delay(1000);
}


When started it gives an value between 6 and 8.
I plugged Different sensors into this analog port (thay give 1v / 5v as an output) and never got 1024 value,
it seems like i cannot reach 1024 - the max i have seen was 115...? why?
User avatar
By WereCatf
#40052 It sounds like you don't know how your sensors work. If the sensors did output 1.0V then you'd get 1024, anything less means the sensor is putting out less than that.
User avatar
By pomelo
#40054
WereCatf wrote:It sounds like you don't know how your sensors work. If the sensors did output 1.0V then you'd get 1024, anything less means the sensor is putting out less than that.


Thank you,
i am using https://www.google.pl/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwiV_b7K8NPKAhWFbRQKHV4kBHwQFggeMAA&url=http%3A%2F%2Fwww.waveshare.com%2Fdust-sensor.htm&usg=AFQjCNGxzlsxbU67tCgkthXLYHxNFlCLrg&sig2=f4eUkI-98nxXBqPlyRmTng&bvm=bv.113034660,d.d24

WaveShare Dust Sensor.

They claim it outputs 0v to 5v,
ESP8266 has AD0 for 1v.
What value should i expect on AD0 if SHARP MAXES OUT(5v)?
User avatar
By WereCatf
#40058
pomelo wrote:They claim it outputs 0v to 5v,
ESP8266 has AD0 for 1v.
What value should i expect on AD0 if SHARP MAXES OUT(5v)?


Anything above 1.0V would obviously result in a reading of 1024, you need a voltage divider to bring the sensor's voltage-output into 0V-1.0V - range.