go_away

Author Topic: transistor switch  (Read 5342 times)

0 Members and 1 Guest are viewing this topic.

Offline jsmokerTopic starter

  • Full Member
  • ***
  • Posts: 118
  • Helpful? 2
transistor switch
« on: December 11, 2007, 04:48:02 PM »
Hello all, I need a little help with a circuit here.  I'm trying to make a circuit with a physical switch, that, once it's "closed" then "opened" the circuit stays on.  I have a diagram of the circuit here using a transistor (3906) and I also tried a N type mosfet (with the placement rearranged a bit).  But in either case, the circuit is on before I even turn the switch. I didn't draw it, but there's a resistor and LED in between the 5V output of the regulator and ground.  The shown resistor is 10kOhm.

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: transistor switch
« Reply #1 on: December 11, 2007, 04:59:17 PM »
each pin of the transistor seems to have +5v going to it. This is definately wrong, id be surprised if the transistor still works now.

In all likelihood you would want to connect the gnd to the middle pin of the transistor using the resistor

Offline jsmokerTopic starter

  • Full Member
  • ***
  • Posts: 118
  • Helpful? 2
Re: transistor switch
« Reply #2 on: December 11, 2007, 05:52:21 PM »
Actually none are connected directly to the 5V. The first pin (collector) goes to the +7.4, the 3rd (emitter) goes to the Vin on the Vregulator,  The 2nd (Base) is connected through a resistor (to control current) to the 5V.

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: transistor switch
« Reply #3 on: December 11, 2007, 08:33:23 PM »
the transistor is a pnp type. 0 volts (on the base) makes it switch on whearas the 5v should make it stay off.
Whats probably happening is because when the circuit is powered on, no voltage is flowing through the collector and emmitter although the potential is there. Because of this there is no voltage on the base, therefore the transistor switches on and voltage flows. As soon as this happens voltage flows through the resistor into the base switching the transistor off. The voltage on the base dies and it switches back on again.
This will happen so fast that it will appear to be always on.

I think that a single transistor latch is very rarely seen and is usually an unexpected effect from ghost voltages.

I presume that you are wanting to use the circuit for a push button turn on rather than a mechanical switch.

You will probably need a complimentary pair using 1 pnp and 1 npn type transistor
 

Offline jsmokerTopic starter

  • Full Member
  • ***
  • Posts: 118
  • Helpful? 2
Re: transistor switch
« Reply #4 on: December 11, 2007, 09:29:11 PM »
Shoot, I got them switched.  Can I no just use a npn then?  It's acutally a thermostat switch ultimately connected to a micro controller, when I want it to turn on with temperature rise, but turn off only when I tell it to.

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: transistor switch
« Reply #5 on: December 12, 2007, 05:19:46 AM »
look at the first and 2nd diagram in this link

http://www.4qdtec.com/putpr.html

in the 2nd diagram if you put you switch before the top resistor, it will turn the circuit on, and the transistors will latch and stay on.

Realistically, the transistor pair can be connected either way (making either a latch on or a latch off circuit) around as long as the main principle is adhered to where the emmitter of one becomes the base of the other.

I'll draw you up a quick circuit a bit later today if you like
« Last Edit: December 12, 2007, 05:20:41 AM by paulstreats »

Offline jsmokerTopic starter

  • Full Member
  • ***
  • Posts: 118
  • Helpful? 2
Re: transistor switch
« Reply #6 on: December 12, 2007, 09:00:04 AM »
Put the mechanical switch above the top resistor? 

Offline bukowski

  • Robot Overlord
  • ****
  • Posts: 219
  • Helpful? 0
Re: transistor switch
« Reply #7 on: December 12, 2007, 10:58:37 AM »
Hey paul, he could just use a SCR right??

Offline bukowski

  • Robot Overlord
  • ****
  • Posts: 219
  • Helpful? 0
Re: transistor switch
« Reply #8 on: December 12, 2007, 11:05:11 AM »
Oh, I forgot to put the switch going to the gate. whoops.

and dont make fun of my AWESOME paint skills.


Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: transistor switch
« Reply #9 on: December 12, 2007, 11:31:47 AM »
yes he can just use an scr.

A silicon controlled rectifier is traditionally the same as the complementary pair in the link I left, only it is the 2 transistors in 1 package with 3 leads. Once the gate is switched on, the scr will latch on until the collector is disconnected. (or latch off if you get the wrong one :))

Whatever happens, it wont work with only 1 transistor or mosfet.

Bukowski, youre paint skillz are like mine ;D (cant be bothered to get it perfect as long as it looks ok)

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: transistor switch
« Reply #10 on: December 12, 2007, 11:41:25 AM »
Jason, there is a minor short in your schematic.

The voltage going into your transistor collector isn't the same as the voltage going out the emitter.

When the switch is closed, there will be a short. You will want some small value resistor coming out of the emitter.

Also, why are you regulating the voltage going to the transistor base? (is there something else being powered?)

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: transistor switch
« Reply #11 on: December 12, 2007, 11:57:49 AM »
the emitter to base voltage is only rated for 5v

Offline bukowski

  • Robot Overlord
  • ****
  • Posts: 219
  • Helpful? 0
Re: transistor switch
« Reply #12 on: December 12, 2007, 12:43:34 PM »
Paul,
Thats interesting, I never really knew thats how an SCR worked. I thought it was something like this:

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: transistor switch
« Reply #13 on: December 12, 2007, 01:30:22 PM »
Many things are made from simple transistors - probably the most common on this forum would be the 5v regulator which is just a few transistors and resistors in 1 package

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: transistor switch
« Reply #14 on: December 13, 2007, 05:29:16 AM »
It just occured to me that your gate voltage could be floating when the switch is open.

Try to attach the base pin to some high value resistor (100kohm+), then attach the resistor to ground.

Offline jsmokerTopic starter

  • Full Member
  • ***
  • Posts: 118
  • Helpful? 2
Re: transistor switch
« Reply #15 on: December 17, 2007, 10:53:13 AM »
Talking to Admin, he made me realize that I should explain my project a little more in depth.  The mechanical "switch" is a thermostat switch that triggers at a set temperature on the rise of the temperature.  I want this to power on a voltage regulator and, in turn, switch on a micro controller.  However, When the temperature goes back down, the thermostat will switch off, but I don't want the micro controller to go off until it's program tells it to turn off.  I've just been using the voltage regulator with an LED so far to try the different combinations, but I haven't been able to get any of the combinations suggested to work.  Well, I'm not 100% sure if I interpreted which load on the diagram should be the loads, but I tried what seemed reasonable.  I think the problem, though, comes from a problem of reference.  If I put the regulator connected to ground and the "switch circuit" above the regulator,  any input from the regulator to the switch circuit would be a "negative voltage" by in reference to the "emitter" of the switch circuit.  If I put the  load above the switch circuit, the base/gate voltage will be higher than the collector...I don't know what that means other than ending up with a fried transistor...(it smells of fried transistor in here now).  Would a 4 terminal mosfet work?  I was thinking for a while (a rare thing for me).  and with a 4 terminal mosfet has two separate leads (body and gate) for the input so it's not tied to (source and drain), so the references shouldn't matter. Right?  Thanks for any help.

-J

Offline jsmokerTopic starter

  • Full Member
  • ***
  • Posts: 118
  • Helpful? 2
Re: transistor switch
« Reply #16 on: December 17, 2007, 11:11:04 AM »
Scratch that mosfet idea, I can't seem to locate any easily attainable 4 terminal mosfets.

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: transistor switch
« Reply #17 on: December 17, 2007, 12:29:13 PM »
You need to use 2 SPDT relay. Connect the voltage regulator after the thermostat, together with the first relay coil. When the thermostat triggers, it will power the vreg and energise the coil of the relay . Now connect the NO contacts of the relay in parallel with the thermostat. When the relay is energised, it will auto sustain power to the vreg for ever. The second relay coil will be energised by the microcontroller, and will have the NC contacts in series with the NO contacts of the first relay. This way, the MCU can open the circuit and thus the power to vreg. If you don't understand, I'll try to make a schematic.

« Last Edit: December 17, 2007, 12:49:20 PM by Ro-Bot-X »
Check out the uBotino robot controller!

Offline jsmokerTopic starter

  • Full Member
  • ***
  • Posts: 118
  • Helpful? 2
Re: transistor switch
« Reply #18 on: December 17, 2007, 01:29:08 PM »
Thanks for input.  Unfortunately I had thought of the relay idea, but relays tend to eat power since it's basically a short circuit, that's why I've been looking for a solid state alternative.  This device has to last a week one on battery charge, and it'll be going in and out of fires (triggering the thermostat).  The size of the entire circuit including batteries is about 1*1*3 inches.  I found this device called an opto-isolator.  The seem to be pretty prevalent and decouples the switch circuit from the input just like a 4 terminal mosfet (which wasn't so prevalent).  Hopefully the local electronics store will have some,  I doubt think radio shack does.  Hopefully it will work.

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: transistor switch
« Reply #19 on: December 17, 2007, 02:00:58 PM »
I don't think it will work, since there is nothing to sustain power after the thermostat triggers.

How about using a thermic sensor with a wide temperature array? This way you can have the MCU powered all the time but in sleep mode (very, very little current draw).

If this is not good, try to find a thermostat that has a long cooling period, long enough so the MCU finishes what ever has to do before power gets interrupted.
Check out the uBotino robot controller!

Offline dj sures

  • Expert Roboticist
  • Jr. Member
  • *****
  • Posts: 28
  • Helpful? 0
Re: transistor switch
« Reply #20 on: December 19, 2007, 01:42:55 PM »
you can do everything in the micro itself . use a thermo resistor and get the temp from ADC . then do all the rest in code . that's what a micro is for :)

 


Get Your Ad Here

data_list