PDA

View Full Version : best way to control a relay?



Jayguy5000
04-18-2007, 09:02 AM
I need to use a bs2 to control a relay that requires 5vdc and a coil resistance at 250 ohms. the relay itself is a spst 125VAC rated at .5A. What is the best way to control this with the bs2?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Actually I think Im going to add the whiskers to my tank and let it roam, just need to figure out where.

Pat Alonzi
04-18-2007, 09:13 AM
NPN switching transistor make sure to use a 220-330 ohm between the data pin and the base. One pole of the relay connects to 5V (I would use external power and not try to put too much load on the power regulator of your BS) and the other goes to the collector of your transistor. the emitter goes to ground.

If you need some help on transistors use this site: http://www.kpsec.freeuk.com/components/tran.htm

Also, I would recommend using a diode across the relay to block any Back EMF from damaging the rest of your circuit.

I can draw up a schematic if you need more help.

-Pat
palonzi@ecn.purdue.edu

Pat Alonzi
04-18-2007, 09:27 AM
Is this goin in that tank of yours?

curious1
04-18-2007, 09:51 AM
Hey Pat,

I'd like to see the schematic for the circuit you just described. I will copy it to my workbook.
Thanks,
RC

Bill Chennault
04-18-2007, 09:53 AM
Jayguy5000 (http://forums.parallax.com/member.php?u=43383)--

Each tank whisker should weigh 2500 pounds and extend 3192 (3120 + 72) inches as measured from the rear of the M1A1 (or A2). Each tank whisker should be composed of five, 500 pound steel rollers which will provide the added benefit of IED detection. (This is important and will make you famous, or alive .·. . whichever is most important to you).

You will not need additional electronics when a whisker successfully detects an IED.

--Bill (Chennault)
ps I think you can forget that stuff about the A2 getting 35% better mileage.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.

Jayguy5000
04-18-2007, 10:00 AM
lol I didn't even think of that! I wonder what I could do with it..Bill did you used to be a tanker?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Actually I think Im going to add the whiskers to my tank and let it roam, just need to figure out where.

PJ Allen
04-18-2007, 10:15 AM
http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv6.pdf

·

curious1
04-18-2007, 10:30 AM
Most Excellent Mr. Allen
Thank you,
RC

Jayguy5000
04-18-2007, 12:55 PM
I don't quite understand what kind of diode to use or where it should be placed. Also, what does the bs2 need to send out of one of its I/O pins?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Actually I think Im going to add the whiskers to my tank and let it roam, just need to figure out where.

Bill Chennault
04-18-2007, 09:00 PM
Jayguy5000 (http://forums.parallax.com/member.php?u=43383)--
Bill did you used to be a tanker?
No, but I have·a little·experience with the A1. It is an absolutely stunning machine. I just wish it was more comfortable! A little crew comfort would go a LONG way! But, I must say the suspension is so good it has to be experienced to be believed.

--Bill

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.

Mike Green
04-18-2007, 09:05 PM
Jayguy5000,
Look at the Nuts and Volts article that PJAllen posted. It has schematics and sample programs.

Nick Waldvogel
04-18-2007, 09:37 PM
Will any diode work or is there a formula to use to determine the proper size?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Mike Green
04-18-2007, 09:51 PM
The article shows a 1N4002 which is rated at 1A average current and 100V.
Anything similar (50V or more, current rating roughly 1A) should work for most small motors or solenoids.

Chris Savage
04-18-2007, 10:07 PM
The following schematics are the ones I usually put up for this question.· There is both a MOSFET and NPN Transistor Driver. R1 would typically be 1K but there is a valid range depending on the load and transistor used.· This schematic is for example.· Take care.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support

Pat Alonzi
04-19-2007, 12:27 AM
it looks like in between when I went to sleep and woke up this got wrapped up do I still need to post my schematic? it is basically the same as Chris's. However I recommend using a darlington since it gives you room to upgrade in the future for more relays.

curious1
04-19-2007, 04:17 AM
I've gotten all that I need, thanks anyway Pat.

RC

skylight
04-19-2007, 05:46 AM
The easiest way I believe saving on component count, is to use the L293D driver chip with four channels each able to drive·600ma into loads at up to 36V, able to drive inductive loads and input direct·from stamp (5V)·without any transistors or external components for simplicity it seems IMO the·easiest route. Anyone think otherwise?

Jayguy5000
04-22-2007, 09:36 AM
ok I bought an extension cord that can be cut to be able to put the 110 VAC through the relay, can some one please put up a shcematic of how all of this should be connected? for right now im trying to control anything really, I dont mind how I control it either, push button would be fine. I have a black light I can use to turn on and off. THANKS

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Actually I think Im going to add the whiskers to my tank and let it roam, just need to figure out where.

PJ Allen
04-23-2007, 01:05 AM
You will also require a fuse·(don't be·an idiot.)
You will also require a terminal block (don't be·an idiot.)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When you get 1st Place in the "Darwin Awards", you're a Winner & a Loser.