Building a High-Voltage, Low-Current Boost Converter

So as the title says, I'm building a high voltage, low current boost converter using an ATTiny84A.

I modified this schematic to the following schematic work with an AVR driving the PWM instead of a 555 timer. This way I can control the converter and the on time (I want 10 second bursts)

|500x166

Code:

//Constants
const int ledG = 8;      // the number of the Green LED pin
const int ledY = 7;      // the number of the Yellow LED pin
const int ledR = 6;      // the number of the Red LED pin
const int NMOS = 5;      // the number of the TI CSD18536 NMOS

// Variables will change:


void setup() {
  pinMode(ledG, OUTPUT);
  pinMode(ledY, OUTPUT);
  pinMode(ledR, OUTPUT);
  pinMode(NMOS, OUTPUT);

// Turn on green PWR indicator LED
  digitalWrite(ledG, HIGH);   
  delay(250);              
  digitalWrite(ledG, LOW);    
  delay(250);  
  digitalWrite(ledG, HIGH);   
  delay(250);         
  digitalWrite(ledG, LOW);
  delay(250);
  digitalWrite(ledG, HIGH);

// Blink yellow WARN light

  digitalWrite(ledY, HIGH);
  delay(1000);             
  digitalWrite(ledY, LOW);   
  delay(1000);  
  digitalWrite(ledY, HIGH); 
  delay(1000);            
  digitalWrite(ledY, LOW); 
  delay(1000);
  digitalWrite(ledY, HIGH);
  delay(1000); 
  digitalWrite(ledY, LOW);

// Burn sequence
// Turn on red STAT light
  digitalWrite(ledR, HIGH);
//Start the NMOS, which starts the converter
  analogWrite(NMOS, 64);
  delay(5000);
  digitalWrite(ledR, LOW);

}

void loop() {


}

The device works perfect in simulations sourcing ~+200V. However, I have run into a hitch. The device is drawing massive current in real life which is shutting down the power supply effectively shutting down the AVR. So the device is dead in the water

It works at a 50% duty cycle, but draws enough current that it burned out the inductor

All the ICs that can source out high voltages cost a lot per IC ($5+). According to the original 555 schematic, you can get ~170V out of it functionally. So why is the same circuit not working with an AVR? I only changed the PWM source.

Help!

Per the article you link, the circuit is designed to be driven by a 45 kHz oscillator. Arduino analogwrite nominally runs at 490 Hz. Smoke ensues because the circuit is switching far too slow, your inductor saturates, and is essentially shunted to ground half the time.

You shouldn't operate it at a 50% duty cycle.

When you turn the MOSFET on, the inductor current will ramp up from zero to a maximum value, which will be determined by several things, such as the resistance of the inductor, the on-resistance of the FET, the maximum power supply current, etc.

Once the current has reached it's maximum value, then there is no point in having the MOSFET conducting any longer. Turn it off as soon as you reach maximum current. (I'm not sure what equipment you have available to determine this, but it might only take a microsecond or so).

If it remains on after the inductor current has reached it's maximum value, then it is just reducing the efficiency of the circuit, causing overheating, and subsequent failure of the inductor.

You might find that the duty cycle only needs to be few percent.

MrMark: Per the article you link, the circuit is designed to be driven by a 45 kHz oscillator. Arduino analogwrite nominally runs at 490 Hz. Smoke ensues because the circuit is switching far too slow, your inductor saturates, and is essentially shunted to ground half the time.

So then how can I get it to run at a higher rate? Can I bit-bang it?

JohnLincoln: You shouldn't operate it at a 50% duty cycle.

When you turn the MOSFET on, the inductor current will ramp up from zero to a maximum value, which will be determined by several things, such as the resistance of the inductor, the on-resistance of the FET, the maximum power supply current, etc.

Once the current has reached it's maximum value, then there is no point in having the MOSFET conducting any longer. Turn it off as soon as you reach maximum current. (I'm not sure what equipment you have available to determine this, but it might only take a microsecond or so).

If it remains on after the inductor current has reached it's maximum value, then it is just reducing the efficiency of the circuit, causing overheating, and subsequent failure of the inductor.

You might find that the duty cycle only needs to be few percent.

Well I'm kind of confused with your answer here. As for current, I don't actually need to draw any current, just provide an extremely high voltage.

Can you provide steps the program should go through, for example: 1. XX% duty cycle for X seconds 2. Drop to XX% duty cycle 3. So on and so forth

Thank you

You keep the 555 and then just turn off the fet at what ever time you want or use a timer and gate it how long you want. As MrMark said you stunt the inductor to ground to long makes smoke

The mosfet is not a logic level type, so will work Ok with the 555 as its running off 9 V, but wont work with an AVR at only 5 V , and you must have the switching frequency correct for the inductor size. Much easier to use the original circuit design. The NE555 also has a far higher output capability than an AVR micro, able to source and sink up to 200 ma.

Can't I change the frequency of the PWM on the ATTiny84A with Arduino? My PWM pin is PA5

The key is that you want the duration the FET is turned on to only be about 10 microseconds (1/2 of 1 / 45kHz). This gives the inductor sufficient time to build a magnetic field, but not so long that it saturates. Here’s three potential approaches.

  1. On the Atmega328 boards the Arduino “tone” library can generate a square wave output at ~45 kHz. I don’t know whether or not it is implemented for the ATTiny84A, but if it is, that might be the easiest approach.

  2. As for bit banging, the following code gives about 50 kHz on an Uno which should be close enough:

  for (int k=0;k<1000;k++) {
    digitalWrite(somePin, HIGH);   // turn the Pin on by making the voltage HIGH
    digitalWrite(somePin, HIGH);   // repeat to stretch state
    digitalWrite(somePin, LOW);    // turn the Pin off by making the voltage LOW
    digitalWrite(somePin, LOW);    // repeat to stretch state
  }
  1. Finally, using a small value (1 or 2) for analogWrite() gives a narrow “on” pulse. Assuming PWM at 490 Hz, then analogWrite(outPin,1) is 1/256/490 ~= 8 microseconds. I think this is what JohnLincoln was suggesting above. This won’t work as well if there is significant leakage or load on your high voltage since the duty cycle is so low.

It’s also worth noting that the circuit in the article you’ve referenced has feedback to limit the high voltage which you haven’t shown in your schematic. Without this the high voltage will grow until something breaks down (probably the diode), perhaps spectacularly.