Help:Binary Resistors switching with MOSFET

Discussion in 'The Projects Forum' started by Kkein, Feb 6, 2013.

  1. Kkein

    Thread Starter Member

    Jun 10, 2011
    Can anyone help with the following issue.
    I have a parallel resistors network (of 2R, 3R9, 8R2, 15R etc.) that I'm switching or driving on/off with a bunch of IRF540N mosfets in a bid to measure resultant current with current probe.
    The MOSFETS are driven from outputs of PIC16F877A microcontroller. The reasoning behind this is to allow simultaneous switching ON of multiple resistors thus mimicking a variable resistor function. My components are soldered onto breadboard.
    With the supply voltage (15V,0.74A) applied, When I test my circuit by connecting 5V on the gates of the MOSFETs (one MOSFET at a time), the current measured on 8R2 resistor with ammeter violets ohm's law as I expected the current to decrease as the resistance increases. Below are the measured currents:
    Isc = 0.74A short circuit,
    I1 =0.74A with 2R2 resistors,
    I2 =0.74A for 3R9 resistor,
    I3 =0.34A for 8R2 Resistor :)mad: why is I3 less than I4 -
    I4 =0.47A for 15R resistor THIS? :eek:)
    I5 =0.36A for 33R resistor
    I6 =0.18A for 120R resistor

    However, when I test the MOSFET alone on the breadboard still the 8R2 connected, the problem goes and I get 0.69A. Also, this problem does not exist when I perform simulation of the same circuit using proteus.
    I have thoroughly checked my board, all connections. What could be the problem? Has anyone come acroos this problem?
    My circuit is as attached.
    Last edited: Feb 6, 2013
  2. crutschow


    Mar 14, 2008
    You are using a MOSFET that is designed to fully turn on with a 10V Vgs signal and you are using only 5V. That many account for your anomalous results. Some of the transistors are not fully turning on.
  3. Kkein

    Thread Starter Member

    Jun 10, 2011
    Many thanks, Crutschow...