DIY Adjustable Constant Load (Current & Power)

24,850

156

27

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

In this project I will show you how I combined an Arduino Nano, a current sensor, an LCD, a rotary encoder and a couple of other complementary components in order to create an adjustable constant load. It features a constant current and power mode and can handle a maximum of 30V and 20A if your heatsink design can handle it. Let's get started!

Step 1: Watch the Video!

The video gives you all the information you need to make your own adjustable constant load. During the next steps though, I will present you some additional information.

Step 2: Order the Components!

Step 3: Create the Circuit!

Here you can find the schematic as well as pictures of my finished circuit. Feel free to use it as a reference for your own circuit.

Step 4: Upload the Code!

Here you can download the code for the project. Upload it to the Arduino Nano through the Arduino IDE

Also make sure to download/include this library:

https://github.com/fdebrabander/Arduino-LiquidCrys...

Step 5: Finish the Project!

All that is left to do is mounting all the components inside your enclosure.

Step 6: Success!

You did it! You just created your own adjustable constant load!

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

    • Organization Contest

      Organization Contest
    • Epilog X Contest

      Epilog X Contest
    • Tape Contest

      Tape Contest

    27 Discussions

    0
    None
    waileun

    Question 21 days ago

    Queston:
    Hi, I notice that there are two electrolytic capacitors and one under the TC4420. may I know what are the values of the two electrolytic capacitors and the SMD? from the diagram I only saw, 22u and 470u

    0
    None
    power000

    4 weeks ago

    WHAT IS the value of R10??

    edit: it is R1 and it is 10ohm

    0
    None
    sk8nfooldavorin.perkovic

    Reply 6 months ago

    Yes - Vcc is red and GND is black. That's not what I asked. Where are the binding posts in the schematic?

    0
    None
    davorin.perkovicChristianR154

    Reply 2 months ago

    Pozdrav, Kristijane. Vidim !

    Mosfet se kontrolira PWM signalom na pinu D9:

    #define pwm 9 // Pin D9
    .....
    ....
    ....
    void setup() {
    ...
    digitalWrite(pwm, LOW); // Isključi mosfet
    ...
    // Postavljanje generiranja PWM signala
    TCCR1A = 0;
    TCCR1A = (1 << COM1A1) | (1 << WGM11);
    TCCR1B = 0;
    TCCR1B = (1 << WGM13) | (1 << WGM12) | (1 << CS10);
    ICR1 = 2047;
    OCR1A = 0;
    ...
    }

    void loop() {
    ...
    ...
    // Kontrola mosfeta kada treba mijenjati struju
    if (curcurrent < current) {
    OCR1A++; // Povećaj širinu PWM signala koji ide na mosfet
    }
    else {
    OCR1A = OCR1A - 1; // Smanji širinu PWM signala koji ide na mosfet
    }
    ...
    ...
    ...
    }

    https://en.wikipedia.org/wiki/Pulse-width_modulation
    https://sites.google.com/site/qeewiki/books/avr-guide/pwm-on-the-atmega328

    0
    None
    davorin.perkovicsk8nfool

    Reply 2 months ago

    The PWM signal is converted to analog voltage by a low pass filter (R1 C3) and brought to Q1's gate . Depending on that voltage, Q1 conducts more or less current, that means it acts as a variable resistor (i.e. load)

    0
    None
    ChristianR154

    2 months ago

    PWM pin not defined to the end.i don t see how you control mosfet

    0
    None
    kiwidave72

    Question 2 months ago

    When looking at the code, i can’t see how you are setting the PWM out? You set it to an output on pin 9 and set it to low, but I can see anything else.

    0
    None
    JanvierD

    6 months ago

    Is it possible to change the Rotary Encoder to push buttons? If so, can you make a version with push buttons please? Thx !!!!!

    4 replies
    0
    None
    kpatel18JanvierD

    Reply 5 months ago

    Rotary Encoder is better than Multiple buttons, its has functionality more than Just Few Buttons.

    0
    None
    JanvierDkpatel18

    Reply 5 months ago

    i said; is is possible to make with puch buttons, not if an encoder is better or not ...

    0
    None
    kpatel18JanvierD

    Reply 5 months ago

    Its very easy to modify code and use Push buttons...

    0
    None
    JanvierDkpatel18

    Reply 5 months ago

    Yes fine, but that still does not answer my question, HOW? a bit of code would be handy

    0
    None
    Yonatan24d8men

    Answer 5 months ago

    If you need a large heat sink, look for a stereo player, they tend to have pretty big heat sinks! Also some desktop computer CPU coolers.