sensor anpassen

hallo,
ich mochte einen honeywell hih 3610 feuchtesensor an den arduino anschliessen.das teil gibt einen analogwert von 0 - 3,9 volt aus für 0 bis 100 % feuchte.wie passe ich das an den hardwareeingang,welcher ja von 0 bis 5 volt geht,an? für ein beispiel wäre ich sehr dankbar.
leider kann ich das nicht wirklich verständlich in englisch ausdrücken.
gruss peter

Deutsch: http://arduino.cc/forum/index.php/board,31.0.html

If I understand the question correctly, there is no need to adjust the voltage, but instead of readings from 0...1023, it will be from 0 to about 800.

(sorry for my poor German)

Es ist nicht so schwer, Schließen Sie das Signal mit analogen Port 0 und führen Sie den folgenden Skizze.

Die analogRead wird ein Wert von 0 zurück .. 1023 steht für die 0 .. 5V.
Wenn wir 3,9 Volt zuordnen möchten auf 100, müssen Sie Karte 5V auf 128 (5/3.9) * 100 => zur Karte 0 .. 1023 bis 0 .. 128 ist eine Division durch 8 (fast).

Probieren Sie es aus.


It is not that hard, Connect the signal with analog port 0 and run the following sketch.

The analogRead will return a value from 0..1023 which stands for 0..5V.
If we want 3.9 Volt to map on 100, you need to map 5V on 128 (5/3.9) * 100 => to map 0..1023 to 0..128 is a division by 8 (almost).

Give it a try.

void setup()
{
  Serial.begin(115200);
  Serial,println("Feuchte messer 0.1");
}

void loop()
{
  long raw = analogRead(0);   // val = 0..1023  === 0..5V
  int humidity = raw / 8;        // hum = 0..128  ;  
  Serial.print("Feuchte : ");
  Serial.print(humidity);
  Serial.println("%");
}

Either use AREF pin and analogReference() for external reference voltage or use the map() function to remap the readings back to a 0..1023 range.
The question is if you really need this?!

--

Entweder per AREF Pin und analogReference() externe Referenzspannung festlegen oder per map()-Funktion die Messwerte wieder auf 0..1023 zuordnen.
Die Frage ist, ob du das wirklich brauchst?!

eider kann ich das nicht wirklich verständlich in englisch ausdrücken.
gruss peter

Gebrauchen Sie http://translate.google.com/ um die Frage nach Englisch su übersetzen, oder eine andere Sprache.