Introduction: 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!

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!

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!

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

author
manatigres2 made it! (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.

author
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:-)

boostconverter1.jpgboostconverter2.jpgboostconverter_wave.jpgpic24f.jpg
author
Iqbal Samin made it! (author)Iqbal Samin2017-07-12

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

author
Zatara11 made it! (author)Zatara112017-03-17

Did you build this on a solderless breadboard first?

author
MARVINLEMA made it! (author)2017-04-07

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

Reponse me please

author
agr00m made it! (author)agr00m2017-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.

author
Amir Malik made it! (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 :)

author
DecemberRain01 made it! (author)DecemberRain012017-06-08

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

author
J4e8a16n made it! (author)2017-04-08

Can't download the pdf

author
mrrrobot made it! (author)2017-03-09

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

author
HannesF1 made it! (author)HannesF12017-03-19

Put a 7805 regulator in series with the ATTINY

author
Iqbal Samin made it! (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);

}

}

}

author
AdityaS240 made it! (author)AdityaS2402017-03-04

did u performed using this code..?

author
arsleosmithe made it! (author)arsleosmithe2017-02-17

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

author
Iqbal Samin made it! (author)Iqbal Samin2017-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)

author
arsleosmithe made it! (author)arsleosmithe2017-02-24

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

author
mpetković1 made it! (author)mpetković12017-01-08

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

author
Iqbal Samin made it! (author)Iqbal Samin2017-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.

author
šušuluskZ made it! (author)šušuluskZ2016-12-12

Its too big for my attiny 13 :(

author
Iqbal Samin made it! (author)Iqbal Samin2016-12-13

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

author
gingerreaper made it! (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??

author
gingerreaper made it! (author)gingerreaper2017-02-10

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

author
gingerreaper made it! (author)gingerreaper2017-02-11

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

author
AlexandruG16 made it! (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!

author
AdityaS240 made it! (author)2017-01-28

What if I use another MOSFET in place of IRLZ44N MOSFET

author
GreatScottLab made it! (author)GreatScottLab2017-01-31

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

author
janstojanovski made it! (author)janstojanovski2017-01-29

Yes, you can

author
BramV34 made it! (author)2017-01-17

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

author
MariusS35 made it! (author)MariusS352017-01-19

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

author
mpetković1 made it! (author)2017-01-08

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

author
JovanE1 made it! (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?

author
Iqbal Samin made it! (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?

author
šušuluskZ made it! (author)šušuluskZ2016-12-11

Same problem here

author
Iqbal Samin made it! (author)Iqbal Samin2016-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);

}

}

}

author
RickyF8 made it! (author)RickyF82016-11-10

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

author
Iqbal Samin made it! (author)Iqbal Samin2016-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!

author
šušuluskZ made it! (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

author
PrithwirajB made it! (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.

author
HaythamL made it! (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?

author
HaythamL made it! (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 -.-

author
AlexAndAmigos made it! (author)2016-06-06

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

author
PikuS made it! (author)2016-05-27

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

author
rmd6502 made it! (author)rmd65022016-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)

author
BuffS1 made it! (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!!!

author
mickeypop made it! (author)mickeypop2016-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

author
BuffS1 made it! (author)BuffS12016-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

author
MatthewM156 made it! (author)MatthewM1562016-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...

author
KROKKENOSTER made it! (author)KROKKENOSTER2016-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 !!!

author
BuffS1 made it! (author)BuffS12016-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).

author
BuffS1 made it! (author)BuffS12016-05-23

I ALWAYS shop-around (I have been an inveterate shopper-arounder for over a half-century). That's how I know that there's NO WAY (no matter how much they claim it) that you can acquire the parts to built this boost converter for less-than the $3 a ready-made module would cost (even if you have devices you can scavenge for parts ... and I have a warehouse full of them ... which I regularly scavenge for parts to build my projects) ... AND, that's not considering the outrageous cost you will pay in your time expended ... in actually finding/extracting the right parts, but also in the time spent fiddling-around trying to adjust the circuit to work with a part that's not an identical match to those specified. You may not consider your time as very valuable, but being an old codger with one-foot-in-the-grave-already, I find that every hour of my time grows in value day-by-day ... so, I'm not into wasting any of it needlessly. Besides, there are much easier (and cheaper) ways to "learn" this circuit ... worlds of online instructional materials about boost-converter circuits. And, yes, as I've already acknowledged, for me, the "thrill" of building a successful project is what has always been my primary motivation-and-reward for building electronic projects and kits ... and I agree with the point-of-view presented by many that there is no substitute for the efficacy of learning through actual "hands-on" building and experimentation ... BUT, I still hold to the opinion that trying to build such a project as the one described here (without any but the most scatter-brained and unclear directions) is a waste-of-time (even more so for a novice than for an old-hand like me) and MONEY ...

@ MickeyPop ... if you ACTUALLY believe your cost estimates are accurate (and I don't think you or anyone else here is that dumb), then you probably also believe that the Pentagon can buy a hammer for less than $400, or Trump's whole line of BS ... ha ha ha ah ah aha ha ha!

About This Instructable

91,507views

539favorites

License:

Bio: Awesome Electronics Tutorials, Projects and How To´s
More by GreatScottLab:Make Your Own Photovoltaic Off-Grid SystemDIY Class D Audio AmplifierMake Your Own Tesla Coil
Add instructable to: