Jump to content
Electronics-Lab.com Community

Cheap transistor switches.


Guest Alun

Recommended Posts

Some people think its better to use silly transistor switches instead of comparators.  ::) A good friend of mine complained to me about how he kept having to replace a relay in a temperature control circuit he designed for his green house. I designed a comparator circuit for him but he stubbornly insisted on using a crappy transistor switch. ::) I explained to him that it was cheap and nasty the and reason why the relay kept breaking is because the transistors often operates in its linear region and pulls the relay open closed slowly and this can often cause an arc to form that will in time destroy the relay. There was no hysteresis although the relay provided some this was unpredictable different relay would behave in a different manner and the circuit needed to be readjusted every time a different relay was used.

The transistor will only turn the relay on when the voltage on the base is >0.7V, this is bad for several reasons:

(1) This 0.7V threshold will vary from transistor to transistor, and will also change with the temperature, and maybe.

(2) If the power supply voltage changes slightly the voltage on the thermistor potential divider will also change, thus completely altering the circuits trigger and reset level.

(3) Different relays will require different coil voltages to turn on and off, and the transistor slowly changes the current though the relay coil hence the voltage across the coil will also change slowly. One relay might turn on when the coil voltage gets to 5V while another of the same type might require 6V. This will also cause the on an off voltages to be unpredictable.

(4) As I've said before this gradual turning on and off is bad for the relay and can cause arcing across the contacts which can eventually destroy the relay.

To get round both of these problems (both the poor quality of the circuit and his stubbornness) I designed an improved transistor circuit for him.  ;D This now includes hysteresis to make it behave in a more predictable manner and prevent the transistors from operating in their linear region. He can now also set the exact voltages an thus temperature when the circuit triggers and resets, and it is far less sensitive to variations in voltage and temperature etc. Now I've outlined the problems with those cheap and nasty transistor circuits, I'll explain how my circuit solves them.

The 1st circuit is one of those silly transistor switch I've just been complaining about.

The last three circuits are various versions of my all new and improved transistor stitch, the 1st one of these uses a relay and the 2nd and 3rd use MOSFETs. The 2nd's uses a P-channel MOSFET so it's ideal for automotive use where you want to switch the +V supply to a circuit. The 3rd uses a N-channel MOSFET and is suitable for most applications because N-channel MOSFETS are generally better because they have a lower on resistance. So without further ado I'll explain the operation of the first circuit that uses a relay just to give you the general idea, the others all work on the same principle so you can easilly apply this knowledge to the others.

R1 (50K pot + 10K) and R2 (the thermistor) form a potential divider so the voltage on Tr1s base will alter with the temperature.

R3 and R4 form another potential divider so the voltage on Tr1s emitter will be set at a reference that's used to determine the on voltage.

When the voltage on R2 is 0.7V greater than the voltage on R4, the base emitter of Tr1 will become forward biased causing it to turn on and connect the base of Tr2 to R4 this will cause Tr2 to turn on and the relay will be activated as a result.

Now if we ignore R5 for the moment this circuit has quite a large linear region, but if we include R5 we can see the hysteresis coming into play, if we now look at the affect of R5 on the circuit, with Tr2 R5 becomes connected in parallel with R1. This will cause the voltage on R2 to rise and R2 will have to reduce it's resistance to a lower value than it was when it initial turned the circuit on.

So what's the point of all of this?

Well the if the circuit is controlling a greenhouse fan you could set it to turn it on when the temperature gets to 30 degrees and of again when it falls bellow 25 degrees. This hysteresis, prevents the transistor from operating in it's linear region, it will either turn on or off, the relay contacts will snap open closed very quickly and reduce any arcing. As the voltage on R4 as well as R2 will change with the changing supply voltage the reference voltage will also change and compensate for it, so the trigger and rest temperatures will remain roughly the same at different supply voltages. Yes I know there's still the 0.7V base emitter threshold to take into account and if this is a problem you could add a compensation diode in series with R5.

The 100K resistor used in the MOSFET circuits it a pull down resistor that ensures the MOSFETS turn off properly, and the resistors are higher values because no current is required to drive the MOSFETS.

post-0-14279142194003_thumb.gif

post-0-1427914219409_thumb.gif

Link to comment
Share on other sites


There is no way I would use any of those circuits with a micro to switch anything. Your circuits are too elaborate and waste too many parts and too much board space. Using bipolar transistors as switches have been around for years. They are cheap, do not take up much real estate on the board and are simple with minimal components. There is nothing "silly" or "Crappy" about using a bipolar transistor as a switch. If you cannot make it work well, do not blame the hardware. Learn how to make it work. BTW- My greenhouse uses bipolar transistor switches to control relays and I have never had a problem since it was installed.

Also note that I am spending considerable time erasing posts which are derogatory to people, or groups of people, or have insults in them. If you cannot say anything nice about someone or if you want to sling insult, don't count on the post to stay here. This community is for helping people. Not for running others down.

MP

Link to comment
Share on other sites


There is no way I would use any of those circuits with a micro to switch anything. Your circuits are too elaborate and waste too many parts and too much board space.


Well I would say that too,I'd rather use a comparator anyway but my friend wanted to use transistors for some reason.

Using bipolar transistors as switches have been around for years.


It doesn't mean that it's good practice just because its been around for a long time.

They are cheap, do not take up much real estate on the board and are simple with minimal components. There is nothing "silly" or "Crappy" about using a bipolar transistor as a switch. If you cannot make it work well, do not blame the hardware.


Skimping on component costs often leads to bad designs.

You show me a single transistor design that doesn’t operate a transistor in its linear region, and has very predictable and easily calculated on/off thresholds.


This makes even more sense if you were to mass-produce the circuit. If wanted to make 10,000 of your simple transistor circuits, all with the same turn on/off temperature, I'd have to adjust each one as each transistor will have a different beta and each relay will have different on/off thresholds. With my circuit all the calculations and selecting of components would be done in the design phase and the circuit wouldn't require any extra adjustment on the production line. So even though you've save at the most 10 pence per board with your simple circuit (components are very cheap in large quantities and SMD components don't take up much board space) my circuit or a comparator would save you more money because you wouldn't have to pay people (or think of an automated process) to adjust it.

  Learn how to make it work. BTW- My greenhouse uses bipolar transistor switches to control relays and I have never had a problem since it was installed.


How long have you been using it for?

Are those relays grossly  overated? ;D


Also note that I am spending considerable time erasing posts which are derogatory to people, or groups of people, or have insults in them. If you cannot say anything nice about someone or if you want to sling insult, don't count on the post to stay here. This community is for helping people. Not for running others down.


I was not meaning to insult anyone, I was just explaining why I dislike transistor switches and giving a logical explanation as to why they're bad, and I was suggesting a more suitable alternative.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...