5 years, 9 months ago.

Reference voltage for ADC on Nucleo-64 boards

Hello everyone!

I'm trying t understand the work of ADC on Nucleo-F411RE board.

From what I understood on https://os.mbed.com/docs/mbed-os/v5.11/apis/analogin.html page:

  • voltage value on ADC pin is compared to VCC
  • function read() returns the value from 0 .0 to 1.0, which equals to ratio of measured voltage to VCC

But, what I see on product page https://os.mbed.com/platforms/ST-Nucleo-F411RE/ :

  • board has separate pin IOREF

Thus, this pin could be used as input for ADC reference voltage using some more precise sources than VCC. Let say, if I need to measure voltage from 0 to 2.5 V, I could use the MAX6125 or MAX6033 as voltage reference, and connect it to IOREF pin of Nucleo board. It will give better resolution and stable voltage reference.

The question is:

  • what is the code for using external voltage reference?

Thank you!

1 Answer

5 years, 9 months ago.

IOREF is not used for the ADC. Look at the AVDD pin on CN5.8 - that pin is used for external ADC reference. However, in order to use it you must follow the instructions in the Nucleo manual for removing the solder bridge SB57 prior to using.

Accepted Answer

Thank, but then another question: Since CN5.8 it is the pin which powers analog part (it goes to pin 13 of microcontroller -> VDDA/VREF+), would it affect the AnalogOut function? Or it will be still from 0 to VCC?

PS. Am I right, that to use external voltage reference on Nucleo-32 board, I need to remove solder bridge SB10?

posted by Yehor Pererva 14 Feb 2019