Shop OBEX P1 Docs P2 Docs Learn Events
How to measure current with Stamp — Parallax Forums

How to measure current with Stamp

ArchiverArchiver Posts: 46,084
edited 2002-12-17 02:33 in General Discussion
Can anybody tell me how to setup a current (0-125ma) measuring
system with a Stamp2? Thanks.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-12-10 23:45
    Can anybody tell me how to setup a current (0-125ma) measuring
    system with a Stamp2? Thanks.
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-11 01:55
    Yes, convert it to a voltage! [noparse]:)[/noparse]

    Take the 125mA and pass it through a resistor. V=IR

    If you use a 33 Ohm, this will give approximatly 0-4.125V, which you
    can use an A/D to measure.

    -Martin Hebel
    Electronic Systems Technologies
    Southern Illinois University
    http://www.siu.edu/~imsasa/est


    --- In basicstamps@yahoogroups.com, "John Schwab
    <johnschwab5678@y...>" <johnschwab5678@y...> wrote:
    > Can anybody tell me how to setup a current (0-125ma) measuring
    > system with a Stamp2? Thanks.
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-11 02:55
    Use a current transformer.
    Jameco, less than $1.00 output changes as the flux field around the
    wire changes. very simple. or if you want even cheaper, wrap a few
    dozen loops around your wire, and measure the induced signal !

    Dave



    --- In basicstamps@yahoogroups.com, "Martin Hebel <martin@s...>"
    <martin@s...> wrote:
    > Yes, convert it to a voltage! [noparse]:)[/noparse]
    >
    > Take the 125mA and pass it through a resistor. V=IR
    >
    > If you use a 33 Ohm, this will give approximatly 0-4.125V, which
    you
    > can use an A/D to measure.
    >
    > -Martin Hebel
    > Electronic Systems Technologies
    > Southern Illinois University
    > http://www.siu.edu/~imsasa/est
    >
    >
    > --- In basicstamps@yahoogroups.com, "John Schwab
    > <johnschwab5678@y...>" <johnschwab5678@y...> wrote:
    > > Can anybody tell me how to setup a current (0-125ma) measuring
    > > system with a Stamp2? Thanks.
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-11 05:11
    Current transformers measure an AC signal, since that is what causes
    the induced current into the sensor. A DC one is usually a linear
    hall effect device.

    Though the original post did not specify, I am assuming this is a DC
    level from some type of sensor?

    -Martin


    --- In basicstamps@yahoogroups.com, "Dave Mucha <davemucha@j...>"
    <davemucha@j...> wrote:
    > Use a current transformer.
    > Jameco, less than $1.00 output changes as the flux field around the
    > wire changes. very simple. or if you want even cheaper, wrap a
    few
    > dozen loops around your wire, and measure the induced signal !
    >
    > Dave
    >
    >
    >
    > --- In basicstamps@yahoogroups.com, "Martin Hebel <martin@s...>"
    > <martin@s...> wrote:
    > > Yes, convert it to a voltage! [noparse]:)[/noparse]
    > >
    > > Take the 125mA and pass it through a resistor. V=IR
    > >
    > > If you use a 33 Ohm, this will give approximatly 0-4.125V, which
    > you
    > > can use an A/D to measure.
    > >
    > > -Martin Hebel
    > > Electronic Systems Technologies
    > > Southern Illinois University
    > > http://www.siu.edu/~imsasa/est
    > >
    > >
    > > --- In basicstamps@yahoogroups.com, "John Schwab
    > > <johnschwab5678@y...>" <johnschwab5678@y...> wrote:
    > > > Can anybody tell me how to setup a current (0-125ma) measuring
    > > > system with a Stamp2? Thanks.
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-11 12:41
    If it is a DC signal, then the resistor/ADC is the way to go.



    --- In basicstamps@yahoogroups.com, "Martin Hebel <martin@s...>"
    <martin@s...> wrote:
    > Current transformers measure an AC signal, since that is what
    causes
    > the induced current into the sensor. A DC one is usually a linear
    > hall effect device.
    >
    > Though the original post did not specify, I am assuming this is a
    DC
    > level from some type of sensor?
    >
    > -Martin
    >
    >
    > --- In basicstamps@yahoogroups.com, "Dave Mucha <davemucha@j...>"
    > <davemucha@j...> wrote:
    > > Use a current transformer.
    > > Jameco, less than $1.00 output changes as the flux field around
    the
    > > wire changes. very simple. or if you want even cheaper, wrap a
    > few
    > > dozen loops around your wire, and measure the induced signal !
    > >
    > > Dave
    > >
    > >
    > >
    > > --- In basicstamps@yahoogroups.com, "Martin Hebel <martin@s...>"
    > > <martin@s...> wrote:
    > > > Yes, convert it to a voltage! [noparse]:)[/noparse]
    > > >
    > > > Take the 125mA and pass it through a resistor. V=IR
    > > >
    > > > If you use a 33 Ohm, this will give approximatly 0-4.125V,
    which
    > > you
    > > > can use an A/D to measure.
    > > >
    > > > -Martin Hebel
    > > > Electronic Systems Technologies
    > > > Southern Illinois University
    > > > http://www.siu.edu/~imsasa/est
    > > >
    > > >
    > > > --- In basicstamps@yahoogroups.com, "John Schwab
    > > > <johnschwab5678@y...>" <johnschwab5678@y...> wrote:
    > > > > Can anybody tell me how to setup a current (0-125ma)
    measuring
    > > > > system with a Stamp2? Thanks.
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-11 15:32
    At 11:44 PM 12/10/02 +0000, you wrote:
    >Can anybody tell me how to setup a current (0-125ma) measuring
    >system with a Stamp2? Thanks.

    What about a 25 Ohm resistor in series with what you want to measure
    and then just use an ADC to pick off the voltage across the resistor?
    An 8-Bit ADC would give you approx 488uA resolution. A 12-Bit ADC
    would give you approx 30uA resolution, but it might be difficult
    distinguishing this against the noise floor.
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-11 15:38
    At 11:44 PM 12/10/02 +0000, you wrote:
    >Can anybody tell me how to setup a current (0-125ma) measuring
    >system with a Stamp2? Thanks.

    Ahem!.. or better yet a 40 Ohm resistor... Sorry!


    What about a 25 Ohm resistor in series with what you want to measure
    and then just use an ADC to pick off the voltage across the resistor?
    An 8-Bit ADC would give you approx 488uA resolution. A 12-Bit ADC
    would give you approx 30uA resolution, but it might be difficult
    distinguishing this against the noise floor.
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-12 17:43
    > Can anybody tell me how to setup a current (0-125ma) measuring
    > system with a Stamp2? Thanks.

    John,

    If you're wanting to measure AC then the CT (current transformer)
    would be ideal, as the other guys on this list already mentioned.

    If you're measuring DC then you can use the series resistor like a
    few of the other guys talked about. However, seems like you need to
    take a look at the load your driving before arbitrarily picking some
    resistor value out of the air like 33 ohms, or 40 ohms or whatever.
    If you add a series resistor to the circuit, the total resistance
    will go up making the current go down. You'll also be dropping some
    of your voltage across the resistor and you will have less voltage
    across the load.

    Say your load is 50 ohms and you have a 12V power supply connected to
    it. Your total current will be .24A. Now you start adding a 33 ohm
    resistor in series, your total current drops to .144A. You'll then
    only have 7.2V across your original load. Depending on the nature of
    the load this may not be acceptable.

    Hope this helps
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-12 18:39
    Here is exactly what I am trying to do: I have a device that
    controls a light output. It outputs 12 Volts DC and varies the
    current between 0-125ma. What I want to do is test the current
    without any lights (so no load) hooked up to test if it is outputting
    very little, some medium amount of current, or something close to
    maximum (125ma) current. I need to make a harness to test this
    circuit, and I already have a Stamp2BSX in the system, so I am hoping
    to use it to check this too.

    /John


    --- In basicstamps@yahoogroups.com, "Ron Jeremy <ronjeremy912@h...>"
    <ronjeremy912@h...> wrote:
    > > Can anybody tell me how to setup a current (0-125ma) measuring
    > > system with a Stamp2? Thanks.
    >
    > John,
    >
    > If you're wanting to measure AC then the CT (current transformer)
    > would be ideal, as the other guys on this list already mentioned.
    >
    > If you're measuring DC then you can use the series resistor like a
    > few of the other guys talked about. However, seems like you need
    to
    > take a look at the load your driving before arbitrarily picking
    some
    > resistor value out of the air like 33 ohms, or 40 ohms or
    whatever.
    > If you add a series resistor to the circuit, the total resistance
    > will go up making the current go down. You'll also be dropping
    some
    > of your voltage across the resistor and you will have less voltage
    > across the load.
    >
    > Say your load is 50 ohms and you have a 12V power supply connected
    to
    > it. Your total current will be .24A. Now you start adding a 33
    ohm
    > resistor in series, your total current drops to .144A. You'll then
    > only have 7.2V across your original load. Depending on the nature
    of
    > the load this may not be acceptable.
    >
    > Hope this helps
  • ArchiverArchiver Posts: 46,084
    edited 2002-12-17 02:33
    Hi John,

    You should probably load your circuit so you know it really can
    output the 12 volts and 125 ma. 96 ohms (=12V/0.125A) is the right
    load for that. If you split the load into 2 resistors, 56 ohms
    between the sense point and the 12v input and then 40 ohms between
    sense point and ground, the sense point will go from 0 to 5 volts as
    the load current goes from 0 to 125 ma. (Likewise the input voltage
    will go from 0 to 12 volts at the same time because of the 96 ohm
    total load). The 0-5 volt sense point voltage can be measured many
    ways depending on the accuracy you need. An A/D gives best accuracy
    but there may be a circuit somewhere to measure that voltage range
    using RCTIME and another resistor or two and a capacitor.

    Harry
    Stamp Robotics to the next level
    www.bluebelldesign.com


    --- In basicstamps@yahoogroups.com, "John Schwab
    <johnschwab5678@y...>" <johnschwab5678@y...> wrote:
    > Here is exactly what I am trying to do: I have a device that
    > controls a light output. It outputs 12 Volts DC and varies the
    > current between 0-125ma. What I want to do is test the current
    > without any lights (so no load) hooked up to test if it is
    outputting
    > very little, some medium amount of current, or something close to
    > maximum (125ma) current. I need to make a harness to test this
    > circuit, and I already have a Stamp2BSX in the system, so I am
    hoping
    > to use it to check this too.
    >
    > /John
    >
    >
    > --- In basicstamps@yahoogroups.com, "Ron Jeremy
    <ronjeremy912@h...>"
    > <ronjeremy912@h...> wrote:
    > > > Can anybody tell me how to setup a current (0-125ma) measuring
    > > > system with a Stamp2? Thanks.
    > >
    > > John,
    > >
    > > If you're wanting to measure AC then the CT (current transformer)
    > > would be ideal, as the other guys on this list already
    mentioned.
    > >
    > > If you're measuring DC then you can use the series resistor like
    a
    > > few of the other guys talked about. However, seems like you need
    > to
    > > take a look at the load your driving before arbitrarily picking
    > some
    > > resistor value out of the air like 33 ohms, or 40 ohms or
    > whatever.
    > > If you add a series resistor to the circuit, the total resistance
    > > will go up making the current go down. You'll also be dropping
    > some
    > > of your voltage across the resistor and you will have less
    voltage
    > > across the load.
    > >
    > > Say your load is 50 ohms and you have a 12V power supply
    connected
    > to
    > > it. Your total current will be .24A. Now you start adding a 33
    > ohm
    > > resistor in series, your total current drops to .144A. You'll
    then
    > > only have 7.2V across your original load. Depending on the
    nature
    > of
    > > the load this may not be acceptable.
    > >
    > > Hope this helps
Sign In or Register to comment.