While building up a simple
Seven-Segment LED Up-Counter Circuit a few weeks ago as a brain storming exercise, I thought a cool 7400 Series project would be to build up a "Buck" Switch-Mode Controller out of Logic Gates.
I had built up a few Analog & Digital PLL's before and I thought that might make a neat starting point for a switch-mode controller. Essentially a Digital PLL requires a Reference Frequency (Square Wave), a Digital Voltage-Controlled Oscillator, a Phase Detector (XOR Gate) and a Low Pass Filter. The Reference Frequency and the VCO outputs are the inputs to the XOR Gate (Phase Detector). The output of the XOR Gate is then feed into the Low Pass Filter which creates a DC error voltage. This error voltage is then feed into the VCO input; creating a feedback connection. As this circuit runs the error voltage will settle and the output of the VCO will become the same frequency as the Reference Frequency. What if the Low Pass filter was a typical Buck - Transistor, Diode, Inducator, and Output Cap. and the error voltage was the Output of the Buck Regulator? ..... that was my starting point anyway.
Below is what I came up with:
I built up a 90KHz reference Ring Oscillator using two 74HC04's. Then I built up a XOR Gate using 5 NAND 74HC00 gates. The VCO is based off the same 90KHz reference Ring Oscillator, but I added a capacitivly coupled MV2109 Varactor to vary the frequency when a DC voltage was applied through the 100K pot adjustment. The 5.1V zener diode was a vain attempt to prevent the Vout overshoot from affecting the VCO's output.... I'll explain this more later.
I used a TIP106 PNP transistor, a B321 Shottkey Diode, a 38uH 3A Inductor, and 3x47uF electrolytic caps as the "Buck" (filter) circuit. Since my XOR gate output was referenced to ground and the PNP transistor needed a Vinput based reference I used a 2N3904 NPN to couple the XOR output to the PNP.
Results:
I was able to get the basic converting circuit working. I used 16VDC as my input voltage and then adjusted the 100K pot to bring the VCO frequency closer to the Reference Frequency of 90KHz and I got 5VDC on the output.
Below are the waveforms:
Issues:
With the feedback disconnected (Vout to the input of the VCO) I was able to get the circuit to convert a 16VDC input voltage down to 5V reliably. With the feedback disconnected though any change on the input voltage will be seen on the output voltage and any load fluctuations will effect the output voltage as well. I wasn't able to get the VCO's output to stay stable enough when connected to Vout for regulation to work. The XOR Gate is a phase detector not a frequency compare; this means the output of the XOR gate when the VCO is 88KHz is pretty much the same as 92KHz. This is the overshoot problem I was hoping my Zener diode would take care of, but my VCO wasn't stable enough to not have the frequency overshoot and dialing in 5V was nearly impossible with the feedback hooked up.
Someone wise told me that "Experience is what you get when you didn't get what you wanted"... I got a lot of experience on this project. The XOR Phase Detector is probably not the right component to be used in this circuit since the phase polarity can not be distinguished and thus overshoot and run away is a problem when the feedback is hooked up. I ran out of time before the 7400 Series Logic Contest deadline, but I am still entering the "non-regulating converter" since I was able to get the 16VDC to convert down to 5VDC reliably (as long as the input voltage and load are constant).
Maybe I'll have an epiphany or kind reader will give me some hints as to how to prevent the XOR Gate Output from switching when the frequency of the VCO is greater than 90KHz in the coming weeks.