Shop OBEX P1 Docs P2 Docs Learn Events
Current supply. — Parallax Forums

Current supply.

ArchiverArchiver Posts: 46,084
edited 2000-11-03 16:52 in General Discussion
I WANT TO USE A SIGNAL FROM A PIEZORESISTIVE PRESSURE SENSOR TO CONTROL SIGNALS FROM A BS2.
THE PRESSURE SENSOR WILL BE POWERED BY A VEHICLE'S 12V SYSTEM.
THE SENSOR NEEDS A CONSTANT 1 mA CURRENT.
I WOULD APPRECIATE IT IF SOMEONE COULD TELL ME HOW TO ENSURE THIS CONSTANT 1mA SUPPLY.
KEITH MOORE.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-11-03 14:11
    That depends on how exact you want to keep the 1mA. A resistor is the
    cheapest (and worst) constant current source around. Just like using an LED
    and a dropping resistor. However, since the resistance of the sensor
    obviously changes, this might not be good in this application (depends on
    WHY it needs exactly 1mA).

    The next step up is a current mirror. Think about this:

    1) If you put a voltage on the base of an NPN transistor, the emitter
    voltage will be about .6V less (some people say .7 -- it is mildly related
    to temperature and other factors, but .6 is close enough for us). Suppose
    you put 1.2V on the base -- the emitter will have .6V on it. No two ways
    about it.

    2) If you put a resistor between the emitter and ground, you can easily
    calculate the emitter current which is -- in the example -- .6/R. So if R is
    600 ohms, the emitter current is going to be 1mA.

    3) Here's the tricky part. The collector current of a transistor is related
    to the emitter current by the transistor's alpha. The alpha is the
    beta/(beta+1). At high beta, this works out to alphas of .99 or even closer
    to 1. So for practical purposes, the Ic (collector current) is the Ie
    (emitter current).

    4) If you hook one end of your sensor to +V and the other end to the
    collector, 1mA will flow through the sensor until the transistor can no
    longer lower the collector voltage (figure about .2 or .3 V).
    What does that mean? Forget your sensor. Suppose we have a 10V supply, and a
    variable resistor. We want 1mA through the variable resistor no matter what.
    If the resistor is set to 100 ohms, you need .1V across the resistor, so
    you'd set the "other end" of the resistor to 9.9V. The drop is .1V and the
    current is .1/100 = 1mA. Now, what if you set the resistor to 2200 ohms? Now
    the drop should be 2.2V (2.2/2200=.001) so the voltage on the other end
    should be 7.8V. What about 25K ohms? The drop should be 25000*.001=25V).
    Now this is a problem. To get 25V across the resistor, you need -15V. The
    transistor can't do that. In fact, at 10K you need 10V and the transistor
    can't do that either because it saturates -- Vce (the voltage between
    collector and emitter) won't go below .2 or .3V. So say .5 for a safety
    factor -- The largest resistor you can force 1mA through is 9.5/.001=9500
    ohms.

    You can also use a PNP transistor. In this case, the +V goes (through R) to
    the emitter and you set the base to .6V LESS than the emitter (this is PNP,
    remember). The collector goes to the + lead of the load and the other lead
    is grounded. Same equations. Suppose a 12V supply and R is 1K. For 1mA you
    need 1V, so the emitter voltage should be 11V. The base voltage should be
    10.4V. (Of course, real 12V supplies in a car are 13.8, but you know what I
    mean).

    So how do you set the voltage on the base? One way is a voltage divider (see
    http://www.al-williams.com/wd5gnr/basiccir.htm). This isn't very good
    though -- you'd want to use 1% resistors. Trim pots are nice, but they tend
    not to be reliable in environment.

    Another way is to use a stack of diodes. Two silicon diodes forward biased
    will give you your 1.2V (use a resistor from +V to the non-banded end of the
    first diode. Banded end goes to the non-banded end of the second diode.
    Banded end #2 goes to ground. The voltage comes off the "cold" side of the
    resistor.

    A zener diode or a commercial voltage reference is another option.

    There are other ways to generate a constant current, but you'll find this is
    the simplest.

    Al Williams
    AWC
    * Floating point math for the Stamp, PIC, SX or any microcontroller at
    http://www.al-williams.com/awce/pak1.htm


    Original Message
    From: Keith Moore [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=9d2VDis20sLHopg3wNiZboblk4d6lEWBIHGD7D0JgZa-SJBibYM9-xY4IpuscjNRsd6OmQDYk0BiVm6FHgs98w]keithmoore1@n...[/url
    Sent: Friday, November 03, 2000 6:53 AM
    To: BASICSTAMPS@egroups.com
    Subject: [noparse][[/noparse]basicstamps] CURRENT SUPPLY.


    I WANT TO USE A SIGNAL FROM A PIEZORESISTIVE PRESSURE SENSOR TO CONTROL
    SIGNALS FROM A BS2.
    THE PRESSURE SENSOR WILL BE POWERED BY A VEHICLE'S 12V SYSTEM.
    THE SENSOR NEEDS A CONSTANT 1 mA CURRENT.
    I WOULD APPRECIATE IT IF SOMEONE COULD TELL ME HOW TO ENSURE THIS CONSTANT
    1mA SUPPLY.
    KEITH MOORE.
  • ArchiverArchiver Posts: 46,084
    edited 2000-11-03 16:52
    I WANT TO USE A SIGNAL FROM A PIEZORESISTIVE PRESSURE SENSOR TO CONTROL
    SIGNALS FROM A BS2.
    THE PRESSURE SENSOR WILL BE POWERED BY A VEHICLE'S 12V SYSTEM.
    THE SENSOR NEEDS A CONSTANT 1 mA CURRENT.
    I WOULD APPRECIATE IT IF SOMEONE COULD TELL ME HOW TO ENSURE THIS CONSTANT
    1mA SUPPLY.
    KEITH MOORE.

    To supplement Al's contribution over his morning cup of coffee, here are
    some alternatives...

    One of the easiest ways is to use a voltage regulator in the following
    circuit:

    <TT>

    |
    |
    | LT | 5490 ohms
    +12v
    | 1121 |--/\/\--;
    | -5 | |
    |______| | 900uA
    | 100uA |
    '
    o
    | 1 ma
    -load-
    |
    com
    '
    </TT>

    For this 1 ma level of current, you must use a micropower voltage regulator
    like the LT1121-5. The circuit feedback holds the voltage across the 5490
    ohm resistor constant at 5 volts, (900 microamps) and added to that is the
    ground pin current (100 uA from the LT1121 data sheet).

    Another way to make a very accurate 1 ma current in the sensor is to put it
    in the feedback loop of an op-amp:

    <TT>

    200 ohms |
    ;-/\/\-o
    load--;
    | | 2|\ | |
    com '--|-\ 6 |
    LM10 | >
    '
    __|+/
    | 3|/|1,8
    ;____;

    </TT>

    The load is a bridge pressure transducer with the sense wires going into a
    differential amplifier. The LM10 provides a constant voltage of 0.2 volts
    on pins 1, connected to pins 8 and 3, and feedback then keeps 1 ma flowing
    to the load and through the 200 ohm resistor. Pin 4 of the op-amp connects
    to common, and pin 7 to +12 volts.

    -- Tracy Allen
    electronically monitored ecosystems
    http://www.emesystems.com
Sign In or Register to comment.