DIY Adjustable Constant Load (Current & Power)

The ADC of the Arduino and tasks at the current information we require for the current and power modes and Speaking of power modes for that. We also need to monitor the voltage of the power source. That is why I utilized a voltage divider consisting of a 10 kilo. Ohm and 2 kiloOhm resistor, which will converge the maximum power source voltage of 30 volts down to 5 volts. Once again, this voltage will then be sampled by the ADC of the Arduino and just like that We got all the measurement values we require.

To control the MOSFET gate though. We cannot simply use a pwm pin of the arduino. Nano Since that would be a signal with only 5 volts and ground logic levels Instead we can hook up the signal to a TCU 4420 MOSFET drivertwos outputs we can connect a low-pass filter Whose job is to turn the square wave signal into an analog voltage Whose level is determined by the duty cycle of the PWM signal? With that voltage we can easily control the saturation region of the MOSFETs. Which means we are done with the power electronics powers.

Next is the interface powered for which I utilized an I square C capable sixteen by two LCD year and a rotary encoder Which connect to pin a4 and a5 of the arduino and pin two three and four now. I have used this interface component combination in a lot of previous projects So feel free to watch them if you want more detailed information on how to interact with them.

But what is more important for the beginning is what kind of menu I want to create for the LCD? So I came up with a total of eight screens The first one basically greets the user and the second one lets you choose between power and current modes After choosing either modes the rest of the screens between the two modes is very similar In the first one, you can either select to change the power slash current start the test or go back when choosing to adjust the power slash current you can then obviously adjust those values and if you choose start you can see the set value and the currently measured value of course there's also a stop button there all those eight screens Basically make up the whole system and let me tell you that after using this piece of equipment for quite a while I think this menu creation was the right choice.

But nevertheless let's move on to creating the hardware for the projects For which I skipped the breadboard prototype and immediately sold out all the required components to piece board according to my finalized schematic And For connecting the LCD and rotary encoder, I utilized female headers and male-to-female had a wires Once the hardware prototype was complete I started the programming for the Arduino.

Here is a simple overview of how I did it. I utilized interrupts to detect the turning of the rotary encoder and whether its push button was pushed and Through the help of a screen variable and of course a few other state variables as well I told the micontroller what to do at which menu screen when either attorneys detectives or the button is pushed.

To actually implement the power electronics functionality. I utilized the 16 bit timer one of theatmega328p in order to create an 11 bits PWM signal Its duty cycle is represented by the OCR one a value and a zero percent duty cycle for the value 0 and 100 percent duty cycle for the value 2047 When the power or current mode is then activated this value increases or decreases depending on the measured values.

But there's a lot more going on in this code than just adds so feel free to download it through the link in the video description so that you can go through it line by line and After uploading the codes to the Arduino My constant load prototype was complete all that was left to do was mounting the components inside a suitable enclosure and adding binding terminals for the power source inputs any DC jack to the 5 foods power inputs To finish up these projects I also conducted a couple of tests which all turned out acceptable the only mentionable thing to notes which many viewers will probably complain about Is that a super precise down to milliamp or milliwatt loads cannot be achieved with the system since the measure values all depends on a 10-bit ADC Whose resolution like the bit number implies is not that high So if you want to improve this builds then feel free to add a batterer ADC and maybe even a better DAC for the MOSFET gate voltage This way you will get more precise and stable values.

But overall I'm still satisfied with the end results and I will hopefully continue improving the software side so that I can get rid of those oscillating measured values Anyway, I hope you enjoyed this very So don't forget to Like share and subscribe Stay creative and I will see you next time.

WEBVTTKind: captionsLanguage: enWhen working with power sources like their bench power suppliesBatteries or even solar panels? It is sometimes mandatory to test how much current and power they can output over timethis way you can determine their output capabilities or the true capacity oreven track their output power in order to find a maximum power pointEven track they'll put power in order to find a maximum power pointNow in a previous video I already showed you how to create a simple constant current loadsWhich lucky name implies draws a constant current from our power source, even when the power source voltage variesBut let's face it that circuit was not very intuitive to use and could not dissipate much heatWhich means it is not suited to test big current lossWhich means it is not suited to test big current Rossso in this videoLet's step it up a notch and create a very intuitive to use adjustable constant loadsWhich not only offers a constant current and constant power modesBut can also dissipate a lot more heat due to its heating and thus can be used for much higher current and power levelsSo let's not waste any more time and let's find out how I made itBut can also dissipate a lot more heat due to its heatsink and thus can be used for much higher current and power levelsThis video is sponsored by jlc PCB in order to help electronicEnthusiasts to build their projects at a lower costsJlc PCB provides a special offer onlyTwo dollars for 10 PCBs per order with quick bail time and reliable qualityTwo dollars for 10 PCBs per order with quick reall time and reliable qualityThere are two main parts for these projects one of them is the power electronics partsbasically how we measure the current and voltage of our power source andhow we dissipate a precise and constant amount of its power in heat andThe other part is the interface which deals with how the system will inputs and outputs the datathe power electronics require and produceSo let's start off with the power electronics parts whose main component will be a simple MOSFETsThis one is an IRFZ44N who according to its data sheets can handle up to 55 volts and 49 ampsZ44N who according to its data sheets can handle up to 55 volts and 49 ampsZ44N who according to its data sheets can handle up to 55 volts and 49 ampswho according to its data sheets can handle up to 55 volts and 49 ampswho according to its data sheets can handle up to 55 volts and 49 ampswho according to its data sheets can handle up to 55 volts and 49 ampswho according to its data sheets can handle up to 55 volts and 49 ampswho according to its data sheets can handle up to 55 volts and 49 ampsBut keep in mind that a 49 amp current draw can only be reached if the heat dissipation of the MOSFETs heatsink allows itBy keeping it cool, which will most likely not be possible with my passive cooling solutionBy keeping it cool, which will most likely not be possible with my passive cooling solutionBy keeping it cool, which will most likely not be possible with my passive cooling solutionBut something like 3 amps at 6 volts is easily possibleBy looking further through the data sheets. We can also find the most important graph of the MOSFETs its typical outputcharacteristics graphUsually you want to utilize a MOSFET in its ohmic or linear region on the left sidesSo that you get a minimum voltage drop across its range to source path and thus have minimal power lossesBut that is not what we wantWe want to get lots of power losses across the MOSFETsWhich means we have to use it in its saturation region on the right sidesthere we got higher drain to source voltage drops and thus big power losses asAn example I mounted the MOSFET to my big heatsinkConnected its drainto the plus terminal of my power sourceits source to the minus terminal and its gates to another voltage source, which I slowly cranked up asYou can see at a voltage level of around 3 point 4 voltsthe MOSFETs starts working in its saturation region andThus can be used kind of like a variable power resistorNow, of course, we cannot use the graph to determine the gate voltage for each current a slash power drawInstead we have to measure the current and power values and then either increase or decrease the gate voltageTo keep the measured values at a constant levelFor the current measuring I will be using an ACS seven one two, ICWhich is a Hall effect based linear current sensor. IWent with the 20 M version which features a sensitivity of 102 millivolts per ampThat means that once we power the IC and connect a power source to its terminalsWe can measure a voltage on its output terminal of around 2.5 or 2 volts at 0 amps2.60 2 volts at 1 amp2.70 2 volts at 2 amps and so on and onLater, we'll be sampling this voltage with the ADC of the Arduino and tasks at the current information we require forthe current and power modes andSpeaking of power modes for that. We also need to monitor the voltage of the power sourceThat is why I utilized a voltage dividerConsisting of a 10 kilo. Ohm and 2 kiloOhm resistor, which will converge the maximum power source voltage of 30 volts down to 5 voltsOnce again, this voltage will then be sampled by the ADC of the Arduino and just like thatWe got all the measurement values we requireTo control the MOSFET gate though. We cannot simply use a pwm pin of the arduino. NanoSince that would be a signal with only 5 volts and ground logic levelsInstead we can hook up the signal to a TCU 4420 MOSFET drivertwos outputs we can connect a low-pass filterWhose job is to turn the square wave signalinto an analog voltageWhose level is determined by the duty cycle of the PWM signal?With that voltage we can easily control the saturation region of the MOSFETsWhich means we are done with the power electronics powersNext is the interface powered for which I utilized an I square C capable sixteen by two LCD year and a rotary encoderWhich connect to pin a4 and a5 of the arduino and pin two three and four now?I have used this interface component combination in a lot of previous projectsSo feel free to watch them if you want more detailed information on how to interact with themBut what is more important for the beginning is what kind of menu I want to create for the LCD?So I came up with a total of eight screensThe first one basically greets the user and the second one lets you choose between power and current modesAfter choosing either modes the rest of the screens between the two modes is very similarIn the first one, you can either select to change the power slash current start the test or go backwhen choosing to adjust the power slash current you can thenobviously adjust those values and if you choose start you can see the set value and the currently measured valueofcourse, there's also a stop button thereall those eight screensBasically make up the whole system and let me tell you that after using this piece of equipment for quite a whileI think this menu creation was the right choiceBut nevertheless let's move on to creating the hardware for the projectsFor which I skipped the breadboard prototype and immediately sold out all the required components to piece breadboardaccording to my finalized schematic andFor connecting the LCD and rotary encoder, I utilized female headers and male-to-female had a wiresOnce the hardware prototype was complete. I started the programming for the ArduinoHere is a simple overview of how I did it. Iutilized interrupts to detect the turning of the rotary encoder and whether its push button was pushed andThrough the help of a screen variable and of course a few other state variables as wellI told the micontroller what to do at which menu screen when eitherAttorneys detectives or the button is pushedTo actually implement the power electronics functionality. I utilized the 16 bit timer one of theatmega328p in order to create an 11 bits PWM signalIts duty cycle is represented by the OCR one a value and a zero percent duty cyclefor the value 0 and100 percent duty cycle for the value2047When the power or current mode is then activated?this value increases or decreasesdepending on the measured valuesBut there's a lot more going on in this code than just addsso feel free to download it through the link in the video description so that you can go through it line by line andAfter uploading the codes to the Arduino. My constant load prototype was completeall that was left to do wasmounting the components inside a suitable enclosure and adding binding terminals for the power source inputs anyDC jack to the 5 foods power inputsTo finish up these projects. I also conducted a couple of tests which all turned out acceptablethe only mentionable thing to notes which many viewers will probably complain aboutIs that a super precise down to milliamp or milliwatt loads cannot be achieved with the system?since the measure values all depends on a 10-bit ADCWhose resolution like the bit number implies is not that highSo if you want to improve this buildsThen feel free to add a batterer ADC and maybe even a better DAC for the MOSFET gate voltageThis way you will get more precise and stable valuesBut overall I'm still satisfied with the end results and I will hopefully continue improving the software sideSo that I can get rid of those oscillating measured valuesAnyway, I hope you enjoyed this very if so, don't forget to Like share and subscribeStay creative and I will see you next time