This is my first post at this forum, and after a lot of google-search i still dont know what to do.
I just started playing with the Arduino Uno board and some sensors. I'm just starting to learn about the analog inputs and the ADC on the Arduino.
From my understanding the ADC converts the voltage signal(0-5 V) from the sensor and mapping it to a value between 0-1023(resolution), just so it's easier to work with the many in-between voltages a sensor can output.
Problem:
I've been working with a DHT-11 sensor, and would like to measure the voltage it outputs on the signalpin, and send that raw voltage value to a website. When measuring with my voltmeter between the signalpin on the sensor and ground i only get 5 V. Shouldn't the voltage be different all the time?
The DHT-library can print out the temperature and humidity values, but i want to measure the raw voltage instead.
Is this possible? Lets say i want to connect one wire to signalpin on the sensor and the other to ground, and then see the actuall voltage the sensor sends out. Do i need to connect something in between to see the true voltage(resistor, capacitor?), or is it just not possible?
The DHT-11 is designed as a digital part. Try the HIH-4030 which has an analog output exactly what you want. for temperature you can use a TMP36. There are many other devices that will do what you want.
But is there any option to read voltage from digital output pin on a sensor? Ive heard there is something called DAC, which converts digital to analog value?
Say i have a DAC and connect that to outputpin on digital sensor, and from the dac output i can measure the voltage?
rookiearduino88:
And if i would like to see raw voltage from digital output i have to go with the adc and then convert adc values into voltage!
True, but it won't make much sense. You will simply see two values, depending on when you happen to take the reading: one that's very close to Vcc (analog reading will be >950) and one that's very close to GND (analog reading will be <50). At times you may see something in between, that'd be if the signal changes in the middle of an ADC conversion...
A digital signal will never be at anything else than 0.0V or 5.0V, except for fleeting moments (measured in
nanoseconds) where it is transitioning between the two (known as a logic signal edge). Information is coded
in how the value changes over time (where the edges are).
An analog signal directly represents a value by voltage and can be any voltage for extended periods,
which is "illegal" for a digital signal (more formally would violate the digital signal's static and dynamic
disciplines)