Maker Pro
Maker Pro

Need Transistor to relay help ASAP

Slobin3d

Jun 13, 2012
38
Joined
Jun 13, 2012
Messages
38
Here is a schematic of a transistor switch controlling a relay using a comparator to set a voltage threshold. The pot can be adjusted to set the voltage between 0 and 12V, so 6V should be very near to the center. Or you could use fixed resistor in the ratio of 3:1 (top:bottom) to get a 6V threshold.

When the throttle signal voltage is less than the threshold, the comparator output is 0V (ground), which grounds the base of the transistor and turns it off. When the throttle voltage goes above, the comparator is not grounded and the 3.3K resistor turns the transistor on. The diode is to protect from the voltage spike that occurs when the relay is turned off. This might very well (should) already be in the circuit, but if it is not, use a 1N4001 (or any of the 1N400X ones).

Bob

looks really good, thanks. Now to find all the parts and wire it up tonight. Hopefully I can get all the stuff in stock at the rat shack
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
looks really good, thanks. Now to find all the parts and wire it up tonight. Hopefully I can get all the stuff in stock at the rat shack
That was one reason I suggested the LM339. I believe they carry them.

Bob
 

Slobin3d

Jun 13, 2012
38
Joined
Jun 13, 2012
Messages
38
That was one reason I suggested the LM339. I believe they carry them.

Bob

they show them in stock. Quick question. in your diagram, does #4 tap into the 24vdc line with 2 10k resistors?
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
I don't understand your question. Pin 4 connects to the center lug on the pot. Pin 5 connects only to the thorttle control. When lines cross, there is only a connection when there is a dot there. Hope this is what you were asking.

Bob
 

Slobin3d

Jun 13, 2012
38
Joined
Jun 13, 2012
Messages
38
I don't understand your question. Pin 4 connects to the center lug on the pot. Pin 5 connects only to the thorttle control. When lines cross, there is only a connection when there is a dot there. Hope this is what you were asking.

Bob

gotcha, Could I use a 5v regulator instead of the pot? I don't want to have anything move once it's together.
 

Slobin3d

Jun 13, 2012
38
Joined
Jun 13, 2012
Messages
38
I'm lost why the output from #2 on the comparator is tied into the 24vdc with the 3.3 resistor at the base? It seems that I would always have voltage to the base regardless of what the comparator was doing, or am I missing something really obvious?
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
gotcha, Could I use a 5v regulator instead of the pot? I don't want to have anything move once it's together.

No, once you dial it in to the right switching point put a glob of hot glue (or another glue) on the pot so it doesn't move OR as instructed by Bob "you could use fixed resistor in the ratio of 3:1 (top:bottom) to get a 6V threshold."

I'm lost why the output from #2 on the comparator is tied into the 24vdc with the 3.3 resistor at the base? It seems that I would always have voltage to the base regardless of what the comparator was doing, or am I missing something really obvious?

Again read what Bob posted... "When the throttle signal voltage is less than the threshold, the comparator output is 0V (ground), which grounds the base of the transistor and turns it off. When the throttle voltage goes above, the comparator is not grounded and the 3.3K resistor turns the transistor on."

In other words when the comparator is grounded the +24 voltage coming through the 3.3K will never be able to bring the base high because the base will be 'shorted' to ground, once you remove the short to ground then it can bring the base high...
 

Slobin3d

Jun 13, 2012
38
Joined
Jun 13, 2012
Messages
38
ok. I'm making my shopping list, forgive my lack of understanding, when you say resistor in 3:1 ratio. that means nothing to me yet. What Ohm resistor should I be looking for? Maybe completely miss the relation between the resistor and Input voltage, but wouldn't you want a 4:1 24/3 is 8V 24/4 is 6, or does it not work that way? either way what would the correct resistor be :)
 
Last edited:

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
Since you are going to RAT SHACK get the 5 package of 2.2KΩ... If they don't have the 2.2KΩ don't freak out get what every value they have in that area, I just used 2.2KΩ because it's close to a total 10KΩ split like the original pot...

Put 3 in series on one side aka like this ---[]------[]-----[]--- for a total of 6.6KΩ
Put 1 on the other side like this ---[]--- for a total of 2.2KΩ

A 3:1 ratio aka 6.6 is three times the value of 2.2
 
Last edited:

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
CC,

It's great to have an interpreter that speaks newbie :)

Bob
 

Slobin3d

Jun 13, 2012
38
Joined
Jun 13, 2012
Messages
38
Thank you guys so much for the help, your amazing! 1 last question, the 3:1 ratio you listed CC what would that look like in the diagram bob posted? I have everything and am getting ready to start assembly
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Thank you guys so much for the help, your amazing! 1 last question, the 3:1 ratio you listed CC what would that look like in the diagram bob posted? I have everything and am getting ready to start assembly
The 3 resistors in series would replace the top 10K resistor. The 1 resistor would replace the pot. This is called a voltage divider. If you have 4 units of resistance split 3:1, the 3 side will have 3/4 of the voltage across them, and the 1 will have 1/4. 1/4 of 24 = 6. It is that simple.

Good luck! I'm headed off to bed soon, so you probably won't hear from me again tonight.

Bob
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
Again as Bob posted "Or you could use fixed resistor in the ratio of 3:1 (top:bottom) to get a 6V threshold."

**Notice I removed the 10K up top and placed both the new resistors on the bottom
 

Attachments

  • rev2.jpg
    rev2.jpg
    39.9 KB · Views: 136
Last edited:

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Again as Bob posted "Or you could use fixed resistor in the ratio of 3:1 (top:bottom) to get a 6V threshold."
Uh, oh, that is not right. See my previous post. As CC posted would give you a 3V threshold.

Edit: I see he fixed it, so never mind :)

Bob
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
Uh, oh, that is not right. See my previous post. As CC posted would give you a 3V threshold.

Edit: I see he fixed it, so never mind :)

Bob

Yeah girlfriend has a bad habit of wanting to talk to me, asked questions and what not when I'm in the middle of something...
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Yeah girlfriend has a bad habit of wanting to talk to me, asked questions and what not when I'm in the middle of something...
Well, my wife is with her father, who suddenly weant deaf this morning, so I had time on my hands and no distractions.

Edited to add: And of course, I have NEVER edited one of my posts after reading it and seeing the glaring errors :)

Bob
 

Slobin3d

Jun 13, 2012
38
Joined
Jun 13, 2012
Messages
38
Done, I hope I followed everything correctly

2012-06-13_21-54-37_718.jpg
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
If you haven't powered it up yet, and you have a multimeter, here is what I would recommend:

1. Check the resistance between the power leads. It should read a few K ohms. If less do not apply power.

2. Put a resistor of 1K or more across the relay leads.

3. Connect the throttle input to ground, and measure the voltage on the relay lead coming from the transitor. It should read 24V.

4. Connect the throttle middle of the 4 resistor chain. The voltage on the relay lead coming from the transistor should now read < 1V.

If it passes all of these tests, you can hook it up and hope for the best!

Bob
 

Slobin3d

Jun 13, 2012
38
Joined
Jun 13, 2012
Messages
38
If you haven't powered it up yet, and you have a multimeter, here is what I would recommend:

1. Check the resistance between the power leads. It should read a few K ohms. If less do not apply power.

2. Put a resistor of 1K or more across the relay leads.

3. Connect the throttle input to ground, and measure the voltage on the relay lead coming from the transitor. It should read 24V.

4. Connect the throttle middle of the 4 resistor chain. The voltage on the relay lead coming from the transistor should now read < 1V.

If it passes all of these tests, you can hook it up and hope for the best!

Bob
could you please re-describe #4. It doesn't make sence to me:D
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
I missed the word input. The throttle input should turn the transistor on when connected to > 6V and off when connected to < 6V. The middle of the 4 resistor chain should be at 12V so that would be a way to test for it going on.

Actually, a better test would be to just connect it to the throttle controller and see if it turns the transistor On when twisted in the forward direction and off when not. This without the relay connected so that you don't go starting the motor.

Then then next step would be to disconnect the motor and connect the relay and make sure the relay operates when it should. Finally, connect the motor back on.

Edited: BTW if anything smokes, disconnect the power and come back for advice.

Bob
 
Top