cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo-H745ZI - OPAMP feeding ADC

MEde.1
Associate III

I am working on a project that uses an FFT to identify noise in specific frequency windows. Currently, I am configuring the hardware to optimize signal input for this analysis, but I'm facing some challenges with the internal connection settings in the IOC for using the OpAmp and the ADC. Here's an overview of my current situation and the queries I have:

  • Hardware Setup: My equipment includes a single coupon from the STEVAL-MIC007V1, which is fitted with an IMP23ABSU analogue microphone. Initially, I connected this microphone directly to the ADC's input and successfully implemented a simple FFT program.
  • Proposed Modification: I am considering routing the microphone through an OpAmp before it feeds into the ADC, a technical note said this needed to be done. However, the configuration details in the IOC are a bit unclear to me.

 

I want to use the non inverting input and the PGA mode and the ADC will be in single ended mode.

I think that the hardware connections should be, ground from microphone to AGND, VDD on microphone to VDDA, output from the microphone to PB0 (OPAMP1_VINP). Do I need to connect anything to VINM? 

MEde1_0-1701950387584.png

 

The inverting input, VINM either PC5 or PA7. As I am not using the inverting input I don’t think this matters? unless the ground from the microphone should actually be connected here rather than to the analogue ground pin?

The non inverting input (VINP) is connected to PB0 (this could also be connected internally to ADC1 IN9 but there is no reason to?). This is where I connect the microphone output.

OPAMP1_VOUT is on pin PC4 and I can select ADC1_IN4, I think this should route the OPAMP output directly to the ADC?

MEde1_1-1701950387589.png

 

Within IOC if I select OPAMP1 I see PC4 has OPAMP1_VOUT in green and PB0 has OPAMP1_VINP in green.

Moving to ADC1 I can select IN4 as OPAMP1 Output Single-ended and that appears in yellow under the pin allocations.

ADC1 still shows a yellow triangle.

MEde1_2-1701950387590.png

 

 

It suggests the following to remove the yellow triangle:

MEde1_3-1701950387602.png

 

 

This seems to suggest that I should connect ADC1_INP9 to the same pin as the opamp input? That doesn’t seem correct to me. However if I do select that both are now highlighted in green

MEde1_4-1701950387603.png

 

 

MEde1_5-1701950387604.png

 

Yet the important one, PC4, OPAMP1_VOUT is green yet the ADC input, ADC_INP4, is still yellow?

MEde1_6-1701950387605.png

 

In summary I think this is a question in two parts, how do I connect the OPAMP1_VOUT to ADC_INP4?

Also, from a hardware point of view, what if anything should be connected to VINM

1 REPLY 1
RomainR.
ST Employee

Hello @MEde.1 

 

1°) To be able to configure the OPAMP1 and ADC1, you must first configure the GPIOs in the Pinout View.

Right Clic on PC4 and choose OPAMP1_VOUT.
Right Clic again PC4, then press Ctrl and choose ADC1_INP4.
Right Clic on PC5 and choose OPAMP1_VINM.
Right Clic on PB0 and choose OPAMP1_VINP.

RomainR_0-1701960741885.png

RomainR_1-1701960788011.png

 

2)° Then select ADC1, enable Cortex-M7 (or M4) 
Enable IN4 Single-ended, PC4 change from yellow to green.

RomainR_2-1701960888445.png

3°) Then select OPAMP1, mode PGA Connected-INVERTINGINPUT_IO0.
PC5 and PB0 change from yellow to green.

RomainR_3-1701961003357.png

4°) Finish the configuration of ADC1 and OPAMP1 according to your application.

 

And my answers to your first question below: 

<I think that the hardware connections should be, ground from microphone to AGND, VDD on microphone to VDDA, output from the microphone to PB0 (OPAMP1_VINP). Do I need to connect anything to VINM? >

I'm referring to RM0399 Rev4, chapter 30.3.4 OPAMP modes.

If you want to use OPAMP1 in Programmable gain amplifier (internal PGA) mode, in STM32CubeMx you should select OPAMP1 Mode = PGA Connected-INVERTINGINPUT_IO0.
In this case, the programmable gain is 2, 4, 8 or 16 (OPAMP1 Parameter Settings Tab)
This configuration will expose the following GPIO assignment.
PC4: OPAMP1_VOUT
PC5: OPAMP1_VINM (must be left unconnected as the PGA is internal and where the resistor bridge is referenced to VSSA, see Figure 228 in RM0399 )
PB0: OPAMP1_VINP, connected to your microphone (referenced to VSSA)

I hope it will help you.
Let me know?

Regards,
Romain,

 

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.