Electronic Design

Parallel-Port Powers Level Detector With Data Logging Capability

Using a PC parallel port, this selfpowered circuit precisely monitors four voltage levels in the range of 0.0 V to slightly over 5.0 V. Since the circuit is software-controlled, it lends itself to simple data logging applications. It’s a simple matter to record the time that a particular threshold is crossed. Doing so could be useful for tasks such as battery-pack-discharge testing. There are four independent comparators. Therefore, logic operations implemented in software can provide windowing functions that determine if voltage levels fall between any two thresholds.

Driven by the parallel port’s D7 output (pin 9), the LM2665 voltage converter is the heart of the circuit (see the figure). Typically, the data pins can source a milliamp or two of current. When current is drawn from these pins, however, the voltage level sags appreciably. Any available voltage is doubled by the LM2665 with better than 90% efficiency. The load presented by the LMV339 comparator and the LM4041-ADJ and its resistor network is light enough to allow the reference voltage to remain in excess of 5.0 V. A 5.1-V Zener diode protects the LMV339 supply voltage.

Measured at the positive terminal of the LM4041-ADJ, the maximum reference voltage is set using potentiometer R2. Potentiometers R3 to R6 are used to set the individual reference voltages for the four comparators. The voltage is measured at the wiper of each potentiometer.

To power the circuit, the software must apply a logic high to pin 9 of the parallel port. Data pins 2 to 8 are free to be used as program output. The software also must read pins 10, 12, 13, and 15 as well as provide output appropriate to the application. Several excellent books are available that cover parallel port programming in various languages. To view a sample Visual C program, visit Electronic Design’s web site at www.elecdesign.com, and click on the “Ideas for Design” icon.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.