DIY Buck/Boost Converter (Flyback)

41,483

319

58

Posted in TechnologyArduino

Introduction: DIY Buck/Boost Converter (Flyback)

About: Awesome Electronics Tutorials, Projects and How To´s

In this project I will show you how a buck/boost converter (flyback) works and how you can easily build one that can step up and step down DC voltage efficiently. Let's get started!

Step 1: Watch the Video!

After watching the video you should have the basic knowledge to create your own buck/boost converter. The next steps though will contain additional information to make your life easier.

Step 2: Order the Components!

Here you can find a parts list with example seller:

Amazon.com:
1x ATtiny85: http://amzn.to/2e1mPzU

1x MCP602: http://amzn.to/2e1mPzU

1x 7805 5V regulator: http://amzn.to/2e1mPzU

1x IRLZ44N: http://amzn.to/2e1mPzU

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

1x 0.03mH Inductor: http://amzn.to/2e1mPzU

1x 1N5819 Schottky Diode: http://amzn.to/2e1mPzU

2x Screw Terminals: http://amzn.to/2e1mPzU

2x 100nF Capacitor: http://amzn.to/2e1mPzU

1x 100µF, 1x 220µF Capacitor: http://amzn.to/2e1mPzU

2x 10kΩ, 2x 5.1kΩ, 2x 20kΩ, 1x10Ω Resistor: http://amzn.to/2e1mPzU

Ebay:

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

1x 7805 5V regulator: http://rover.ebay.com/rover/1/711-53200-19255-0/1...

1x IRLZ44N: 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 0.03mH Inductor: 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 Screw Terminals: http://rover.ebay.com/rover/1/711-53200-19255-0/1...

2x 100nF Capacitor: http://rover.ebay.com/rover/1/711-53200-19255-0/1...

1x 100µF, 1x 220µF Capacitor: http://rover.ebay.com/rover/1/711-53200-19255-0/1...

2x 10kΩ, 2x 5.1kΩ, 2x 20kΩ, 1x10Ω Resistor: http://rover.ebay.com/rover/1/711-53200-19255-0/1...

Amazon.de:

1x ATtiny85: http://amzn.to/2dWIc4j

1x MCP602:http://amzn.to/2dLaboV
1x 7805 5V regulator: http://amzn.to/2dWHC6K

1x IRLZ44N: http://amzn.to/2dL9WKB

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

1x 0.03mH Inductor: http://amzn.to/2dWIojS

1x 1N5819 Schottky Diode: http://amzn.to/2dLapwo

2x Screw Terminals: http://amzn.to/2aTTLNW

2x 100nF Capacitor: http://amzn.to/2dWJaNW

1x 100µF, 1x 220µF Capacitor: http://amzn.to/2dL9dsO

2x 10kΩ, 2x 5.1kΩ, 2x 20kΩ, 1x10Ω Resistor: http://amzn.to/2aAsWdV

Step 3: Create the Circuit!

Here you can find the schematic and pictures of the circuit that I created. Feel free to use them as a reference. You can also find the schematic on EasyEDA: https://easyeda.com/GreatScott/ATtiny_Buck_Boost_C...

Step 4: Upload the Code!

Here you can find the code that you need to upload to the ATtiny85 before plugging it in the circuit. If you don't know how to upload the sketch then make sure to watch this video of mine:

Step 5: Success!

Awesome! You did it! You just created your own buck/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

Share

Recommendations

  • Spotless Contest

    Spotless Contest
  • Microcontroller Contest

    Microcontroller Contest
  • Space Challenge

    Space Challenge
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

whats is the logic of using "cont int" instead of "int " ???
i never under stand when to use which.............

58 Comments

May I know what is the duty cycle of this circuit?

hello guys , can someone explain to me where i must connect the voltage regulater part

Is it possible that 2 new ATTINY85 from Reichelt are bricked out of the box?

hello,can i use this project for solar charge controller?

thank you

1 reply

hey dude ,, did you build it using a solar charger ?

hey , i built the same exact circuit as in the sketch with the same components and i uploaded the code to the attiney85 ,,, but it didnt work

i received an output voltage of 5volts at my 20kohms load and the potentiometer was not changing the outpout voltage ,, am thinking that the problem is with the defined pwm inputs and the pot input in the code ,

any suggestions to help make it work?

The code has seem to be changed, I am unable to replicate the same results as with the previous code... may I have the older code uploaded?

Is there a way to add current control to this also? I am Novice Newb please help

How about a list of specs such as input/output voltage range, output current, etc?

6 replies

Input: 6V-30V Output: 0-20V Output Current: 1-2A

I can't seem to produce a 1-2A based on this specs, I am only able to get 0.3A at most to charge a smartphone, any solutions on this?

hey scott, does this circuit can works with input 2-7v,and constant output voltage as 5.5v? i want some advice from you.....i am waiting for your answer please?

you need at least 6 to 7 volts input in order for the 7805 to be able to regulate it down to 5 volts to power the MCU. however, if you power it up with the aforementioned voltages you can use it as a step-down converter to have a 5v5 output.

if we would replace the 1n5819 diode with a 1n5822 diode, wouldn't it be possible to draw up to 3 A ? (ofc if we take into account that our power inductor can handle this)

Sir, can you added also the calculation for getting the component in the later video. Especially using inductor and resistor and capacitor when making something like buck / boost converter. Thanks ^^

1. in your shematic R9 not a resitor is it load ?

2. 100nF ceramic cap. you use only on of them at finished photo or i coudnt see it but shematic & bom 2 of them

3.attiny 85 whats the options for programing bod % ldo enable/disabled, 8mhz (int/ext) ?

2 replies

1. R9 is the load, not a resistor.

2. There are two 100nF capacitors in the schematic. look closely. They are C1 and C2 on the top left corner, next to the voltage regulator.

3. Where do you get these options? When burning fuse? If so, you don't need to burn fuse, you just need to burn the Arduino bootloader.

Iqbal thank you for answers. I forgot the questions nearly year passed for 3rd q. at arduino ide if you look closer theese options on section mcu but nevermind now

I can not find MCP602. Can I use NE5532 or LM358?

user

1 what is the frequency? Increasing frequency might be helpful to efficiency and you can do it with Arduino.

2 why not use a resistor valtage devider for feedback?

3 will you please uplode the code for multi chanal version based on Arduino Nano here?

Thankyou.