Introduction: Power Supply LM317

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.

Makerspace Contest 2017

Participated in the
Makerspace Contest 2017

Power Supply Contest

Participated in the
Power Supply Contest