Logic spark wiring

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

Moderators: jsmcortina, muythaibxr

jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Logic spark wiring

Post by jsmcortina »

Presently the manual suggests:
Image
This requires "Going Low" which can cause problems at power-on with the coils firing unexpectedly.

On the same CPU, the Microsquirt is using this:
logic1.png
But, do we really need anything more than this:
logic2.png
These second two use the safer "Going High" setting.

Thoughts?

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".
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Logic spark wiring

Post by dontz125 »

The pull-down resistor may or may not be necessary, but sending a wire connected to a CPU pin with nothing more than a low-value resistor for protection is begging for trouble. The BAT54 will shunt any spikes or accidental contact with a 12v wire. If not using SMT bits, this can be duplicated with a pair of 1N4148s. Sustained connection with a 12v source will blow the resistor in short order (0.65W at 12v, 0.9W at 14v - don't use anything heavier than a 1/4W resistor!), but that's a lot cheaper than frying the daughter card!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Manu
Master MS/Extra'er
Posts: 723
Joined: Mon Feb 15, 2010 4:57 am
Location: Alès - France
Contact:

Re: Logic spark wiring

Post by Manu »

Hello James,

As dontz125, I prefer to protect the processor pins, especially with coils outputs. As there is many possible setup due to many systems we can use, I often get users that blow the command circuitry for ignition. With no "protection", they should have blow the processor.

IMO the Microsquirt logic spark can be use. But I often use a pullup on a transistor to achieve logic spark command.

Best regards,
Manu
I can supply, repair or upgrade Megasquirts in FRANCE.

Image
https://www.megasquirt.fr
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Logic spark wiring

Post by jsmcortina »

Manu wrote:But I often use a pullup on a transistor to achieve logic spark command.
That I understand, however the undesirable pulsing of the outputs at power-on has been a problem on many installs. Fixing that and standardising on "Going high" for all installs (logic and high-current) would surely help many customers - so long as we are happy with the circuit !

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".
Manu
Master MS/Extra'er
Posts: 723
Joined: Mon Feb 15, 2010 4:57 am
Location: Alès - France
Contact:

Re: Logic spark wiring

Post by Manu »

jsmcortina wrote:
Manu wrote:But I often use a pullup on a transistor to achieve logic spark command.
That I understand, however the undesirable pulsing of the outputs at power-on has been a problem on many installs. Fixing that and standardising on "Going high" for all installs (logic and high-current) would surely help many customers - so long as we are happy with the circuit !

James
You're right James. Also I'd like the idea of "standardising for all installs". This will be better for everyone. It's maybe time to ask for a new revision of v3 PCB according to the new capacities of MS2/extra firmware. Maybe, as µMS and MS3, MS2 PCB may propose ONLY low current command and ALWAYS need to use some EXTERNAL IGBT (MTR04 or whatever you want to use). This should allow a common way to trigger "spark" and simplify the code.

Manu
I can supply, repair or upgrade Megasquirts in FRANCE.

Image
https://www.megasquirt.fr
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Logic spark wiring

Post by racingmini_mtl »

If you want to standardize the outputs with a non-inverting circuit and no power-up pull up issue, why not use something like the TC4427. That's a bit overkill but you can drive more current than with a CPU pin and you can also drive 12V logic coils. It is available as a through-hole and SMD component. And I know it works for this purpose because it has been tested (with the uSM-based ECU I designed).

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
juansh2385
Master MS/Extra'er
Posts: 612
Joined: Fri Feb 25, 2011 4:28 pm

Re: Logic spark wiring

Post by juansh2385 »

What do you think of the way Joe Perez presented in Miataturbo forums? I think it does what you want. In my personal experience It has work pretty well with a lot of different setup that require 5v logic out
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Logic spark wiring

Post by jsmcortina »

juansh2385 wrote:What do you think of the way Joe Perez presented in Miataturbo forums?
Functionally and safety wise that's fine. But if a simpler circuit can be as effective - why not go with the simpler one.?

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".
juansh2385
Master MS/Extra'er
Posts: 612
Joined: Fri Feb 25, 2011 4:28 pm

Re: Logic spark wiring

Post by juansh2385 »

I understand your point. It was just a suggestion of a circuit in my opinion simple enough to be standardize. Right now a ms2 daughter board processor from diyautotune its more than $100 I don't think that a circuit simplification of 1 component is worth the risk on the processor.
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: Logic spark wiring

Post by racingmini_mtl »

Also, can the CPU pin even drive the problematic VW COPs and other similar supposedly "logic-level" COPs? Or do they require more current that the pin can provide? If the goal is to standardize a circuit, do you want to have a list of exceptions which need a different circuit? Or is the Microsquirt the benchmark and everything that can't be handled by it is a special case?

Also, additional protection should be part of any standard. We all know that if something stupid can be done, it will be done (I'm sure most of us have done stupid things even if we should know better so it's not even limited to newbies). If we minimize the consequences of the stupid things then we make it a better experience for all: those who do the mistake, those who will be on the receiving end of the blaming rant and everyone who has to deal with the bad reputation from following the recommendations.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Logic spark wiring

Post by dontz125 »

racingmini_mtl wrote:Also, can the CPU pin even drive the problematic VW COPs and other similar supposedly "logic-level" COPs? Or do they require more current that the pin can provide?
From the MS2/E manual:
If you measure around 120-500 ohms then you will need a buffer.
According to the processor datasheet, each I/O pin has an instantaneous maximum current rating of +/-25 mA. Depending on the actual incorporated coil driver resistance, current may or may not be an issue. I seem to recall that voltage was suggested as an issue, even more than current; I remember this because I had to be reminded - pointedly, and by a few posters :oops: - about the way that voltage dividers work.

With that in mind, I got out the LTSpice and pondered both the NPN circuit by Joe Perez, and a PNP equivalent. While the NPN puts out 5v with nothing attached, with a low-resistance VAG coil connected it droops, badly - 1.3v into a 120R coil. The PNP version is quite stiff, still holding 4.9v against an R50 coil.
PNP Spark Driver.jpg
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
juansh2385
Master MS/Extra'er
Posts: 612
Joined: Fri Feb 25, 2011 4:28 pm

Re: Logic spark wiring

Post by juansh2385 »

I think the pnp circuit will need spark not inverted so the original problem presented when initializing the processor will not be addressed.
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Logic spark wiring

Post by dontz125 »

I disagree. While the processor pin is low and the NPN is off, the PNP base is pulled high through the LED and so blocks the path to the coil. As I said, I ran Spice sims, and the output signal form at the PNP matches the input from the pin.
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Logic spark wiring

Post by jsmcortina »

Don is correct.

The NPN/PNP circuit is able to drive VAG COPs and retains the safe "Going High" polarity settings.

The question then becomes whether that's a good idea for all users - the circuit is a little more difficult to build, but gives a more generally useful output.

(Note that I started this topic as a discussion point, so these differing views are welcome.)

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".
prof315
Super MS/Extra'er
Posts: 3760
Joined: Sun Jan 18, 2009 3:13 am
Location: Melbourne, FL

Re: Logic spark wiring

Post by prof315 »

I very much like the idea of standardizing the spark output to going high. And while simple is good in my mind it would make sense to use a logic level trigger circuit that would work with any logic coil including VAG coils. Maybe a duplicate of what the MS3-Pro uses since that will supposedly run VAG coils out of the box?
Linfert Performance/321 Motorsports
SCCA 2019 SM National Champion Crew Chief
SCCA 2023 FP National Champion Tuner/electrical engineer
100s of MS systems built installed and tuned
Support the developers!
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Logic spark wiring

Post by dontz125 »

Much of the concern with logic coils is protecting the processor pin from getting mugged by passing high voltages running down the wire with 12v clubs; the NPN/PNP does that well, and has the added benefit of being powerful enough to drive probably any logic coil out there. If you have a 12v logic coil, simply switch the PNP's feed to +12v - and yes, I checked that the 12v will NOT backfeed to either the 5v rail or the processor pin.

An installation with on-board BIPs etc doesn't need to worry about protecting the processor, and the current standard of having the connection point for the 330R base resistor at the processor side of the NPN base resistor (R26) should stay as it is.

Prof - do we have the schematics for the MS3-Pro?
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
juansh2385
Master MS/Extra'er
Posts: 612
Joined: Fri Feb 25, 2011 4:28 pm

Re: Logic spark wiring

Post by juansh2385 »

In that case the pnp would make more sense to be the standard for documentation.

On a different note for wasted spark application that are the most common in ms2 in my country and probably in other places should we recommend a more robust pnp transistor that can drive 2 coils (assuming vag coil for worst case scenarios) or should the documentation recommend one circuit per coil?

I think that if we are going for the simple general solution a more robust transistor should be recommended to drive multiple coils from the same output but I see the appeal to have one transistor per coils as it leaves the door open for a individual coil firing setup and wastes park with the same general circuit.

Juan
prof315
Super MS/Extra'er
Posts: 3760
Joined: Sun Jan 18, 2009 3:13 am
Location: Melbourne, FL

Re: Logic spark wiring

Post by prof315 »

dontz125 wrote: Prof - do we have the schematics for the MS3-Pro?
I don't think so..... but maybe Matt Cramer can chime in and show us what it uses.
Linfert Performance/321 Motorsports
SCCA 2019 SM National Champion Crew Chief
SCCA 2023 FP National Champion Tuner/electrical engineer
100s of MS systems built installed and tuned
Support the developers!
Matt Cramer
Super MS/Extra'er
Posts: 17499
Joined: Thu Apr 16, 2009 8:08 pm

Re: Logic spark wiring

Post by Matt Cramer »

It's a variant of the VW COP output circuit.
Matt Cramer -1966 Dodge Dart slant six running on MS3X
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: Logic spark wiring

Post by dontz125 »

juansh2385 wrote:In that case the pnp would make more sense to be the standard for documentation.

On a different note for wasted spark application that are the most common in ms2 in my country and probably in other places should we recommend a more robust pnp transistor that can drive 2 coils (assuming vag coil for worst case scenarios) or should the documentation recommend one circuit per coil?

I think that if we are going for the simple general solution a more robust transistor should be recommended to drive multiple coils from the same output but I see the appeal to have one transistor per coils as it leaves the door open for a individual coil firing setup and wastes park with the same general circuit.

Juan
The 2N3906 can handle 200mA of continuous current. Assuming a 120 Ohm internal resistance, a really low-resistance VAG would draw ~ 42mA, with most loads in the 5-10mA range. I don't think wasted spark will be an issue.
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Post Reply