Shop OBEX P1 Docs P2 Docs Learn Events
transistor as switch — Parallax Forums

transistor as switch

dr_eggman198dr_eggman198 Posts: 15
edited 2005-07-15 19:47 in BASIC Stamp
I am making a tic tac toe robot where the human places pieces on a grid, and when they do this, the robot "drops" an object from an electromagnet onto the grid. I used a 74hc595 to increase the number of outputs, and originally was going to use the outputs from this shift register to power an electromagnet. Knowing now that this is not possible, I came across a 12 voilt 3 amp transformer that I was going to use to power each electromagnet. there are nine electromagnets, and each corresponds to a piece of the 3x3 tic tac toe grid. Each EM would be engaged to hold a piece. When the robot wants to make a move, it stops sending a current to the EM, and the piece drops onto the grid. If I use my transformer to power each electromagnet, I would need a way to turn off the EM's when the robot needed to make a move, so I need some type of switching device. I need to use the output of the 74hc595 to control each switch that would allow the current of the transformer to reach or not reach the electomagnets. iS there any way that I could use a transistor as a siwtch? or a logic gate?

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2005-07-15 18:32
    Look for the Darlington Arrays -- multiple high-current drivers per IC chip.
  • Don BuczynskiDon Buczynski Posts: 31
    edited 2005-07-15 19:40
    Here is a small circuit I use to drive solenoid type model railroad switch machines. Connection C is driven by the 74hc595 output. The PNP TIP127 can handle 5 amps of continuous current with a heat sink. The transistor is switched on and the solenoid energized when connection C is low. The TIP122 is an NPN version with the same voltage/current specs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don Buczynski

    http://www.buczynski.com
    159 x 203 - 2K
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-07-15 19:47
    Ah, thanks Don. If you really do have high currents, use Don's circuit. And make sure not to leave out the 1N4001 Diode. Yes, in 'normal' use it is reverse biased -- but when you try to turn off the coil, there's a backlash of current generated as the magnetic field collapses. The Diode gives the current somewhere to go.

    Also note the "C" pin is the 'Control' pin -- +5 turns on, 0 volts turns off. AND the 'ground' must be connected to the BS2 'Vss' ground.
Sign In or Register to comment.