Introduction: DIY Boost Converter || How to Step Up DC Voltage Efficiently

Picture of DIY Boost Converter || How to Step Up DC Voltage Efficiently

In this project I will show you an efficient and common way how to step up DC voltages. I will also demonstrate how easy it can be to build a boost converter with the help of an ATtiny85. Let's get started!

Step 1: Watch the Video!

The video gives you all the information you need to create your own boost converter. The next steps just contain additional information for your convenience.

Step 2: Order Your Components!

Picture of Order Your Components!

Here is a list of all the parts that you need with example sellers:

Amazon.com:

1x ATtiny85: http://amzn.to/1VXnHYs

1x IRLZ44N MOSFET: http://amzn.to/1OseN2X

1x 100µH Coil: http://amzn.to/1XbJMSb

2x 47µF Capacitor: http://amzn.to/1qlm6Oc

1x 100kΩ Potentiometer: http://amzn.to/1VXnEfe

1x 1N5819 Schottky Diode: http://amzn.to/1VXnDYN

2x 10kΩ, 1x 1kΩ, 1x 2.2kΩ, 1x 100Ω Resistor: http://amzn.to/1VXnAfN

2x PCB Terminal: http://amzn.to/1qlm0WQ

Perfboard: http://amzn.to/1XbJBGA

Ebay:

1x ATtiny85: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x IRLZ44N MOSFET: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x 100µH Coil: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

2x 47µF Capacitor: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x 100kΩ Potentiometer: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x 1N5819 Schottky Diode: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

2x 10kΩ, 1x 1kΩ, 1x 2.2kΩ, 1x 100Ω Resistor: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

2x PCB Terminal: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

Perfboard: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

Amazon.de:

1x ATtiny85: http://amzn.to/1E9ubfB

1x IRLZ44N MOSFET: http://amzn.to/1Osfnxn

1x 100µH Coil: http://amzn.to/1OsfxVz

2x 47µF Capacitor: http://amzn.to/1OsfIjE

1x 100kΩ Potentiometer: http://amzn.to/1OsfBEN

1x 1N5819 Schottky Diode: http://amzn.to/1OsfwBc

2x 10kΩ, 1x 1kΩ, 1x 2.2kΩ, 1x 100Ω Resistor: http://amzn.to/1E9uEhN

2x PCB Terminal: http://amzn.to/1GzZAZw

Perfboard: http://amzn.to/1YAqPI8

Step 3: Build the Circuit!

Picture of Build the Circuit!

Here you can find the schematic for the project and reference pictures. The soldering process takes around 45 minutes if you know what you are doing.

Step 4: Upload the Code!

In order to upload the code to the ATtiny85 you can use an Arduino Uno. Here is an older video of mine in which I demonstrated how to do that:

Step 5: Success!

Picture of Success!

You did it! You just created your own Boost Converter!


Feel free to check out my YouTube channel for more awesome projects:

http://www.youtube.com/user/greatscottlab

You can also follow me on Facebook, Twitter and Google+ for news about upcoming projects and behind the scenes information:

https://twitter.com/GreatScottLab

https://www.facebook.com/greatscottlab

Comments

hedi25253 (author)2017-08-28

What is the maximum output current (Iout max) of this project thanks.

manatigres2 (author)2017-07-25

Hello! You can control the output voltage with the potentiometer, my question is: can you use a digital potentiometer instead so that you're always working on a constant voltage? If so, how can you program it?

I'm building a MPPT charge controller using a boost converter but I need the charge controller to controll itself, can the attiny85 or arduino UNO do that?

I'm sorry but I'm really a beginner in electronics.

Oldeman65 made it! (author)2016-11-28

Thanks for sharing your idea. I use it to charge my 12V lead-acid battery from a (beefy) 5V power supply.

I didn't have an ATtiny lying around, but there was a PIC24F at hand.
It seemed that the IRLZ44 mosfet did not switch nicely at 200+kHz, so I lowered the frequency to about 80~120kHz and used a big coil from an old PC power supply. I guess the coil is around 1mH.

The switching speed problem with the mosfet could be due to that no driver circuit was used, the gate was driven directly from the PIC (at 3.3V only).
A switching frequency of around 100kHz works fine now.

So, now I can charge and top up my battery to keep it in top shape:-)

Iqbal Samin (author)Oldeman652017-07-12

Those capacitors looks like they're at the end of their life, I think you should change them, just to be safe.

Zatara11 (author)Oldeman652017-03-17

Did you build this on a solderless breadboard first?

MARVINLEMA (author)2017-04-07

Hello friend,I don't get the ATtiny85, can I do the converter using only Arduino UNO?

Reponse me please

agr00m (author)MARVINLEMA2017-06-24

Yes you can. He used the Tiny85 is because you only need 3 I/O pins, so the Uno is huge overkill. Plus the uno can cost anywhere from 3x to 6x more than a Tiny85.

Amir Malik (author)2017-04-25

Excuse me, I am sorry guys, I need a favor..

I would like to ask u something about the circuit above. I have a power supply dc voltage with 0,3 volt as an output, and I want to step up it become 12 volt dc, can I use u'r circuit above?

thanks u so much for u'r answer :)

Yes, if correctly fine tuned. But when you raise the voltage, the current drops.

J4e8a16n (author)2017-04-08

Can't download the pdf

mrrrobot (author)2017-03-09

What changes would need to be made in order to boost 12V rather than 5V?

HannesF1 (author)mrrrobot2017-03-19

Put a 7805 regulator in series with the ATTINY

Iqbal Samin (author)2016-12-11

Here's the code for Arduino UNO or any other Arduino with ATmega328 chip:

int pwm = 1;

int potinput = A2;

int feedbackinput = A3;

int potinputval;

int feedbackinputval;

int pwmval;

void setup() {

TCCR0B = TCCR0B & 0b11111000 | 0x01;

pinMode(pwm, OUTPUT);

pinMode(potinput, INPUT);

pinMode(feedbackinput, INPUT);

digitalWrite(pwm, LOW);

pwmval = 0;

}

void loop() {

potinputval = analogRead(potinput);

potinputval = map(potinputval, 1023, 0, 255, 0);

feedbackinputval = analogRead(feedbackinput);

feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);

while (potinputval > feedbackinputval) {

if (pwmval == 230) {

potinputval = analogRead(potinput);

potinputval = map(potinputval, 1023, 0, 255, 0);

feedbackinputval = analogRead(feedbackinput);

feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);

}

else {

pwmval = pwmval + 1;

analogWrite(pwm, pwmval);

potinputval = analogRead(potinput);

potinputval = map(potinputval, 1023, 0, 255, 0);

feedbackinputval = analogRead(feedbackinput);

feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);

}

}

while (potinputval < feedbackinputval) {

if (pwmval == 0) {

potinputval = analogRead(potinput);

potinputval = map(potinputval, 1023, 0, 255, 0);

feedbackinputval = analogRead(feedbackinput);

feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);

}

else {

pwmval = pwmval - 1;

analogWrite(pwm, pwmval);

potinputval = analogRead(potinput);

potinputval = map(potinputval, 1023, 0, 255, 0);

feedbackinputval = analogRead(feedbackinput);

feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);

}

}

}

AdityaS240 (author)Iqbal Samin2017-03-04

did u performed using this code..?

arsleosmithe (author)Iqbal Samin2017-02-17

One question tho. Which pin is the pwm output in ur code ? Pin1 of the arduino ?

Iqbal Samin (author)arsleosmithe2017-02-23

Oh, sorry. Pin 1 isn't a PWM pin. Please change it to 5/6. (Pin 5 and 6 can provide higher PWM frequency)

arsleosmithe (author)Iqbal Samin2017-02-24

Yeah i was wondering about that... thx for the correction

mpetković1 (author)Iqbal Samin2017-01-08

Why do you say "if (pwmval == 230)" ? What's so special about number 230?

Iqbal Samin (author)mpetković12017-01-08

Sorry, this code is not mine. It's written by GreatScott. I just changed it a little bit to make it compatible with ATmega328P.

šušuluskZ (author)Iqbal Samin2016-12-12

Its too big for my attiny 13 :(

Iqbal Samin (author)šušuluskZ2016-12-13

This code is for ATmega328, not ATtiny13. If you want to use it on ATtiny13, you'll have to study its datasheet.

gingerreaper (author)2017-02-10

best explanation of boost converters ive seen but i only get 3.5khz from your code, where did you find out how to increase the frequency of the attiny??

the frequency stays the same regardless of the clock speed i programme the chip with

i figured it out; i had to burn the bootloader to get the clock speed to change rather than just up loading the code

AlexandruG16 (author)2017-02-05

hey guys.....i will ask a dumb question....how do you increase the output power? do you change the inductor or change something in the code? thanks for your attention!

AdityaS240 (author)2017-01-28

What if I use another MOSFET in place of IRLZ44N MOSFET

GreatScottLab (author)AdityaS2402017-01-31

You will change some properties. But it should still work.

Yes, you can

BramV34 (author)2017-01-17

can i swap the shottky diode with a normal 1n4007 ? The voltage drop doesn't seem that much bigger

MariusS35 (author)BramV342017-01-19

No, normal diodes like the 1n4007 are too slow. It might work but very inefficiently.

mpetković1 (author)2017-01-08

Why do you say "if (pwmval == 230)" ? What's so special about number 230?

JovanE1 (author)2016-12-17

Hi! I built this and it makes a weird humming sound and the MOSFET heats up quickly.

Could it be the inductor as i did not use 100µH?

Thanks?

Iqbal Samin (author)2016-11-10

I get this error when I try to compile for Arduino UNO:

ATtiny85BoostConverter:12: error: 'TCCR1' was not declared in this scope

TCCR1 = 0 << PWM1A | 0 << COM1A0 | 1 << CS10;

^

ATtiny85BoostConverter:12: error: 'PWM1A' was not declared in this scope

TCCR1 = 0 << PWM1A | 0 << COM1A0 | 1 << CS10;

^

ATtiny85BoostConverter:13: error: 'PWM1B' was not declared in this scope

GTCCR = 1 << PWM1B | 2 << COM1B0;

^

exit status 1

'TCCR1' was not declared in this scope

Can you modify the code for Arduino UNO Please?

šušuluskZ (author)Iqbal Samin2016-12-11

Same problem here

Iqbal Samin (author)šušuluskZ2016-12-11

I found a solution. If you want to make it with Arduino UNO, or any other Arduino with ATmega328, use this code:

int pwm = 1;

int potinput = A2;

int feedbackinput = A3;

int potinputval;

int feedbackinputval;

int pwmval;

void setup() {

TCCR0B = TCCR0B & 0b11111000 | 0x01;

pinMode(pwm, OUTPUT);

pinMode(potinput, INPUT);

pinMode(feedbackinput, INPUT);

digitalWrite(pwm, LOW);

pwmval = 0;

}

void loop() {

potinputval = analogRead(potinput);

potinputval = map(potinputval, 1023, 0, 255, 0);

feedbackinputval = analogRead(feedbackinput);

feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);

while (potinputval > feedbackinputval) {

if (pwmval == 230) {

potinputval = analogRead(potinput);

potinputval = map(potinputval, 1023, 0, 255, 0);

feedbackinputval = analogRead(feedbackinput);

feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);

}

else {

pwmval = pwmval + 1;

analogWrite(pwm, pwmval);

potinputval = analogRead(potinput);

potinputval = map(potinputval, 1023, 0, 255, 0);

feedbackinputval = analogRead(feedbackinput);

feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);

}

}

while (potinputval < feedbackinputval) {

if (pwmval == 0) {

potinputval = analogRead(potinput);

potinputval = map(potinputval, 1023, 0, 255, 0);

feedbackinputval = analogRead(feedbackinput);

feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);

}

else {

pwmval = pwmval - 1;

analogWrite(pwm, pwmval);

potinputval = analogRead(potinput);

potinputval = map(potinputval, 1023, 0, 255, 0);

feedbackinputval = analogRead(feedbackinput);

feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);

}

}

}

RickyF8 (author)Iqbal Samin2016-11-10

you should change the board in arduino IDE to attiny85 and then compile it

Iqbal Samin (author)RickyF82016-11-17

I wanna use it with my Arduino UNO. However, I was able to set the right registers to get a high frequency of 62.5 KHz. Thanks!

šušuluskZ (author)2016-12-11

It says exit status 1

'A2' was not declared in this scope
and then some others... Could it be because Iam using attiny 13 and not 85? I have the libraries for attiny 13 so.. dunno please help

PrithwirajB (author)2016-12-11

The program gives a compilation error on my Digispark ATTiny board. And what is the guarantee that the feedback input remains within logic level? I was trying to fed 12V input to the Inductor (while added a LM7805 to power the logic circuitry and ATTiny) and I am suspecting that the feedback would easily cross 5V.

HaythamL (author)2016-07-04

int potinput = A2;
int feedbackinput = A3;

dont you acctualy mean the reverse of that? the pot in A3 in the attiny right?

HaythamL (author)2016-07-04

i want to use a 555 timer i cant find

attiny 85 right.

plus the shop saied if i want to order it it will cost me aroud 5$ xD (10 dinars in tunisa)

sucks to be in the 3 world -.-

AlexAndAmigos (author)2016-06-06

does it also boost amperage or only voltage, and if so does the amperage drop?

PikuS (author)2016-05-27

It can be build from arduino instead of attiny 85 right.

rmd6502 (author)PikuS2016-06-04

The ATTiny85 has a timer that can be clocked using a PLL, so you can get a PWM frequency of 256KHz, as opposed to 62.5KHz with an Arduino. That having been said, the Leonardo has a PLL-drivable timer too.

See Great Scott's Buck converter tutorial for why the higher frequency is better (spoiler alert: greater efficiency and lower values needed)

BuffS1 (author)2016-05-17

Why on Earth would anyone want to go to the trouble and expense of building this boost converter (whose parts cannot be obtained for less than $20) when a better quality module can be purchased for around $3 ??? I can get SIX (6) ready-made modules for less than the cost of the parts!!!

mickeypop (author)BuffS12016-05-18

mine can drive 4 amps almost all under $20 drive around 80-300 miliAmps. - a few drive near 1 Amp - have not found any cheap that can drive that much

1 scrap toroid $0
10 ft bell wire about 10 cents
1 salvage FET -- $0
2 schotky diodes 87 cents/ each - $1.74
3 junk caps -- $0
a few spare resistors about 15 cents
vector board 54 cents worth
NET COST out of pocket -- $2.53 - that's why

BuffS1 (author)mickeypop2016-05-24

99-cents (FREE shipping) ... I bought 10 of them:

http://www.ebay.com/itm/381544971857

Much better, more capabilities/range = $2.97 (plus modest shipping) ... I got 7 at this great price:

http://www.ebay.com/itm/331727051544

MatthewM156 (author)mickeypop2016-05-18

But using an 8 bit computer to regulate voltage ? Hard for anyone to maintain in your absence if and when it fails. You would need to supply spares. I don't mind people using op-amps instead of transistors, but I am against using Arduinos instead of 555 timers, say. Yes it is fun, but why drive in thumbtacks with sledgehammers ? Good effort though, people will replicate to see what tweaking can be done. Not enough younger people doing this anymore. My wife has a Masters, and has *never* used a soldering iron. Many people are no longer comfortable buying discrete components any more either. I was so happy to see Nixies in Tomorrowland ! Please do something with Nixies...

KROKKENOSTER (author)BuffS12016-05-23

Diud you do shopping around? Here in RSA the one supplier's was for an I.C. so high that I could get the same make and type of I.C. and all the components from another plus a box and vero board !!!

BuffS1 (author)KROKKENOSTER2016-05-23

The title of this website is "Instructables' which tends to suggest there ought to be some "instructions" ... that was my main quibble about this project ... the DEARTH of "instruction" (along with the lack of any clearly-stated purpose or introduction). Cost is a completely secondary issue (unless it's the cost of my time that's being wasted ... and I consider that always a primary concern).

About This Instructable

95,671views

542favorites

License:

Bio: Awesome Electronics Tutorials, Projects and How To´s
More by GreatScottLab:Adding a Current Limit Feature to a Buck/Boost ConverterDIY LiPo Charge/Protect/5V Boost CircuitMake Your Own POV LED Globe
Add instructable to: