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

11 REPLIES 11
Apill
Senior

@Nickname16262 (Community Member), In response to your answer above, I assume the sampling period has to be greater than or equal to the maximum frequency component of the signal.

How ADC sampling period is related to source impedance ???

AvaTar
Lead

> How ADC sampling period is related to source impedance ???

Check general resources about ADC working principles.

Sampling time is the time span the Sample&Hold capacitor is connected to the input voltage.

The source must be able to charge this capacitor up across the input impedance(s).

The shorter the time, the higher the current needs to be.

A simple model with a switched voltage and a RC element will give you a good estimation.