Go Down

### Topic: Will this transistor/ relay set-up work? (Read 2794 times)previous topic - next topic

#### pwnm30rdi3

##### Jan 01, 2012, 09:48 am
I'm using an Arduino Pro in my car.

I'm using this transistor:
http://www.sparkfun.com/products/10213

& this relay

Will this work or do I need a smaller Relay?

#### tigerbomb8

#1
##### Jan 01, 2012, 09:55 am
what are you trying to do?

#### Grumpy_Mike

#2
##### Jan 01, 2012, 09:57 am
You need a 125R resistor between the pin 5 and the gate of the FET.
You need a reverse bias diode across the relay.
You need to connect the -ve of the battery to the arduino ground.

#### pwnm30rdi3

#3
##### Jan 01, 2012, 10:04 amLast Edit: Jan 01, 2012, 10:09 am by pwnm30rdi3 Reason: 1

You need a 125R resistor between the pin 5 and the gate of the FET.
You need a reverse bias diode across the relay.
You need to connect the -ve of the battery to the arduino ground.

1) How did you calculate the size of the resistor and why is it needed exactly.
2) Do I need a reverse bias diode because of how the transistor is wired to the relay?
3) I did the sketch pretty fast, I will ground the Arduino to the battery and make a 5v regulator for the (+)

I'm just starting to get into this stuff so go slow

Thanks so much,

Andrew

what are you trying to do?

Use an RFID reader to act as my ignition switch (or kill switch), since I have no key.
I guess I could use a smaller Relay, I just have this one laying around.

#### Grumpy_Mike

#4
##### Jan 01, 2012, 10:10 am
Quote
1) How did you calculate the size of the resistor and why is it needed exactly.

The FET gate looks like a discharged capacitor. A resistor of 125R keeps the peak current below the 40mA that it is "safe" to draw from an arduino.

Quote
2) Do I need a reverse bias diode because of how the transistor is wired to the relay?

No you need it because of the back EMF generated by the coil.

Quote
and make a 5v regulator for the (+)

You need 12V for the relay, so what is the regulator for?

#### pwnm30rdi3

#5
##### Jan 01, 2012, 10:14 amLast Edit: Jan 01, 2012, 10:17 am by pwnm30rdi3 Reason: 1

Quote
1) How did you calculate the size of the resistor and why is it needed exactly.

The FET gate looks like a discharged capacitor. A resistor of 125R keeps the peak current below the 40mA that it is "safe" to draw from an arduino.

Quote
2) Do I need a reverse bias diode because of how the transistor is wired to the relay?

No you need it because of the back EMF generated by the coil.

Quote
and make a 5v regulator for the (+)

You need 12V for the relay, so what is the regulator for?

1. Ohhh, So no matter what size transistor I have I should always have a 125 Ohm resistor? What Watt?
3. I meant to say a 5v regulator for the Arduino since it will be in my car.

Thanks!

#### tigerbomb8

#6
##### Jan 01, 2012, 10:23 am
Quote from: pwnm30rdi3

Use an RFID reader to act as my ignition switch (or kill switch), since I have no key.
I guess I could use a smaller Relay, I just have this one laying around.

cool you should make this into and enter it into the instructables shopbot contest

i was going to make something like this. but to start the car i would need to put my wallet in a specific spot.

#### pwnm30rdi3

#7
##### Jan 01, 2012, 10:28 am

Quote from: pwnm30rdi3

Use an RFID reader to act as my ignition switch (or kill switch), since I have no key.
I guess I could use a smaller Relay, I just have this one laying around.

cool you should make this into and enter it into the instructables shopbot contest

i was going to make something like this. but to start the car i would need to put my wallet in a specific spot.

I should enter!
I will have to swipe a RFID key tag near the reader then I will be able to start the car, right now you could press 2 buttons and drive off with my car.
If the car was fuel injected I would program it to turn over the starter too and start the entire car when the key was swiped.

#### Grumpy_Mike

#8
##### Jan 01, 2012, 11:15 am
Quote
should always have a 125 Ohm resistor?

With an FET then yes, with a bipolar transistor no.

Quote
What Watt?

It doesn't mater, so little power is being dissipated here.

Quote

Yes

#### pwnm30rdi3

#9
##### Jan 03, 2012, 09:10 am
Quote
should always have a 125 Ohm resistor?

I could only find a 120 Ohm 1/4 watt resistor. Hopefully it works?

Quote

I also could only find a,
Prv - 400v Max
Vf- 1.2v @ 3A
Industrial Rectifier, will this work?

Thanks so so so much!!

#### Grumpy_Mike

#10
##### Jan 03, 2012, 03:26 pm
Quote
Hopefully it works?

Yes it will work but will not provide enough protection. The absolute maximum output current for a pin is 40mA, even that will produce damage if sustained. Your resistor will limit the current to 5 / 120 = 41.6 mA, you are better getting a resistor greater that the 125R you need.

The diode is fine.

#### pwnm30rdi3

#11
##### Jan 04, 2012, 05:27 am

Quote
Hopefully it works?

Yes it will work but will not provide enough protection. The absolute maximum output current for a pin is 40mA, even that will produce damage if sustained. Your resistor will limit the current to 5 / 120 = 41.6 mA, you are better getting a resistor greater that the 125R you need.

The diode is fine.

I found some 130 Ohm 1/4 watt resistors today.
Thanks for all your help. I would have probably messed something up terribly without your help!
You are the best!!!

Go Up