Sign in to follow this  
Followers 0
BrakeDanceJ

What type of Relay?

21 posts in this topic

I am more of a software guy, so please save me!

I am rapid prototyping an exciting new project, that I will believe will prove to be extremely profitable and fun!

Basically, it's a tiptronic shifting system and a rpm-based shifting system.

A user can shift his automatic car (in this case, a 91-98 Mitsubishi Eclipse or Eagle Talon) like a manual transmission via two buttons/paddles. Another mode allows the user to define a certain rpm that he would like the transmission to automatically shift for him; without any user interaction, the car would slam gears at redline.

Both are extremely cool features. The manual-shift will auto utilize a launch-control mode, allowing the user to enter neutral, rev the car up, and dump into the lowest possible gear.

Here's my layout:

ECU rpm (rev per minute) 0-5v ------------ Arduino analog pin 1

ECU vss (vehicle speed sensor) 0-5v ------------ Arduino analog pin 2

Transmission Valve 1 0/12v -------- RELAY 1 > 12v Battery line

Transmission Valve 2 0/12v -------- RELAY 2 > 12v Battery line

Transmission Valve 3 0/12v -------- RELAY 3 > 12v Battery line

Transmission Valve 4 0/12v -------- RELAY 4 > 12v Battery line

RELAY 1 'activator' voltage -------- Arduino output pin 1 3-5v

RELAY 2 'activator' voltage -------- Arduino output pin 2 3-5v

RELAY 3 'activator' voltage -------- Arduino output pin 3 3-5v

RELAY 4 'activator' voltage -------- Arduino output pin 4 3-5v

I am looking for a solid state relay that can be 'triggered' by 3-5v and then allow 12v to flow from the battery to the valve.

So all you electronics hobbyists, where can I find these? how much are they?

Thanks much,

Joe

0

Share this post


Link to post
Share on other sites

If you're looking for an electromechanical relay, any relay designed to handle your valves' current @ 12 V with a 5 V or preferably 12 V coil will work fine. For the interfacing to the Arduino, you will absolutely, positively need a transistor to switch the relay on. Your microcontroller will die a horrible EM death otherwise. If you want to use a single IC rather than a bunch of discrete transistors, you can use a Darlington transistor array, like the ULN2004, which contains a bunch of high-current Darlington transistor pairs in a single IC package.

Depending on the current draw of your 12 V transmission valves, you may be able to use just some Darlington transistor pairs on their own. I think the ULN20** series of arrays will source up to 500 mA per pair. If not, you can use a driver-power pair of transistors (just a big old power transistor, probably a TO-220 package and a small signal transistor to switch it on). I wouldn't imagine small valves would pull too much current. If they do turn out to be high current, SCRs might be a good choice too.

If you have a hard time finding individual transistors, especially power transistors, let me know, as I have quite a few rated to around 5 Amps or so.

EDIT: Also, Mouser Electronics carries just about every modern part known to man -- http://www.mouser.com

Edited by systems_glitch
0

Share this post


Link to post
Share on other sites
If you're looking for an electromechanical relay, any relay designed to handle your valves' current @ 12 V with a 5 V or preferably 12 V coil will work fine. For the interfacing to the Arduino, you will absolutely, positively need a transistor to switch the relay on. Your microcontroller will die a horrible EM death otherwise. If you want to use a single IC rather than a bunch of discrete transistors, you can use a Darlington transistor array, like the ULN2004, which contains a bunch of high-current Darlington transistor pairs in a single IC package.

Depending on the current draw of your 12 V transmission valves, you may be able to use just some Darlington transistor pairs on their own. I think the ULN20** series of arrays will source up to 500 mA per pair. If not, you can use a driver-power pair of transistors (just a big old power transistor, probably a TO-220 package and a small signal transistor to switch it on). I wouldn't imagine small valves would pull too much current. If they do turn out to be high current, SCRs might be a good choice too.

If you have a hard time finding individual transistors, especially power transistors, let me know, as I have quite a few rated to around 5 Amps or so.

EDIT: Also, Mouser Electronics carries just about every modern part known to man -- http://www.mouser.com

You completely lost me. I've tried to research as much as possible, but again, I'm a lost software guy in this hardware world; and it's really a limiting factor.

I wiki'd transistor, but I'm not sure why it would be required off the Arduino. Doesn't the Arduino output 5v from the pins? And what's this of a Darlington transistor array?

Sorry to completely drain your time, but google and wiki just having some trouble explaining all of this to me.

0

Share this post


Link to post
Share on other sites

You don't want a transistor array, you want an opto-isolator to ensure your microcontroller stays safe. Depending on the current the opto-isolator can take, you may also need some transistors to shield the isolator itself from the higher current required to trigger the relays.

As for which relays you'll need.. I really don't know.

0

Share this post


Link to post
Share on other sites

How much would you guys want to just design the circuit for me and source the parts?

As much as I desire to, I'm having trouble picking this up.

0

Share this post


Link to post
Share on other sites

Good call, Ohm, an opto-isolator would probably be better. I've used a ULN2004 to push 500 mA into stepper motor windings, but you'd want something more failsafe when driving down the road.

Basically, an opto-isolator is a device with a LED and an optical switch coupled together. What happens is, when you turn the LED on, it causes the optical switch to turn on, but because the "connection" beween them is a one-way light connection, there's no chance of something happening to a transmission valve and causing your Arduino's magic blue smoke to be let out. If that happened, something /very/ bad might happen, like all of the transmission valves being turned on at once.

Transistors are essentially solid-state switches. You place them in series with a load (in your case, a relay coil or a transmission valve actuator), and when a small current at the transistor's base terminal (there are three, Emitter, Collector, and Base) is applied, it causes a larger current to flow across the transistor, through the load. Which direction depends on the transistor type. The reason you absolutely need one for a relay, is that yes, the Arduino puts out a full 5v at its port pins, but they're only sourcing a few tens of milli-Amps of current, at most. This isn't enough to drive a relay coil, usually (not one for switching transmission valves). Besides, when the relay is switched off by the Arduino, there's a high voltage pulse caused by the collapsing magnetic field when the electromagnet turns off (in both the relay and the transmission valve). This "back EMF" can bake microcontrollers and improperly rated transistors with ease.

Both relays and opto-isolators provide adequate separation from the control and the work ends of the electronics, preventing total failure of your system. If a relay or opto-isolator dies, then that transmission valve it controls stops working. That's not nearly as bad as one (or all!) being stuck open.

The relay you'll need depends on the load of the transmission valves. You can find this in their spec sheets, or if you don't know what the specs are, see which fuse they're powered from. You can be sure they don't draw more than that, and planning your relay around the maximum current available to the valves is probably a better path than just building to your specific valves' specs.

I've probably got the parts laying around the workshop to throw something together. If you're having trouble understanding transistors and opto-isolators, I'd suggest finding some of the Forrest M. Mims "Engineering Mini-Notebooks" -- they're out of print, but they can be found online. Prototyping it should be pretty easy, and I can probably throw together a schematic of the general concept some time this week.

0

Share this post


Link to post
Share on other sites
Good call, Ohm, an opto-isolator would probably be better. I've used a ULN2004 to push 500 mA into stepper motor windings, but you'd want something more failsafe when driving down the road.

Basically, an opto-isolator is a device with a LED and an optical switch coupled together. What happens is, when you turn the LED on, it causes the optical switch to turn on, but because the "connection" beween them is a one-way light connection, there's no chance of something happening to a transmission valve and causing your Arduino's magic blue smoke to be let out. If that happened, something /very/ bad might happen, like all of the transmission valves being turned on at once.

Transistors are essentially solid-state switches. You place them in series with a load (in your case, a relay coil or a transmission valve actuator), and when a small current at the transistor's base terminal (there are three, Emitter, Collector, and Base) is applied, it causes a larger current to flow across the transistor, through the load. Which direction depends on the transistor type. The reason you absolutely need one for a relay, is that yes, the Arduino puts out a full 5v at its port pins, but they're only sourcing a few tens of milli-Amps of current, at most. This isn't enough to drive a relay coil, usually (not one for switching transmission valves). Besides, when the relay is switched off by the Arduino, there's a high voltage pulse caused by the collapsing magnetic field when the electromagnet turns off (in both the relay and the transmission valve). This "back EMF" can bake microcontrollers and improperly rated transistors with ease.

Both relays and opto-isolators provide adequate separation from the control and the work ends of the electronics, preventing total failure of your system. If a relay or opto-isolator dies, then that transmission valve it controls stops working. That's not nearly as bad as one (or all!) being stuck open.

The relay you'll need depends on the load of the transmission valves. You can find this in their spec sheets, or if you don't know what the specs are, see which fuse they're powered from. You can be sure they don't draw more than that, and planning your relay around the maximum current available to the valves is probably a better path than just building to your specific valves' specs.

I've probably got the parts laying around the workshop to throw something together. If you're having trouble understanding transistors and opto-isolators, I'd suggest finding some of the Forrest M. Mims "Engineering Mini-Notebooks" -- they're out of print, but they can be found online. Prototyping it should be pretty easy, and I can probably throw together a schematic of the general concept some time this week.

Your post is probably the most insightful one i've seen in a very long time. I'm going to try to snag that book, or some other print-material to read at night before I snooze. I just wish life would allow me some spare time to learn this like the back of my hand before producing a product; though in my previous life experiences, nothing is as insightful as diving right in and fiddling around!

I found a relay schematic, on the Arduino site (http://www.arduino.cc/playground/uploads/Learning/relays.pdf); though I'd have problems sourcing those parts, and I'd still be unsure as to which relay to use.

I'd have to agree that an opto-isolator sounds like the way to go, but made me think of a horrible situation:

Let's say 1st gear requires voltage on valves 1 and 2

2nd on 1 and 3

3rd on 2 and 3

4th on 3 and 4

What if the opto-isolator blows and valve 1 is engaged, now the car shifts to 4th also enabling valves 3 and 4?

Some type of mechanism should cause the device to release all valves if it detects failure.

On other feature I forgot to incorporate would be a 'pass through mode', basically another 4 relays that allow the stock connections to the valves to be put back through to the stock AT computer.

If you're willing/interested in drafting a schematic and sourcing the parts; I'd be more than willing to compensate you! Let me what you'd like.

Thanks much in advance,

Joe

Edited by BrakeDanceJ
0

Share this post


Link to post
Share on other sites

Well, that's one positive thing about using relays -- if they fail, they'll fail open. No current on the coil will cause the return spring to pull the contacts open again.

As far as selecting between regular car-computer control and Arduino control, you could add a bank of 4 double-throw relays all controlled from a single microprocessor line, to select between control voltage going to the transmission valves from either the wires from the computer, or the other set of relays. This would be implemented in much the same way as the Arduino's relay control for the valves themselves. It'd just be another user-selectable option.

The schematic link you posted is the basic idea behind microcontroller-operated relays. You'll notice the diode across the coil of the relay -- that's to damp out the spike generated when the relay switches off. In stead of the base of the transistor in that schematic connecting to the microcontroller, it'd connect to an opto-isolator, which would then be connected to the micro. The driver of the opto-isolator is just an infrared LED, so it needs no special circuitry other than a current-limiting resistor, to connect to the Arduino's pins.

Sure, I can lay it out for you. If you're interested, I can also print and etch circuit boards myself, so I can make some prototype boards for you. I use EAGLE layout editor, so if you like the design I come up with, you can send the EAGLE files off to a board house and have them made en masse. I'm not sure what quantity of parts I have at home (most of my relays plug in to 8-pin vacuum tube sockets, and do 25 A @ 250 VAC), but from what I've seen poking around eBay this afternoon, relays capable of 25 A @ 12 VDC don't cost much -- $35 with shipping for 50 from China. Opto-isolators are cheap as well.

0

Share this post


Link to post
Share on other sites
Well, that's one positive thing about using relays -- if they fail, they'll fail open. No current on the coil will cause the return spring to pull the contacts open again.

As far as selecting between regular car-computer control and Arduino control, you could add a bank of 4 double-throw relays all controlled from a single microprocessor line, to select between control voltage going to the transmission valves from either the wires from the computer, or the other set of relays. This would be implemented in much the same way as the Arduino's relay control for the valves themselves. It'd just be another user-selectable option.

The schematic link you posted is the basic idea behind microcontroller-operated relays. You'll notice the diode across the coil of the relay -- that's to damp out the spike generated when the relay switches off. In stead of the base of the transistor in that schematic connecting to the microcontroller, it'd connect to an opto-isolator, which would then be connected to the micro. The driver of the opto-isolator is just an infrared LED, so it needs no special circuitry other than a current-limiting resistor, to connect to the Arduino's pins.

Sure, I can lay it out for you. If you're interested, I can also print and etch circuit boards myself, so I can make some prototype boards for you. I use EAGLE layout editor, so if you like the design I come up with, you can send the EAGLE files off to a board house and have them made en masse. I'm not sure what quantity of parts I have at home (most of my relays plug in to 8-pin vacuum tube sockets, and do 25 A @ 250 VAC), but from what I've seen poking around eBay this afternoon, relays capable of 25 A @ 12 VDC don't cost much -- $35 with shipping for 50 from China. Opto-isolators are cheap as well.

I downloaded the Eagle demo a few days ago, and have yet to install it. I'm looking forward to playing around with it and designing some boards.

0

Share this post


Link to post
Share on other sites

you could just use a 5v relay to switch a 12volt relay? it would be slower but then you wouldnt really need to know anything about hardware, and it would be very simple circuit...

edit: you may want to make the car shift before the red line othere wise you would be going way faster then you would want to be; as you would have to get up to like 50-60mph to shift into second gear. most cars have shifted threw all 4-5 gears by like 2000-3000rpm anyways...

edit2: it would also be safe for the micro controller as it would do nothing but "pop" the relays. also you may want to just buy a atmega168 chip and program your arduino to write your program to it, so you can make your "shifter" for like $5-$20.00.

Edited by dinscurge
0

Share this post


Link to post
Share on other sites
you could just use a 5v relay to switch a 12volt relay? it would be slower but then you wouldnt really need to know anything about hardware, and it would be very simple circuit...

edit: you may want to make the car shift before the red line othere wise you would be going way faster then you would want to be; as you would have to get up to like 50-60mph to shift into second gear. most cars have shifted threw all 4-5 gears by like 2000-3000rpm anyways...

It would take to long to piggy-back relay it. Speed is a must.

Remeber, this is for a racing application. Redline shifts are perfect, but the rpm should be user-configurable in that mode.

0

Share this post


Link to post
Share on other sites

not really you could time the relays and then off set them to shift earlier it should be something like .5seconds, besides inless you have a volkswagon you'll be shifting slow anyways.

edit: you could just be lazy and of set them in rpm like shift 100rpm before red line

Edited by dinscurge
0

Share this post


Link to post
Share on other sites
not really you could time the relays and then off set them to shift earlier it should be something like .5seconds, besides inless you have a volkswagon you'll be shifting slow anyways.

edit: you could just be lazy and of set them in rpm like shift 100rpm before red line

You can actually control how hard the clutch pack engages by varying voltage to a line. I'm thinking of using 3-way dip switches for the user to control how hard the shifts are (hard, medium, soft), and looking into a way to output variable voltage to that line; something similar to a relay, but with variable voltage.

0

Share this post


Link to post
Share on other sites

Also, I wouldn't want there to be a delay when manually shifting either.

0

Share this post


Link to post
Share on other sites
Also, I wouldn't want there to be a delay when manually shifting either.

as for the hard/soft shift you will probably want to do that by declaring the current/voltage as a variablebecause then you could use 1 button to change the current or voltage. as if you did it with hardware you could use regulators to set voltage but then you would need 4 regulators. or you could use resistors and would need 4 switches to switch all 4 of them hard/med/soft.

0

Share this post


Link to post
Share on other sites
Also, I wouldn't want there to be a delay when manually shifting either.

as for the hard/soft shift you will probably want to do that by declaring the current/voltage as a variablebecause then you could use 1 button to change the current or voltage. as if you did it with hardware you could use regulators to set voltage but then you would need 4 regulators. or you could use resistors and would need 4 switches to switch all 4 of them hard/med/soft.

What about a potentiometer? I would like the software to be 'aware of everything'. I'd like it to 'know' that it's shifting hard, and even maybe able to display it on an lcd.

0

Share this post


Link to post
Share on other sites

Your microcontroller should have some sort of Digital to Analog converter, which allows you to input a binary number and get an analog voltage output. If it doesn't DACs are fairly common and cheap. If your micro doesn't have one and you need one, let me know. I ordered 20 or so from eBay a year ago for a project, and only used a few. The DACs I have are, I think, 12 bit, so even that would provide some pretty high resolution for how hard/soft it shifts. It could even be user-programmable.

Edited by systems_glitch
0

Share this post


Link to post
Share on other sites

yep, ive seen people directly declare voltage and current as variables, and then could vary them with up/down buttons i quess, and you could probably get it to display the exact voltage and current if you had a big enough lcd but youd probably want a sugmented one so it would be easyer to display characters, like a 1 line could work but a 2 line would work good. but dunno how you would controll the resistance with the cpu because it would have to vary on the 12volt side of the circuit and i dont know of any particularly good ways to controll resistance with voltage.. i mean ive use light before but its not real accurate,and if you car already has a cpu to controll everything on it, it might get alittle fussy and show some trouble lights and stuff if the outputs on the shifter arent used... and you probably could use just 5v relays as it probably doesnt take hich current to shift a car since it would be switching 12volts instead of 120v it would handle about 10x the current its rated for at 120v...

0

Share this post


Link to post
Share on other sites
yep, ive seen people directly declare voltage and current as variables, and then could vary them with up/down buttons i quess, and you could probably get it to display the exact voltage and current if you had a big enough lcd but youd probably want a sugmented one so it would be easyer to display characters, like a 1 line could work but a 2 line would work good. but dunno how you would controll the resistance with the cpu because it would have to vary on the 12volt side of the circuit and i dont know of any particularly good ways to controll resistance with voltage.. i mean ive use light before but its not real accurate,and if you car already has a cpu to controll everything on it, it might get alittle fussy and show some trouble lights and stuff if the outputs on the shifter arent used... and you probably could use just 5v relays as it probably doesnt take hich current to shift a car since it would be switching 12volts instead of 120v it would handle about 10x the current its rated for at 120v...

I explained how you'd vary a voltage with a microprocessor: you use a DAC. A DAC is just a resistance ladder; that is, when you input a logic HIGH on one of the bits, you're applying voltage across a resistor in a R2-R ladder. The current coming from the DAC is tiny, so you use a transistor to amplify it to the current you need, with no voltage gain.

As to sticking relays directly on microprocessor lines, please read the previous posts. For substantial relays (i.e. anything but reed-type relays) you need more current to trip the coil than a micro can provide. In general, any load over 25 mA shouldn't be driven directly by an I/O line. For this, you use a transistor, or an opto-isolator for protection and isolation. Also, "probably doesn't take high current" isn't a term you work with, when you're designing something that's supposed to push your car through its gears with you inside. A relay's contacts welding shut during fast acceleration would be disastrous. While I don't imagine that it does take much amperage to operate a transmission valve solenoid, it's something that needs to be researched, and preferably overengineered.

Speaking of relays, a lot of the relays I've seen for sale are in the 5-15 mS off-to-on time range, so the speed of the relay shouldn't be noticeable when shifting. I'd imagine it takes significantly longer than that just to engage the clutch pack for the shift.

0

Share this post


Link to post
Share on other sites

Not to back pedal, but after some googling, a optoisolator would rock. Switching a valve on would be a matter of:

digitalWrite(ledPin, HIGH);

http://www.glacialwanderer.com/hobbyrobotics/?p=10 is somewhat helpful, but I'm still unsure as to what else needs to be inline with that optoisolator

Edited by BrakeDanceJ
0

Share this post


Link to post
Share on other sites
yep, ive seen people directly declare voltage and current as variables, and then could vary them with up/down buttons i quess, and you could probably get it to display the exact voltage and current if you had a big enough lcd but youd probably want a sugmented one so it would be easyer to display characters, like a 1 line could work but a 2 line would work good. but dunno how you would controll the resistance with the cpu because it would have to vary on the 12volt side of the circuit and i dont know of any particularly good ways to controll resistance with voltage.. i mean ive use light before but its not real accurate,and if you car already has a cpu to controll everything on it, it might get alittle fussy and show some trouble lights and stuff if the outputs on the shifter arent used... and you probably could use just 5v relays as it probably doesnt take hich current to shift a car since it would be switching 12volts instead of 120v it would handle about 10x the current its rated for at 120v...

I explained how you'd vary a voltage with a microprocessor: you use a DAC. A DAC is just a resistance ladder; that is, when you input a logic HIGH on one of the bits, you're applying voltage across a resistor in a R2-R ladder. The current coming from the DAC is tiny, so you use a transistor to amplify it to the current you need, with no voltage gain.

As to sticking relays directly on microprocessor lines, please read the previous posts. For substantial relays (i.e. anything but reed-type relays) you need more current to trip the coil than a micro can provide. In general, any load over 25 mA shouldn't be driven directly by an I/O line. For this, you use a transistor, or an opto-isolator for protection and isolation. Also, "probably doesn't take high current" isn't a term you work with, when you're designing something that's supposed to push your car through its gears with you inside. A relay's contacts welding shut during fast acceleration would be disastrous. While I don't imagine that it does take much amperage to operate a transmission valve solenoid, it's something that needs to be researched, and preferably overengineered.

Speaking of relays, a lot of the relays I've seen for sale are in the 5-15 mS off-to-on time range, so the speed of the relay shouldn't be noticeable when shifting. I'd imagine it takes significantly longer than that just to engage the clutch pack for the shift.

you can use a dac or just do this if your using a atmega168 chip

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0