Electronic Design

PC Helps Improve Current Measurements

Measuring currents with a current meter can be problematic due to the series impedance of the meter. Most current meters have a series resistance of about half an ohm, which introduces an error voltage of about half a volt at just one amp of current. This can be a serious problem for many systems.

A circuit and software combination was developed that effectively eliminates the series impedance loss of the meter, while at the same time providing accuracy and ease of measurement (see the figure). This solution uses the National Semiconductor LM3813PM-1.0 integrated circuit to measure the current and provide a digital signal to the PC for display. The impedance loss of this circuit is typically a factor of 100 lower than using a meter directly, at just 0.005 Ω.

The circuit features a pulse-widthmodulated (PWM) output with duty cycle proportional to current. While the PWM signal could be displayed directly on an oscilloscope and manually converted to current, a more userfriendly solution was desired. To complete the circuit, a C-language program (compiled using Borland C) uses the parallel port of the PC to measure the duty cycle of the PWM signal, convert the duty cycle to current, and to display the current to the screen.

The duty cycle is calculated as:

Duty Cycle = (high time)/\[(high time) + (low time)\]

The current is calculated as:

Current = 2.2 \[(Duty Cycle) − 0.5 − 1/2048\]

A software-loop timer was used to measure high and low time. It’s important that the loop time be same in high-time and low-time software loops. The unit-less nature of the duty cycle makes the real-time interval to execute the loop non-critical, as long as the Nyquist criteria is met (loop time must be less than 1/2 the desired resolution of the duty-cycle measurement).

This solution measures currents from −1 A to +1 A with 1% accuracy. Accuracy can be improved by adding a software-calibration capability.

Hide comments

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