Proton BASIC Compiler - A simple wide-range, low-current switching regulator

  • PicŪ Basic

  • A simple wide-range, low-current switching regulator

    I was recently tasked with designing an LCD voltmeter that had to derive it's operating power from the circuit being measured, which could be anything from 12 volts DC to 400 volts DC or 10 volts AC to 277 volts AC. In the process of designing it I stumbled across an interesting chip- the HV9922 from Supertex. It is intended to be an off-line switchmode LED driver. Looking at the spec sheet, you'd think it is only good for 85-265 VAC input, but there is actually a lot more capability hiding within this chip. I'll tell you at the outset that the drawback is that it will only provide 50 milliamps (100 if you parallel two of them), but there are a lot of PIC circuits out there that will consume less than that.

    The spec sheet for the chip is here:
    An app note for use as a non-isolated supply is here:
    ......And an app note for an isolated supply is here:

    Let me distill some of the information from the APP notes for you:
    • The input voltage to the chip can be up to 16 times the output voltage, so for a 5 volt output the input can be up to 80 volts.
    • You're not limited to a 5 volt output. The output voltage is determined by the Zener D2 in the above diagram. If you wanted 12 volts at the output, just make D2 a 12 volt zener. The input voltage range would be from 19 volts DC to 196 volts DC
    • If you want a low voltage output but need a higher input voltage range, just add a dropping resistor in series with the inductor. You can easily make a 5 volt DC supply that can operate from 85-265VAC this way.
    • This is not one of the most efficient switching regulators, but it is one of the simplest and has an unusually wide input range. Think of it as a 50 milliamp constant current source.
    • This circuit is inherently stable since there is no feedback loop.
    Safety notice and disclaimer: You'll see in the application notes that you can easily build a non-isolated off-line supply. PLEASE BE CAREFUL!! Unless you know exactly what you're doing you can get hurt or killed because of the shock hazard.
  • Recent Activity


    Valid time in NMEA sentance

    Thread Starter: SimonJA

    Is there any way to know that a GPS nmea sentence has the correct time? I use a module to keep a pic rtc accurate but have noticed that when...

    david Today, 01:45 Go to last post

    I'm over the moon with joy. :-)

    Thread Starter: Les

    I just had to show you this, because I am over the moon with it. LOL I've just about finished procedures on the Proton 8-bit compiler so I am busy...

    joesaliba Yesterday, 18:19 Go to last post
    John Drew-26

    GPS speed logger for RC planes.

    Thread Starter: david

    Hi All, This is a simple project to allow the logging of RC plane speeds to help determine battery, motor and prop variables. The code is crude and...

    John Drew Today, 01:31 Go to last post