Maker Pro
Maker Pro

Removing DC offset

Hi
I have a 9V pulse at 4KHz.
This is slighty negative going to about 200mV.
I need this fed into a PIC to detect edges.
I used a diode to remove the negative oart of the signal. Then fed into a potential divider to divide by a factor of 3.
However the output is a square wave sitting on a dc offset of 2V. How can i remive the dc offset please? Any ideas would be appreciated. Please see my sketch to explain the problem.
Thanks in advance.20180312_195304.jpg
 
The -200 mV level could be a scope misalignment. Even if not, it is not a large enough undershoot to cause problems with a PIC input. So I don't think you need the series diode.

A text description doesn't convey enough information. Please post a schematic showing the signal source, attenuator, PIC (with pin numbers), and any other components. Pay particular attention to all power and ground connections.

ak
 
Hi
Ok thanks for the reply.
The diode can be removed. This 9V pulse still needs to be reduced to a level so it doesn't damage the PIC A/D (AN10) line.
It will be used to detect the edges of the signal. However the voltage divider has the square wave sitting on a 2V signal. This makes edge detection awkward.
So can I remove the DC offset easily?
Or can I do something with the 9V pulse to just detect the edges but have it at a level suitable for the PIC input.
Best regards
Raj
 
Sorry the pk to pk amplitude of the square wave is around 0.9V
I was thinking ti remove the voltage divider and have a RC high pass filter ie a differentiator circuit.
Having the value of RC less than Time of pulses.
Does that seem plausible?
Thanks.
 
You could fairly easily offset the "offset" using an opamp.
Can you give us a picture of a scope trace showing the signal and give it a ground reference using another scope trace if necessary?
 

hevans1944

Hop - AC8NS
With the "ground" lead of your oscilloscope connected to the bottom of the 10 kΩ resistor in your voltage divider, connect the oscilloscope probe tip to the cathode of the diode that is connected to the top of the 20 kΩ resistor in your voltage divider. You should see a square wave with a peak voltage of nine volts minus one diode forward-voltage drop, or about 8.3 V peak, assuming 0.7 V is dropped across the diode, which is typical for silicon diodes. The minimum value of the square wave should be 0 V, since the diode will block the minuscule 0.2 V negative swing you observe on the anode of the diode.

Now move the oscilloscope probe to the junction of the 10 kΩ and 20 kΩ resistors. You should see one third the peak-to-peak amplitude observed on the diode cathode, or about 2.8 V peak-to-peak and no DC offset. IF you do see a DC offset, there is something wrong with the "ground" connection of the 10 kΩ resistor. Find and remedy this problem before attempting to proceed.
 
Top