Modifications

Sauter à la navigation Sauter à la recherche
665 octets ajoutés ,  17 mai 2012 à 12:38
Ligne 103 : Ligne 103 :  
[[Fichier:cds-connect2.jpg]]
 
[[Fichier:cds-connect2.jpg]]
   −
== Analog voltage reading method ==
+
== Méthode de lecture Analogique ==
   −
The easiest way to measure a resistive sensor is to connect one end to Power and the other to a '''pull-down''' resistor to ground. Then the point between the fixed pulldown resistor and the variable photocell resistor is connected to the analog input of a microcontroller such as an Arduino (shown)  
+
La façon la plus facile de mesurer un senseur résistif est de connecter une borne sur l'alimentation et l'autre sur une résistance Pull-Down (elle même raccordée à la masse).
 +
 
 +
On raccorde ensuite le point de connexion entre "la résistance et la photo-résistanc" sur une entrée analogique d'un micro-controlleur comme Arduino (voir ci-dessous).
    
[[Fichier:cds-analog1.jpg]]
 
[[Fichier:cds-analog1.jpg]]
Ligne 111 : Ligne 113 :  
[[Fichier:cds-analog2.jpg]]
 
[[Fichier:cds-analog2.jpg]]
   −
For this example I'm showing it with a 5V supply but note that you can use this with a 3.3v supply just as easily. In this configuration the analog voltage reading ranges from 0V (ground) to about 5V (or about the same as the power supply voltage).
+
Dans cet exemple, nous utilisons une tension d'alimentation de 5V mais vous pouvez aussi utiliser une tension de 3.3v tout aussi facilement.  
 +
 
 +
Dans cette configuration, la tension lue varie de 0V (la masse/GND) à +/- 5V (approximativement la tension d'alimentation).
 +
 
 +
'''Notes sur le fonctionnement:'''
 +
 
 +
# Lorsque la résistance de la photo-résistance diminue (donc quand la luminosité augmente), la résistance totale "Photo-résistance + Résistance Pull-Down" diminue de ~ 600 KΩ à 10 KΩ.
 +
# Cela signifie que le courant traversant le circuit "Photo-résistance + Résistance Pull-Down" augmente.
 +
# SI le courant augmente dans la résistance pull-down ALORS la chute de tension augmente au borne de cette résistance.
 +
# Par conséquent, la tension mesurée sur l'entrée analogique du micro-controleur augmente aussi.
 +
 
 +
Pour résumé, la tension lue sur l'entrée analogique augmente avec la luminosité.  
   −
The way this works is that as the resistance of the photocell decreases, the total resistance of the photocell and the pulldown resistor decreases from over 600KΩ to 10KΩ. That means that the current flowing through both resistors increases which in turn causes the voltage across the fixed 10KΩ resistor to increase. Its quite a trick!
+
Par la nature même du circuit, il est plus difficile de déduire directement (c-à-d "sans calcul"), la tension sur l'entrée du analogique du micro-contrôleur.  
 +
Le tableau suivant est basé sur une résistance Pull-Down de 10 Ko.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Ligne 159 : Ligne 173 :  
| align="left" | 5V
 
| align="left" | 5V
 
|}
 
|}
''This table indicates the approximate analog voltage based on the sensor light/resistance w/a 5V supply and 10KΩ pulldown resistor''
+
''Cette table indique approximativement la tension analogique basée sur un senseur de lumière de type photo-résistance avec une alimentation de 5V et une résistance Pull-Down de 10KΩ''
    
If you're planning to have the sensor in a bright area and use a 10KΩ pulldown, it will quickly saturate. That means that it will hit the 'ceiling' of 5V and not be able to differentiate between kinda bright and really bright. In that case, you should replace the 10KΩ pulldown with a 1KΩ pulldown. In that case, it will not be able to detect dark level differences as well but it will be able to detect bright light differences better. This is a tradeoff that you will have to decide upon!  
 
If you're planning to have the sensor in a bright area and use a 10KΩ pulldown, it will quickly saturate. That means that it will hit the 'ceiling' of 5V and not be able to differentiate between kinda bright and really bright. In that case, you should replace the 10KΩ pulldown with a 1KΩ pulldown. In that case, it will not be able to detect dark level differences as well but it will be able to detect bright light differences better. This is a tradeoff that you will have to decide upon!  
29 917

modifications

Menu de navigation