loading

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

<p>Can't download the pdf</p>
<p>Hello friend,I don't get the ATtiny85, can I do the converter using only Arduino UNO?</p><p>Reponse me please</p>
<p>What changes would need to be made in order to boost 12V rather than 5V?</p>
<p>Put a 7805 regulator in series with the ATTINY</p>
<p>Thanks for sharing your idea. I use it to charge my 12V lead-acid battery from a (beefy) 5V power supply.</p><p>I didn't have an ATtiny lying around, but there was a PIC24F at hand.<br>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.</p><p>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).<br>A switching frequency of around 100kHz works fine now.</p><p>So, now I can charge and top up my battery to keep it in top shape:-)</p>
<p>Did you build this on a solderless breadboard first? </p>
<p>Here's the code for Arduino UNO or any other Arduino with ATmega328 chip:</p><p>int pwm = 1;</p><p>int potinput = A2;</p><p>int feedbackinput = A3;</p><p>int potinputval;</p><p>int feedbackinputval;</p><p>int pwmval;</p><p>void setup() {</p><p> TCCR0B = TCCR0B &amp; 0b11111000 | 0x01;</p><p> pinMode(pwm, OUTPUT);</p><p> pinMode(potinput, INPUT);</p><p> pinMode(feedbackinput, INPUT);</p><p> digitalWrite(pwm, LOW);</p><p> pwmval = 0;</p><p>}</p><p>void loop() {</p><p> potinputval = analogRead(potinput);</p><p> potinputval = map(potinputval, 1023, 0, 255, 0);</p><p> feedbackinputval = analogRead(feedbackinput);</p><p> feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);</p><p> while (potinputval &gt; feedbackinputval) {</p><p> if (pwmval == 230) {</p><p> potinputval = analogRead(potinput);</p><p> potinputval = map(potinputval, 1023, 0, 255, 0);</p><p> feedbackinputval = analogRead(feedbackinput);</p><p> feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);</p><p> }</p><p> else {</p><p> pwmval = pwmval + 1;</p><p> analogWrite(pwm, pwmval);</p><p> potinputval = analogRead(potinput);</p><p> potinputval = map(potinputval, 1023, 0, 255, 0);</p><p> feedbackinputval = analogRead(feedbackinput);</p><p> feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);</p><p> }</p><p> }</p><p> while (potinputval &lt; feedbackinputval) {</p><p> if (pwmval == 0) {</p><p> potinputval = analogRead(potinput);</p><p> potinputval = map(potinputval, 1023, 0, 255, 0);</p><p> feedbackinputval = analogRead(feedbackinput);</p><p> feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);</p><p> }</p><p> else {</p><p> pwmval = pwmval - 1;</p><p> analogWrite(pwm, pwmval);</p><p> potinputval = analogRead(potinput);</p><p> potinputval = map(potinputval, 1023, 0, 255, 0);</p><p> feedbackinputval = analogRead(feedbackinput);</p><p> feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);</p><p> }</p><p> }</p><p>}</p>
<p>did u performed using this code..?</p>
One question tho. Which pin is the pwm output in ur code ? Pin1 of the arduino ?
Oh, sorry. Pin 1 isn't a PWM pin. Please change it to 5/6. (Pin 5 and 6 can provide higher PWM frequency)
Yeah i was wondering about that... thx for the correction
<p>Why do you say &quot;if (pwmval == 230)&quot; ? What's so special about number 230?</p>
Sorry, this code is not mine. It's written by GreatScott. I just changed it a little bit to make it compatible with ATmega328P.
<p>Its too big for my attiny 13 :(</p>
<p>This code is for ATmega328, not ATtiny13. If you want to use it on ATtiny13, you'll have to study its datasheet.</p>
<p>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??</p>
<p>the frequency stays the same regardless of the clock speed i programme the chip with</p>
<p>i figured it out; i had to burn the bootloader to get the clock speed to change rather than just up loading the code</p>
<p>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!</p>
<p>What if I use another MOSFET in place of IRLZ44N MOSFET</p>
<p>You will change some properties. But it should still work. </p>
<p>Yes, you can</p>
<p>can i swap the shottky diode with a normal 1n4007 ? The voltage drop doesn't seem that much bigger</p>
<p>No, normal diodes like the 1n4007 are too slow. It might work but very inefficiently. </p>
<p>Why do you say &quot;if (pwmval == 230)&quot; ? What's so special about number 230?</p>
<p>Hi! I built this and it makes a weird humming sound and the MOSFET heats up quickly.</p><p>Could it be the inductor as i did not use 100&micro;H?</p><p>Thanks?</p>
<p>I get this error when I try to compile for Arduino UNO:</p><p>ATtiny85BoostConverter:12: error: 'TCCR1' was not declared in this scope</p><p>TCCR1 = 0 &lt;&lt; PWM1A | 0 &lt;&lt; COM1A0 | 1 &lt;&lt; CS10;</p><p>^</p><p>ATtiny85BoostConverter:12: error: 'PWM1A' was not declared in this scope</p><p>TCCR1 = 0 &lt;&lt; PWM1A | 0 &lt;&lt; COM1A0 | 1 &lt;&lt; CS10;</p><p>^</p><p>ATtiny85BoostConverter:13: error: 'PWM1B' was not declared in this scope</p><p>GTCCR = 1 &lt;&lt; PWM1B | 2 &lt;&lt; COM1B0;</p><p>^</p><p>exit status 1</p><p>'TCCR1' was not declared in this scope</p><p>Can you modify the code for Arduino UNO Please?</p>
<p>Same problem here</p>
<p>I found a solution. If you want to make it with Arduino UNO, or any other Arduino with ATmega328, use this code:<br><br>int pwm = 1;</p><p>int potinput = A2;</p><p>int feedbackinput = A3;</p><p>int potinputval;</p><p>int feedbackinputval;</p><p>int pwmval;</p><p>void setup() {</p><p> TCCR0B = TCCR0B &amp; 0b11111000 | 0x01;</p><p> pinMode(pwm, OUTPUT);</p><p> pinMode(potinput, INPUT);</p><p> pinMode(feedbackinput, INPUT);</p><p> digitalWrite(pwm, LOW);</p><p> pwmval = 0;</p><p>}</p><p>void loop() {</p><p> potinputval = analogRead(potinput);</p><p> potinputval = map(potinputval, 1023, 0, 255, 0);</p><p> feedbackinputval = analogRead(feedbackinput);</p><p> feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);</p><p> while (potinputval &gt; feedbackinputval) {</p><p> if (pwmval == 230) {</p><p> potinputval = analogRead(potinput);</p><p> potinputval = map(potinputval, 1023, 0, 255, 0);</p><p> feedbackinputval = analogRead(feedbackinput);</p><p> feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);</p><p> }</p><p> else {</p><p> pwmval = pwmval + 1;</p><p> analogWrite(pwm, pwmval);</p><p> potinputval = analogRead(potinput);</p><p> potinputval = map(potinputval, 1023, 0, 255, 0);</p><p> feedbackinputval = analogRead(feedbackinput);</p><p> feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);</p><p> }</p><p> }</p><p> while (potinputval &lt; feedbackinputval) {</p><p> if (pwmval == 0) {</p><p> potinputval = analogRead(potinput);</p><p> potinputval = map(potinputval, 1023, 0, 255, 0);</p><p> feedbackinputval = analogRead(feedbackinput);</p><p> feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);</p><p> }</p><p> else {</p><p> pwmval = pwmval - 1;</p><p> analogWrite(pwm, pwmval);</p><p> potinputval = analogRead(potinput);</p><p> potinputval = map(potinputval, 1023, 0, 255, 0);</p><p> feedbackinputval = analogRead(feedbackinput);</p><p> feedbackinputval = map(feedbackinputval, 1023, 0, 255, 0);</p><p> }</p><p> }</p><p>}</p>
<p>you should change the board in arduino IDE to attiny85 and then compile it</p>
<p>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!</p>
<p>It says exit status 1</p><p>'A2' was not declared in this scope<br>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</p>
<p>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.</p>
<p>int potinput = A2;<br>int feedbackinput = A3;</p><p>dont you acctualy mean the reverse of that? the pot in A3 in the attiny right?</p>
<p>i want to use a 555 timer i cant find </p><p>attiny 85 right.</p><p>plus the shop saied if i want to order it it will cost me aroud 5$ xD (10 dinars in tunisa)</p><p>sucks to be in the 3 world -.-</p>
<p>does it also boost amperage or only voltage, and if so does the amperage drop?</p>
It can be build from arduino instead of attiny 85 right.
<p>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.</p><p>See Great Scott's Buck converter tutorial for why the higher frequency is better (spoiler alert: greater efficiency and lower values needed)</p>
<p>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!!!</p>
<p>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<br><br>1 scrap toroid $0<br>10 ft bell wire about 10 cents <br>1 salvage FET -- $0<br>2 schotky diodes 87 cents/ each - $1.74<br>3 junk caps -- $0<br>a few spare resistors about 15 cents<br>vector board 54 cents worth<br>NET COST out of pocket -- $2.53 - that's why</p>
<p>99-cents (FREE shipping) ... I bought 10 of them:<br><br>http://www.ebay.com/itm/381544971857<br><br>Much better, more capabilities/range = $2.97 (plus modest shipping) ... I got 7 at this great price:<br><br>http://www.ebay.com/itm/331727051544</p>
<p>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...</p>
<p>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 !!!</p>
<p>The title of this website is &quot;Instructables' which tends to suggest there ought to be some &quot;instructions&quot; ... that was my main quibble about this project ... the DEARTH of &quot;instruction&quot; (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).</p>
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 &quot;learn&quot; this circuit ... worlds of online instructional materials about boost-converter circuits. And, yes, as I've already acknowledged, for me, the &quot;thrill&quot; 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 &quot;hands-on&quot; 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 ... <br><br>@ 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!
<p>ya don't value education , and 'hands-on' learning?</p><p>Sad.</p>
<p>BuffS1; you miss the point. </p><p>this is to learn how they work. also not all of the $3 modules meet any application and home made may sometimes be needed. -- only recently i needed an &quot;isolated&quot; supply to boost 8v to 14v.</p><p> no board could be found so i made mine. the point of instructables is teaching.</p><p>i say job well done.</p>
<p>a side note;</p><p>if you mount the filter cap (c1) the FET and Micro so ground paths between them are as short as possible you can often increase the efficiency by as much as 8-12 percent, though 6 percent is more likely on this simple circuit.</p><p>If your coil is a dumbbell type instead of toroid you will also reduce the EMI. </p><p>EE 50 years in electronics</p>
<p>&gt;&gt; If your coil is a dumbbell type instead of toroid you will also reduce the EMI.</p><p>Why?... Toroid is closed! Dumbbell (drum) is open...</p>
<p>dumbbell by their shape create a partial <em>Faraday </em>shield because of the way the ends couple back on each other in all directions, the best ones are the short wider relieving the ends closer together. </p><p>They do radiate some but less that the toroid. Toroids radiate 90 degrees to their center. Dumbbells couple on themselves. </p><p>Because the iron is in the center on the dumbbell the field shape is different than with the hole in the toroid. The iron in the center acts kind of like an absorber or like the &quot;Keeper bar&quot; on a horseshoe magnet.</p><p>ie; When you take the Keeper off a magnet it feels far stronger than when the Keeper is on the magnet. The magnetic field acts similarly here.</p>

About This Instructable

84,608views

529favorites

License:

Bio: Awesome Electronics Tutorials, Projects and How To´s
More by GreatScottLab:DIY Arduino Soldering Station Make Your Own GPS SMS Security Tracking System DIY Portable LED Panel 
Add instructable to: