MMBT2222A-TP For Switching?

Discussion in 'Embedded Systems and Microcontrollers' started by robsworld, Nov 6, 2015.

  1. robsworld

    Thread Starter New Member

    Nov 5, 2015
    22
    0
    Hi, I've been using the MMBT2222A-TP in my circuits for switching the grounds to pumps and they've been working great.

    I like how they work, if 3.3v goes in then it switches on or off depending on voltage state.

    So now I get thinking and have another idea I would like to implement with them and was wondering if this is ok? I have very little knowledge on what I'm doing, makes sense that it should work but...

    My project is Arduino based and has a box with 12 USB ports, just like a hub. Different equipment and sensors plug into the ports. I want the ports to handle as much equipment and sensors as possible but lots of sensors require different resistors etc that others don't which causes a problem.

    I'm wondering if I can use these transistors to control the path of the circuit? Because I'm using an Arduino I have lots of IO puts that can tell different transistors to turn on or off. I'm using a touch screen so the idea is you go to a page and tell it port1 has a water pump, then via code different transistors turn on or off so all the components are in line that are required for the water pump. If I selected a float switch different transistors would take over.

    Does that make sense? No real current would pass through the transistors, only used for directing the path to the USB port.

    I attached a pic of how I use the MMBT2222A-TP. D33 is digital pin 33 from the Arduino, 3.3v or 0v comes out of it.
    MMBT2222A-TP_circuit.jpg
     
  2. robsworld

    Thread Starter New Member

    Nov 5, 2015
    22
    0
    Here's an example, does this look right? This circuit converts 5v PWM.

    There were jumpers where I placed the transistors.
    [​IMG]
     
  3. ScottWang

    Moderator

    Aug 23, 2012
    4,850
    767
    Could you draw a block diagram to show what you wan to do?
     
  4. robsworld

    Thread Starter New Member

    Nov 5, 2015
    22
    0
    Hi, well I think I've decided not to do that anymore, reason is if someone had something plugged in the port and someone changed what the port was to do something could get damaged. Unlikely someone will change a jumper unless they have to.

    Is the following the correct thinking for this transistor?

    In my first diagram when voltage (D33) is applied to the transistor it opens the flow between the remaining two pins? Just like a switch controlled with voltage? Voltage in switch on, voltage off switch off? This particular transistor can handle 600ma of current going through the switch pins? In the first diagram I'm switching ground, can this also have the +12v or whatever go through it or can it only switch ground?
     
  5. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    A transistor doesn't work that way.

    First, it is not a voltage device, it is a current device. That is why you need R1 to limit the base to emitter current (or just "base current"). But it is important for the emitter to go to the circuit common or ground to let the base current flow.

    Next, the collector to emitter current (again, just "collector current") is some multiple of the base current. If something outside the transistor limits this current then there will be a rather good connection C to E, but it is only a one way current. Make the collector negative and things go wrong, the current no longer flows freely.

    I have used such a circuit many times to act as a switch to ground. It does not work as a switch between any two points.
     
  6. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    This isn't going to work at all. You're evidently assuming that the transistors can carry current in both directions when they're turned on, and they don't--if there's current from base to emitter, current can flow from collector to emitter (in the direction of the arrow) also, but not the other way.

    Take a look at the 74HC4053. It can do a lot of the stuff you're trying to do here.
     
  7. robsworld

    Thread Starter New Member

    Nov 5, 2015
    22
    0
    Thanks for the feedback everyone, I had a feeling I was simplifying the part. I will leave that transistor to only switch ground as it currently does in the first example. I'm not going to electronically switch those circuits now as that will cause more problems with people than it solves. But I still need to understand the switching because at some point I will be using it.

    I looked at the 74HC4053, so this part is basically an electronic switch as I described? In the end that's all I want, a component I can apply 3.3v to and 2 pins make contact and can handle at least 600ma. I read the datasheet and it sounds like its 4 channels (4 switches??) but I don't see a pin to switch each channel. I also can't find anything about current, how much can each channel handle? Is there a single channel component?
     
  8. ScottWang

    Moderator

    Aug 23, 2012
    4,850
    767
    Because you didn't show the block diagram, so I can't do a better suggestion.
    The 74HC4053 was designed for analog or digital signal and it is not a switch for power.
     
  9. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    What I was imagining was using the 74HC4053 to switch the inputs to the op amp in whatever way you need. It definitely is not a power switch! For switching currents that can do work (as opposed to simply conveying information) you most likely need to use a relay. But the smart way to do the job would be to have a single power circuit and control it using analog components, which handle information rather than power.
     
  10. robsworld

    Thread Starter New Member

    Nov 5, 2015
    22
    0
    Thanks, that's where I forget about the signal, in my working circuit for the pumps the mmbt222a is being switched with a digital signal, not just regular 3.3v. From the digital pin I see 3.3v on the meter so I think its regular voltage and not a voltage signal. Thanks for bringing that up, in my new circuit I was going to send just a regular 3.3v to one of them, will switch it do a digital 3.3v.

    I think I understand better now, as long as I keep my mmbt222a type transistors to switching grounds and using digital or analog signal to switch I should be ok? Just like in the original diagram I posted.
     
  11. robsworld

    Thread Starter New Member

    Nov 5, 2015
    22
    0
    Would the KTC3265SY work in place of the mmbt2222A-TP?

    The pumps being connected run at 12v DC and draw 500ma max. The mmbt2222A-TP handles them ok.

    To me it looks like the KTC3265SY will do the same job?

    Here's the datasheet for the KTC3265SY
    http://www.alldatasheet.com/datasheet-pdf/pdf/69820/KEC/KTC3265.html?

    This is datasheet for MMBT2222A-TP
    http://www.mccsemi.com/up_pdf/MMBT2222A(SOT-23).pdf

    EDIT: For the KTC3265SY, after clicking the link you need to click the pdf datasheet in the top left corner and it will open
     
Loading...