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 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.
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.
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.