SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By kavesman1
#31115
I need some help.I very new to the world of microcontrollers and programming codes.But i've got friends that are going to help me.

The project I'm starting is for my truck.i need to know how to wire 2 different darlington array chips to a set of automotive relays.the 1st one is a ULN2003A chip array.

the 2nd is a Mitsubishi M54661P quad array.here is the link to the chip. http://exdwh.com/M54661P.pdf

which one of these chips would work in the project im building? i know that the m54661p has an output rating of 1.5 amps per output to control the relays,and that is enough i think to control the coil of the relays.

i need to control the switching of the regular automotive type relays.there are going to be 12 relays on a pcb to control all the high power accessories that will be on the truck.

Can anyone help me with the wiring? Thanks
User avatar
By bigglez
#31121
kavesman1 wrote:The project I'm starting is for my truck.i need to know how to wire 2 different darlington array chips to a set of automotive relays.the 1st one is a ULN2003A chip array.

the 2nd is a Mitsubishi M54661P quad array.here is the link to the chip. http://exdwh.com/M54661P.pdf

which one of these chips would work in the project im building? i know that the m54661p has an output rating of 1.5 amps per output to control the relays,and that is enough i think to control the coil of the relays.

i need to control the switching of the regular automotive type relays.there are going to be 12 relays on a pcb to control all the high power accessories that will be on the truck.
Greetings (no name supplied),

Before your design and build a driver for the relays you'll need the relay data. In particular, what current the coil takes to energize the relay contacts. You can get this from the manufacturer's data sheets, or if you have a sample relay form a quick test with a DMM (VOM, ammeter).

Mechanical relays typically require more current to energize compared with keeping them closed (holding current). A two stage driver would reduce the current after the relay moves; saving power and reducing the strain on the driver.

The four channel chip that you referenced is rated to 1.5A Abssolute Max. don't be tempted to operate it at that level. Also, according to the data sheet, it designed for a very low duty cycle, which means that you can't energize the relay(s) all the time.

This will be true of any IC device due to thermal limits of the package. A better choice would be to use descrete PMOS FETs to drive the relay, and drive the FETs in turn from your existing logic or uC circuits.

What sort of total power are you planning to pass through the relays and PCB? It might be hard to make a reliable PCB to carry heavy currents.

Comments Welcome!
By oPossum
#31122
Measured characteristics for a Bosch 0332204150 30A automotive relay:

Coil voltage, coil hold current

14 V 165 mA
13 V 145 mA
12 V 135 mA
11 V 120 mA
10 V 110 mA

Pull in: 9 Volts
Drop out: 4 Volts


Worst case calculation for ULN2003...

14 V supply, 1.3 V Vce, 150 mA coil current, 7 outputs active

1.3 * .150 * 7 = 1.4 Watts

A 16 pin DIP package will get quite warm.

The M54661 will run cooler because the Vce is lower and there are only 4 outputs.

14 V supply, 1.0 V Vce, 160 mA coil current, 4 outputs active

1.0 * .160 * 4 = 0.64 Watts

Wiring for ULN200x
By oPossum
#31123
Be sure to use an automotive grade voltage regulator (not a 7805), and use RC filters or optical isolation on all inputs.

Don't control anything safety related (headlights) or that could cause injury (power windows).
By Polux rsv
#31124
Hi,
Why not use fet transistors. They have very low Rdson, and even at high load they will not be warm.

Angelo
User avatar
By bigglez
#31127
Polux rsv wrote:Hi,
Why not use fet transistors. They have very low Rdson, and even at high load they will not be warm.
Greeitngs Angelo,

I had the same thought, I'd probably use FETs not relays for myself. However, we don't know from the OP whether the loads are battery connected or ground connected (low-side or high-side FETs).

Inductive loads (motors, relays, solenoids) would require care to prevent back EMF from entering the control electronics. Relays might be the smartest solution in this case.

Should be interesting to see what they are designing!

Comments Welcome!
By rmd6502
#31160
In an automotive application, you want to be very careful to use reverse-ESD diodes to protect from voltage spikes. I'd also feel more comfortable using an optosiolator, say the 4N30, to protect the processor board.
User avatar
By bigglez
#31162
rmd6502 wrote:In an automotive application, you want to be very careful to use reverse-ESD diodes to protect from voltage spikes. I'd also feel more comfortable using an optosiolator, say the 4N30, to protect the processor board.
Greetings (No Name Supplied),

Did you mean flywheel diode? I'm not sure what a "reverse-ESD" anything would be.

The opto-isolator is only required if care is not taken to isolate the logic ground currents from those in the load (or if the load circuit does not share a common connection to the logic). Relays provide the isolation between the circuit driving the relay coil and the circuit using the relay contacts.

Comments Welcome!
By rmd6502
#31164
Er, yes. I was thinking "reverse-EMF", but my fingers had their own ideas.
By bretth
#31238
I'm attempting something similar to the original post, so hopefully someone can help verify this MOSFET circuit will work. Goal is to replace a mechanical relay... switching 12v vehicle power to V_OUT at maximum of 1A.

Image

The P-MOSFET is rated at 1.5A.

The microproccessor is running at 3.3v, powered by a switching regulator connected to the 12v input. When the vehicle power is not available, it is battery powered. Obviously there would be no 12v on V_OUT until the vehicle power is reconnected to 12V_IN.

Any thing I should be aware of?

Thanks,
Brett
By Polux rsv
#31242
Bretth, your schematic is correct. I use the same, but with different transistors. Resistors values are correct.

At 12V_IN, you could add a small ceramic capacitor, 10nf or 100nF to lower EMI at switching. An aluminium capacitor, low ESR, is even better.

If you connect relays, don't forget the freewheeling diode.

Angelo
By oPossum
#31243
bretth wrote:Any thing I should be aware of?
Yes, many issues to be aware of when usings MOSFETS in automotive applications.

Consider what happens when Vgs drops below Vgs(th). The low RdsOn goes away and the magic smoke that powers all semiconductors may be released. VgsMax must also not be exceeded to ensure reliablility.

Automotive circuits must be able to tolerate supply voltages that drop below 5 Volts for several seconds and rise to 40 volts for several milliseconds.

The high voltage can be solved by a Zener diode from gate to source. That will keep Vgs below VgsMax.

The low voltage is a more difficult problem to solve. The logic level device you have chosen makes this dangerous condition much less likely, but for a conventional MOSFET, Vgs needed to insure low RdsOn may be 8 volts or more. If the microcontroller has an ADC, it could be used to monitor battery voltage and turn off the MOSFET if a safe Vgs can not be met. This is not a comprehensive solution, but it is a practical one for a DIY project.

The current required to keep a MOSFET on is very small, but the current required to turn it on (and off) is much higher due to the gate capacitance. Slow turn on puts the MOSFET in the "danger zone" where Rds not at it's minimum. For a circuit that does not turn on/off rapidly this may not be a problem. Reducing R1 and R2 will promote faster turn off/on.

Derating components is desireable if practical. Using a part rated at 1.5 A max to switch 1 A is more likely to fail than one rated at 5 A. Does the load have significant capacitance? Inductance? Design for worst case.

Low side switching (N channel to ground) is often prefered for many reasons. For examplle, it is easier to ensure Vgs is within range and has fast rise and fall times. Also, no current will flow if the output is shorted to the vehicle chasis. N channel devices are usually less expensive than P channel.

MOSFETs can self-oscillate for many reasons. Low value gate resistors (47 to 470 ohm) and ferrite beads are the usual fix. PCB layout may be critical.

When driving motors it is important to size the MOSFET for stall current, not run current. This can be 5 to 10 times higher.

Driving incandescent bulbs is quite difficult due to the very high inrush current. A cold filliment has very low resistance. When a bulb burns out, it may short out and destroy the MOSFET.

There are many MOSFET drivers and integrated driver/MOSFET chips available that attempt to provide protection. Great on paper, but far from perfect in the real world.

A quality automotive relay (Bosch, P&B) is a *very* rugged and reliable device. Don't assume something mechaincal must be inferior to something solid state. Cars still use many relays for many good reasons. Some applications such as fuel injectors, ABS and HID lighting require the fast switching of semiconductors, but the basics still are best served by relays. For simple high current (1A +) switching needs a $3 Bosch relay will likely last much longer than any $3 electronic circuit.
By bretth
#31291
Wow! Thanks for all the great information. I'm trying to avoid the relay because of the physical size, cost, and current required to drive it (in decreasting order of concern). My device is the size of a cell phone, and provides similar functionality as a car alarm. So I do need it to be safe and reliable.

Also, I have to admit I don't remember much about transistors and MOSFETs... that class was always way too early in the morning ;-)

So, I'll add a 12v zener diode to keep Vgs well under Vgsmax (20V).

The FDN358P is rated at 1.5A continuous or 5A pulsed. My system will have a 1A fuse on the output line, so that should protect the on-board circuitry in the case of a heavy load or external short?

If you were building a device with commecial potential and 100+ unit field tests during the next 6 months, would you go with this circuit, or a relay?





[/code]
By oPossum
#31295
I can't say if a relay or solid state switch is better for your application. There are just too many factors to consider.

A fuse will *not* protect a MOSFET (usually OK for a relay). Fast electronic protection is required. A 1 A fuse will allow several amps to flow for many seconds. If this pushes Rds (and thus Vds, and dissipated power) up, the MOSFET will smoke.

Don't rate a semiconductor switch at 150% of exptected load. 200% is better, but 300% or more is not unreasonable. Assume the output will be shorted and connected to much higher loads than intended. People don't read instructions. A specified 1A limit means nothing to them.

If you want to use a MOSFET switch, don't use the circuit you have posted for a commercial product. Use a protected high side switch designed for automotive use. ST and others make them.

ST Product line
This part may work for your application
By bretth
#31335
Thanks again for all your help, oPossum. I am looking at the ST and also some Linear high side switches that should do the trick. Will report back once I have made a decision!

Regards,
Brett
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]