News:

Let's find out together what makes a PIC Tick!

Main Menu

Ideas for a PIC controlled HV PSU

Started by kcsl, Nov 12, 2023, 04:53 PM

Previous topic - Next topic

kcsl

I've got a DC PSU that will put out 100v and I wanted to make a PIC controlled bolt-on that allows me to enter the voltage required using a keypad instead of a pot. I'm only wanting 20mA or so from this device.

When I started thinking about how to do this I realised that it's much harder than I though. Using OpAmps is out as I can't find any that work past around 35v and digital potentiometers have a similar maximum voltage rating.
I'm starting to realise why so many bench PSU's only go to around 35v.

I found a couple of service manuals for commercial bench PSUs on-line that can do highish voltage but they seemed to be based on a switch mode design, and I'm looking for something much simpler and crude.

After some experimentation the only solution I can come up with that may come even close is to use an LR8 high voltage regulator, with an LDR with a LED glued to it and vary the brightness of the LED, but that feels a bit clunky.

Does anybody have any suggestions for how this could be done, or better still, a nice circuit diagram I can grab the interesting bits from?

Thanks,
Joe



There's no room for optimism in software or hardware engineering.

John Lawton

You didn't say what adjustment range you want, but this circuit or something like it might do the job. https://i.stack.imgur.com/pBaHV.jpg The pre-regulator ensures that the LM317 is never over-volted. You could use a digi-pot in place of R7 but change the resistor values a bit to reduce the power dissipation in the digi-pot at maximum output voltage.


gtvpic

#2
Hello
I make reference power supplies for 300Vpeak peak tests, I used PICs for many years, but since the pandemic I was forced to change processors due to lack of availability

I use APEX trades, they are not cheap but they work very well, as long as you don't push them to the limit

Be very careful with high voltages, especially anything that exceeds 200Vdc.  :-X  :-X  :-X

Here you can find a lot of information.
https://www.apexanalog.com/products/matrix_high-voltage.html
I usually use the PA95 with some output transistors to increase the intensity


Good luck with the design

kcsl

Thanks John,
An interesting circuit... I would never have thought about putting HV into a common LM317. I've got the bits to put together something close to that so will have a play. I'll have to try lowering the zener / reference voltage a bit for the digi-pots I've got but it's a place to start.

As for adjustment range, I'll be happy with anything from around 10v up.

Regards,
Joe
There's no room for optimism in software or hardware engineering.

kcsl

Those are interesting parts gtvpic, thanks.
Bit out of my price range unfortunately as I would need 4 of them for my finished project, but I may ask for a sample to experiment with.

Regards,
Joe




There's no room for optimism in software or hardware engineering.

John Lawton

Quote from: kcsl on Nov 12, 2023, 07:09 PMI'll have to try lowering the zener / reference voltage a bit for the digi-pots I've got but it's a place to start.
Oops. As you say, the pot would have to withstand the output voltage (less 1.4V) and I don't know a digital pot that would do that. The voltage across R8 is only the LM317 reference of 1.4V so the digital pot could be used there as long as you could power and control it as it floats up and down with the output voltage. Tricky.

I'll have another think.

John

John Lawton

See the attached. This is an old design for a high voltage pulse amplifier. The gain is x10 so 0-10V input gives 0-100V on the output. It could be simplified if you don't need to generate short risetime pulses by omitting Q4 and if you don't require current limiting by omitting Q2 and associated components.

I hope that is of some help.

John

Stephen Moss

Just brainstorming here but depending on what voltage range you need (as it may not work that well at the lower end) could you use the PIC to control the firing of a Triac as the primary (course) voltage control method, you will probably require a large smoothing cap to maintain the voltage given the time between input refresh but as there will only be 20mA draw from it it should be possible to find one that would allow the voltage to be maintained.
Theoretically the later in the phase it fires the lower the AC voltage going into the Bridge rectifier, thus you would get a corresponding smaller DC voltage output.

You could then possibly use a resistor and Zenner combination to create a floating ground voltage that sits say 10V below that of the rectifier output, and then use a standard adjustable regulator circuit power by that for the fine voltage adjust.

On second thoughts, I am not entirely sure that would work but am posting it anyway in case someone here wants to give it some thought (and tell me I'm talking nonsence), there are still issues I have not resolved such as...
How would you initially regulate the voltage at powerup, a secondary supply to power the Triac controlling PIC?
Then how to ensure the Triac stay off until the PIC has started to avoid the PSU potentially outputting the full voltage at switch on which may damage whatever is attached due to overvoltage? Maybe a PIC driven relay that keeps the DC voltage disconnected from the external terminals
Finally how to measure the output voltage to give feedback if you want to be able to adjust the fining on the fly for precise rather than approximate output voltage.

ricardourio

#8
I use DAC MCP4728 to control a boost power supply from 30 to 300 Vdc within 1% error, acting at feedback pin of UC2843, after current amplified by a LM358. You need to "map" input voltage x output voltage at 3 or 4 points, and then set the MCP4728 output with needed corrections. So I guess you can change your pot by a PIC + MCP4728 + LM358.

Ricardo Urio

david

Variant on John's circuit.  Short circuit protection could be added.

David

John Lawton

That looks like a good circuit. It could be fed via PWM or a digital pot. What about the 110V supply, is that a problem for you, Joe?

John

david

If you've got something like 16kHz PWM then C2 and C3 can drop to 1-2uF.   
R2 may need to change depending on the threshold of Q2. 
Biggest trick might be getting it to be stable.

David

top204

Excellent circuits, but they puzzle me.....

What is generating the higher voltage? There is no inductor in them to store the pulsing energy and release it at a higher level when it is in resonance?

Every voltage boost circuit I have seen, and built in the past, that could actually supply some current with the higher voltage, always had an inductor coil and a rectifier or two after the MOSFET or transistor switching it?

kcsl

Les,

Those two circuits are already being supplied with a separate HV source.
All I'm trying to do is regulate it; without the op-amp exploding in my face.

Regards,
Joe
There's no room for optimism in software or hardware engineering.

SeanG_65

What about using a tapped voltage multiplier (diode ladder) and driving it using PWM? You could tap off whichever voltage you needed then and take the voltage up to 1000's.

kcsl

Quote from: John Lawton on Nov 13, 2023, 12:28 PMSee the attached. This is an old design for a high voltage pulse amplifier. The gain is x10 so 0-10V input gives 0-100V on the output. It could be simplified if you don't need to generate short risetime pulses by omitting Q4 and if you don't require current limiting by omitting Q2 and associated components.

I hope that is of some help.

John

John,
Initial experimentation demonstrates the circuit seems to work as expected with just a couple of tweaks. The input resistor changed to 47K makes it respond better to a my maximum 5v input and as you said, everything around Q2 and Q4 can go - I only need a few mA for my application. Running the op-amp from a separate 12v meant I could drop the Zener (and allows for testing at lower voltages). I just need to program a PIC to output a PWM via the internal DAC since I've discovered my pulse generator output won't go below 2v which is rather annoying (another Christmas project on the list), but so far it all looks promising. I may add some voltage feedback into the PIC's ADC and get it to trim the output voltage. Luckily I've a box full of those high voltage MPSA42 transistors from my Nixie clock designing days, so I think I'm good to go. Thanks for your help. Regards, Joe
There's no room for optimism in software or hardware engineering.

kcsl

Quote from: SeanG_65 on Nov 16, 2023, 01:24 AMWhat about using a tapped voltage multiplier (diode ladder) and driving it using PWM? You could tap off whichever voltage you needed then and take the voltage up to 1000's.
It's an interesting idea but I only needed 100v and the output voltage wouldn't be PIC controllable.

Regards,
Joe
There's no room for optimism in software or hardware engineering.

kcsl

Quote from: david on Nov 15, 2023, 06:38 AMVariant on John's circuit.  Short circuit protection could be added.

David

I'll need to experiment with this circuit, but won't pin 2 of the op-amp just end up with a steady DC voltage after passing though R5, R6, C2 & C3 ?

Regards,
Joe
There's no room for optimism in software or hardware engineering.

John Lawton

Into the inverting input (-)? Yes, I think so, but the op-amp receives negative feedback into the non-inverting input (+) and this works because the action of A1 and Q2 is an overall inversion so this should work as expected.

SeanG_65

Surely using PWM you could control the voltage, OR, you could drive an RC circuit to emulate a DAC, or even use a REAL DAC, feed that into a coil, then use the coil as a "Ruhmkorff coil" or in the same way a car ignition coil works. That would give you control over the voltage.