toftat's blog

With two switches being toggled on and off, there are 4 states in which they can be

State Buck Switch Boost Switch

With state 2 being invalid, as it winds up shorting out the inductor.

To prevent state 2 from occurring I am going to ensure the following 3 points

With the prospect of implementing a "2-switch" non-inverting buck boost DC-DC converter, I started to redesign the board, which involves choosing the n channel FETs, and a high/low side driver for them, the Schottky diodes and most importantly the energy storage elements (an inductor and a capacitor).

After the module died last weekend I tried to look into how I can solve the problem of needing a 500kOhm variable resistor that could take >30v on the resistive element. I found there was no such device, the largest available high voltage device is 100kOhm, so I'd need 5 of them in series, with the wiper resistance being 75Ohm, that's a minimum resistance of 375Ohm which may be too high. I then went about using a chain of resistors in series and a device to "short out" unwanted ones to get various values.

At the weekend I picked up the courage to plug the PWM filter connectors into the voltage control on the module, and it appeared to work, dialing the PWM output higher caused more voltage to come out, turning it down caused less. Yet there were problems...

This is going to be a mammoth entry as this weekend I did a lot of stuff to the firmware...

After measuring the voltage on the divider, it seemed ok, as it varied linearly with the output voltage, it was also right around what I calculated it should be it's a 90k/10k divider so the output voltage of the divider should be (and is) very close to 10% of the post voltage. However the output of the opamp (configured as a unity buffer) does not go much above 1.9v which is why the ADC tops out at ~19v.

As the desire to provide feedback from the power supply on what it is actually doing as well as what it has been commanded to do has always been present, I designed into the board the necessary connectors, voltage dividers and op amps to connect and condition the voltage from the output posts. With the board correctly configured, it is a simple task to configure and turn on the ADC and read the results.

After the PIC24 redesign, it has been my wish to use the realtime clock so that the reports to the serial port can be made with the correct time. Unfortunately when the processor loses power, the clock stops and the time is reset.

To get around this, I figured that I would use a battery and the low power characteristics of the microcontroller. When I designed the board I added the battery holder for a CR2032 and an LTC4411 from Analog/Linear to manage the switching between the power sources.

The regulator uses variable resistors to control the output voltage and current. I plan on replacing this control with a voltage level.

To generate the voltage levels I will use the PWM outputs from the microcontroller. The PWM will need to be smoothed into a steady voltage level for which I will need a low pass filter.

I went through the process of writing the heap_malloc function, and got it ready for the initial testing. I decided that I would do that in the simulator, so I added a heap_malloc of 1 byte to the main function. On the first run, the code crashed with an invalid program counter. This is the block of code with the crash


Subscribe to RSS - toftat's blog