Jump to content

Parallel port voltmeter


rsd3k

Recommended Posts

g'day, i'm trying to build a monitor charateristics(voltage ,current,temperature) of a battery charger from a PC.

I got limited knowledge in programing .I have bulid a analog to digital conversion circuit which can feed the 12bit digital signals in to a parallel port.

I found a sample labview program and circuit necessary for my requirement from an article of EDN magazine.

http://www.edn.com/article/CA220405.html?industryid=2817

pls find the attached newmulti_max187.Vi file

but i get few errors (logical) when i run the program.

Could any one help me out to fix this problem or suggest another method to build a new program to accquire analog signals and display the votage,current readings.

ps.i don't have a DAQ card because we are not allowed to use it as i'm doin this for my university project.

If i can give 12 bit digital signal to parallel port how can i make a software to read them and display the values.

----------following is the description of the software---

The circuit in Figure 1 represents a simple and cost-effective way to obtain eight-channel analog-signal acquisition through a PC's LPT port. IC1, a 12-bit, serial-output MAX187 ADC, operates from a single 5V supply and accepts analog inputs of 0 to 5V. IC2, an eight-channel MAX338 analog multiplexer, also operates from a single 5V supply. The circuit acquires eight analog inputs and displays eight independent digital readouts in a Microsoft Windows environment.

The MAX338 connects one of eight inputs to a common output through the control of a 3-bit binary address. You derive the positive supply, V+, and the logic supply, VL, by using IC3, a simple, ICL7660-based voltage-doubler circuit. The ICL7660 is a negative-voltage converter. The bits D0 through D3 (pins 2 to 4 on the connector) provide the channel-selection function.

The software allows for channel selection through the Data port (0x378) and collects the ADC's serial data through one of the bits in the LPT1 Status port (0x379). (The Status port uses Pin 15 on the connector, the LPT port's Error input.)

Once the ADC completes the conversion, its Data Ready pin switches from high to low. The DRDY output of the ADC connects to the LPT's port Pin 10 on the connector (the Acknowledge input). The controlling software senses the DRDY signal through the Status port (0x379) on Pin 10 and sets the ADC's chip-select pin to low, through Pin 1 (Data Strobe output) in the Control port (0x37A). The routine then receives the MSB (most-significant bit) from the ADC. After receiving the MSB, the software generates the serial-clock output (SCLK) through Pin 14 (Auto Line Feed output) in the Control port (0x37A)

and then receives the remaining 11 bits from the ADC. Upon reception of all 12 bits, the input goes high to enable the ADC to accommodate new data in its tristate output buffer. The sequence continues, and the digital panel meter displays the acquired data. One input of the LPT port (control port 0x37A, Pin 15) acquires the serial, 12-bit data. The controlling software shifts most of the bits left, according to the bit position, and some of the bits right (because the serial data is in the fourth bit of the data in the status port (0x379)). The software sets other bits to zero.

Finally, a logical OR function of the 12 bytes/words delivers the 12-bit pattern of the acquired signal. For example, the 12th bit

(MSB) appears as the first bit for transfer. This bit must be set as the 12th position of the word; hence, the data received through the fourth bit, D3, must shift left through seven positions to be assigned as an 11th bit, and so on. In this sequence of data structuring, once the fourth bit (LSB 4) of the 12-bit pattern appears, it needs no shifting, because it is an actual D3 bit. The third bit, D2, requires shifting in the right position by one, and the D1 and D0 bits need right-shifting by two and three, respectively. This method of shifting and finally performing a logical-OR operation delivers the exact 12-bit

data pattern from the serial data received through one line of the parallel port.

D0 through D3 bits in the Data port (0x378) enable the channel selection. For each channel selection, the cited sequence of acquiring the data and conditioning it provides eight independent digital readouts.

In the program, a time delay of 125

Link to comment
  • 3 weeks later...

Hi down under,

I had a look to the original vi - it is written in a very bad style - using no loops etc.

Unfortunately I cannot open your vi - I use LV7.1.1 @ the moment

What I can offer is a vi - written for MAX168 - a 12Bit serial ADC using the LPT - Port.

It is tested and worked perfect in the past for me. From there you can go ahaed and

make changes for yor ADC.

The Datasheet of MAX168 find @ MAXIM

Hope this helps

Regards from Dresden / Germany

Werner

Download File:post-4460-1159424160.zip

Link to comment
  • 2 weeks later...

thanks alot for the max 168 based program.unfortunately max 168 chip ic isn't available in australia.

i ordered it through the internet and it will take up to 3 weeks for shipment.

i 'll let u know the out come once the circuit is build.

g'day, i'm trying to build a monitor charateristics(voltage ,current,temperature) of a battery charger from a PC.

I got limited knowledge in programing .I have bulid a analog to digital conversion circuit which can feed the 12bit digital signals in to a parallel port.

I found a sample labview program and circuit necessary for my requirement from an article of EDN magazine.

http://www.edn.com/article/CA220405.html?industryid=2817

pls find the attached newmulti_max187.Vi file

but i get few errors (logical) when i run the program.

Could any one help me out to fix this problem or suggest another method to build a new program to accquire analog signals and display the votage,current readings.

ps.i don't have a DAQ card because we are not allowed to use it as i'm doin this for my university project.

If i can give 12 bit digital signal to parallel port how can i make a software to read them and display the values.

----------following is the description of the software---

The circuit in Figure 1 represents a simple and cost-effective way to obtain eight-channel analog-signal acquisition through a PC's LPT port. IC1, a 12-bit, serial-output MAX187 ADC, operates from a single 5V supply and accepts analog inputs of 0 to 5V. IC2, an eight-channel MAX338 analog multiplexer, also operates from a single 5V supply. The circuit acquires eight analog inputs and displays eight independent digital readouts in a Microsoft Windows environment.

The MAX338 connects one of eight inputs to a common output through the control of a 3-bit binary address. You derive the positive supply, V+, and the logic supply, VL, by using IC3, a simple, ICL7660-based voltage-doubler circuit. The ICL7660 is a negative-voltage converter. The bits D0 through D3 (pins 2 to 4 on the connector) provide the channel-selection function.

The software allows for channel selection through the Data port (0x378) and collects the ADC's serial data through one of the bits in the LPT1 Status port (0x379). (The Status port uses Pin 15 on the connector, the LPT port's Error input.)

Once the ADC completes the conversion, its Data Ready pin switches from high to low. The DRDY output of the ADC connects to the LPT's port Pin 10 on the connector (the Acknowledge input). The controlling software senses the DRDY signal through the Status port (0x379) on Pin 10 and sets the ADC's chip-select pin to low, through Pin 1 (Data Strobe output) in the Control port (0x37A). The routine then receives the MSB (most-significant bit) from the ADC. After receiving the MSB, the software generates the serial-clock output (SCLK) through Pin 14 (Auto Line Feed output) in the Control port (0x37A)

and then receives the remaining 11 bits from the ADC. Upon reception of all 12 bits, the input goes high to enable the ADC to accommodate new data in its tristate output buffer. The sequence continues, and the digital panel meter displays the acquired data. One input of the LPT port (control port 0x37A, Pin 15) acquires the serial, 12-bit data. The controlling software shifts most of the bits left, according to the bit position, and some of the bits right (because the serial data is in the fourth bit of the data in the status port (0x379)). The software sets other bits to zero.

Finally, a logical OR function of the 12 bytes/words delivers the 12-bit pattern of the acquired signal. For example, the 12th bit

(MSB) appears as the first bit for transfer. This bit must be set as the 12th position of the word; hence, the data received through the fourth bit, D3, must shift left through seven positions to be assigned as an 11th bit, and so on. In this sequence of data structuring, once the fourth bit (LSB 4) of the 12-bit pattern appears, it needs no shifting, because it is an actual D3 bit. The third bit, D2, requires shifting in the right position by one, and the D1 and D0 bits need right-shifting by two and three, respectively. This method of shifting and finally performing a logical-OR operation delivers the exact 12-bit

data pattern from the serial data received through one line of the parallel port.

D0 through D3 bits in the Data port (0x378) enable the channel selection. For each channel selection, the cited sequence of acquiring the data and conditioning it provides eight independent digital readouts.

In the program, a time delay of 125

Link to comment
  • 2 years later...

QUOTE (wha @ Sep 28 2006, 08:19 AM)

Hi down under,

I had a look to the original vi - it is written in a very bad style - using no loops etc.

Unfortunately I cannot open your vi - I use LV7.1.1 @ the moment

What I can offer is a vi - written for MAX168 - a 12Bit serial ADC using the LPT - Port.

It is tested and worked perfect in the past for me. From there you can go ahaed and

make changes for yor ADC.

The Datasheet of MAX168 find @ MAXIM

Hope this helps

Regards from Dresden / Germany

Werner

Hello.

I bought this ADC and I want to connect it to my LPT port. Is there any tricks I should know before I connect it? Can I get the power supply from the LPT port? Witch pin? Is it a must to connect a VREF pin on +5V or can I leave it floating in the air? If I do that then is my reference voltage 4,096V?

Sory for my bad english.

Grettings from Slovenia.

Urban

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.