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.

Pc controlled voltatge regulation

Status
Not open for further replies.

hassenman

Advanced Member level 4
Full Member level 1
Joined
Nov 29, 2004
Messages
117
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,298
Activity points
912
lm317 digipot

Hi Everybody

In order to build a testing circuit , i need first to find a way to regulate voltage using the pc , in fact , starting from an initial voltage , i need to increase the voltage by steps of 0.1 volts , any ideas ?

Regards .
 

You can use a DAC, controlled by the parallel port on the PC. Even an 8-bit DAC, with a 4.096V reference will give you 16mV of resolution. With a 5V reference you get about 19.5mV steps.
 

OK , i won't need too much current , some uA , so think it DAC will handle it.
i'm thinking of another solution , what about using a digital potentiometer with the classic LM317 voltage regulator . i mean replacing the variable resistance with a digital potentiometer that will be controlled digitally . will it be ok ?
 

Yeah, that will be perfectly fine. There are digitally controller resistors on sale in the market, they are generally controlled by I2C bus, which is a 2 wire interface. You can emulate I2C bus by toggling two wires on your parallel port with a simple piece of code and thats all you need.
 

ok , thank u , but are sure that pc can control it without adding a microcontroller ?
i found a digipot that suists my needs , but it's SPI interface .
Is the Pc still able to handle it ?
i found many kinds of control interfaces :

-3-Wire Serial SPI.
-I2C interface.
-2-Wire Serial
-2-Wire Addressable
-Increment-Decrement ...

whats the easiest interface that i can use ?

REGARDS .
 

I think SPI is the easiest to emulate using the parallel port.
 

    hassenman

    Points: 2
    Helpful Answer Positive Rating
I have the feeling that to have a small microcontroller connected to the serial port (simple commands from PC keyboard in Hyperterminal) is just more user-friendly approach .. no software for PC required ..

All what you need is to type, say, 001 for 10mV, or 010 for 100mV and so on ..
When you type a command like 010 in Hyperterminal it sends out these numbers in ASCII, so, in this case the sequence that the micro sees is: 30h 31h and 30h ..
As micro you can use a PIC and to generate output voltage you can choose a DAC, digital potentiometer or just PWM on one of pins ..

Personally, I would use PICAXE-08M with its build-in PWM function, and write code in the PICAXE-Basic, which, most likely, would have something like 10 lines ..
If you wish to have a look at similar device, namely 4-20mA tester based on this PIC have a look at: ..


Regards,
IanP
 

    hassenman

    Points: 2
    Helpful Answer Positive Rating
Thank u for your replies ,
well i don't know if this pwm will permit me to generate from 0 to 15 v or not , but i think i have to write a software , can a software emulate I2C and SPI without the need of a micrcontroller ? .
 

If you would like to experiment with the PC's parallel port without microcontrollers, here are some examples:
"APPLICATION NOTE 1142
Experimenting with the MAX6956 and MAX6957 SPI and I2C GPIO and LED Display Drivers from a PC
This application note describes a PC program, downloadable free, to assist evaluation of the MAX6956 and MAX6957 LED display drivers and GPIO (port expanders).

The MAX6956 and MAX6957 are versatile 28-segment LED display drivers which allow any of the outputs to be configured as general purpose inputs/outputs (GPIO). Control is made through a high-speed SPI (MAX6957) or I2C (MAX6956) serial interface.
This application note describes a utility program which allows a MAX6957 or MAX6956 driver to be controlled from a PC. The utility can be used as a standalone to help an engineer become familiar with the registers and functions of the drivers. Moreover, it can be used to 'prove' an application board prototype by directly controlling the MAX6957 or MAX6956 registers before the equipment's software is designed.

Requirements
A PC running Windows 95, 98, 98SE, ME, NT, or 2000 with a parallel printer port configured for either LPT1 or LPT2."
**broken link removed**

Regards,
IanP
 

thank u all .
well , another question please , this design is with no feedback from the circuit , it means that the pc will only give orders and get nothing in return , will it be stable enough or should i consider this ?
 

Having feedback is always a good option, but if you intend to have none, then a voltage-referenced source should performe well, assuming that it can deliver enough current ..

Regards,
IanP
 

Hi ,
i was just looking to the AD5259 digpot datasheet , and it says that voltage on its resistance pins can'y exceed 5 volts , what will be the voltage on its pins in My case if 'im planning to feed the circuit with a 25 volt voltage as input .
i mean , if i put 25 volts in the LM317 reg input , what will the voltage in the ref pin ?
Regards .
 

OK , i did search for a better voltage range but my problem is that i want the pot to be nonvolatile and i have to reach a precision of 0.1 volt , so the device should be at least 256 steps for a 5kΩ pot and 512 steps for a 10kΩ and so on ..., and all nonvolatile devices are 5.5 maximum voltage range .
how can i calculate the voltage that will be present at pins of potentiometer ?
Are u sure 5 volt will no work with LM317 ?
thank u .

PS : i will use the pot in the 0--->2 kΩ range only so it can provide me
from 1.25 ---> 11.66 volts .
 

What you can do is, you can reduce the voltage to 0-5V, use any digital potentiometer you like, and add an opamp to shift and amplify the voltage to drive the LM317 ADJ pin ..

Regards,
IanP
 

hi ,
can anyone of u tell me how can i calculate the voltage between the red points ?
 

Basically, it's 1.25V/240Ω*Rpot. There is an error term, due to the ADJ pin input current, but the above equation should be close enough.

Why do you need that voltage? You simply adjust the pot and measure the output voltage.
 

as i told u , i will replace the analog potentiometer with a digital one , the maximum voltage at the 2 ends of that pot is 5 volts , thats why i wanna check that . but how did u found that voltage VVV ?
thank u all .
Regards
 

This voltage regulator tries to maintain 1.25V between its output and ADJ pin (accross R1), so if one forgets about a tiny current flowing from ADJ to 0V via R2 the formula given by VVV is moretheless accurate ..

And that means that the voltage on the ADJ pin follows the output minus 1.25V, and that you can't use any digital potentiometer rated for 5V ..

If you want to use a digital potentiometer you have to find one that can withstand voltages of at least Vout(max)-1.25V ..

Regards,
IanP
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top