1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Solved] supply voltage

Discussion in 'GPIO Modules' started by DMc, Aug 31, 2015.

  1. DMc

    DMc New Member

    Joined:
    Aug 19, 2015
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    Occupation:
    Engineer
    Location:
    USA
    I have the GPIO 8 board hooked up to a powered USB hub. On the Numato board I read 5.25V between ground and VDD. When I read the voltage between ground and one of the IO terminals, do I multiple by 5.25V and divide by 1023 to get actual voltage or do I multiple by 5V as per the User Manual and divide by 1023. There is a 4% difference so it matters to me. For a reading of room temperature, the 4% translates to 3 degrees F.
     
  2. DMc

    DMc New Member

    Joined:
    Aug 19, 2015
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    Occupation:
    Engineer
    Location:
    USA
    It turns out that using 5.25V which is the measured voltage between ground and VDD gives me an accurate temperature reading using the Texas Instruments LM34 (outputs 10mV/degF) or LM35 (outputs 10mV/degC). The 4% difference between nominal 5V for a USB and 5.25V actual turns out to be important. That leads me to my next question... Is there a way to read input voltage to the Numato GPIO8 programatically? The reason is that when I plug into:
    1) The powered hub the voltage on the Numato device is 5.25V.
    2) Non-powered hub, the voltage is 5.15V.
    3) Directly into the computer (Mac Mini), the voltage is 5.04V.
    If I can read the input voltage programatically, then scaling calculations can be based on actual supply voltage running the Numato device.
     
  3. admin

    admin Administrator Staff Member

    Joined:
    Jan 23, 2015
    Messages:
    169
    Likes Received:
    11
    Trophy Points:
    18
    Hi DMc,

    All our GPIO devices use the supply voltage (VCC) as reference for the Analog to Digital converter. While this allows us to save cost and provide inexpensive solutions, it does come with the side effect that if the supply voltage is not where it is supposed to be (5.0V) the reading may vary a bit from what you would expect. It is important to note though that the readings themselves are *not* incorrect because the device faithfully translate the input voltage with reference to the VCC. The problem is that as a user we would expect the VCC to be 5V which may not be the case always because between PCs and hubs it can change slightly. Currently, to our knowledge, there is no way to read the VCC (trying to read VCC using one of the analog inputs will always return 1023 ). Looked at the possibility of using internal band gap reference but the band gap reference has 10% tolerance, which 2.5 times larger than the 4% we are talking about.

    Thanks,
    Tom
     
  4. DMc

    DMc New Member

    Joined:
    Aug 19, 2015
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    Occupation:
    Engineer
    Location:
    USA
    Tom, I guess it is not a big deal. We will not be switching power sources often so a quick input voltage measurement only takes a minute to do it manually and then the scaling factor can be setup in the software config setup.
    Dave
     
  5. admin

    admin Administrator Staff Member

    Joined:
    Jan 23, 2015
    Messages:
    169
    Likes Received:
    11
    Trophy Points:
    18
    Thanks Dave. I'll mark this thread solved for now.

    Thanks,
    Tom
     

Share This Page