Current sensor output modification. PIC or opamp or something else?


+ Reply to Thread
Results 1 to 10 of 10
  1. #1

    Default Current sensor output modification. PIC or opamp or something else?

    I have a hall effect current sensor with a 0-5V output. Zero current flow is 2.5V out.
    It is monitoring a 20khz motor drive signal.

    I want to pass thru signals from 0-2.5V unmolested but want to reduce signals over 2.5V by an amount lets call it 20%.

    What could we do to do that?

    I was thinking OP amps, but I can't think of way to only reduce the signal once it is over 2.5V

    I also thought about a PIC with adc in and then a pwm out with low pass filter.
    But I don't think it will do 20khz.

    Any brilliant ideas? Thanks Peter

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,560

    Default Re: Current sensor output modification. PIC or opamp or something else?

    Hi, peter

    why not use a TL431 or similar " zener effect diode " that will draw some current past 2.5v https://www.ti.com/lit/ds/symlink/tl...lsrc%253Daw.ds

    the idea is a resistor paralled by the "zener" and a second resistor in series ... as the lower part of a voltage divider.

    Now that's the raw answer to the question ...

    IF your signal doesn't exceed the input range of the converter, it will be much much much simpler to apply a simple " IF conversion_result is > 2.5 THEN result = (result-2.5)/2 + 2.5 ...

    the "2" divider being just an example ( might be /3*2 ... for / 1.5 )

    Alain
    Last edited by Acetronics2; - 1st December 2020 at 20:47.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3

    Default Re: Current sensor output modification. PIC or opamp or something else?

    Thanks for that.

    Alain. When you say 'If conversion' do you mean using a PIC?
    I didn't think that would be quick enough

    Or some sort of analog circuit like the TL431

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,560

    Default Re: Current sensor output modification. PIC or opamp or something else?

    Quote Originally Posted by retepsnikrep View Post
    Thanks for that.

    Alain. When you say 'If conversion' do you mean using a PIC?
    I didn't think that would be quick enough

    Or some sort of analog circuit like the TL431
    Hi, Peter

    I wrote
    IF Conversion_RESULT
    = the number the ADC returns ...

    Whatever processor you use ( of course, a PIC is much better )

    Have a nice day
    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Sep 2009
    Posts
    686

    Default Re: Current sensor output modification. PIC or opamp or something else?

    If you use your signal for regulation of something, ADC/DAC solution act like first order hold
    https://en.wikipedia.org/wiki/First-order_hold
    And it can cause instability in regulation.
    So my advice would be OPAMP.

    Circuit is not hard to make. You basically need 2 buffers and 1 compactor, few resistor, and that is it.
    I can draw basic schematic, if you want...

  6. #6

    Default Re: Current sensor output modification. PIC or opamp or something else?

    An example schematic of your idea would be kind Pedja.

    Thanks for responding.

    I basically have this so far.

    A potential divider activated by the MOSFET turning on and an non inverting unity gain opamp buffer.

    When the mosfet is on output is reduced by the PD ratio R2 and R3.

    R1 & R2 are out of my control in the equipment I am trying to modify.

    Name:  Switched OPAMP.jpg
Views: 112
Size:  39.6 KB

  7. #7
    Join Date
    Sep 2009
    Posts
    686

    Default Re: Current sensor output modification. PIC or opamp or something else?

    You got most of circuit. I added one more buffer, so input to rest of circuit is low impedance. If you know your sensor output, you can omit first buffer.
    Second OPAMP create comparator with hysteresis.
    If input voltage excide trip point, output will be hi, so mosfet is turned on, and output voltage is reduced...
    Name:  limiter.png
Views: 105
Size:  194.7 KB

  8. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,560

    Default Re: Current sensor output modification. PIC or opamp or something else?

    Hi, Pedja ...

    you just redraw the TL431 !!!



    just have a look to its " OFF " state current ... : Off-State Cathode Current IK(off) VKA = 40V, VREF = 0 typ 0.26 max 0.9 A



    Alain
    Last edited by Acetronics2; - 5th December 2020 at 21:49.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  9. #9
    Join Date
    Sep 2009
    Posts
    686

    Default Re: Current sensor output modification. PIC or opamp or something else?

    Sorry for that...

  10. #10
    Join Date
    Apr 2014
    Location
    Northeast
    Posts
    340

    Default Re: Current sensor output modification. PIC or opamp or something else?

    Back to the original challenge, I'd do it in software:
    Code:
    IF ADC > 127 THEN  ;Assuming 8-bit ADC
      ADC_VAL = (ADC * 4) / 5  ;Yields 80% of value
    ENDIF
    The above snippet will deliver <128 results as soon as ADC > 128. I don't think that's what you want. So we have to add a filter:
    Code:
    IF ADC > 127 THEN  ;Assuming 8-bit ADC
      B0 = ADC - 127  ;Use a temporary variable to determine how much above 128 our result is
      B1 = (B0 * 4) / 5  ;Get 80% of only the amount > 128
      ADC_VAL = B1 + 128  ;Yields mid-point + 80% of overage
    ENDIF
    Last edited by mpgmike; - 10th December 2020 at 06:27.

Similar Threads

  1. How can I get a PIC to switch 2.5V DC to my Opamp pin?
    By HankMcSpank in forum Schematics
    Replies: 4
    Last Post: - 9th January 2010, 23:04
  2. Output current to a DC motor
    By bigbanner in forum General
    Replies: 1
    Last Post: - 6th April 2009, 08:29
  3. current sensor interfacing
    By hell_pk in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th January 2009, 05:55
  4. PIC based mAh meter/current draw sensor
    By skimask in forum Off Topic
    Replies: 6
    Last Post: - 26th February 2008, 03:10
  5. Suggestions for Boosting Current Output?
    By RossW in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 3rd June 2005, 03:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts