ADC External Voltage Reference (AnalogReference)

Post here first, or if you can't find a relevant section!
Post Reply
nedsar85
Posts: 7
Joined: Fri Aug 19, 2022 8:10 pm

ADC External Voltage Reference (AnalogReference)

Post by nedsar85 »

Hi,

Is there a compatible command to set the external Vref through Pin 13 in the Nucleo 32 boards?
I have tried to disable Jumper SB10 and then connect directly a Vref = 3V, but, this is not completely working...

I'm looking for a compatible command like: AR_EXTERNAL as it is available for SAMD boards...

Thanks,
GonzoG
Posts: 403
Joined: Wed Jan 15, 2020 11:30 am
Answers: 27
Location: Prudnik, Poland

Re: ADC External Voltage Reference (AnalogReference)

Post by GonzoG »

You cannot choose analog voltage reference in software. With most (if not all) STM32 MCUs there is only hardware way.
In Nucleo manuals there is information how to do it:
https://docs.rs-online.com/762c/0900766b8147aa39.pdf
p.19.
But you also need to read MCU datasheet for information about voltage range that can/need be provided.
nedsar85
Posts: 7
Joined: Fri Aug 19, 2022 8:10 pm

Re: ADC External Voltage Reference (AnalogReference)

Post by nedsar85 »

Thanks GonzoG...

I found the instructions in the manual, I deactivated the SB10 and provided a direct 3Voltage to pin Vref (pin13), and now I can have a full 10bit ADC count up to 1023... (I'm using a sensor with max output of 3V)

Nevertheless, my sensor has an offset value of 400mV, I would expect that the Nucleo board could read some noise when there is no signal over the offset, but, I get only 0's ...

I'm not really sure what is going on... if you have an idea I appreciate the feedback, I will return later to post the solution if i find it...

Thanks again
nedsar85
Posts: 7
Joined: Fri Aug 19, 2022 8:10 pm

Re: ADC External Voltage Reference (AnalogReference)

Post by nedsar85 »

I was having a hardware issue...
To enable the external Vref, just disable the SB10 and we should be fine... (Vref should always be < than VDD)

:)
saucedense
Posts: 1
Joined: Wed Mar 29, 2023 1:53 am

Re: ADC External Voltage Reference (AnalogReference)

Post by saucedense »

nedsar85 wrote: Tue Oct 18, 2022 3:10 pm I was having a hardware issue...
To enable the external Vref, just disable the SB10 and we should be fine... (Vref should always be < than VDD)

:)
Hardware tuning seems a lot more complicated.
Post Reply

Return to “General discussion”