Pages: [1] 2   Go Down
Author Topic: Relay help  (Read 2178 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey everyone I have a project that requires a relay. What I am trying to accomplish is if I punch in the right keycode the arduino will send a pulse to the relay. The problem is the relay will be hooked up to my ignition switch to my truck. I am pretty sure that runs at 9-12 volts. The arduino operates at 5v. So how would I connect a relay? Would I need a latching or non latching. I bought a spdt relay with a 12vdc coil. Rated 10A at 120VAC/24VDC. So matrix keypad to arduino. Arduino to relay/ignition switch. Correct keycode on the keypad arduino sends pulse to relay enabling ignition.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34168
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
arduino sends pulse to relay enabling ignition.
If the arduino pulses the relay the contacts will pulse. If you have a holding relay you will have to figure out how to turn it off.

This link shows you how to connect a relay:-
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html
Logged

0
Offline Offline
Shannon Member
****
Karma: 206
Posts: 12179
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Trucks tend to be 24V rather than 12V, you need to find out the voltage and current ratings for definite...
Logged

[ I won't respond to messages, use the forum please ]

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The problem is the relay will be hooked up to my ignition switch to my truck. I am pretty sure that runs at 9-12 volts.

Most likely +12vdc that can range from 9vdc while cranking the motor to +14 or so when being charged. Get a multimeter and measure to be sure and you need to own a meter if you are going to build something with a arduino, that's not optional in my book.


The arduino operates at 5v. So how would I connect a relay?

You need to add a transistor switch and resistor so that the arduino can control a 12vdc relay. Here is an example circuit: http://arduino.cc/playground/uploads/Learning/solenoid_driver.pdf It shows a solenoid being controlled but that is the same as a relay coil.


Would I need a latching or non latching.
Depends on what the arduino code is trying to do and control. In most cases you don't require a latching relay, just proper program commands in the arduino code.


I bought a spdt relay with a 12vdc coil. Rated 10A at 120VAC/24VDC. So matrix keypad to arduino. Arduino to relay/ignition switch. Correct keycode on the keypad arduino sends pulse to relay enabling ignition.

  From a safety point of view do you trust an arduino you programmed and wired into your truck not to turn off the ignition while driving high speed on the hiway. Think about that carefully before proceeding. Just because an arduino can be made to perform a specific task doesn't mean it should be used for that task.

Lefty
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Lefty, I do have a multimeter. I went and bought one the otherday. I understand your concern about the ignition being involved. See I thought the car runs off the alternator after it is started. That would mean the ignition has nothing to do with driving, while in the process. But I could be wrong and I guess to be on the safe side I will go with hooking the relay up to the selanoid.

I guess the relay being latched or non latched wouldn't make a difference with the proper programming.
« Last Edit: February 08, 2012, 11:43:19 am by annonymous » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Lefty, I do have a multimeter. I went and bought one the otherday. I understand your concern about the ignition being involved. See I thought the car runs off the alternator after it is started.

I don't think that is correct. The ignition circuit is it's own circuit, how else would you be able to stop the engine running by just turning the keyswitch off?

That would mean the ignition has nothing to do with driving, while in the process. But I could be wrong and I guess to be on the safe side I will go with hooking the relay up to the selanoid.

Well that is possible but be sure you have a relay that has contact current ratings able to handle what the starting solenoid requires.

I guess the relay being latched or non latched wouldn't make a difference with the proper programming.

Correct. And latch relays are more complex in that there is additional wiring to allow both setting and resetting for it.


Lefty


Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well that is possible but be sure you have a relay that has contact current ratings able to handle what the starting solenoid requires.

A typical small/medium car starter motor solenoid draws about 30 Amps initially, dropping to about 10 Amps once it has engaged the main contacts. If this is for a heavy vehicle it would likely need correspondingly more current.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

PeterH, I just went outside and tested the starting selanoid with my multimeter and while the car is off the DCV is 12.5 to 13. When I turn the key back, the DCV drops to 12.10 to 12.53. While the car is on it jumps to 15-15.11 DCV.

So would the SPDT 12V relay at 120VAC/24VDC rated 10A work for my project?
What kind of diode and transistor would I need? Am I missing anything?
« Last Edit: February 08, 2012, 12:44:49 pm by annonymous » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So would the SPDT 12V relay at 120VAC/24VDC rated 10A work for my project?

The voltage variation is fine for the 12volt relay coil, however the 10A contact ratings is probably much too low for handling the starting solenoid circuit, and you would end up with the contacts welded closed, which in not a good thing and would most likely end up destroying the starter motor or it's turning gear or both.


Lefty
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So what contact rating is suitable for the starting selanoid, 30? Could I even find a spdt 12V relay that has a contact rating of 30?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So what contact rating is suitable for the starting selanoid, 30?
I have no idea what a suitable rating for your truck would be and don't know where to find such information.
 Could I even find a spdt 12V relay that has a contact rating of 30?

30amps, maybe, higher then 30, not sure. Controlling the starter current path is not method I would attempt. I really don't have a solution for you other then to say using a arduino to control the starting or the ignition circuits is a pretty risky application. However cars and truck do come with such keyless entry systems and security systems and there my be 3rd party options that can be fitted to your truck. I'm just not sure it's a good arduino beginners project to take on.

Lefty

Logged

Canada
Offline Offline
Sr. Member
****
Karma: 0
Posts: 318
Sometimes teaching, always learning,
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

On my ranger there is a solenoid that looks like this:

By applying 12V to the silver terminal, it will close the copper terminals. I don't know how much amperage the coil will use, but for sure it will be under 10A. I would use the relay you have to control the solenoid.

edited to add: Applying 12V to the silver terminal will only cause the engine to crank. It will not energize the ignition, or turn on the fuel pump, or run the fuel control unit. All those are necessary to start the engine.

edit #2: Also, cranking the engine that way will also override any neutral safety switch. The truck will drive if it is in gear. Be very, very careful. If you go ahead with this, you should consider a reliable fail-safe method for this reason.
« Last Edit: February 08, 2012, 03:09:54 pm by John_S » Logged


Canada
Offline Offline
Sr. Member
****
Karma: 0
Posts: 318
Sometimes teaching, always learning,
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Perhaps a better approach would be as follows:

Connect a relay in series with the solenoid I linked to above. (i.e. the solenoid will only work if the relay is closed)
When you get in your truck, you enter the code, which closes the relay for a few seconds.
In that time, you start your truck with the key as normal.
This would be the safest and easiest approach to a key-code ignition lock.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

John_s, I just returned the 10A relay and went to a car parts store and bought a 30A relay. But I am going to hook it up to the selanoid. I went over it with the master mechanic and he broke it down. It is actually really simple. But I am going to take the ignition wire that goes to the selanoid and connect that to the com terminal on the relay and the normally open to the selanoid positive. The arduino to the coil. Now I need to figure out how to make the arduino send 12 volts. And what line I have to hook up the diode to.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34168
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
And what line I have to hook up the diode to.
Hook the diode across the coil with the cathode (the strip end) pointing towards the positive.

Quote
Now I need to figure out how to make the arduino send 12 volts.
I gave you a link to that in my first reply.
Logged

Pages: [1] 2   Go Up
Jump to: