Putting robotics at your service™

Free shipping on orders over $200

Lets Make a Simple Transistor or Relay Switch :)

Print view Share :
Previous topicNext topic

Page 1 of 2 [ 25 posts ]

1, 2
User avatar
Guru ( offline )
Posts: 2446
Posted: 2007-06-28 17:17 
Ok, a lot of people here on the Lynxmotion forums have been asking about making electrical switches.

Heres my proposal, can we please make up some sort of list of parts and a printable diagram of how to set them up, that way people can download and print it up and make their connections by refferring to the diagram. Im sure this setup can be inexpensive when homemade (which is what Im looking for) and most of the parts can probably be bought online for fairly cheap (that way the gas in your car to go buy them at the local radioshack isnt more expensive then the setup :lol: ). Naturally I'd post something I could come up with, but i have yet to enter the world of electronics and diodes :lol:

Can someone shed some light about this. :idea:

_________________
Joe A.
Built in Canada with Lynxmotion Parts!


User avatar
Expert ( offline )
Posts: 633
Posted: 2007-06-28 22:22 
In other words:



D1 = Common power diode
K1 = Relay (rating appropriate to your +V line)
Q1 = 2N2222 or equivalent
R1 = 10K ohm resistor

R2 and D2 are optional, but provide a nice LED indicator to tell you when your relay is energized - very handy if you have a number of these in play at once.

R2 = 470 ohm resistor
D2 = LED

It just about takes longer to draw the circuit in a paint program and publish it to the web than it does to build it.

_________________
[b]Seamus[/b]
Read. Learn. Do.


User avatar
Guru ( offline )
Posts: 2446
Posted: 2007-06-28 22:26 
Id like to point out that these setups are run by high/low voltages (thus being an electronic relay). Also, images of what these components look like will be up shortly.

_________________
Joe A.
Built in Canada with Lynxmotion Parts!


Guru ( offline )
Posts: 2251
Posted: 2007-06-28 22:39 
I'm reposting the below switch setup if one needs a DIY switch that is controlled via servo type pulsed control signals.

http://www.uoguelph.ca/~antoon/gadgets/rc-sw.htm


User avatar
Guru ( offline )
Posts: 9257
Posted: 2007-06-29 16:21 
Here is a nice HEXFET switch that EddieB submitted in another thread. I thought it would be a nice addition to this sticky. Thanks again EddieB!


_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


Guru ( offline )
Posts: 2251
Posted: 2007-06-29 17:39 
Below are the Radio Shack parts which should be available at most RS stores. I use inexpensive 4 conductor cat3 phone wire for hookup wires.

MOSFET IRF510 Transistor 276-2072 $1.99
10K Ohm 1/4-Watt Carbon Film Resistor (5-Pack) 271-1335 $.99
1N914/4148-Type Diode (10) 276-1122 $1.39


Guru ( offline )
Posts: 2251
Posted: 2007-06-30 12:07 
I made the below setup using the radio shack parts. I used a 22k resistor (271-1339) instead of the 10k to have a little less drain on the battery. The board is half of a dual mini board (276-146, $1.99) and hooked up with pieces of cat3 phone wire. The two wires going to the left go to the controller hi/lo and ground. the two wires going to the right go to what is being controlled, the top wire goes to the power +, and the bottom wire goes to the power -. I tested it using 4.5v (3 batterys) for control, and the component being controlled was a 9 LED flashlight head being powered by 4.5v (3 batterys). I haven't tried it controlling anything of a higher voltage, such as a 12v motor.




Last edited by zoomkat on 2009-10-28 04:12, edited 1 time in total.

User avatar
Guru ( offline )
Posts: 2446
Posted: 2007-06-30 12:10 
Looks simple and easy to make (the point of this thread :wink: ) I hope this will help a lot of people.

_________________
Joe A.
Built in Canada with Lynxmotion Parts!


User avatar
Expert ( offline )
Posts: 633
Posted: 2007-06-30 13:06 
If we're sharing.....


The basic transistor switch circuit, with LED indicator, used to switch power to a gearhead motor. Built on a random scrap of protoboard, using solid hookup wire. (The servo cable passes under the board with no connection - I just used the board and its mounting screws as wire-routing.)


Same circuit, but directly switching an array of LEDs, rather than a relay (remove the relay and suppression diode from the circuit). Built on random perfboard. The wire is salvaged from an old data cable that was being thrown out when we changed buildings at work. A 20-foot, 40-conductor cable provides enough brightly-colored 24-gauge solid hookup wire for a lifetime of projects. The bundle of rainbow-colored wires at the top of the photo were salvaged from an 18-conductor printer cable, which supplied lots of brightly-colored stranded wire for applications that call for more flexibility than solid conductors can provide.


A trio of transistor switches, laid out on perfboard, and again driving LED arrays instead of relays. Red, green, and blue wiring and status LEDs correspond to the driver circuits, while the yellow wire is for the return signal. Same source as above for the wires.


Driving a relay again, this time for house current. this board controls a desk lamp for use in time-lapse photography projects. Using a signal from the camera to turn the light on only when a photo is about to be taken means that I don't need to leave a lamp on and burning 24/7, when I only really need it for about 15 seconds, every hour or two.


For scale purposes, all of these circuits are built on standard perfboard, with 0.10" hole spacing.

_________________
[b]Seamus[/b]
Read. Learn. Do.


Guru ( offline )
Posts: 2251
Posted: 2007-06-30 13:52 
Just as a quick tip, one can use the basic DIP Programming Shunts (RS 276-1512, $.99 for 10) like below to make connections to the male pins on various boards. One puts the wire end down one hole in the shunt and solder it there. The other unfilled shunt hole is then slipped on the desired male pin. In 3 male servo pin setup, the common power and ground can be jumped off the end pins of an 8 pin bank.



Last edited by zoomkat on 2009-10-28 04:13, edited 1 time in total.

Guru ( offline )
Posts: 2251
Posted: 2007-06-30 14:24 
Final hookup tip. When I have to make long runs to servos, I use cat3 phone wire like below (using 3 of the 4 conductors). I put a slight curve on the ends of the bare wires for a slight inteferance fit, then slide them into the end of the servo connectors. I use the shunt jumpers on the other end of the wires to connect to a servo board. Comes in handy when the ready made servo connectors aren't available.



Last edited by zoomkat on 2009-10-28 04:13, edited 1 time in total.

Guru ( offline )
Posts: 2251
Posted: 2007-07-01 16:26 
I've done some testing with my IR510 switch. With a ~4.8v control voltage, to appeared to operate a small 12v motor (.25a running no load), and a 12v 12w bulb (~1a current). I could not control my 12v harbor freight drill motor. With the 4.8v control voltage, the motor would not start, and the transistor got very hot very quickly. With a 12v control voltage (from the same battery powering the drill), the motor started and ran at 1.25a no load. The transistor also heated up, but not as quickly. I also swaped a 100k resistor for the 22k one I was using, and it was sufficient to keep the control line from floating. It appears that the IR510 switch is capable of controlling small motors and other moderate loads.


Veteran ( offline )
Posts: 101
Posted: 2007-08-27 09:40 
When a coil is switched off, it generates a large back EMF. The purpose of the diode in these circuits is to harmlessly diverte the EMF through the diode, protecting the transistor and keeping all the magic blue smoke in.

Relays, motors, solenoid and other devices with coils need this diode.

With other loads (if you use one to switch on a logic power supply, for example), the protection diode can be omitted.

_________________
Do you know where your stack pointer is?


Guru ( offline )
Posts: 2158
Posted: 2007-08-27 12:20 
MattPower wrote:
When a coil is switched off, it generates a large back EMF. The purpose of the diode in these circuits is to harmlessly diverte the EMF through the diode, protecting the transistor and keeping all the magic blue smoke in.

Relays, motors, solenoid and other devices with coils need this diode.

With other loads (if you use one to switch on a logic power supply, for example), the protection diode can be omitted.

If you are controlling loads of several amperes with the IRF510 you may need to increase the gate voltage as current flowing through the MOSFET has the effect of trying to turn it off. Once the MOSFET comes out of, for lack of a better word off of the top of my head, saturation it is in the linear mode and starts dissipating significant power.

If you are going to try driving loads of more than a couple amperes you may want to consider upgrading the IRF510 to something like a Fairchild MTP3055VL which is designed for 12A with a 5V gate voltage. At 12A it will be dissipating 2W so you need some sort of heatsink but at 5A to 6A it should be fine just by itself.

Increasing the resistor from the 10K certainly may save some power but it also means the MOSFET takes longer to turn off and stays in the linear region for a longer period of time. For high amperage loads you may actually want to decrease the resistor if you are switching at any significant rate.

Oh, also you probably want to upgrade the 1N4148 re-circulation diode to a 1N4001 or 1N5401 if you are > 5A load. The 4148 is only rated for about 100mA. ;)


New ( offline )
Posts: 9
Posted: 2007-09-28 17:18 
Hello all,

What do you think about the...

Picoswitch
( follow this link : http://www.dimensionengineering.com/PicoSwitch.htm )

...or...

Battleswitch
( follow this another link : http://www.dimensionengineering.com/BattleSwitch.htm )

...to control electrical power on and power off.

Much expansive and maybe much sure for "high voltage"...

James

Edit : Argh... This articles are already in the Lynxmotion online shop. Sorry for this needless reply.


Last edited by James J. Elwood on 2007-09-28 19:26, edited 1 time in total.

1, 2

All times are UTC - 5 hours [ DST ]. It is currently 2014-10-31 09:30
Feedback Form
Feedback Form