| ??? 04/03/03 01:14 Read: times |
#42795 - Software controlled Voltage Booster. |
I am in the middle of trying to make an 8052 controlled voltage booster. The ASCII schematic below shows the basic circuit concept I am working with. It is intended to be driven off the 9V battery that powers the system and to boost the HV (high voltage) up to a level of about 25 volts.
+Vbatt o---UUUU---o---|>|---o---o--o HV
---------------+ 100uH | ES2D | |
8052 Type | | X |
microcontroller | +--+ 1M X = 220uF
| |A X |
T2OUT |------0---|| N-FET | GND
| | +--+ o--+
| X | | |
| 10K X | X |
| X | 110K X |
| | | X |
| GND GND | |
| GND |
| |
A/D |--------------------------+
IN |
---------------+
So far I have made the control algorithm work as follows: 1) The Timer 2 is programmed to produce a pulse train out the T2OUT pin. This will be a software variable frequency with a fixed 20 uSec high going pulse to switch on the N-Channel MOSFET. 2) An A/D input is monitored, via the external voltage divider, to let the software know what the current high voltage is. 3) I setup another timer that runs at 25 Hz rate to be used as a sampling uppdate for the high voltage regulator. At each sampling time the current high voltage is sensed and compared to the high voltage level that is needed. If the current voltage is higher than needed then the T2OUT is shut off and set low till the next sample period. If it is lower than the amount of high voltage needed then I subtract the two readings (in units of A/D counts of error) and arrive at an error value. Right now I limit the max error value to 63 and then use the error value to index into a lookup table. The content pulled from the lookup table is a frequency setting for the T2OUT pin. (Table actually has 16-bit timer period values). If frequency setting for the timer is different from the current timer setting I then re-program the timer to start operating at the new frequency. So far I have found that it is possible to find a set of table values that permit the high voltage to settle into a reasonably stable voltage as long as the load on the HV output stays relatively constant. However I have found that if the load on the output varies over time then the high voltage may not be able to get up to the level desired. My algorithm does not have any type of built in correction to try to compensate for the error caused by varying loads on the output. Can anyone on this forum engage in discussion with me on how to add this type of compensation to the voltage control algorithm? I know it has to be possible to do it!! The customer I am doing this for used to have an external MAXIM voltage booster chip to do this function in hardware. It was decided to try software instead because it reduced the cost of the circuit implementation about $3. All of the components you see in the diagram above were present around the MAXIM chip plus a few others. Thus the cost savings. This customer builds high volume consumer 'things' and so it is extrememly interesting to save $3 whenever possible. Unfortunately I think my brain is on vacation regarding control systems concepts and I am not seeing how to add in the compensation I need. I think it has something to do with keeping track of the error from one sample period to the next - but in what manner. I am also not sure if the idea of using a 25 Hz sampling period is good or not. Maybe I need to be using a sampling period of 100 or 500 Hz. Can anyone help? Michael Karas PS..Please note that in the actual hardware design there is a shottky diode installed from the A/D input on the micro controller toward the Vcc pin of the microcontroller so as to protect the microcontroller from latch up upon power down should there be siginificant charge left im the 220 uF HV capacitor after the microcontroller Vcc pin has gone down toward ground. MJK |



