DIY Adjustable Constant Load (Current & Power)

26,409

162

33

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

  • Trash to Treasure

    Trash to Treasure
  • Tape Contest

    Tape Contest
  • Arduino Contest 2019

    Arduino Contest 2019

33 Discussions

0
None
UKDradge

14 days ago

Where do you get this box? I see you have used it on several projects.

0
None
kiwidave72

Question 3 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.

1 answer
0
None
ChristianR154

3 months ago

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

1 reply
0
None
esorreta

Question 24 days ago

I'm confused with how the voltage (curvoltage) is calculated. If 30 volts is applied across the entire divider 5 volts would appear across the 2K resistor. Hence shouldn't curvoltage be caculated as curvoltage = curvoltraw * (30/1023)? Would also appreciate it if you could explain how the current is calculated. I intend to build this for my son to help him with his final year project involving solar power. Thank you.

0
None
taki2007

Question 4 weeks ago

Would it be possible to combine this project with the variable power supply project, would it be complicated or just as easy as daisychaining this constant load supply to the output of the variable voltage supply? Would it be recommended, or would it be wiser to rethink the whole thing to be on the safe side?

Edit: the variable power supply project seems to take care of max current output; would using it to charge a lithium battery be like the "CC-CV" charging method, since this was my goal initially ?

0
None
waileun

Question 8 weeks 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

2 months ago

WHAT IS the value of R10??

edit: it is R1 and it is 10ohm

0
None
sk8nfooldavorin.perkovic

Reply 7 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 3 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 3 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
JanvierD

8 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 !!!!!