CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Voltage inverter

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Agios



Joined: 28 Jan 2006
Posts: 8
Location: Brighton

View user's profile Send private message

Voltage inverter
PostPosted: Sat Jul 15, 2006 5:02 am     Reply with quote

Hi everyone, I believe that most of you have used an op amp which requires a negative voltage rail. In my occasion I am building a battery operated device that needs a -5 Volt source. Has anyone any simple and quick suggestions on how to achieve that? Any suggestion will help! I am using a 9 volt battery and LM7905 negative voltage regulator!! Apologies for posting in a microcontroller related forum. I am really comfused. Thank you all in advance



Agios
Sherpa Doug
Guest







DC inverter chip
PostPosted: Sat Jul 15, 2006 6:52 am     Reply with quote

Look at a ICL7660 by Maxim. It will take your +9V and turn in into -9V, or you can give it +5V for a -5V.

SherpaDoug
C. Turner
Guest







Re: Voltage inverter
PostPosted: Sat Jul 15, 2006 10:28 am     Reply with quote

Often, when you need a negative voltage for an op amp, you really don't need a *regulated* negative voltage, or even a symmetrical negative supply: The very nature of a good op amp is such that neither power supply need be regulated or even filtered well - as long as the output stays sufficiently far away from the respective supply rail.

In order to keep the chip count to an absolute minimum, I've had good luck in using the PIC itself to generate the negative voltage for an op amp, toggling one of the pins in software and then connecting a charge-pump inverter to it (a couple capacitors and a diode.)

The obvious disadvantage is that requires that there be at least one "unused" output pin on the PIC (and it MUST be one that will both source and sink current) and that this pin must be toggled for as long as one needs the negative voltage.

In many cases, one can put such a toggle in the main() function while in other cases, one may already have an ISR running at a few hundred Hz or a few kHz and a simple pin-toggle may be placed in there, while in still a few other cases, you may have hardware available (and unused) that would allow a completely "hands-off" means of doing this (e.g. a PWM output, etc.)

If the PIC is running from +5 volts, it is easy to get a -4 volt supply capable of sourcing at least 10 mA. Higher voltage (but lower current) may be obtained by using a different arrangement of capacitors/diodes and this circuit can even be wired to provide positive voltages.

(I couldn't conveniently post ASCII art of this simple circuit and maintain formatting, but such a circuit is easily found, often using the venerable 555 timer)

I've used this scheme several several times, usually using an ISR running at 1 kHz or so (which was also used for timing by the program) to run an op amp carrying audio, but I've also used it for outputting/inputting re-scaled A/D and D/A values as well as with an op amp section wired to output serial data on an RS-232 port (although not all of the above at once:-)

CT
Kenny



Joined: 07 Sep 2003
Posts: 173
Location: Australia

View user's profile Send private message

PostPosted: Sat Jul 15, 2006 5:11 pm     Reply with quote

I usually use the ICL7662 charge pump inverter to get the negative rail.

As mentioned by C. Turner, the voltage doesn't need to be well regulated or the same as the positive rail to the op. amp. The relevant specification in the op amp's data sheet is the change in output with power rail voltage change, but usually it's not a problem.
Another consideration is that many op amps need some 'overhead' - for example for the LM324 the power rail should be be at least 2 volts more than the signal level to avoid clipping of the signal.

However, if there is a RS232 level shifter like the MAX232 on the board, there is a negative supply (pin 6) that can be used for the negative rail.
Not much current should be taken from this pin though.
I have used this method to level shift a signal from a transducer to get it within the 0 to +5V range of the pic's analog to digital converter. Sherpa Doug has mentioned this method before on this board.
Agios



Joined: 28 Jan 2006
Posts: 8
Location: Brighton

View user's profile Send private message

PostPosted: Sun Jul 16, 2006 3:38 am     Reply with quote

Thank you all for replying. I am going to implement some of the recommendations and I will let you know.


Agios
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group