Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
The digital pot have a end to end resistance tolerance of 20% , output voltage must be less than 6.25v ,5v (maximum voltage on the pot ) +1.25 (LM317 regulated voltage).
See the tipical use of LM317 (fist page) https://www.electro-tech-online.com/custompdfs/2009/08/LM117-4.pdf and look at the formula at the bottom of the page:
The current on the ADJ pin is somewhere between 0 and 100uA , using a 10k digital pot this will giwe an error of R2*Iadj = 10000*0,0001 = 1V , so you have to use for R2 a smaller value than a digital pot can have. If you don't need a very good precision you better use a resistive net connected to the portb this will give you in the worst case an error of 0.6 V
I would use the PWM output from the PIC CCP module, then filter it with a 2 stage low pass filter (requires only 2 resistors and 2 caps) then just connect that DC voltage to the Adj pin of the LM317.
That will be fully linear and PIC output of 0v-5v will give LM317 output of 1.2v-6.2v.
1 - The Rds of 2N5461 is temperature dependent so the output voltage will be temperature dependent
2 - The PWM output is referenced to PIC supply voltage
If this is a school project I think the idea is to use the precision and the temperature stability of LM317 to build a digital controlled voltage source , both ideas have the same lack , if you multiply (first case) or add (the second case) an imprecise value to a precise value you will have an imprecise value at the end. Sorry for the criticism , I'm still searching for an working solution.
Improved version of digital pot solution, the Iadj will go through the op amp repeater output , not through R1 R2 divider
You will need a calibration procedure because the digital pot have a tolerace of 20%.
Sorry , replace R1 with a digital pot https://www.electro-tech-online.com/custompdfs/2009/08/MAX5402.pdf and connect the pot through SPI to PIC , i missed the weak point , this will work only for Vout less than 6.5 V otherwise the voltage on the pot will be higher than the maximum voltage admitted ( 5V)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.