Close
0%
0%

Electronic Load 3.3V-16V 1A

Electronic load that supports 3.3V-16V at 1A of current. Equipped with keypad, LCD, rotary encoder, STM32 Microcontroller and more!

Similar projects worth following
Electronic load that supports 3.3V-16V at 1A of current. My goal was to develop a useful tool for my bench, while learning many aspect of electronics engineering. I could have made a simple electronic load, but I also wanted to create a useful development environment for the STM32 micro-controller family. I have not used the STM32 micro-controller family before, and would like to take advantage of its powerful capabilities, while branching away from the typical Arduino environment I have become comfortable with. Some of the features include a DAC (Digital to Analog Converter), custom keypad, rotary encoder, LCD module, voltage measurements, current measurements, temperature measurements, buzzer, USB to Serial interface & RGB LED.

x-zip-compressed - 211.36 kB - 12/01/2019 at 19:27

Download

Adobe Portable Document Format - 268.95 kB - 12/01/2019 at 19:27

Preview
Download

OpenDocument Spreadsheet - 23.82 kB - 12/01/2019 at 19:27

Download

  • 1 × See Attached BOM See Attached BOM

  • Getting To Blinky

    schwarzrmsu3 days ago 0 comments

    Now that I have connected successfully to the microcontroller, the logical next step is to blink an LED.  I simply plan to test the functionality of the Debug RGB LED by writing some code to turn on and off each element of the RGB LED:

    Microcontroller Pins:

    Debug RGB LED:

    I wrote functions for each LED for Turn On and Turn Off.  I included Red, Green, Blue and all other color combinations.  This will make it easier to toggle these LED's once the code gets more complicated:

    void TurnOnRedLED(void)
    {
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_9, GPIO_PIN_SET);
        return;
    }
    
    void TurnOffRedLED(void)
    {
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_9, GPIO_PIN_RESET);
        return;
    }
    
    void TurnOnGreenLED(void)
    {
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_SET);
        return;
    }
    
    void TurnOffGreenLED(void)
    {
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_RESET);
        return;
    }
    
    void TurnOnBlueLED(void)
    {
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_11, GPIO_PIN_SET);
        return;
    }
    
    void TurnOffBlueLED(void)
    {
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_11, GPIO_PIN_RESET);
        return;
    }
    
    void TurnOnYellowLED(void)
    {
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_9, GPIO_PIN_SET);
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_SET);
        return;
    }
    
    void TurnOffYellowLED(void)
    {
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_9, GPIO_PIN_RESET);
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_RESET);
        return;
    }
    
    void TurnOnPurpleLED(void)
    {
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_9, GPIO_PIN_SET);
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_11, GPIO_PIN_SET);
        return;
    }
    
    void TurnOffPurpleLED(void)
    {
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_9, GPIO_PIN_RESET);
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_11, GPIO_PIN_RESET);
        return;
    }
    
    void TurnOnCyanLED(void)
    {
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_SET);
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_11, GPIO_PIN_SET);
        return;
    }
    
    void TurnOffCyanLED(void)
    {
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_RESET);
        HAL_GPIO_WritePin(GPIOA, GPIO_PIN_11, GPIO_PIN_RESET);
        return;
    }

     I added some simple code in the main while loops to test each function:

      while (1)
      {
          TurnOnRedLED();
          HAL_Delay(1000);
          TurnOffRedLED();
          HAL_Delay(1000);
    
          TurnOnGreenLED();
          HAL_Delay(1000);
          TurnOffGreenLED();
          HAL_Delay(1000);
    
          TurnOnBlueLED();
          HAL_Delay(1000);
          TurnOffBlueLED();
          HAL_Delay(1000);
    
          TurnOnYellowLED();
          HAL_Delay(1000);
          TurnOffYellowLED();
          HAL_Delay(1000);
    
          TurnOnPurpleLED();
          HAL_Delay(1000);
          TurnOffPurpleLED();
          HAL_Delay(1000);
    
          TurnOnCyanLED();
          HAL_Delay(1000);
          TurnOffCyanLED();
          HAL_Delay(1000);
      }

    I then compiled and loaded this code to the micro and tested the SW:

    Red:

    Green:

    Blue:

    Yellow:

    Purple:

    Cyan:

  • Getting To Ready To Code

    schwarzrmsu3 days ago 0 comments

    Getting started with the software portion of the project proved to be quite difficult.  I had to learn which tools and software to use in order to do so.  Below is a breakdown of my selections along with how you can get started yourself if you wish to use a similar tool chain.

    Programming Tool:

    I chose the STLINK-V3

    https://www.st.com/en/development-tools/stlink-v3set.html

    This seems to be a very versitile tool.  I plan on using the following pins to interface with my board:

    1. VCC (3.3V)
    2. CLK
    3. GND
    4. DIO
    5. NRST (Forgot to route, going to need to solder wire to make connection [TP 47])

    Choosing an IDE:

    Choosing an IDE seemed to be the most difficult decision.  Through a bit of research I decided on using the following tools:

    Powering Board:

    I simply plugged in a 12V center positive plug pack into the power connector.  You could power up using a current limited supply just in case, but I felt confident so I plugged directly into wall.

    You should see the back light on LCD power on:

    You should also be able to measure 3.3V on the voltage regulator:

    Connecting Board To Programming Tool:

    Next I connected the programming tool to my board.  You will need to make the following connections:

    1. VCC (3.3V)
    2. CLK
    3. GND
    4. DIO
    5. NRST (Forgot to route, going to need to solder wire to make connection [TP47])

    I plan on switching to the STLINK-V3 main 14 way connector for future revisions in order to simplify the programming tool connections.

    Communicating With Microcontroller:

    With everything plugged in.  I opened the STM32CubeProgrammer, crossed my fingers and hit connect:

    I succesfully connected to the microcontroller which means I am ready to start programming.

  • Electronic Load 3.3V-16V 1A EDU 1 Release

    schwarzrmsu12/01/2019 at 19:30 0 comments

    Uploaded Electronic Load 3.3V-16V 1A EDU 1 files and updated all relevant material to reflect this latest revision.

View all 3 project logs

  • 1
    Order PCB (Printed Circuit Board)

    The PCB is a custom designed component, therefore you will need to order this part from PCB manufacturers like https://oshpark.com/ or https://jlcpcb.com/.  The gerbers I have attached to this project are very conservatively designed in order to be directly compatible with these services.  You should be able to simply drop the zip file into the website and select the necessary settings.

    From JLPCB:

    Track the production progress and shipping until the boards arrive:

  • 2
    Order All Electrical & Mechanical Components

    The rest of the BOM items are off the shelf devices, therefore you can purchase these from a number of sources like https://www.digikey.com/ or https://www.mouser.com/.  The BOM I have attached to this project show Manufacturer, Manufacturer PN & Quantity:

    Quantity Description Manufacturer
    1 AUDIO PIEZO TRANSDUCER 12.5V SMD Murata Electronics North America
    1 CAP SMD CER 0.1UF 50V 10% X7R 0603 FLEXSAFE AVX Corporation
    1 CAP SMD CER 10UF 25V 10% X7R 1210 FLEXSAFE AVX Corporation
    15 CAP SMD CER 0.01UF 50V 10% X7R 0603 Samsung Electro-Mechanics
    1 CAP SMD AEC 10UF 35V 20% 105 Wurth Electronics Inc.
    12 CAP SMD CER 0.1UF 50V 10% X7R 0603 Yageo
    2 CAP SMD CER 47pF 50V 5% C0G/NP0 0603 Walsin Technology Corporation
    1 CAP SMD CER 4.7UF 25V 10% X5R 0805 Samsung Electro-Mechanics
    5 CAP SMD CER ESD 0.01UF 100V 10% X7R 0603 KEMET
    2 TVS DIODE 33V SMB Littelfuse Inc.
    1 DIODE SCHOTTKY 40V 1A SOD123 Diodes Incorporated
    2 TVS DIODE 3.3V SOD923 ON Semiconductor
    1 LED RGB 622NM 530NM 470NM 6SMD CREE Inc.
    1 LED GREEN CLEAR 0603 SMD Lite-On Inc.
    1 LED BLUE CLEAR 0603 SMD Lite-On Inc.
    1 DIODE ZENER 17V 500MW SOD123 ON Semiconductor
    1 FUSE 500MA 125VAC FAST 1206 Bel Fuse Inc.
    1 FUSE 2A 125VAC FAST 1206 Bel Fuse Inc.
    1 FUSE 250MA 125VAC FAST 1206 Bel Fuse Inc.
    1 FERRITE BEAD 40 OHM 0805 1LN Laird-Signal Integrity Products
    1 HEATSINK TO-220 W/PINS 1.5"TALL Aavid Thermal Division of Boyd Corporation
    1 CONN PWR JACK 2X5.5MM 24V 2.5A SOLDER CUI Inc.
    1 CONN HEADER VERT 4POS 2.54MM Harwin Inc.
    1 CONN USB MICRO B RECPT SMT R/A Amphenol ICC (FCI)
    4 TEST POINT PC MINI .040"D BLACK Keystone Electronics
    1 Test Sockets SINGLE PCB SOCK RED Deltron
    5 TEST POINT PC MINI .040"D WHITE Keystone Electronics
    1 Test Sockets SINGLE PCB SOCK BLACK Deltron
    1 MOUNTING KIT TO-220 Aavid Thermal Division of Boyd Corporation

    4 MOSFET N-CH 2.5OHM 60V 0.25A SOT-23 Rohm Semiconductor
    1 MOSFET P-CH 33mOHM 40V 3.3A DFN2020 Diodes Incorporated
    1 MOSFET N-CH 24mOHM 75V 80A LINEAR TO-220AB IXYS
    3 RES SMD 2K OHM 1% 1/10W 0603 Stackpole Electronics Inc
    2 RES SMD 100K OHM 1% 1/10W 0603 Stackpole Electronics Inc
    26 RES SMD 10K OHM 5% 1/10W 0603 Stackpole Electronics Inc
    1 RES SMD 12K OHM 5% 1/10W 0603 Stackpole Electronics Inc
    1 RES SMD 301 OHM 1% 1/2W 1206 Stackpole Electronics Inc
    1 RES SMD 931 OHM 1% 1/4W 1206 KOA Speer Electronics Inc.
    1 RES SMD 2.61K OHM 1% 1/4W 1206 KOA Speer Electronics Inc.
    1 RES SMD 442 OHM 1% 1/4W 1206 KOA Speer Electronics Inc.
    4 RES SMD 1K OHM 5% 1/10W 0603 Stackpole Electronics Inc
    2 RES SMD 4.7K OHM 5% 1/10W 0603 Stackpole Electronics Inc
    10 RES SMD 28.7 OHM 1% 1W 2512 Vishay Dale
    1 RES SMD 47 OHM 5% 1/10W 0603 Stackpole Electronics Inc
    3 RES SMD 0 OHM 1/10W 0603 Stackpole Electronics Inc
    1 RES SMD 75m OHM 1% 3W 2512 Bourns Inc.
    2 RES SMD 27 OHM 1% 1/10W 0603 Stackpole Electronics Inc
    3 RES SMD 20K OHM 1% 1/10W 0603 Stackpole Electronics Inc
    1 TRIMMER 100K OHM 5% 1/10W 1 TURN Bourns Inc.
    17 SWITCH TACTILE SPST-NO 0.02A 15V Panasonic Electronic Components
    1 ROTARY ENCODER MECHANICAL 24PPR Bourns Inc.
    1 THERM NTC 10KOHM 3984K RING LUG Vishay BC Components
    1 THERMISTOR NTC 10KOHM 3380K BEAD Murata Electronics
    1 IC OPAMP GP 4 CIRCUIT 14TSSOP Texas Instruments
    1 IC USB SERIAL FULL UART 20SSOP FTDI
    1 IC REG LINEAR 3.3V 1A DPAK-3 ON Semiconductor
    1 IC MPU SUPERVISOR 3.08V 20MS SC70-3 Microchip Technologies
    1 LCD COG CHAR 2X20 WH TRANSFL 3.3V Newhaven Display Intl
    1 IC MCU 32BIT 256KB FLASH 64LQFP STMicroelectronics
    1 IC DAC 12BIT V-OUT SC70-6 Linear Technology/Analog Devices
    1 IC CMOS 1 CIRCUIT SOT23-5 Texas Instruments
    1 IC MONITOR PWR/CURR BIDIR 0.5% 10MSOP Texas Instruments
    1 TVS DIODE 5.5V 10V SC88 ON Semiconductor
    1 CERAMIC RES 8.0000MHZ 10PF SMD Abracon LLC

    Manually load these parts into a cart and purchase the components.

  • 3
    Order Stencil & Solder Paste

    Once your PCB & components arrive, you will be ready to start assembling.  One critical custom tool will be the solder paste stencil which can be ordered using services like https://www.oshstencils.com/#%20.  The gerbers I have attached to this project are very conservatively designed in order to be directly compatible with these services.  You should be able to simply drop the zip file into the website and select the necessary settings..

    From OSH Stencils:

    Track the production progress and shipping until the stencil arrives.

    Also you will need solder paste.  I recommend using lead free, but be sure to investigate all of the usage warnings since it does contain chemicals.  I usually purchase my solder paste through OSH Stencils during checkout, but you can buy solder paste through many sources:

View all 9 instructions

Enjoy this project?

Share

Discussions

Dan Maloney wrote 12/02/2019 at 16:57 point

Thanks for the great documentation. I learn a ton just looking at schematics that are nicely laid out like that.

  Are you sure? yes | no

schwarzrmsu wrote 12/03/2019 at 03:47 point

Thank you for the compliment.  I do my best to document my projects.  I have been working on a few over the past few years, but never decided on a platform to share them.  Hackaday.io seems to be exactly what I was looking for.  Slowly catching up with uploading content, but this is actually one of my newer projects.  Glad to hear other people can benefit from my work as well.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates