@tutorial: Arduino electronic load

In this tutorial I show you how I've build a homemade electronic load with Arduino, an LCD, rotary encoder for the menu and a power MSOFET for load control. It also has a good cooling system so it could handle high loads.

External Link: https://electronoobs.com/eng_arduino_tut123.php

by: ELECTRONOOBS on 2026-05-29

See how to make the circuit, the case, connect everything, see the code I've used and which modules and make the same project. Hope you like it. If this tutorial helps you, consider supporting my work.

~Part 1 - What we need?

This are all the electronics we need for this project. You also have a list with some other parts we need such as plywood, the cooler, the 3DF printed fan covers and screws. The electronics are easy to use. All modules are using i2c communication. For the heat dissipator I've used a PC cooler and works great. You will need thin wire for 5V connections but thick wire for the MOSFET and power lines.


Electronics:

  1. 1 x Arduino NANO: LINK eBay
  2. 1 x i2c LCD display: LINK eBay
  3. 1 x ADS1115 ADC: LINK eBay
  4. 1 x MCP4725 DAC: LINK eBay
  5. 2 x Push Buttons: LINK eBay
  6. 1 x Rotary Encoder: LINK eBay
  7. 1 x IRF3205 N-MOSFET: LINK eBay
  8. 1 x 12V supply: LINK eBay
  9. 1 x 1?/5W resistor: LINK eBay
  10. 4 x Banana Panel Socket: LINK eBay
  11. 1 x DC connector pair: LINK eBay
  12. 1 x ON/OFF switch: LINK eBay
  13. 18AWG (or lower) wire: LINK eBay
  14. Thin wire (for connections): LINK eBay

We also need:

  1. Plywood: LINK eBay
  2. Fan cover (back) 3D STL: Download 3D file
  3. Fan cover (side) 3D STL: Download 3D file
  4. LCD support 3D STL: Download 3D file
  5. Heat dissipator (I've used PC cooler) LINK eBay
  6. You can also sue this one (for less power): LINK eBay
  7. Carbon Fiber Vinyl Film : LINK eBay


~Part 2 - Schematic
Arduino electronic load schematic
Arduino electronic load schematic
~Part 3.1 - Prepare the MOSFET

Ok, get the MOSFET and solder thick wires to the drain, gate and source. Add shrinking tubes for insulation. Then measure the position and make a hole in the heat dissipator. Add some thermal paste and screw in place the MOSFET. Now you should have the entire power block with 3 wires.

~Part 3.2 - Mount the PCB

On a prototyping PCB, solder all the components. I use thin wires for the low power connections such as 5V for the modules, i2c connections and push buttons. For the path from input through the load and to the MOSFET use thick wires connections. Also, make the connection from the ADC0 and ADC1 of the ADS1115 to the terminals of the 1ohm resistor very short. The longer these connections are, more voltage drop there will be on the load, and we need to read the drop exactly on the LOAD. For the push buttons, LCD and encoder, we add long thin wires for future connection to the PCB with some male-female pins. For power connections add some screw terminals if you have.

~Part 3.3 - Mount the PCB

Below you can see the connections on the bottom side of the PCB. As you can see I've used thick wire for the pwoer path so it could handle high current. I've also filled with solder some connections for the same reason. I've placed female pins so I could later connect the LCD, encoder and those 2 push buttons. Now we can even make a test and then make the case.

~Part 4.1 - The case

I've used plywood and made a simple case. I start with 4 walls, the top one, sides and the back wall. I measure where to fit the coolder fan on the back panel. I then cut a hole in taht back panel for the fan and another one on the right side for air flow. Then I cover the enirte case with carbon fiber texture vinyl so it will look better. I then 3D printe the fan covers. Download those from below. Using super glue I glue the covers in place.

Download: Fan part
~Part 4.2 - More case

Then I glue 4 wood blocks on the bottom part adn add a M3 nut. These will be used to close the case when is finished using M3 screws. I then make the front panel and wrap it in carbon fiber vinyl. I print the LCD support and place it inside. Then I decide where to palce each component. I make holes and add all the buttons, LCD, encoder and connectors. I then glue the fron pannel to the case and make connections to the PCB. Secure the PCb inside with glue.

~Part 4.3 - Finishing the case

The fan is glued in place on the back panel. I make a hole on the side and make sure the Arduino USB connector will be in front of that hole so I can program the chip with a USB cable. The main 12V DC connector has a hole on the back so we can connect power here. That's it. Close the case with screws and we can uplaod the code.

~Part 5.1 - Controller Code

Go below and download the code. You will need the libraries for the LCD, the ADS1115 and the MCP4725 modules and you can download those libraries from the next link as well. You will also need the BusIO library so install that with the library manager of Arduino IDE. Read the code for more details, especially the multiplier part. Compile and upload and then test the controller.

~Part 5.2 - Multiplier explain

This part is important. You see, when you sue the ADS1115, to pass from bit values (0 to 65000), we use a multiplier. By default that is "0.185mv" or "0.000185V". In the code, to measure current, we make a differential measurement of the voltage on the "1ohm" load. Since the load is 1ohm, that will give us DIRECTLY the current value since "I = V/R" and R is 1. BUT!!! The resistor is not exactly 1ohm, so in my case I've adapted the multiplier to 0.0001827. You might need to adjust this variable to other values till you get good readings, so while measuring the value with an external multimeter at the same time, adjust this variable till you get good results.


The same goes here. But in this case, the voltage read is from a voltage divider. You see, the ADS1115 can only measure up to 5V. If the input is higer it will get damaged. So, for that btween the ADS1115 and the main input I've used a 10K and 100K divider and that will equal to a divider of 0.0909090. So, now the multiplier is 0.000185 / 0.0909090 = 0.002035. Now these resistor values are not perfect neighter so we don't have exactly 10K and 100K, that's why my multiplier for voltage read is 0.0020645. Just do the same, measure the voltage on the LCD screen and also with an external multimiter and adjust this value till you get good results. I've measure the resistors but that's not enough. We need precise values.

~Part 6 - Test Video

I hope that you like this tutorial. If you consider supporting my work, buy my PCBs on my shop, or maybe consider supporting me on PATREON or if you want, make a PayPal donation. Thank you very much.

~Part 7 - More info
  1. Something to have in mind. In this version, I'm not using the sense probes. The code was too slow if I read the input voltage and sense voltage at the same time but I'll try to add this feature in a future version.
  2. Also, the current control is made by changing the voltage at the MOSFET gate. This control should be PID for very good results but the ADC read and DAC write are slowing the code so much, that a good PID was not working. So, instead of PID I've made a "manual control" and I decide the proportional value dependind on the error range. Below you can see an example. If the error is very big, bigger than 80% of the setpoint, then the DAC output will change in steps io 300 from a total of 4069. If the error is 60% of the setpoint in steps of 170 and so on. If the error is small, the steps are jsut 1 from a toral of 4069 so we have good control. This works but is not perfect.
~Part 8 - Tutorial video

I hope that you like this tutorial. If you consider supporting my work, buy my PCBs on my shop, or maybe consider supporting me on PATREON or if you want, make a PayPal donation. Thank you very much.

Leave a comment

Please login in order to comment.

Comments

ADVERTISERS
ADVERTISERS
PCBWAY