Ideas on how to switch a 12v Load

Hi

Im trying to use the DigitalWrite pin on the Arduino to switch a Load. The load is an ECU (engine control unit) spark signal (12v). I need to divert this signal to dissipate over some load (that isnt the spark plug) such as an LED and Resistor (anything of high resistance so that excess current is not drawn). Another thing, I need it so that when the Arduino is LOW, the ECU signals pass to the spark plugs, but when the Arduino is HIGH, it is diverted over to the LED.

So what ive currently tried:
Use NPN MOSFET to switch the 12V between the spark plug and ground - This works, but i cant have it go to ground.
Using a CMOS Inverter to an NMOS AND gate, this kind of works. When i use a 3,3v signal boosted to 12v via the op amp it doenst work right. If i set the Arduino to 12v (in the simulator), remove the op amp stage, it does work right.
Using a NOT GATE and an AND GATE - logic is ( A'. B ) - This works but limited to 5V. Also good as a high resistance is encountered when the AND Gate output is 0.

So i took the logic gate circuit and tried to make it out of MOSFETS, but I just cant get it to work right.

Any ideas on how i can accomplish this? My only other requirement is that the switching needs to be quite fast.
I have attached some of my circuit diagrams:

switch.JPG

Complex.JPG

I think another method using an optocoupler could work, but how can this configuration be used to have the Load On when Arduino is LOW and Load Off when Arduino is High?

Could you put another AND gate in the first circuit that is looking for the Arduino and ECU to go high and switch a MOSFET to the coil? In other words, leave the NOT/AND setup the way it is, but add another AND without the inverter.

This sounds like you want a bistable multivibrator, but I don't know how to implement that.

http://www.electronics-tutorials.ws/waveforms/tim17.gif

Edit: When I say I don't know how to implement that, I see how to do it with a mechanical SPDT switch, I just don't get how to do it with a High/Low output from a microcontroller.

Edit2: Okay this helped me:
http://www.daenotes.com/electronics/digital-electronics/bistable-multivibrators-working-construction-types

So the engine control unit is the output 1 load and the led/resistorwhatever is the output 2 load. Two pins from the Arduino, write out to either set or reset to switch which load is active.

Edit3: I got interested in this. Sorry.

Here is a NOR Gate Bistable- #6 on this page:
http://www.doctronics.co.uk/4001.htm

It uses the 4001 chip which is 36 cents at Tayda:

Thanks for the thoughts guys.
The multivibrator is interesting, but I see one issue, if the Arduino fails, that could leave the output of the multivibrator to be stuck in either Load 1 or Load 2, I need it to always fail with Load 1 active (ECU to Spark).

The other idea about adding an AND gate and MOSFET, I didn't fully understand, care to expand a little?

elementjj:
I need it to always fail with Load 1 active (ECU to Spark).

Well, you didn't say that. Makes things easy.

12v source into both Load 1 Primary and Load 2 Backup.
PNP transistor controlling Load1. NPN transistor controlling load 2.
1 Arduino pin out to both transistor bases.
Appropriate pull down resistors and base resistors.
Do nothing (or Arduino failure) Load 1 transistor is low and conducts by default.
Write HIGH to pin, Load 1 transistor kicks off, Load 2 transistor kicks on, Load 2 active.

Thanks again for the reply, I beleive i did try playing with that config, but there was an issue with the NPN and PNP transistor base only being fed 3.3v from the Arduino (simulated in National Instruments MultiSim). I think this is called CMOS logic, thats what I was trying to make firstly, but didnt work as intended. Possible to sketch me a quick diagram? Or point me in the right direction -> CMOS?

You can switch a MOSFET with 3.3 volts.

I was using TIP31A, i beleive these have low enough threshold voltage to work at 3.3v, but for some reason it just didnt work as intended. Maybe incorrect resistor values? I will try again tomorrow.

Had a quick go, the TIP31A NPN performs just as id like, but the TIP32A just doesnt work as id like, it either stays on or stays off when playing with the resistors.

My guess is you need a pull down resistor on the line from the Arduino. You want that line to be pulled low and stay low so the 32 is on and load 1 is active unless you actively write that line high and turn on the 31 to switch on load 2.

OP- did you get this working yet?