Wednesday, October 11, 2017

How to Build a Simple DC Electronic Load with Arduino Part 1

In this video we look at how to make a simple DC electronic load with Arduino and some simple components.





//****************Arduino code from video************
/*
 * This code was used for a tutorial on how to build a simple eload with Arduino
 * The Tutorial can be found on the ForceTronics YouTube Channel
 * This code is public domain and free for anybody to use at their own risk
 */
void setup() {
  pinMode(A0, OUTPUT); //A0 DAC pin to output
  analogWriteResolution(10); //default DAC resolution is 8 bit, swith it to 10 bit (max)
}

void loop() {
  //create pulsed current profile
  analogWrite(A0, 16); //Set DAC to approximately 10mV --> current 10mV / 5ohm = 2 mA
  delay(500);
  analogWrite(A0,310); //Set DAC to 1V --> current 1V / 5ohm = 200 mA
  delay(50);

}

2 comments:

  1. I really loved reading your blog. It was very well authored and easy to understand. Unlike other blogs I have read which are really not that good.Thanks alot! Best Selfie Ring Lights in 2019 – LED Selfie Light For Smartphones

    ReplyDelete
  2. analogWrite(A0, 16); //Set DAC to approximately 52mV not 10mV
    1023 ------> 3V3
    16 ------> x = (3.3 * 16)/1023 = 0.0516 V

    ReplyDelete