circuit to test if mosfets are on or off. Does it look sane?

Discussion in 'The Projects Forum' started by Toebs, Feb 18, 2015.

  1. Toebs

    Thread Starter Member

    Oct 9, 2014
    52
    1
    Hi i have made schematic and pcb layout, but would like a second pair of eyes on it before i ship the gerber files.

    Particularly on the "MOSFET TEST CIRCUIT" in the schematic. What I want to do here is for the board to selvf test one mosfet at a time, if mosfets are working correctly for on/off.

    I have attached the schematics. Please tell if you notice something odd, it will be greatly appreciated.

    I tested it all on breadboard, I think, but breadboards always get somewhat confusing so its only 95% that I actually tested what i thought ;)

    (NOTE: The lock is a small cabinet lock)
     
    • Box4.PDF
      File size:
      431.1 KB
      Views:
      83
    Last edited: Feb 18, 2015
  2. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,290
    1,255
    Should work.
     
  3. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    It took about 9, "zooms" to read that, but yes, it looks good.
     
  4. ScottWang

    Moderator

    Aug 23, 2012
    4,854
    767
    Maybe the current flows through zener diodes D201, D604 too less and lose their functions.
    If the power is not providing from battery, maybe the input resistors of mosfet and op amp could be reduce some more.
     
  5. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    D201 and D604 are merely safety diodes. They could be replaced with a simple diode connected from the input line to the 3.3V power supply. R203 and R602 are the critical components here, but these are only, "just in case" design.

    The 1 meg resistors can cause an offset of 0.1 volts with an LM358.
    Not a problem.
     
  6. ScottWang

    Moderator

    Aug 23, 2012
    4,854
    767
    How did you calculate that 0.1V offset?
     
  7. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    That should have been 500 na. :oops:
    Datasheet. Page 3. Input bias current = 500 na.
    500 na times 1 meg = 0.5 volt.
    I think this is not a problem for, "high" or "low" measurements, but I'm not that good with microprocessors.
     
  8. ScottWang

    Moderator

    Aug 23, 2012
    4,854
    767
    Do you know why I asked that, because whatever the power is 3V or 12V, they are very less, they can't be reach the current to that high, and you just said the bias current, so I checked it and it shows this :
    Very low supply current drain (500 uA)Ðessentially independent of supply voltage.
     
    Last edited: Feb 18, 2015
  9. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    Supply current is not equal to input bias current.
    The 1 meg resistors are connected to the input pins.
    Supply current is 1.2 ma, not 500 ma.
    See page 2 of datasheet.
     
  10. ScottWang

    Moderator

    Aug 23, 2012
    4,854
    767
    500 mA is a mistake when I copied the data from the datasheet, I dont' know why, but it changed from 500uA became 500mA.
    Calculating the Imax current when the power are 12V and 3.3V.
    I1=12V/1MΩ=12uA.
    I2=3.3V/1MΩ=3.3uA
    I still can't get the 1.2mA.
     
  11. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    The 1.2 ma is the current the chip uses up from the power supply. The 1 meg resistor is not in series with the supply voltage before it gets to the op-amp. The 1 meg resistors are connected to the input pins. The input pins must have up to 500 na of current flowing in or out of them. The 1 meg resistor allows a path to ground for the input transistor base. This has nothing to do with the supply current for the chip.
     
  12. ScottWang

    Moderator

    Aug 23, 2012
    4,854
    767
    According to the datasheet.
    The highest voltage of (+) and (-) pins as V= 3.3V-0.2V-0.7V = 2.4V
    The current of bias = 2.4V/1MΩ = 2.4uA.
     
  13. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    The current of bias is 500 na. The current of bias is made inside the op-amp chip. The current of bias flows all the time. 500 na times 1 megohm is 0.5 volts. This is the maximum error that the 1 meg resistor can cause. If you made the 1 meg resistor 4.8 million ohms, the base current of the input transistor inside the chip (the current of bias) would create 2.4 volts on the input pin and the amplifier would always read this voltage as a, "high" input. You would not want the amplifier to always believe its input is high because it would not measure anything.
     
  14. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,290
    1,255
    I think what Scott is saying is that the common mode range is Vcc - 1.5 volts. Since the supply is only 3.3 volts and the input is 3.3 volts this spec. is violated. I don't think this hurts the ic, but it won't tell you the real voltage above about 1.7 volts. The 358 output voltage doesn't go to Vcc either, so that's a similar problem. He could power the 358 with the 12 volt supply and all would be well, but you might want to protect the micro if the 358 goes bad by placing a small resistor in series with it's output.
     
  15. ScottWang

    Moderator

    Aug 23, 2012
    4,854
    767
    Because the power is too low, so there is no way to generating a 500 nA, that's what I thought, and also the datasheet already mentioned the bias depends on the power supply.
    You can check the datasheet where it can generate a 500uA current when the power supply just only has 3.3V.
     
  16. ScottWang

    Moderator

    Aug 23, 2012
    4,854
    767
    I just thought maybe using 1MΩ is too big when the power supply is only 3.3V.
     
  17. ScottWang

    Moderator

    Aug 23, 2012
    4,854
    767
    I just checked the Input Bias Current, the typical values is only 40nA, 500 nA is the Max values, so when some lucky one may get that values, but I don't think I have that lucky.
     
  18. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    The goal of the 1 meg resistors is to allow bias current for the base of the input transistor of the op-amp. It is sized to allow that current to flow to ground without making a big voltage out of it. If the bias current is lower than 500 na, that is only good because it does not make a big voltage error while passing through the 1 meg resistor.

    You are not supposed to make the bias current create the voltage you are measuring.
     
  19. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    This is the first time, "common mode" has been mentioned in this thread, so I've been chasing down the input bias current. Go figure.
     
  20. Toebs

    Thread Starter Member

    Oct 9, 2014
    52
    1
    Wow just got to my computer, allot of response to the thread, how wonderful.
    And thanks for zooming all the way in, I am not sure why my program always creates PDF like that or how I can fix it.

    The moisture measurements are important to me, so if the OpAmp configuration is messing with it then I need to fix it.
    I am not running of battery and heat is not really an issue in this case - so burning some power in resistors is not an issue if it can alleviate some other problems.

    I am not sure, but what i am reading from your comments is:
    - choose lower resistor value for R300 and R301 to limit voltage ofset created from biase current from OpAmp. So maybe choose like 10k or something?
    - Add resistor to OpAmp output to protect inputs of uC.
    - Maybe choose another OpAmp? If so what should I look for, rail to rail and low bias currents? Maybe you know one of your head?
    - I have some MCP609's lying around. Might do the trick?
    • Low Input Offset Voltage: 250 µV (max.)
    • Rail-to-Rail Output
    • Low Input Bias Current: 1 pA (typ.)
    • Low Quiescent Current: 25 µA (max.)
    • Power Supply Voltage: 2.5V to 6.0V
     
    Last edited: Feb 19, 2015
Loading...