Switch between 9 and 0 volts

Discussion in 'General Electronics Chat' started by stoopkid, Aug 22, 2012.

  1. stoopkid

    Thread Starter Member

    Mar 3, 2011
    136
    1
    I need to switch a logic signal between 9 and 0 volts using a 5v signal and 9v supply. I am driving a Lego motor that takes a constant 9v and uses two 9v logic pins to tell it which way to go.
    http://www.philohome.com/pf/pf.htm
    The problem is that it seems to have no tolerance for variation in voltage. At 9.05v it wont spin with a logic signal resistance of anything more than 300ohms. I discovered this when I tried to use my multimeter to see how much current the 9v logic signal used. The multimeter read about 40mA but the motor did not spin. It will only spin with a direct 9v connection to one logic pin and 0 on the other in addition to the 9v power and gnd.

    My idea WAS to use a transistor to switch the 9v logic signal and a pulldown to ground to make it 0v when the transistor is off but I don't think it will tolerate a voltage drop for the 9v or any resistance on the 0v. How can I switch these signals?

    Thanks.
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    You need a logic level MOSFET.
     
  3. stoopkid

    Thread Starter Member

    Mar 3, 2011
    136
    1
    Do I need two for each pin, one to pull it high and another to pull low?
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    Without knowing the details I would guess you need only one MOSFET on the high side per pin, i.e. between 9V and the pin. You may add a 10kΩ pulldown to GND.

    Make sure that you experiment with only one pin first. You don't want both pins to be energized at the same time.
     
  5. stoopkid

    Thread Starter Member

    Mar 3, 2011
    136
    1
    Like I said before, the motor does not seem to respond when the logic signal is pulled to ground with any resistance. In order for it to work one of the logic pins must be at 9v and the other must be at 0v. Leaving the second unconnected does not work.
     
  6. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    Ok, I read you.
    Then you do need a pair of MOSFETs for both pins. This is known as an H-bridge.
     
  7. stoopkid

    Thread Starter Member

    Mar 3, 2011
    136
    1
    Ok thank you. Could anyone suggest good N and P channel MOSFETS for less than 100mA than can fully switch at 5v and run at PWM speed?

    Thanks
     
Loading...