Power Supply LM317

3,687

58

7

About: Think, make, test, write, repeat

In these instructable we are going to show you how to make digital power supply using LM317 adjustable regulator, and Arduino pro mini. We added ultrasonic sensor which is used to control output voltage.

Output voltage depends on resistance R2 (picture 4, picture from lm317 datasheet). If you change the resistance R2, you change output voltage. We are changing resistance R2 with parallel connection of the resistors. We are controlling 12 resistors, that means we can get 2^12 (4096) different resistances and with that different output voltage.

Power supply can output voltage from 4,3V to 12V (0,1V Precision). We added 250 ohm potentiometer, so you can lower buttom line to 3V (and with that upper line to 7V).

Its max current is 5A.

Step 1: Parts

For this instructable you are going to need following parts:

- Voltage/current meter________(1)(link)

- On/off switch_______________(1)(link)

- 3D printed parts

- Fuse holder________________(1)(link)

- Ultrasonic sensor____________(1)(link)

- 1 Pair Banana Plugs__________(1)(link)

- 1 Pair Banana connector_______(1)(link)

- 1 Pair Alligator Clip____________(1)(link)

- Circuit

- Button switch_________________(3)(link)

- Power adapter (16V), (64mm x 42mm x 129,5mm)

- 12v ventilator_________________(1)(link)

Step 2: 3D Printed Parts

Power supply is designed in Fusion 360. It is made out of two parts. We added .f3d files, so you can modify housing in fusion 360.

Step 3: Power Adapter

Place power adapter in housing (picture 1). We are using 16V input for circuit (max input voltage for circuit is 30V).

Step 4: Electronic Circuit

Make sure that your circuit board is small enough to fit in housing of power supply.

Blue elements (picture 1) are add on, and you don`t need them. Potentiometer is used to regulate output voltage, and switch is used to chose between manual (Potentiometer controls resistance) and digital mode (arduino controls resistance).

2k ohm resistor -> D0 (Arduino pro mini)

1,8k ohm resistor -> D1 (Arduino pro mini)

1,6k ohm resistor -> D2 (Arduino pro mini)

1,4k ohm resistor -> D3 (Arduino pro mini)

1,2k ohm resistor -> D4 (Arduino pro mini)

1,1k ohm resistor -> D5 (Arduino pro mini)

1k ohm resistor -> D6 (Arduino pro mini)

900 ohm resistor -> D7 (Arduino pro mini)

800 ohm resistor -> D8 (Arduino pro mini)

700 ohm resistor -> D9 (Arduino pro mini)

250 ohm resistor -> D10 (Arduino pro mini)

100 ohm resistor -> D11 (Arduino pro mini)

Ultrasound sensor : trig D13, echo D12

Red button: A0

Yellow button: A1

Green button: A2

Step 5:

Connect and install buttons, fan, switch, fuse and voltage current meter.

Step 6: Program It

Program arduino and test power supply.

Step 7: Tighten the Cover

Tighten the cover with M3 x 15mm screws.

Step 8: Cables (banana - Aligator)

Solder wires on connectors.

Step 9: Cable Holder

Cut rubber band and bind it gently on housing (picture 2), and your power supply is ready to use.

Share

    Recommendations

    • Plastics Contest

      Plastics Contest
    • Optics Contest

      Optics Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018

    7 Discussions

    0
    None
    JosuéH23

    1 year ago

    Interesting project. What is the part number of the BJT?

    1 reply
    0
    None
    Niko_96JosuéH23

    Reply 1 year ago

    Thank you. I used S9014, but you can use any similar transistor, just make sure it is NPN.

    0
    None
    Teratron

    1 year ago

    Interesting way to control the LM317!

    I think your R1 feedback resistor on you circuit diagram should go to Vout though.

    I would also add some capacitance on the output for stability and low ripple.☺

    1 reply
    0
    None
    Niko_96Teratron

    Reply 1 year ago

    You are right, my mistake. Thank you for the information.

    0
    None
    dvlr

    1 year ago

    I have to say that using ultrasonic sensor is very clever and can be useful on the field, you could have deported it to do the setting with foot while your 2 hands are busy ?

    0
    None
    burn317

    1 year ago

    Great Instructable!

    I'm just confused why you would use an ultrasonic sensor to control your voltage output?

    1 reply
    0
    None
    Niko_96burn317

    Reply 1 year ago

    Thank you! You can use ultrasonic sensor when you have dirty (Motor oil) or wet hands.