Jump to content
Electronics-Lab.com Community

How to generate negative voltage from PIC


Recommended Posts

Hi guys,

I'm new here at the forum, and I've been searching for a solution to my problem without any luck! I need to design a circuit, where I can control a negative voltage with a PIC (in this case, the AT-platform). I've got the PIC's PWM-function, as well as digital potentiometers to control the circuit. However, the PWM is limited from 0-5V+ DC, and the digital potentiometers have certain limits to the voltage at their taps.

The negative voltage should be -25 to -70 Volts DC. -50 Volts will also be OK if -70 is totally out of the question. So far, I've got a opamp working as an inverting amplifier, but even the best rail-to-rail model can only give me -22 volts from the +5V sources that I have. I thought about having the opamp controlling an elevated LM337 to get the -25V to -50V, but I can't get it figured out in my head, as I constantly bump into the limits of the PIC or the digital potentiometers.

Also, linearity is important for me. The PWM allows me a resolution of 8 bits - 256 steps. If this proves a problem, I'll use a DAC to get 1024 steps.

Does anyone have a clue as to how I can solve this?

Kind regards, Jake

Link to comment
Share on other sites


There are numerous different models of the PIC MCU and many of them are pretty affordable.  Have you tried using the pic to just perform a switching function, and then using an inductor, caps and a 555 to produce the levels you are trying to obtain?  The PIC should be able to monitor and control process by tracking a sample voltage that is stepped down to levels it can handle.

Link to comment
Share on other sites

Hi Jack, thanks for your reply!

I am having a hard time of conceptualizing your idea. However, the circuit that I am looking to integrate this solution into already has a negative voltage source, that I would just need to attenuate. It's like -80-90V, that I'm looking to get down to -50-25V. I would like to get some linearity. My digital potentiometers can't handle this voltage, and I was hoping to get some kind of solution that made use of the 8bit D/A's in my pic, so I could get a resolution of, say, 0,1V in that 25V of potential.

Is this impossible? I'm currently working with a optoisolator, however it's not nearly as linear as I could hope for, even though the manufacturer claims exactly that!

Link to comment
Share on other sites

  • 2 weeks later...

When I was talking about a buck-boost, I meant using the PIC as a controller not buying a pre-made controller-IC but if you already have a negative supply then you don't need a buck-boost converter.

I think you're already going down the right path with op-amps but you're correct in that finding one which will work up to 50V will be a problem and 70V is probably certainly out of the question so a buck-boost might be your only option after all, in which case you should read the Wikipedia article I linked to earlier.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...