Launch control input circuit options?

This is a forum for discussing the development and testing of alpha MS2/Extra code. Documentation
(Runs on MS2 and Microsquirt)

Moderators: jsmcortina, muythaibxr

Post Reply
md95
Master MS/Extra'er
Posts: 721
Joined: Tue Mar 15, 2005 6:44 pm
Location: Grand Rapids, MI
Contact:

Launch control input circuit options?

Post by md95 »

Looking at the hardware docs for launch control input, it shows 2 choices of schematics..my question is why can't you just use a simple 5 volt pullup resistor to the input pin to the CPU? The clutch switch for the car is a simple on/off switch that provides a ground signal when depressed. I know MS1 Extra could use a simple pullup, something different with the MS2 processor? Thanks for any info.
-Matt-
1998 Mitsubishi Eclipse RS 420A Turbo- MS2 Extra- 2.1.0 Release
1992 Plymouth Laser RS 4g63 AWD Turbo MS2 Extra- 3.0.3s
jsmcortina
Site Admin
Posts: 39612
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

If you connect it to 12v by mistake the CPU is destroyed. The addition of either the diodes or the transistor driver adds protection.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
md95
Master MS/Extra'er
Posts: 721
Joined: Tue Mar 15, 2005 6:44 pm
Location: Grand Rapids, MI
Contact:

Post by md95 »

jsmcortina wrote:If you connect it to 12v by mistake the CPU is destroyed. The addition of either the diodes or the transistor driver adds protection.

James
I can do the diode circuit, but instead of that, if I wanted to make it a bit easier with some protection as well, could you use a 1k 5v pullup, then a 1k resistor inline to the CPU pin from the clutch switch? I know it's not great for protection, but at least it's something..you would think a added resistor would be better than just diodes?
-Matt-
1998 Mitsubishi Eclipse RS 420A Turbo- MS2 Extra- 2.1.0 Release
1992 Plymouth Laser RS 4g63 AWD Turbo MS2 Extra- 3.0.3s
md95
Master MS/Extra'er
Posts: 721
Joined: Tue Mar 15, 2005 6:44 pm
Location: Grand Rapids, MI
Contact:

Post by md95 »

I think what i'm going to end up doing is using 2 of the NPN 2n2222's to invert the signal from the switch. I'm using the cruise control switch, which provides a ground when depressed. I'll pull up the first transistor input to 5 volts, which will keep that always"on", providing ground to the second transistor input, which keeps that one "off", CPU pin rests at 5volts. Then when the clutch is depressed, the ground then turns off the first transistor, which in turn switches on the second, to provide a ground 0 volt signal to the CPU pin.

As far as circuit build, for the first transistor: Use a 1k 5 volt pullup to the base, then a direct connection from the switch to the transistor base? Do i need a input resistor at all?

For the second transistor, i'll follow the "active" diagram for the most part, but for base input, instead of the 2.2k resistor, i'll use a 1k at the base input from the 1st trans output, then a 5volt 1k pullup on the base input as well.. Does this sound good?

I'm no EE, but i think this should work. I dont want to totally disconnect the cruise switch from the car and use it to switch 12volts, as the cruise still needs to turn off with the cltuch pedal..

If this works fine, i can post up a schematic diagram for others to go by if they use switches that provide grounds when depressed.

Image
-Matt-
1998 Mitsubishi Eclipse RS 420A Turbo- MS2 Extra- 2.1.0 Release
1992 Plymouth Laser RS 4g63 AWD Turbo MS2 Extra- 3.0.3s
jsmcortina
Site Admin
Posts: 39612
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

I use the active low input and it is simple and fine. The diodes block a 12v signal while a resistor would still present 12v (with a low current flow) to the CPU which would likely still harm it.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
md95
Master MS/Extra'er
Posts: 721
Joined: Tue Mar 15, 2005 6:44 pm
Location: Grand Rapids, MI
Contact:

Post by md95 »

jsmcortina wrote:I use the active low input and it is simple and fine. The diodes block a 12v signal while a resistor would still present 12v (with a low current flow) to the CPU which would likely still harm it.

James
Sounds good..the docs say the low input isnt the greatest for protection, so that's why my other method. I'm going to assume the one 1N4001 diode with 5 volts going to it, will pass 5 volts to keep the input pulled up? The diagram shows the position of this diode to be blocking positive voltage??
-Matt-
1998 Mitsubishi Eclipse RS 420A Turbo- MS2 Extra- 2.1.0 Release
1992 Plymouth Laser RS 4g63 AWD Turbo MS2 Extra- 3.0.3s
jsmcortina
Site Admin
Posts: 39612
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

Hmm, even though I drew that schem I'm not convinced I got it right. The left diode only allows the pin to be pulled down and protects against the positive voltages (e.g. 12v)

The top diode probably does nothing, however if you connect it from 0v "pointing up" to the CPU input (ie. move it down on the page) it will also protect the input against negative voltages.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
md95
Master MS/Extra'er
Posts: 721
Joined: Tue Mar 15, 2005 6:44 pm
Location: Grand Rapids, MI
Contact:

Post by md95 »

jsmcortina wrote:Hmm, even though I drew that schem I'm not convinced I got it right. The left diode only allows the pin to be pulled down and protects against the positive voltages (e.g. 12v)

The top diode probably does nothing, however if you connect it from 0v "pointing up" to the CPU input (ie. move it down on the page) it will also protect the input against negative voltages.

James
Hmm, ok, let me ask this: Does the input pin to the CPU need a 0-5v signal? By this i mean dont you need to keep the input at 5 volts until it goes low to trigger the input? OR, can the pin "float" with no positive voltage on it? If no 5 volts on the input, then wouldn't it be possible to get false triggers?(eg the pin stays low when ground removed). To me, it makes sense to substitute that top diode with like a 1k resistor pulled up to 5 volts. ?? In the schematic, the top diode position is preventing 5volts from getting to the CPU pin..which is why i ask. Now the high input schematic, shows it pulled up to 5 volts..These 2 circuits didnt make much sense to me in their discrepencies.
-Matt-
1998 Mitsubishi Eclipse RS 420A Turbo- MS2 Extra- 2.1.0 Release
1992 Plymouth Laser RS 4g63 AWD Turbo MS2 Extra- 3.0.3s
jsmcortina
Site Admin
Posts: 39612
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

When the pin is used an input there should be an internal pullup to 5v. Putting a 1k resistor in there wouldn't hurt.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
md95
Master MS/Extra'er
Posts: 721
Joined: Tue Mar 15, 2005 6:44 pm
Location: Grand Rapids, MI
Contact:

Post by md95 »

jsmcortina wrote:When the pin is used an input there should be an internal pullup to 5v. Putting a 1k resistor in there wouldn't hurt.

James
Ok, that's what i was thinking. Should that low input diagram be updated? Thanks James.
-Matt-
1998 Mitsubishi Eclipse RS 420A Turbo- MS2 Extra- 2.1.0 Release
1992 Plymouth Laser RS 4g63 AWD Turbo MS2 Extra- 3.0.3s
Gokart
Master MS/Extra'er
Posts: 667
Joined: Thu Aug 03, 2006 2:38 am
Contact:

Post by Gokart »

jsmcortina wrote:When the pin is used an input there should be an internal pullup to 5v. Putting a 1k resistor in there wouldn't hurt.

James
It wouldn't hurt to put in a 1k pull up resistor to the circuit but the diode (that is pointing towards the 5v) must be remove or you'll risk shorting it and goes to smoke.
md95
Master MS/Extra'er
Posts: 721
Joined: Tue Mar 15, 2005 6:44 pm
Location: Grand Rapids, MI
Contact:

Post by md95 »

Gokart wrote:
jsmcortina wrote:When the pin is used an input there should be an internal pullup to 5v. Putting a 1k resistor in there wouldn't hurt.

James
It wouldn't hurt to put in a 1k pull up resistor to the circuit but the diode (that is pointing towards the 5v) must be remove or you'll risk shorting it and goes to smoke.
If you put a pullup resistor right next to the diode as the doc shows, then it wont short to 5v..The diode wont do much of anything. With the doide's stripe end going to 5v, this means no ground can go up to 5 volts, and no 5 volts can go down to ground. When the ground is supplied by the switch, ground can't flow up through the diode to 5 volts, and the pullup resistor provides the load from a short. Now IF you would position that top diode in reverse, with the stripe facing down, then that would short as it would bypass the pullup resistor. Ground would flow up through the diode right to 5volts. I always remembered diodes polarity flow, as striped end is negative in, positive out. Either way, that top diode isn't needed, and can be replaced with a 1k pullup resistor.
-Matt-
1998 Mitsubishi Eclipse RS 420A Turbo- MS2 Extra- 2.1.0 Release
1992 Plymouth Laser RS 4g63 AWD Turbo MS2 Extra- 3.0.3s
jsmcortina
Site Admin
Posts: 39612
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

Gokart wrote:It wouldn't hurt to put in a 1k pull up resistor to the circuit but the diode (that is pointing towards the 5v) must be remove or you'll risk shorting it and goes to smoke.
How?

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Gokart
Master MS/Extra'er
Posts: 667
Joined: Thu Aug 03, 2006 2:38 am
Contact:

Post by Gokart »

What I meant was, if the pull up resistor is soldered parallel with the diode that points to the 5v, then short circuit will happen. However, placing it parallel with the mcontroller pin is no harm. (after the second diode). I just want to make people alert that certain mod can be harmful.

To my experiment, the recomended 2 diode circuit is good enough without further modification.
(4G63T - MSIIextra) (4G13 - MS3-beta testing)
jsmcortina
Site Admin
Posts: 39612
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

I still don't see how a diode and resistor in parallel can be considered a "short"

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Gokart
Master MS/Extra'er
Posts: 667
Joined: Thu Aug 03, 2006 2:38 am
Contact:

Post by Gokart »

Theoritically yes, it shouldn't be shorted out. I thought that too. However, I have experience this scenario which ended up with a smoking diode. Nothing to worry, it's cheap to replace...
(4G63T - MSIIextra) (4G13 - MS3-beta testing)
6040solder
Experienced MS/Extra'er
Posts: 307
Joined: Mon Oct 22, 2007 7:15 am
Location: Auckland, New Zealand

Post by 6040solder »

jsmcortina wrote:I still don't see how a diode and resistor in parallel can be considered a "short"
Probably because it can't be :-)
jsmcortina
Site Admin
Posts: 39612
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Post by jsmcortina »

Gokart wrote:Theoritically yes, it shouldn't be shorted out. I thought that too. However, I have experience this scenario which ended up with a smoking diode. Nothing to worry, it's cheap to replace...
If anyone builds that circuit and that diode "goes up in smoke" due to the resistor in parallel I'll replace it and give them a free Megasquirt as well.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
6040solder
Experienced MS/Extra'er
Posts: 307
Joined: Mon Oct 22, 2007 7:15 am
Location: Auckland, New Zealand

Post by 6040solder »

Yay! free ms units for everyone :-) lol
Gokart
Master MS/Extra'er
Posts: 667
Joined: Thu Aug 03, 2006 2:38 am
Contact:

Post by Gokart »

jsmcortina wrote:
Gokart wrote:Theoritically yes, it shouldn't be shorted out. I thought that too. However, I have experience this scenario which ended up with a smoking diode. Nothing to worry, it's cheap to replace...
If anyone builds that circuit and that diode "goes up in smoke" due to the resistor in parallel I'll replace it and give them a free Megasquirt as well.

James
haha... very funny....
Yes, I was wrong. It was not this circuit that make my diode goes in smoke.. sorry everyone. I was just recalling to a different case.

I was using D15 to activate a 5v relay and in my effort to stop the backed emf, I added a diode across the resistor led circuit. It smoked the transistor.... I've been wondering why could that happened since the diode was correctly oriented to cut that backed emf. Theoritically, even when the transistor is conducting, it's actually going through the -ve which shouldn't harm anything. But it smoke the transistor.

This happened a while back, and that makes me give the alarm to be carefull with palcing a resistor parallel with a diode.

Please accept my apology. :oops:
(4G63T - MSIIextra) (4G13 - MS3-beta testing)
Post Reply