GPIO pins RRS feed

  • Question

  • I am trying to connect an NTC thermistor (temperature sensor) to the dev kit. To which pin do I connect it to? Does GPIO take analog values as input? If not, which pins should I make use of?
    Monday, November 18, 2019 9:20 AM

All replies

  • Hello Gotham,

    Have you came across with these docs?

    Let us know if you still have questions. Thanks!

    Monday, November 18, 2019 2:41 PM
  • Dear friend,

    I believe that you want to collect the data from NTC thermistor by analog-to-digital converters (ADCs). If you want to use analog-to-digital converters (ADCs) on Azure Sphere, you can achieve this in a high-level application or in a RTApps. 

    The MT3620 contains a 12-bit ADC with 8 input channels. The ADC compares an input voltage to a reference voltage and produces a value between 0 and 4095 as its output. The ADC input channels and the GPIO pins GPIO41 through GPIO48 map to the same pins on the MT3260. However, if your application uses the ADC then all 8 pins are allocated for use as ADC inputs. None of them can be used for GPIO.

    Please refer to this docs: Using ADCs on Azure Sphere

    And also you can download the sample project from GitHub:  ADC_HighLevelApp sample

    Keep Fighting

    Wednesday, November 20, 2019 1:25 AM
  • Hi Jiong Shi, thanks for the reply.

    I tried the ADC High level sample application following the steps from the Readme file. The application works fine and generates sample (simulated) voltage values. I tried modifying the application to get the analog values from NTC thermistor connected to pin H2 Pin 11. But it isn't working. I also want to set the reference voltage as 5V instead of 2.5V. How do I get the real time temperature value from the sensor?

    Basically I am trying to control the speed of a fan with respect to change in temperature. I have managed to vary the fan speed with sample data using PWM pins but now I need the real time input from the temperature sensor to vary the fan speed.   

    Tuesday, December 3, 2019 12:59 PM
  • Dear friend,

    Sorry for the delay.

    According to the official docs: Using ADCs on Azure Sphere, you will find that "The MT3620 has an on-chip, 2.5 volt reference. Alternatively, it can be connected to an external voltage reference that is less than or equal to 2.5 volts."

    Hence, maybe you can not set the reference voltage to 5V..

    I suggest that you can use DHT11 or DHT22 temperature and humidity sensor instead of your NTC sensor. It's cheap and convenient. Furthermore, you can refer to the libs here:


    Keep Fighting

    Sunday, December 8, 2019 3:25 AM