Configurable polarity of I/O

FreeEMS topics that aren't specific to hardware development or firmware development.
Post Reply
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Configurable polarity of I/O

Post by Fred »

ababkin wrote:If this works, the user is relieved from having anything to do with polarity - no jumpers, no check boxes, no fried coils and flooded engines, no figuring needed polarity out - it just works. You've formulated the problem, i've proposed a solution.
No, they are not. What if I have an ignitor that needs to be driven HIGH to dwell? Your solution fails. If it's just the on board IGBTs then there is no reason to worry about what you are worrying about, I would rather buy a BDM and offer a service to fix bad bootloaders IF they ever change...

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
ababkin
LQFP112 - Up with the play
Posts: 215
Joined: Tue Jan 15, 2008 5:14 pm

Re: Configurable polarity of I/O

Post by ababkin »

Please correct me if i am wrong:

there will be two possible cases for ignition high current driver:
1. logical 0 = dwell state (high current charges the coil), logical 1 = no current through coil, causes magnetic field collapse if transitioned from logic 0.
2. the other way around

injection:
1. logical 0 = squirt, logical 1 = don't squirt
2. the other way around

are there other cases?
Alex
Legal disclaimer for all my posts: I'm not responsible for anything, you are responsible for everything. This is an open and free world with no strings attached.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Configurable polarity of I/O

Post by Fred »

It's 2x2

The pin being 0 = squirt, the pin being 0 = not squirt * The output being 0 = not squirt, the output being 0 = squirt.

Hence 4 combos. Hence no worky :-)
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
ababkin
LQFP112 - Up with the play
Posts: 215
Joined: Tue Jan 15, 2008 5:14 pm

Re: Configurable polarity of I/O

Post by ababkin »

Is it just me or the above post is incomprehensible?
how can logic level 0 make it squirt and not squirt at the same time? unless there are plans to use quantum computer for EMS ;-)

does anyone else understand what Fred is trying to say?

Alex
Legal disclaimer for all my posts: I'm not responsible for anything, you are responsible for everything. This is an open and free world with no strings attached.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Configurable polarity of I/O

Post by Fred »

pin != output
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
ababkin
LQFP112 - Up with the play
Posts: 215
Joined: Tue Jan 15, 2008 5:14 pm

Re: Configurable polarity of I/O

Post by ababkin »

ok, i give up
seems like asking for clarity is asking too much
Legal disclaimer for all my posts: I'm not responsible for anything, you are responsible for everything. This is an open and free world with no strings attached.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Configurable polarity of I/O

Post by Fred »

I'm afraid I've been as clear as I can be. The state of the micros pin and the what it means are not the same as the state of the external output and what that means. It's that simple. You are either forgetting something or over simplifying or over-complicating it. I can't help with that :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
ababkin
LQFP112 - Up with the play
Posts: 215
Joined: Tue Jan 15, 2008 5:14 pm

Re: Configurable polarity of I/O

Post by ababkin »

Ok, good, let's try again then

is this what you are trying to say? :

Two possible cases that depend on particular user's setup (types of high current drivers for inj and ign):
case 1:
MCU pin = 0 causes: output energize, aka saturate, aka pass current
OR
MCU pin = 1 causes: output to close shut, aka not pass current

case 2:
MCU pin = 1 causes: output energize, aka saturate, aka pass current
OR
MCU pin = 0 causes: output to close shut, aka not pass current

Is this how you see it, or am i missing some cases? (note that there could be different cases for ign and inj, i.e inj can be configured as case 1, while ign as case 2)

Reason i am asking this is i am still trying to understand why you say my solution won't work for the problem. (just out of curiosity, not for any other reason :geek: )

Alex
Legal disclaimer for all my posts: I'm not responsible for anything, you are responsible for everything. This is an open and free world with no strings attached.
gearhead
LQFP112 - Up with the play
Posts: 120
Joined: Sun Feb 03, 2008 9:30 pm
Location: Chicago, USA

Re: Configurable polarity of I/O

Post by gearhead »

As i see it:

For injection: Whatever the state of those pins during code load and the driver of choice determines if the circuit needs to invert. Since we are settling on an N channel protected FET for these (according to the schematic thread), if these pins are lo during code load, we need to do nothing. If they are hi, we need to invert this to keep the injectors off during code load regardless if they are powered by the fuel pump relay or not. The default for this drive circuit should be *off* unless the code wants fuel to be delivered and *off* should be defined as whatever the pin state is during code load.

Fir ignition: Similar. Since we are contemplating an N channel IGBT for this, we also do not want the coils charging (regardless of FPR action of connection). If these pins are hi during code load, then fine, If they are low, there needs to be an inverting circuit so that the IGBT is not conducting. If low, omit the inverting circuit. If someone wants an inverted output (that is not driving coils directly) they can jump the output of this device (fet or bjt) to the ignition output they are interested in so that it gets to the correct pin on the connector.

For the FPR, likewise. The state of this pin in code load should determine the default off state of this output.

The reason the ign and inj are 'regardless of FPR' is because I do not want the injectors squirting or coils charging when I cycle the fuel pump on boot up.

Am I still way off?

Gearhead
User avatar
ababkin
LQFP112 - Up with the play
Posts: 215
Joined: Tue Jan 15, 2008 5:14 pm

Re: Configurable polarity of I/O

Post by ababkin »

^^ seems correct. You've described one possible scenario in regards to polarity. I am guessing, the whole discussion is about how to make freeEMS suit needs of people with different polarity options of their power circuits.
A simple and flexible solution is jumpers and checkboxes, but it is not fool-proof of course, so there is always a possibility of a disaster.

I was just exercising creativity approaching the problem, but my proposed solution would involve extra parts (2 opamps and bunch of pull resistors), thus extra HW complexity (and a tiny bit of SW complexity) also it assumes high-impedance state asserted on the relevant IO pins by the bootloader.

Alex
Legal disclaimer for all my posts: I'm not responsible for anything, you are responsible for everything. This is an open and free world with no strings attached.
Post Reply