toftat's blog

I am starting to get pissed off at this.

The boards came in yesterday...

I put one together hooked it up and poked it a little, and it looked like it was in the static sense working. I programmed the uC with the same code as I had on the previous board, and after a short while, I got "the smell". So I flipped the power switch (the hand is never far from it during early development) and started to think about it...

While the uC has been outputting PWM as designed, there have been other problems...

First off, when I designed the board, I based it on the "Family Reference Manual" without thinking to ensure the extensions I was using were actually available on the uC I was looking at. This led to me trying to use PWM1L independently to PWM1H, which is not supported. So I instead needed to use PWM1L and PWM2L, PWM2L is attached to one of the pins I am using for the buttons, so there was a need to switch the pins around between the uC and the board.

So I figured out my PWM issue...

The PWM control registers have a feature that requires them to be "unlocked" before writing to them. There is a config bit that turns the feature on and off. Needless to say, I flipped the configuration bit and it started working.

At the moment I am configured for 9 bit resolution, from the scope, that gives me 76kHz, if that isn't fast enough then I will go to 8 bit, and double the frequency, but that's something to look at once I understand how the regulator section responds.

As mentioned in the previous update, I had been on holiday when the parts came in and on the day of my arrival I did not trust my state of exhaustion to build anything complex, so I decided that I needed to wait a day.

After a long break during which time I designed a buck-boost section for the circuit board, and took a vacation. I am back onto the project.

So once i realized the necessity of the buck boost I went about drawing the circuit and laying out the board, with the help of various websites I got the circuit mostly done. Then came the need to calculate the necessary capacitors and inductors... The numbers I came up with were HUGE! I means really big! and big things usually come with a big price tag. I really needed to get them under control.

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

State Buck Switch Boost Switch
1 OFF OFF
2 OFF ON
3 ON OFF
4 ON ON

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 500kΩ variable resistor that could take >30v on the resistive element. I found there was no such device, the largest available high voltage device is 100kΩ, so I'd need 5 of them in series, with the wiper resistance being 75Ω, that's a minimum resistance of 375Ω 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...

Pages

Subscribe to RSS - toftat's blog