Shop OBEX P1 Docs P2 Docs Learn Events
Measuring current on a half-square wave — Parallax Forums

Measuring current on a half-square wave

SteveHSteveH Posts: 3
edited 2007-07-05 20:39 in BASIC Stamp
Hello everyone,

I have a request for some advice on a project I am building.· I have a circuit that sends DC pulses (half-square wave, from 0 VDC up to 15 VDC and everywhere in between) to a load in·voltages I can vary with a controller.· The current that the load draws is not linear, so I need to be able to measure it.· I would like to do this with a stamp so I can send the information to a computer via RS-232.· To date I've just been using a oscilliscope, a current sense resistor, and a calculator to compute the current.· The pulses are in a 180Hz cycle, and like I said, the voltage can vary from 0 VDC to 15 VDC, but only when I vary it.· So the voltage and current stay the same so long as I don't adjust the voltage of the pulses up or down.

I've tried using an ADC with the current sense, but to no avail.· It couldn't sense the small pulses.· I tried varying sense resistances with didn't do anything but generate more or less heat.· The current I am dealing with is anywhere from 0·to 12 Amps.· I know this is more of an electronics question than a stamp question, but anyone have any ideas?· I really appreciate your help.

Thank you,

Steve

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-07-05 20:39
    I'm a little surprised the ADC couldn't sample-and-hold the signal in 2.7mSec, but there're other ways to skin the cat. Here's one:

    Filter the voltage from the current sense resistor using an RC circuit to convert it to DC. Then use the ADC on that. Your true intermittent voltage will be the ADC value divided by the squarewave duty cycle. Be sure to double check the readings against what you were getting from the scope to make sure things like cap leakage, low ADC input impedance, etc., don't sabotage your readings. Also, if you can't get enough ripple out of the filtered signal, take several readings and average them.

    -Phil
Sign In or Register to comment.