LM317T voltage regulator project

I need some assistance with building a power supply. For that I drawed a shematics and would like you to guide me in that. Would it work that way, or have I done some mistakes in it?

Looks more or less OK. The output of the LM317 is always 1.25 volts higher than it's control pin, so your output should be controllable over a 1.25 to 1.25 + (1+R2/R1)*5 volts range

regards

Allan

Yes that looks quite a good circuit. One thing I would point out is that you could of course use a 7805 rather than a 7809 and feed the Arduino with 5v direct, this bypassing the controllers own 5v regulator. Also, if the current needed by the Arduino is small, the 78L09 or 78L05 (100mA) might do and are much smaller packages.

A Low-Pass Filter ....

Using an Arduino and PWM and a low-pass filter (resistor and capacitor) is not a good idea.

The LM317 needs 2 resistors to control the output voltage. Your OP-Amp replaces one of the resistors and the low-pass filter will give you an output voltage with a lot of ripples. A filter is just a filter.

Use a digital potentiometer in front of the OP-Amp.

You did not explain at all, why you need an Arduino for a power supply. A simple potentiometer in series with a resistor can do everything you want in a manually controlled power supply.

Or do you want a digitally controlled power supply?

There is a lowpass filter - and if the OP ran the PWM at a much higher frequency than normal - 20kHz or more - would be very effective

Allan

You can use a npn power darlington transistor (TIP120…) instead of the LM317. Connect the output to the opamp - input, using a voltage divider (R1/R2). Don’t forget a biiiig heat sink (and fan?), the transistor will burn up to 45W!

G7MRV:
Yes that looks quite a good circuit. One thing I would point out is that you could of course use a 7805 rather than a 7809 and feed the Arduino with 5v direct, this bypassing the controllers own 5v regulator. Also, if the current needed by the Arduino is small, the 78L09 or 78L05 (100mA) might do and are much smaller packages.

Good idea, thank you!

arduinoaleman:
A Low-Pass Filter …

You did not explain at all, why you need an Arduino for a power supply. A simple potentiometer in series with a resistor can do everything you want in a manually controlled power supply.

Or do you want a digitally controlled power supply?

Why not? :slight_smile: I’m just interested in Arduino and in power supplies - I think it will help me to go deepter in unterstanding electronical principles. Later on, I would also try to write a software in C++ (with surface), which could generate different signal types (sinus, rectangle, triangle) to the arduino and output them just by clicking a certain button at the power supply.

allanhurst:
There is a lowpass filter - and if the OP ran the PWM at a much higher frequency than normal - 20kHz or more - would be very effective

Allan

Yes, I think 490 Hz is way too little!

DrDiettrich:
You can use a npn power darlington transistor (TIP120…) instead of the LM317. Connect the output to the opamp - input, using a voltage divider (R1/R2). Don’t forget a biiiig heat sink (and fan?), the transistor will burn up to 45W!

If this first version will run well, then I will (maybe) combine the lm317 with a power transistor and change some other components.

So, now I have added some components for current and voltage measuring. The PWB frequency I have also changed to 31kHz. I have already soldered my project and I'm able to change the voltages with two micro switches, but as far as I connect a load (fan/lamp) to the output, the voltage is breakdown like from 12V to 2.8V... ? I can't find the reason for that - already checked everything many times... What could the reason be for that?

Hi,
When your output breaksdown,

What is the input voltage to the LM317?
What is the voltage at the ADJ pin of the LM317?
How much current is the lamp/fan drawing?

Also a 0.1uF capacitor from the input pin to gnd and one form output pin to gnd of the LM317 may help.

Thanks.. Tom.. :slight_smile:

I see two possible reasons:
The LM317 is shut down for thermal or other overload?
Your circuit is oscillating? Check what caps are recommended around the LM317.

You haven't fitted the essential 2 feedback resistors to the LM317T. Read the datasheet!

The circuit you show will output 1.25 volts. That won't run an arduino.

Allan

allanhurst:
You haven't fitted the essential 2 feedback resistors to the LM317T. Read the datasheet!

The circuit you show will output 1.25 volts. That won't run an arduino.

Allan

The lesson here is to consider the readability of a document before posting it. The regulator that runs the arduino isn't an LM317. It's some other smudge.

In which case how can anyone comment on stability etc? We need a datasheet / part number.

Allan

edit - and a readable circuit diagram.

Hi,
OPs new diagram,

Tom.... :slight_smile:

Ok, it works now! Somehow the input-pin of the LM317 wasn't connected, now the voltage is stable!