Capacitive divider interfaced with ADC - Help needed in board debugging

Thread Starter

mishra87

Joined Jan 17, 2016
1,034
Hi all,

I am opening this thread with actual tested results.
Please find attached waveform & schematic.

I did not get expected results as per simulation.
Please help me out to get the right results.
CH1(yellow) : PWM Signal
CH2(green) : Opamp output

use shorting link in place of sensor as done in above simulation.
 

Attachments

Thread Starter

mishra87

Joined Jan 17, 2016
1,034
Hi All,

I tried testing with 100Khz but still not able to get the correct output.
Case 1: When sensor is not connected (means there is no shorting link)
Vout : 2.65V
Case 2 :
When sensor is not connected (means there is shorting link)
Vout : 2.45V

So I do not see any changes in either cases.

Could anybody help me.

Thanks
 

Attachments

Thread Starter

mishra87

Joined Jan 17, 2016
1,034
Your post#44 schematic looks wrong. Why are there two100pF caps in series?
Thanks for your inputs.
You are correct there is clerical mistakes i have done while drawing the schematic.
This circuit we have already discussed in simulation. I have implemented the same in application and now trying to debug the same on board but not getting the expected results as simulated.
for your kind information my Board is correct. i only made clerical mistake today before posting the thread.

Could you suggest some changes to get the expected results ?

Thanks .
 

Attachments

Thread Starter

mishra87

Joined Jan 17, 2016
1,034
What signal is being applied at the 'From MCU' terminal?
Hi Alec_t,

A 100KHz PWM signal is being applied from MCU to drive capacitive divider.
Waveform of MCU Output and ADC are already attached in post #44.
Consider two cases for application : when sensor is connected Vout should be half of Vin and when sensor is not connected Vout should be Vin.

Please guide me.

Thanks .
 
Last edited:

ebeowulf17

Joined Aug 12, 2014
3,307
How certain are you of your schematic layout, and also of the component values?

I can easily sim a circuit and get results like on your scope, but only with some rearranging. Is it possible your input caps are arranged differently than what you've drawn?

Also, that's not a 100kHz square wave, but closer to a 50Hz square wave (off by a factor of 2000!) If you fed an actual 100kHz square wave in as the input, the decay time would look more appropriate, and the signal to the ADC wouldn't have time to settle at 1/2 supply voltage as long as the pulses kept coming.
 

Thread Starter

mishra87

Joined Jan 17, 2016
1,034
How certain are you of your schematic layout, and also of the component values?

I can easily sim a circuit and get results like on your scope, but only with some rearranging. Is it possible your input caps are arranged differently than what you've drawn?

Also, that's not a 100kHz square wave, but closer to a 50Hz square wave (off by a factor of 2000!) If you fed an actual 100kHz square wave in as the input, the decay time would look more appropriate, and the signal to the ADC wouldn't have time to settle at 1/2 supply voltage as long as the pulses kept coming.
Hi ,

Thanks,

Correct schematic is post #46
Correct waveform is in post #44

Yes I can rearrange the capacitor on board.

Regards,
 

ebeowulf17

Joined Aug 12, 2014
3,307
Hi ,

Thanks,

Correct schematic is post #46
Correct waveform is in post #44

Yes I can rearrange the capacitor on board.

Regards,
I see, sorry about that. I had misunderstood your comments and didn't realize that post 44 was the only one at 100kHz. Makes sense now.

I think @Alec_t is on the right track. It wouldn't take all that much extra capacitance to create the waveform in post 44. Breadboards are notorious for that.
 

Alec_t

Joined Sep 17, 2013
14,280
The slew rate of the opamp seems to be a limiting factor, judging by the waveforms shown. You might get better results with a simple push-pull buffer, as below, or even just an emitter-follower :-
CapDividerBuffer.gif

Note that this needs a supply above 3.3V to give some headroom.
 

Attachments

Last edited:

Thread Starter

mishra87

Joined Jan 17, 2016
1,034
The slew rate of the opamp seems to be a limiting factor, judging by the waveforms shown. You might get better results with a simple push-pull buffer, as below, or even just an emitter-follower :-
View attachment 190723

Note that this needs a supply above 3.3V to give some headroom.
Hi
Alec_t,

Thank you so much for your effort.

We have already done simulation if you see the right from starting the thread.
Now we have build up the design in PCB board.
As we moved ahead in project leaving the poc phase so at this stage it would be very difficult to redesign the circuit and again go for PCB manufacturing & validation. Changing the hardware affects project timeframe.

So it would be very helpful for us if you suggest some solution on same hardware & circuit.
i.e. tuning the capacitor value and charging discharging time
finding some other Opamp with higher slew rate with same footprint.

I would really appreciate if some more people participate in discussion

Thanks once again for your proposal..

Regards,
 

ebeowulf17

Joined Aug 12, 2014
3,307
Why are you using 100kHz signal for water detection? How quickly do you really need to be able to detect water level changes? In most applications I've seen, 10-100Hz (or less) would be more than adequate.

Of course, if you slow down the pulses, you'll have to adjust input capacitor values and/or adjust your code so it knows what to expect at ADC input.

It would ease the slew rate requirements though. Food for thought.
 

ebeowulf17

Joined Aug 12, 2014
3,307
Try removing the 100R and 100nF from the opamp output. Why are they there?
I think post 30 indicated that they're meant to simulate the input characteristics of the ADC input. Although, the values of both components have changed quite a bit since that post.
 

Thread Starter

mishra87

Joined Jan 17, 2016
1,034
The present values are unrealistic, particularly the 100nF (which was originally a much more realistic 4pF).
Hi all,

Sorry for late reply.
I did not get time to work out on the same.

I removed 100R and 100nF of output of Opamp and still I am not getting any good response.
Please suggest me your findings.


Waveform : 1nF is open
1nF is shorted with cap divider

Thanks
 

Attachments

Top