[Success Story] 1997 Ford F-150 5.4 E4OD

Your chance to introduce yourself and your vehicle
dbh97
contributor
contributor
Posts: 84
Joined: Sat Jul 19, 2014 10:43 pm
Location: 67867
Github Username: chuckwagoncomputing
Slack: dbh97

Re: 1997 Ford F-150 5.4 E4OD

Post by dbh97 »

The yellow trace is set to zero offset, so GND should be the middle division. So it looks like the noise is indeed going through ground, but centered maybe 0.5v above it. Taking that into account, the max voltage must be about 5v.
blundar
contributor
contributor
Posts: 141
Joined: Tue Jan 07, 2014 4:38 am
Location: Cincinnati, Ohio
Github Username: blundar
Slack: Dave B.
Contact:

Re: 1997 Ford F-150 5.4 E4OD

Post by blundar »

Talking with dbh on slack, I have a rather strong feeling that the lack of a gate drive resistor in the circuit is to blame for component death.

6A (specified by MCP1407) is a *lot* of gate drive current for casual switching. The MOSFET doesn't specify Rgate so ASSuming it to be around 1ohm puts the gate driver into potentially dangerous current consumption around 6V supply. If the driver was not internally current limited, inrush current could be enough to make it POP maybe?

Ringing is also a real issue. I don't have enough energy to type about it. TL;DR: MOSFETs are real devices that have capacitance that can contribute to non-ideal behavior.

App note that covers it decently: https://toshiba.semicon-storage.com/info/docget.jsp?did=59456
Youtube video that was a little verbose but ok:

TL;DR: always use a gate drive resistor, even if you're using a MCU pin to directly drive the gate without a dedicated gate driver. (in this case, the gate drive resistor is what will prevent you melting the I/O pin!)

TL;DR#2: If you have EMI from voltage spikes that result from the FET switching faster than a flyback diode can "capture" the inductive kick, use a bigger gate drive resistor to slow down the transition from on to off, spreading the inductive energy dissipation over a longer time period (but at a lower peak voltage). But beware that slower switching speeds will put a higher thermal load on the switching FET and increase switching losses.
blundar
contributor
contributor
Posts: 141
Joined: Tue Jan 07, 2014 4:38 am
Location: Cincinnati, Ohio
Github Username: blundar
Slack: Dave B.
Contact:

Re: 1997 Ford F-150 5.4 E4OD

Post by blundar »

Another note:

High-speed Schottky diodes are generally a good choice for the flyback diodes for relatively low switching speeds. Reverse voltage only needs to be margin of error > Vsupply which will give a great selection of parts. They're generally pretty fast.

Be mindful of both PEAK and AVERAGE current. Average current through the diode will be fairly low because it will only see current for the duration of the inductive kick. Peak current can be as high as you can switch the FET quickly, i.e. you could have several times the average on state current of your solenoid as instantaneous flyback current.

Also note: if the flyback diode is too slow and the FET switches too fast, you can have crippling unclamped inductive spikes that have the potential to destroy the FET (if they exceed its Vds rating) or cause nasty EMI.
blundar
contributor
contributor
Posts: 141
Joined: Tue Jan 07, 2014 4:38 am
Location: Cincinnati, Ohio
Github Username: blundar
Slack: Dave B.
Contact:

Re: 1997 Ford F-150 5.4 E4OD

Post by blundar »

Part of the reason half bridges are used for higher speed switching vs. FET+diode is that the non-switched FET can act as an active flyback path, which is often termed synchronous rectification. The losses from a fully-on FET are current * Rds(on) whereas losses from diode are current * Vf. Combine that with the speed at which FETs can switch and the case for half bridges / synchronous rectification is more clear at higher switching speeds.
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: 1997 Ford F-150 5.4 E4OD

Post by mck1117 »

You want a Schottky because they work via a different mechanism than plain PN silicon diodes, so they have essentially zero reverse recovery time. It's purely capacitively determined, but that current flows through the capacitor (until the diode is forward biased) anyway.
dbh97
contributor
contributor
Posts: 84
Joined: Sat Jul 19, 2014 10:43 pm
Location: 67867
Github Username: chuckwagoncomputing
Slack: dbh97

Re: 1997 Ford F-150 5.4 E4OD

Post by dbh97 »

Thank you both for the lessons in electronics! I ordered some more drivers from Digikey. When those arrive I'll replace the one that's toast, add an 100ohm resistor, and replace the 1N2001 diode with a SB5200. That diode should work, no? It's what I happen to have. It's rated at 5A average, 20A repetitive peak.
https://diotec.com/tl_files/diotec/files/pdf/datasheets/sb520.pdf
dbh97
contributor
contributor
Posts: 84
Joined: Sat Jul 19, 2014 10:43 pm
Location: 67867
Github Username: chuckwagoncomputing
Slack: dbh97

Re: 1997 Ford F-150 5.4 E4OD

Post by dbh97 »

Well it didn't work.
I added a 100 ohm resistor to the gate, and replaced the 1n4001 with a SB5200. It failed in the same manner as the first one. The gate driver outputs about 4.5V, no matter the state of the input.

Theories:
1: My MOSFET is somehow broken. I tested it on the ATX power supply I use as a bench supply, and it switched a LED on and off successfully. I would guess that it could fail in ways that this test doesn't catch, but IANAEE.
2: Arcing between solder blobs.
3: Maybe the diode isn't fast enough?
4: Maybe the 22ga wire I'm hooking this all up with isn't skookum enough for the flyback diode to keep the voltage drained something something

So what am I going to do? Give up and hook up my Proteus, of course.
dbh97
contributor
contributor
Posts: 84
Joined: Sat Jul 19, 2014 10:43 pm
Location: 67867
Github Username: chuckwagoncomputing
Slack: dbh97

Re: 1997 Ford F-150 5.4 E4OD

Post by dbh97 »

I changed my mind about giving up, and decided to try again. New gate driver, new MOSFET.
And I found a problem: I had the diode wired to ground instead of 12V. I don't think that would kill the gate driver, but I decided to give it another try anyway.
It worked perfectly - for maybe a minute. Then the gate driver bit the dust again. I felt the gate driver with my finger probably 15 seconds in, and it wasn't getting warm.
I have no idea what's going on, but judging from the history of this project, the answer is most likely that I am an idiot and have something wired wrong.
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: 1997 Ford F-150 5.4 E4OD

Post by mck1117 »

How many more gate drivers do you have? If it's a few, I'd replace the gate driver, and remove the mosfet entirely. Scope the driver output, turn it on, and see what happens.
dbh97
contributor
contributor
Posts: 84
Joined: Sat Jul 19, 2014 10:43 pm
Location: 67867
Github Username: chuckwagoncomputing
Slack: dbh97

Re: 1997 Ford F-150 5.4 E4OD

Post by dbh97 »

I'm fresh out. Time for my nth Digikey order I guess.

In other news, I've got all the pins crimped for a Proteus adapter harness, just need to stick them in the connector.
Here's the pinout and Proteus mapping if someone wants to look it over. My pinout is column E.
https://calc.holdemanenterprises.com/eecv-table
dbh97
contributor
contributor
Posts: 84
Joined: Sat Jul 19, 2014 10:43 pm
Location: 67867
Github Username: chuckwagoncomputing
Slack: dbh97

Re: 1997 Ford F-150 5.4 E4OD

Post by dbh97 »

Sooooo....
image.png
image.png (30.48 KiB) Viewed 9645 times
See those capacitors on Vdd? Turns out that following the circuit in the datasheet is a good idea.
Thanks to @blundar for suggesting that this was probably the problem.
It was.

Interestingly, the behavior of the trans line pressure is completely different than when I was driving the MOSFET with a bare digital output. 50% does roughly what 90% did before. I say roughly, because the pressure now varies more with RPM. I haven't got that one thought through yet.
dbh97
contributor
contributor
Posts: 84
Joined: Sat Jul 19, 2014 10:43 pm
Location: 67867
Github Username: chuckwagoncomputing
Slack: dbh97

Re: 1997 Ford F-150 5.4 E4OD

Post by dbh97 »

Pic for context:
IMG_20210706_150942.jpg
IMG_20210706_150942.jpg (1.85 MiB) Viewed 9530 times
Notably absent are the block and crank, which are off at the machine shop.

- junkyard dave
dbh97
contributor
contributor
Posts: 84
Joined: Sat Jul 19, 2014 10:43 pm
Location: 67867
Github Username: chuckwagoncomputing
Slack: dbh97

Re: 1997 Ford F-150 5.4 E4OD

Post by dbh97 »

Block and crank have returned
IMG_20210716_170008.jpg
IMG_20210716_170008.jpg (1.75 MiB) Viewed 9442 times
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: 1997 Ford F-150 5.4 E4OD

Post by AndreyB »

Any updates, how is it going? :)
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
dbh97
contributor
contributor
Posts: 84
Joined: Sat Jul 19, 2014 10:43 pm
Location: 67867
Github Username: chuckwagoncomputing
Slack: dbh97

Re: 1997 Ford F-150 5.4 E4OD

Post by dbh97 »

Current status of the new engine is that the block is painted and the crankshaft is installed.

I haven't been working on it much because some other stuff has taken priority. I agreed to swap the transmission in my parent's car with a junkyard pull. I drained the fluid from the junkyard pull and it looked even worse than the fluid from the original transmission, so they decided to have me rebuild it instead. Add procrastination and depression to this picture, and I've had their car for about 2 years now. I've decided that I must finish it before I tear into my pickup again - which needs to be done before I can do much in the direction of making the transmission shift itself, because this transmission has a pre-existing condition or two.

Another new development to add to the picture is that the pickup blew a coolant hose and it was at night and raining so I didn't notice for a mile or two, and now it's using coolant and the coolant tank smells like fuel, so it blew a headgasket and/or cracked a head. It still runs though, and I still drive it quite often when my wife is using my one reliable vehicle.

My plan right now is to rebuild the transmission, and get the engine running on rusEFI at the same time.
Then develop the code to get the transmission shifting properly.
Then (probably quite a while later) swap the engine out. This step will take quite a while as I'll have to custom-build all the turbo plumbing.
apauna
Posts: 12
Joined: Fri Feb 10, 2023 12:56 am
Github Username: alpauna

Re: 1997 Ford F-150 5.4 E4OD

Post by apauna »

I would like to help with this build. I have a 1999 Ford that I have been messing with to get off the Ford ECU and have planned to use MegaSquirt to do this swap. However. I like would rather spend some time developing a PNP board for the 104 pin ECU controller.

Here is my setup:
1999 Ford F150 with 5.4 and 4R70w transmission. In the end, I have a E40D that I will put into it. However, first things first. Currently, it is setup to run the 4R70w and as such that is the only one that will fit. 4R100 aka E40D is 5 inches longer and requires different everything to fit. I do not have time or money currently to do that swap. So, first want to get trans controller configured. I am going to use the MegaSquirt for ECU since I already own it. However, in the end the Proteus board makes the most sense and have already priced it out to get 5 of them from https://jlcpcb.com/. That comes in at just under $500 with most parts assembled on the 5 boards.

So my question here... Should I continue on this thread here or create a new one specific for my setup?

This thread seems like a good starting point but I do not want to be rude and take away anything for the originator of this thread. Instead, maybe we can come up with a solution that works in both of these cases. Internally much the same firmware code will work for both 4R70w and 4R100's just different shift tables since 4R100 has a converter clutch solenoid. However both have a PWM controlled pressure solenoid and that seems to be the biggest thing worked on in this thread ahead of my interest in rusefi. Also the shift selector plays a part in this setup. Ford has two different version an analog and a digital version. Not sure the version used in the truck in the thread here is how to tell:
This is the analog version
image.png
image.png (248.86 KiB) Viewed 5309 times
This is the digital version:
image.png
image.png (218.83 KiB) Viewed 5309 times
I got this info from here:
https://hgmelectronics.com/blogs/hgmelectronics/e4od-4r100-transmission-controllers-and-the-ford-e4od-4r100-transmission


Anyway, let me know how I can be helpful here. I have mapped the pins for the 104 pin in the past and will do so and provide a pcb board that will accept the ford 104 pin connector in the future to so that it can connect the Protus board to the Ford 104 connector. Oh, this works on the Mustangs too I think 99 - 04 with the 4.6 modular v8. That is what the Megasquirt was that I paid way to much for is designed to control.
apauna
Posts: 12
Joined: Fri Feb 10, 2023 12:56 am
Github Username: alpauna

Re: 1997 Ford F-150 5.4 E4OD

Post by apauna »

Well, looky here you guys have already done the work!
https://github.com/rusefi/rusefi/tree/master/hardware/Breakout_104pin_EEC-V-Connector

Now, all I have to do is get the pins right for the F150 I will provide a spreadsheet with the pinout in github this week. Then figure out the ECU and PCM relationship. Remember the ford is more of a PCM as it controls both the ECU and Powertrain so I classify it more of a PCM then a ECU. Not sure if the code is designed to do both or if it is like the MegaSquirt where you run a MicroSquirt to control the Trans and the ECU is managed by the MegaSquirt. This may be where a microrusefi could be a trans controller. Let me know what others have done to control these crazy Fords. Seems like much is already done. I am just starting on this myself and have look at many option and even already ran my truck on a megasqurit but had problems with the microsquirt controlling the trans. So I put back the Ford ECU. Try and get the code for the latest version of the firmware for MegaSquirt forget it.

This is why I started looking for other options. Speeduino was one but then looking for wideband controller ideas I came across rusefi controller. I like the idea of using faster processor and getting rid of some of the complexity found in Speeduino since it is so interrupt driven. This code uses HAL to rid itself of some of the uCPU requirements. Seems more feasible with faster processors that are available. For Example, Teensy 4.2 that thing is crazy fast. Anyway, this seems like it focuses on simplicity rather than some other options out there so I am glad to give it a try.

I am a complete noob here so any suggestions are welcome.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: 1997 Ford F-150 5.4 E4OD

Post by AndreyB »

Welcome!

Separate thread is probably better. Forum is a bit quiet these days but it's best to keep a record of context :)
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Post Reply