cancel
Showing results for 
Search instead for 
Did you mean: 

Tutorial on OPAMP and ADC

HDaji.1
Senior

Is there any good tutorial on using OPAMP and ADC together, esp. on G4 Nucleo board?

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

Hello @HDaji.1​ 

Have a look at this AN5306 Application note Operational Amplifier (OPAMP) usage in STM32G4 Series.

Refer also to this presentation of the STM32G4 OPAMP.

I hope these resources are helpful for you.

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

3 REPLIES 3
Imen.D
ST Employee

Hello @HDaji.1​ 

Have a look at this AN5306 Application note Operational Amplifier (OPAMP) usage in STM32G4 Series.

Refer also to this presentation of the STM32G4 OPAMP.

I hope these resources are helpful for you.

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
HDaji.1
Senior

Hi @Imen DAHMEN​ ,

I have read those two documents, which well cover some tech details for OPAMP. However, there is no practical sample codes on how to use them.

In the software package for G4 MCU series, there is one sample of using HAL API to link DAC and OPAMP.

What I need is to connect OPAMP to internal ADC, can you give a step-to-step guide on how to do it in IOC UI?

HDaji.1
Senior

For example, I want to use OPAMP and ADC1 to monitor a voltage source value based on ADC_GainCompenstaion example.

In the IOC UI, I cannot connect OPAMP1 to ADC1 (PGA internally connected is disabled), so I select OPAMP3. According to G4 reference manual, OPAMP3_VOUT is internally connected to ADC1_IN12. There are two pins: PA1 for VINP and PB2 for VINM0.

My question is how to set non-inverting mode.

And I should link VINP pin to the voltage source, is it correct? How about VINM0 pin, just leave it because of non-inverting mode?