PDA

View Full Version : A PIC logic 0V output is not equal to a ground?



HankMcSpank
- 16th November 2009, 16:37
I've put a question mark at the end of the Subject heading, but I can kind of answer my own question!

If I physically ground the +ve input to this opamp pin (using a flying lead to connect the pin to ground), the opamp's output inverts vs the input (as it should)....

http://img24.imageshack.us/img24/7376/invnoninv.gif (http://img24.imageshack.us/i/invnoninv.gif/)

but if I then change by connecting that same opamp pin but directly to a PIC pin & then set the PIC pin as an output 'LOW' - weird stuff happens (the output from the opamp looks akin to a full wave recified signal - ie where the negative cycle is flipped up)

So, a PIC's 0V ouput isn't ground? (no laughing at the back - I might be stating the obvious to you, but not to me!)

What would be my best option to ground that opamp pin under PIC control? (I've tried a CD4066 with poor results - same thing ....the opamp's output looks full wave rectified!)

Macgman2000
- 16th November 2009, 17:22
Try a low gate voltage (1.5v or 2.5v) NFET, something that will handle low current. That should work reliably.

Nick

Acetronics2
- 16th November 2009, 17:35
Hi Hank,



the opamp's output looks full wave rectified!)



Quite annoying for 180° out of phase looked for ...



The good question might be : what does my OPA do with inputs tied to ground ???

This is generally called " Common mode Input Voltage Range "

RTFDatasheet ... in short terms !

741 ( ! ) or 5532 AOP ???

also remember PIC pin must be OR left floating OR Grounded ....

Alain

HankMcSpank
- 16th November 2009, 19:27
Hi Hank,

The good question might be : what does my OPA do with inputs tied to ground ???



I wouldn't know how to interpret the opamp datasheet for that kind of thing! But I do know when I hardwire the Opamp's +ve pin to ground...the circuit performs as expected (input signal is inverted)...remove the ground & the input is non inverted at the ouput. However when applying a PIC output low in the same manner - eeeeugh. That particular circuit is a fairly generic circuit & not specific to any particular opamp variant.

Nick, I'll give that a go, but I'm not confident - if a CD4066 doesn't work in situ (which as very low channel 'on' resistance), then it's likely to have a similar outcome!

Acetronics2
- 16th November 2009, 19:41
So, use MacGman idea ...

a 2N7000 or 7002 will do it !!!

BTW ... which is the OPA supply voltage ??? ...

Alain

falingtrea
- 17th November 2009, 18:47
Yes, most digital logic outputs are not purely ground. The are guaranteed to be within a certain range close to 0, usually 0.2 v which is typical VCE of a saturated transitor. For your application, the lowest Rds FET you can find would work best. Also make sure it can be controlled by a 5VDC signal. Like a BSS138LT or Si4410BDY or IRLL014N.