UniPi-entrée-analogique

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche

Introduction

UniPi features two analog 0-10V input channels (via the MCP3422, address 0x68) marked as AI1 and AI2. Each channel has its own + and – (e.g. AI1+ and AI1-). The + connector expects positive voltage from the connected device and – expects the negative pole (the GND).

The guaranteed accuracy is 5% however 1% is commonly reachable.

To correctly calculate the input voltage, a coefficient of the resistor divider has to be taken into account. The coefficient of each channel is saved in EEPROM as single precision binary floating point format binary32 (IEEE 754).

Before version 1.1 the coefficient is not saved in the EEPROM and thus must be calculated during conversion in software (Typically the value is around 5.56).

Lire une tension

Pour lire une tension sur l'UniPi, brancher:

  • La masse de la source de tension sur AIx- (qui est aussi la masse d'UniPi)
  • Le pôle positif de la source de tension sur AIx+.

Comment lire une résistance

UniPi ne sait la lire directement la valeur d'une résistance (comme un potentiomètre utilisé pour fixer une consigne).

Il faut utiliser un point diviseur de tension pour transformer la valeur de la résistance en tension lisible sur une entrée analogique.

To be able to read resistance e.g. of thermal probes with higher temperature range PT1000 (-200°C - +800°C) a small resistor has to be added according to the schema below.

320px

The R_sens is the sensor and the R_ref is the additional resistor you need to add.

To be able to read PT1000 themometer with resistance between 200R(-200°C) - 3800R(+800°C), the R_ref should be 1K in order not to go over 10V on the AI.

Then the value at the AI (in Volts) is calculated as following for our sensor is:

R_sens(200) = 12V/(969.7+200)*969.7 = 9.948

R_sens(3800) = 12V/(969.7+3800)*969.7 = 2.439

Please note that there is 10V at R_sens and 2V on the junction.

S the value on AI when the sensor measures -200°C is 9.948V and when the sensor measures +800°C, the value at AI is 2.439. See datasheet of your sensor in order to check all the values. Also remember that the hardware design of UniPi has some limitation so you can read precisely to 0.05V. In this sample sensor this would mean that you will be able to read temperature with precision +-50°C. If you need more precise reading, change the value of the R_ref.....

If the range of the R_sens is does not match your needs the R_ref can be changed. The value of R_Ref is calculated according to this formula:

Rx = (R_ref*12K8)/(R_ref+12K2)

When choosing your R_ref, make sure that at the point when the sensor will have minimum/maximum resistance, the values at the AI+ does not go over 10V or under 0V.



Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.