cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any specific hardware connection for ADC signal to setup for a AC signal ? My code works with a potentiometer but not with AC signal (updated with image), Solved

Apill
Senior

I am trying to convert a signal from accelerometer to a digital value. The output coming from accelerometer is in mv so I have added a non inverting voltage amplifier, then too I am getting a dc voltage at the output of opamp so I have added two capacitors to eliminate dc voltage in my signal. Here are my issues,

When I tried have connected a potentiometer and tried, I didnt find any issues, ADC is working perfectly but when I am trying to connect the output from the capacitor to PA1 and ground, I could not able to get the reading from controller!!!! I mean the voltage across capacitor is dropping to mV . I have measured the voltage across capacitor in oscilliscope by not connecting to PA1 its working perfectly, peak to peak is coming at 4V when vibrating.. but the moment I connect the ouput from capacitor to PA1 and measure the voltage across PA1 to GND. its dropping to mV in which i cannot do the data acquisition.

 

Are there any hardware connections/ biasing I need to do for acquiring an AC signal?

I am using a STM32F429 discovery board, Keil, ADC is in interrupt mode. Kit is powered through USB via computer.

https://drive.google.com/open?id=1S_W7tXZgMwFcIQ1TJsEK5ybjGHp9yLB4

1 ACCEPTED SOLUTION

Accepted Solutions

On the F429I-DISCO board the PA1 pin is connected the interrupt pins of the gyroscope

Try the experiment with PA5 (ADC12_IN5), it doesn't look to be used by the board itself.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

11 REPLIES 11

You need a voltage between 0-3V, not up to 4V, and you need to be able to provide enough current to charge the sampling capacitor used by the ADC.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Apill
Senior

@Community member​  agreed for 3 V, any specific reason for voltage across PA1 to Gnd changing to mV as soon as I connect PA 1 to capacitor ? before connecting to PA1 voltage is around 4V.

Because you suddenly applied some load, and have no charge/energy there?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Dvorak.Peter
Senior II

To AC couple a signal to the ADC input you should bias the input with 2 2kohm resistors. One resistor is connected to ground and the other to 3V supply (reference )

The ADC sampling period should be adjusted for this source impedance.

Also limit your signal peaks to 0 to 3V max.

AvaTar
Lead

Capacitive coupling of the opamp output means you have the coupling capacitor and the S&H capacitor in series.

Not sure if this is what you want. Or stated differently, I'm sure this is not what you want.

Apill
Senior

@Community member​ , @Community member​ I have updated with a google link which opens the image of the schematics, I have removed capacitor after seeing the feed back. Then too the input driving to analog input goes to mV ( less than 300mV) as soon as i connect the analog input pin to the output of opamp.

Apill
Senior

@Community member​  In response to you post, I assume after some time in few seconds the ouput has to change. but it didnt.

On the F429I-DISCO board the PA1 pin is connected the interrupt pins of the gyroscope

Try the experiment with PA5 (ADC12_IN5), it doesn't look to be used by the board itself.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Apill
Senior

@Community member​  you made my day.. I have been working on this for a week !!! thanks a lot!!! its working now.