Controlling Variable Voltage Regulator L200 or LM317 Using PIC Microcontroller?

Status
Not open for further replies.

asking

Full Member level 5
Joined
Sep 21, 2010
Messages
279
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,298
Activity points
3,377
Hello,

I was thinking can i control the Voltage Regulators Like L200 or LM317 using pic microcontroller ? Can we use PWM Signal to control the reference voltage provide to the voltage regulator ? OR any other idea, Because i need to make one digital power supply which will increment and decrement voltage according to our need.

i need some guidance....Plz..
 

you could try use a non volatile digital potentiometer (with sufficient voltage rating) instead of R2 in an LM317 circuit. But getting a low enough ohm value might be a challenge. So maybe a fixed resistor in parallel to reduce the ohms... ?
 
Last edited:

you could try use a non volatile digital potentiometer (with sufficient voltage rating) instead of R2 in an LM317 circuit. But getting a low enough ohm value might be a challenge. So maybe a fixed resistor in parallel to reduce the ohms... ?

Actually here the place where i live, digital Potentiometer are not available...so can i use PWM Technique ?
 

what increments of control or how many steps do you want ? what is your min and max voltages ?

i'm not sure how you could use PWM, but there are other methods.... also digital control.
 

I want to use LM338K and i want lowest possible to 2.5-24 Volt. Increment could be atleast 0.5Volt. So consider as 45-50 increments
 

PWM control is basically possible solving this functions:
- pulse width to constant reference voltage conversion
- controlling a three terminal regulator with a voltage

The first point can be achieved with a low pass of sufficient pwm frequency supression, depending on the frequency and accepted residual ripple. A second or third order active filter is usually suitable. For moderate accuracy, you can use the processor port voltage itself as output reference, otherwise a reference IC and analog switch.

Using the standard voltage divider regulator circuit, the control voltage must be as high as the intended output voltage variation. Alternatively, a voltage controlled current source can be used in place of the lower resistor, getting rid of a high voltage supply for the control circuit.
 

could you please provide me circuit diagram how to apply PWM to LM317 or LM338K ? for range of 1.25 - 24V?
 


although it was made on pic-axe but you can get idea how to implement using other development environment such as C or pic basic

Fragrance
 

Attachments

  • lm317.rar
    72.2 KB · Views: 210

I tried the circuit given in the image attached...but not able to simulate properly in the protues.... do u have any PIC MCU Based circuit ? that would be helpful..
 

 

 

 

 

hi i have uploaded a bunch of idea how to control LM317 with PWM input the best and good is from Atmel stk500 schematic

Fragrance
 

Attachments

  • lm317.rar
    379.1 KB · Views: 190
hi i have uploaded a bunch of idea how to control LM317 with PWM input the best and good is from Atmel stk500 schematic

Fragrance

Hi...

This is really awesome...and good for people like me those who are planning to construct their own digital power supply really appreciable..
 

Initial complete working design based 18F452 code in Mikro basic I get it from Mikroe web page they have removed the project link that why I share here, Just add LM317 after OP-AMP I am planning to add voltmeter to it to display output voltage on LCD display.

Fragrance
 

Attachments

  • digital_supply.zip
    61.1 KB · Views: 163

I've had a quick look at the design and can see why they removed it, in my opinion there is no measurement or control for current limiting. this is bad practice and would never use it on any of my projects unless you dont mind seeing a puff of smoke coming out of it. You would need to add current limiting and a way of measuring it to control it, Not sure what the ripple or load control would work like, there are better ways of doing it
but thanks for sharing
 
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
Not sure what the ripple or load control would work like
The OP/output FET control loop can be suspected to expose instability by placing a low-pass and >1 gain in the OP feedback path without the required additional compensation means.
 

Hey kripacharya!

you could try use a non volatile digital potentiometer (with sufficient voltage rating) instead of R2 in an LM317 circuit
Can you tell me the part no. of some generic digital non-volatile potentiometers for this purpose.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…