Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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?
 

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..

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: 208

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..
 

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..[/QUOTE

on real hardware it is working fine, i made schamtic in isis for record only not for simulation purpose as i do not have picaxe license file
 

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..[/QUOTE

on real hardware it is working fine, i made schamtic in isis for record only not for simulation purpose as i do not have picaxe license file

ok so you mean to say that i should connect pin 2 to the PIC PWM output pin ? right ?
 

ok so you mean to say that i should connect pin 2 to the PIC PWM output pin ? right ?

Looking at the schematic, Do you mean pin 2 of the regulator ? If so this is the input like it said 25V,
The feed from R10 is the feed back that reads into the ADC channel of the PIC and the pin on the pic axe that feeds the 1m resistor is where you connect the PWM pin from the PIC normally RC2. Say if you set the ouput to 5V then place a load on the output the voltage will drop so the feed back (R10) will give a voltage feed in then if the voltage drops below 5V you increase the PWM to maintain the 5V
my opinion this is not the best way to make a digital PSU. It is possible but for the current limit side you would need to add a 0.1R resistor in line on the 0V side of the output then use the voltage developed accrross the 0.1R resistor then use this to set the current limit in software say if you set it to 200ma anything over that you would cut off or reduce the PWM to the mosfet, Like I siad it's not the best way and not as easy as you think to make a PSU.
 

Looking at the schematic, Do you mean pin 2 of the regulator ? If so this is the input like it said 25V,
The feed from R10 is the feed back that reads into the ADC channel of the PIC and the pin on the pic axe that feeds the 1m resistor is where you connect the PWM pin from the PIC normally RC2. Say if you set the ouput to 5V then place a load on the output the voltage will drop so the feed back (R10) will give a voltage feed in then if the voltage drops below 5V you increase the PWM to maintain the 5V
my opinion this is not the best way to make a digital PSU. It is possible but for the current limit side you would need to add a 0.1R resistor in line on the 0V side of the output then use the voltage developed accrross the 0.1R resistor then use this to set the current limit in software say if you set it to 200ma anything over that you would cut off or reduce the PWM to the mosfet, Like I siad it's not the best way and not as easy as you think to make a PSU.

I mean to say Pin 2 of PICAXE. And i dont need to use feedback for now just need PWM signal to provide some voltage with no Load Resistance. I just need output settable on the output pin.... I just want to confirm that where should i apply PWM Signal. And as you said, Its 1M Resistor is your PWM Signal.
Thanks
 

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: 188
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: 157

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
 
  • Like
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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top