View Single Post
  #2  
Old - 6th November 2009, 02:28
Pic_User's Avatar
Pic_User Pic_User is offline
Registered User
 
Join Date: Apr 2006
Location: New Hampshire USA
Posts: 292
Lightbulb Just a thought....

Quote:
Originally Posted by HankMcSpank View Post
So I found this little circuit that works well for my needs - the circuit takes one small analogue signal into an opamp & when a SPST switch is flicked, the opamp output changes from non-inverting to inverting.

I've changed the circuit to illustrate my needs - it normally switches a ground to the non inverting pin - that's fine if you're using dual rail/supply opamp circuits - but all my circuit is single rail & therefore my opamp pins input pins aren't biased at ground potential ..........my circuit uses a single rail of 5V - therefore all my opamps are biased at VCC/2 .... 2.5V.

So therefore rather than switch a ground to the non inverting pin (which would have been easy to do with a PIC!) ...I'm faced with having to switch 2.5V - so I'm looking for a way to get the PIC to do this with the lowest component count possible! Also, I want to avoid relays as I just don't have the PCB real estate available.

Now Melanie touched upon a way of switching to 5V/0V from a mid 2.5V DC potential (http://www.picbasic.co.uk/forum/showthread.php?t=11163 ) ...but I can't see how I could use her clever little suggestion in this instance - because the cicuit above is an on off switch.

Any ideas?
Hi Hank,

Keep in mind I have never tried anything like this.

If you set Pin A to 5V and Pin B to 0V you should get the difference divided by the Voltage divider (2.5V).
If you set Pin A and Pin B to “float” you should get no voltage.

Just a theory, let us know about the reality.
May be too much noise on the floating resistors for your circuit.

-Adam-
Attached Thumbnails
Click image for larger version

Name:	Tristate.png
Views:	186
Size:	17.9 KB
ID:	3773  
__________________
Ohm it's not just a good idea... it's the LAW !
Reply With Quote