PIC 16f88 based variable bench power supply help

Microcontroller Topics
Post Reply
User avatar
nipunawg
Posts: 2
Joined: Mon Feb 06, 2012 2:17 pm
Location: Kandy

PIC 16f88 based variable bench power supply help

Post by nipunawg » Wed Mar 13, 2013 7:57 pm

hello everybody :). I'm Nipuna from the Aruppola Technical college. My course is NCIT Electrical And Electronic Engg.

We're in the sophomore year and have to do a project. Our group decided to go for a bench power supply since we already had an old UPS which we could scrap for most of the parts (4 FETS, 650VA transformer).

our idea is to rewind the transformer for 30V-0V-30V (its currently at 18-0-18 if I remember right), then use the PWM modules of a 16F88 on the FETs to vary the output current/voltage using a buck converter configuration. ( or just use buck-boost instead?)

Right now, I've 2 problems for which I request your help.

1) what is the best current metering method for this config? i need a readout accurate to 1mA- eg: 853mA (display consists of three 7-segments) for currents below 1A, and 100mA (eg- 09.2A) for currents above 1A (max current is ~10A).

2) <I'm new to PIC programming.> I'm thinking of using the F88's comparators to do the regulation job (set Vref= value proportional to required output voltage and then increase/ decrease duty cycle on occurrence of interrupt as relevant),

but I don't know if it's possible to change the comparator reference voltages on the fly (which is how I'd change the output V), or whether it'd be more practical to just use the outputs of the ADC which I'd be using to measure output voltage, to do the job) I'd be very thankful if you could shed some light on this :)
User avatar
SemiconductorCat
Major
Major
Posts: 455
Joined: Mon Aug 22, 2011 8:42 pm
Location: currently in hyperspace

Re: PIC 16f88 based variable bench power supply help

Post by SemiconductorCat » Fri Mar 15, 2013 7:56 pm

You mean configuration.
1. Since you have a transformer isolation, buck converter is oky.

You have to decide the operating switching frequency, then you have to decide the inductor value, then
maximum current through the inductor, then it should provide some headroom against core saturation.
You have to do stress checking against those items.

If you only willing to down stepping then there's no need of buck-boost converter topology.

And when selecting the switching frequency, high frequency is fine for many reasons.
1. Fast response time.
2. Low output capacitor value.
3. small core size of the inductor.

But the disadvantages are.
1. High hysteresis loss.
2. High frequency switching electronics come with a price.
3. high frequency componment will generate EMI (electro-magnetic interference and sometimes lead to
hum in audio system).

>>
1) what is the best current metering method for this config? i need a readout accurate to 1mA- eg: 853mA (display consists of three 7-segments) for currents below 1A, and 100mA (eg- 09.2A) for currents above 1A (max current is ~10A).
>>
All the configurations that I have reviewed , it they have use a serious 1ohm 5W like resistor to current sensing.
So it's accuracy is depending on it's tollorance value. High accurate resistor could be made using a FET, see the
configuration , FET as a variable resistor,so you could also calibrate it as you need. But I never seen a configuration
which uses FET as a variable resistor before. But this could be easily implemented.

high precision resistors were build by laser trimming. But I don't think even Aptinx like company in SL have process
that technology. I don't know how much it is fesable for you to , I mean for accurate as 7 digits.

As a person who learn electronics , I could suggest these alternatives.
1. Current transformer method.
2. Current mirror method. [you could configure current mirror to mirror 0.001 part of the original current flow].
3. If you need to compare currents , study the mechanism used in the RCCB switch, same principle could also
be used, for a example a simple troid with three coils, one is feedback, primary and secondary. If say primary
coil runs 1A, and secondary coil runs 0.9mA and we have 1:1000 ratio , then there is a 10% unbalance that could
be identified by the feedback coil. I think you get what I'm suggesting.

>>

2) <I'm new to PIC programming.> I'm thinking of using the F88's comparators to do the regulation job (set Vref= value proportional to required output voltage and then increase/ decrease duty cycle on occurrence of interrupt as relevant),
>>

what you asking here is not clear. Are you asking the internal mechanism of it? if so there's a DA conversion, simply
aladder circuit. So did you understand what Vref used to and
how it generates voltage to be compared by Vref and digital bit value in a register. Simply if you know how that unit
works , then programming it is not a big deal.
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: PIC 16f88 based variable bench power supply help

Post by Neo » Sat Mar 16, 2013 9:25 pm

Since Semi has given some important points, I would like to add some of my ideas.

For 1, you would use a Hall effect current measuring sensor. The one of the following link can measure up to 20A. There are two more types coming in by next week for a custom order, we would add them too.
You can find it at TRONIC.LK

2. I think a comparator mechanism is not going to be suitable here. In theory, in a comparator we have V+ and V-. When V+ > V-, we will get HIGH output (Same supply voltage to the comparator, so for PIC micro, this is 5V), if V+ < V-, we get LOW. If a fixed threshold is there for either V+ or V- and you only need a HIGH or LOW to identify this, it's ok. But you need to dynamically adjust the duty cycle based on the voltage level. The most suitable method to use for this is an analogue input connected to a voltage divider arrangement which provides you the actual voltage. So based on that, you can dynamically adjust the duty cycle.

We can discuss further on these when you have started to do it.
Post Reply

Return to “Microcontrollers”