I have a very stable version of the Sigma Delta(ΣΔ) firmware to test with. I decided to use it to test the Voltage boost circuit. I started by populating the PCB with the voltage boost components. Definition: Populate a PCB means installing the components onto a board; this includes but isn’t limited to soldering.
Once Installed, I started modifying the code for a simple test. The first test is a sanity check. I disabled all functions other than sending an incrementing number out the serial port every 5 seconds. And then I ran into another problem. I had upgraded my install of Ubuntu studio to 16.04 earlier this week and now USB wasn’t working in the virtual machine. After a few hours of fiddling, I got it working and finally built and uploaded the test code. The terminal started counting as expected.
Next I turned on the ΣΔ and set the duty to 16. I figured out the prescaler with the following math. An inductor will reach approximately 2/3 saturation current after a given amount of time calculated by inductance divided by resistance. I am using a 2 μHenry inductor with an internal resistance of 0.25 Ohms. 2×10^-6 /.25 = 8×10^-6 or 8 μsesonds. So the most efficient use of the inductor will be between 4 and 8 microseconds. One cycle (pulse width) at 80 MHz is 12.5 nanoseconds. This results in a prescaler of 640 for an 8 microsecond pulse width. If I choose a prescaler of 255, I end up with a pulse width of 3.2 microseconds. This is a simplified calculation and I hope it will get me close enough. The PCB resistance, capacitors, and R5 all contribute in varying degrees. I also set GPIO16 as an output and drove it low to enable the voltage booster. And the code ran as I was hoping for. I measured the Vpp voltage at 5.93 Volts which is slightly above the 5 volts being supplied by the USB. Yeah! small victory.
The next firmware modification turns on the Sigma Delta and set the duty cycle to 128 (50%) . I measured 2.75 Volts. So next I read from the ADC each time I sent to the terminal. The value I read back was 137. Then I enabled changing the duty with each update. and the values changed with each step. Very good. Next I did a little math on the data. The ADC reads 1/1024 V/step. So when I got the reading of 137, that means (137/1024)*20 = 2.675 V.
I get a small error but within 5% reading a meter verses calculated. I fixed this by changing the 20 to 21. I got the error because of a 5% error in the calculation of the voltage divider. I had known about this error, but was ignoring it. Now it is fixed. I then started to play with the prescaler to see if i could make it work better. The 100 Ohm resistor is having more affect on the circuit than I had anticipated. With a prescaler of 128, Vpp rises to 8V. At 64 Vpp rises to 11.6 V. At 32 Vpp Rises to 11.6 V again. At 16 the Vpp Rises to 11.6 again. This suggests the design is limiting the max voltage. I need to check the reverse breakdown voltage on the diode and FET. I would like to see better control between the steps. With a prescaler of 0 it Vpp peaked at 12.1 V. It took more steps to get there, and the steps weren’t linear. It still needs tuning, maybe a different inductor.
This was fun playing with the Voltage boost circuit. I actually got it to work fairly well. This is the first switching boost circuit I have designed from scratch. Of course, I have had a few bumps along the way. I have uploaded the test code to GitHub.
Have you designed a circuit that was out of you normal area of expertise? I would love to hear about your experience.