View previous topic :: View next topic |
Author |
Message |
miky_boy
Joined: 11 Jan 2008 Posts: 8
|
Output_low not 0V |
Posted: Wed Nov 05, 2008 10:47 pm |
|
|
Hi guys, I made my program and I use some ports of the pic to make a selection of an opamp gain. To make this selection I use only output_low and output_float in pic ports connected to a some resistances, when I use output_float it put high-z so it's okay, but when I select output_low it doesn't send 0V, it sends around 10mv. With this value it change the final result in opamp, because the input voltage is so low too.
In the ground at LM7805 the value is 0V fixed, but in port of pic isn't.
I searched a lot but I can't find any similar situation, if anybody can help me or have suggestion I will be very appreciative.
Very thank's in advice.
Strong regards,
Miky |
|
|
dbotkin
Joined: 08 Sep 2003 Posts: 197 Location: Omaha NE USA
|
|
Posted: Wed Nov 05, 2008 11:26 pm |
|
|
Take a look at the data sheet. There is no minimum spec for VOL, but there is a max. Its 0.6V for the chip I happen to be looking at, and it's probably similar for all of them. In short, there's no guarantee the low output voltage will be zero. Considering you're looking at a MOSFET with some amount of ON-state resistance, you're probably never going to see exactly 0V. It's probably also going to vary somewhat with supply voltage, temperature, etc. |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Wed Nov 05, 2008 11:53 pm |
|
|
As a simple fact, a CMOS digital processor output is no analog signal, although it can be used for this purpose in many cases (e. g. for 8 or 10-Bit accuracy). The observable residual voltage has two main sources: finite on-resistance of the output driver when sinking current and voltage drops at the uP internal ground net.
If you need analog signal quality with a digital signal, you should use an analog switch. Also a separate single gate driver may overcome the problem of voltage drops. However, you should be aware, that an analog switch and even a mechanical relay have finite on-resistances.
You should study professional circits, e. g. of measurement equipment, how they handle similar problems. Also major analog IC vendors (Analog, TI, Maxim, Linear) applications notes can be expected to present solutions that don't depend on partly unspecified properties of digital components. |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Thu Nov 06, 2008 7:00 am |
|
|
A better way to do this is to have the PIC drive a discrete MOSFET to switch your analog signal. Digital PIC pins have very loose voltage specs and tend to be noisy too. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
try this part |
Posted: Thu Nov 06, 2008 11:40 am |
|
|
Typically where a LOW offset from ground is required
I use an 2n7000 or 2n7002 for up to 50 ma current SINKING.
Pic drives the drive gate thru 270 ohms with a shunt to
ground of 10k or so.
Even with 50 ma and a 12V source on the MOSFET side - offsets as low as 20-30 mV are possible. |
|
|
miky_boy
Joined: 11 Jan 2008 Posts: 8
|
|
Posted: Fri Nov 21, 2008 11:52 am |
|
|
Hi guys thank's to all answers.
Okay I don't know that in datasheet says this problem, we never look at the final pages , but yes I found it and I understand the problem.
I look around and I see analog switch like some of you said, and it's done, I used 4066 and it's work great, I have only to change the pic output ports to high and low, before is low and hi-z, and I had 0v in output of this 4066 device.
So I have to thank to all that help me in this question, I'm so sorry to this delay, but only now this project it's done and I have finished my high-school.
Very thank's and strong regards |
|
|
|