Electric fan control on Sd4x

A1C calibration can be modified and configured to operate all EFI-SD4x ECUs in 4 cylinder, 6 cylinder and 8 cylinder configurations.
efloth
Posts: 274
Joined: 2021 Feb 15, 22:12
Location: Sacramento CA
Vehicle Information: 1991 F150 4.9L J1X 80lb Injectors E85
1995 F150 5.8L MOB1

Electric fan control on Sd4x

Unread post by efloth »

Does anyone have sample code and know what pin to use? I'd like to control the fan in software instead of a static temp switch so I can turn it on when AC is on as well. Any guidance is greatly appreciated.
efloth
Posts: 274
Joined: 2021 Feb 15, 22:12
Location: Sacramento CA
Vehicle Information: 1991 F150 4.9L J1X 80lb Injectors E85
1995 F150 5.8L MOB1

Re: Electric fan control on Sd4x

Unread post by efloth »

http://www.efidynotuning.com/foxfan.htm

Duh. Found this but it appears pin 41 is used for the OD switch. Any other ther pins that could work?

https://web.archive.org/web/20070112084 ... nouts.html
decipha
Posts: 4955
Joined: 2021 Feb 15, 12:23
Location: Metairie, LA
Vehicle Information: Work Truck
'19 F-150 3.3L

Re: Electric fan control on Sd4x

Unread post by decipha »

if you have an unused digital output just write some code for it
wwhite
Posts: 313
Joined: 2021 Feb 16, 15:53
Location: Victoria, BC, Canada
Vehicle Information: 1994 Flarside, XLT, 351w E4OD
SD48b, Quarter Horse, Burn2

Re: Electric fan control on Sd4x

Unread post by wwhite »

Couldn't you run another relay off the A/C relay?
Then when ever A/C is on, your fans will be on.
If your wanting more control, then do it in software.
efloth
Posts: 274
Joined: 2021 Feb 15, 22:12
Location: Sacramento CA
Vehicle Information: 1991 F150 4.9L J1X 80lb Injectors E85
1995 F150 5.8L MOB1

Re: Electric fan control on Sd4x

Unread post by efloth »

I'd like temp control. I started studying the AL9 Fan control code but it's over my head at this point. I am pasting it here for reference. If one of you can help decipher this that would be great. I believe the B2_RE9=0 and BE2_RE9=1 lines are where the output is controlled. I don't understand how that relates to pin 41 or how that would translate to A1C. The orb and an2b opcodes are a mystery as well. Am I even close?

Code: Select all

Sub_648c:
648c: 9b,f6,74,00         cmpb  R0,[Rf6+74]      
6490: d7,01               jne   6493             if ([941c] = 0)  {
6492: f0                  ret                    return; }

6493: 37,a1,02            jnb   B7,Ra1,6498      if (B7_Ra1 = 1)  {
6496: 20,c1               sjmp  6559             goto 6559; }

6498: 71,df,e9            an2b  Re9,df           B5_Re9 = 0;
649b: 9b,f6,77,b0         cmpb  Rb0,[Rf6+77]     
649f: d6,24               jge   64c5             if (Rb0 < [941f])  {
64a1: 9b,f6,76,b0         cmpb  Rb0,[Rf6+76]     
64a5: de,21               jlt   64c8             if (Rb0 < [941e]) goto 64c8;
64a7: b3,74,21,42         ldb   R42,[R74+21]     R42 = [29f];
64ab: 9b,f6,78,42         cmpb  R42,[Rf6+78]     
64af: d3,17               jnc   64c8             if (R42 < [9420]) goto 64c8;
64b1: a3,74,de,42         ldw   R42,[R74+de]     R42 = [25c];
64b5: 8b,f6,7a,42         cmpw  R42,[Rf6+7a]     
64b9: d3,0d               jnc   64c8             if (R42 < [9422]) goto 64c8;
64bb: b3,74,3f,42         ldb   R42,[R74+3f]     R42 = [2bd];
64bf: 9b,f6,79,42         cmpb  R42,[Rf6+79]     
64c3: d9,03               jgtu  64c8             if (R42 > [9421]) goto 64c8; }
64c5: 91,20,e9            orb   Re9,20           B5_Re9 = 1; } } } }
64c8: 35,e9,0d            jnb   B5,Re9,64d8      if (B5_Re9 = 1)  {
64cb: b3,f6,71,40         ldb   R40,[Rf6+71]     R40 = [9419];
64cf: 9b,72,ce,40         cmpb  R40,[R72+ce]     
64d3: d9,03               jgtu  64d8             if (R40 <= [14e])  {
64d5: 91,08,e9            orb   Re9,8            B3_Re9 = 1; } }
64d8: b3,f6,76,42         ldb   R42,[Rf6+76]     R42 = [941e];
64dc: 7b,f6,6d,42         sb2b  R42,[Rf6+6d]     R42 -= [9415];
64e0: 98,b0,42            cmpb  R42,Rb0          
64e3: da,03               jle   64e8             if (R42 > Rb0)  {
64e5: 71,f7,e9            an2b  Re9,f7           B3_Re9 = 0; }
64e8: 9b,f6,6c,b0         cmpb  Rb0,[Rf6+6c]     
64ec: da,03               jle   64f1             if (Rb0 > [9414])  {
64ee: 91,04,e9            orb   Re9,4            B2_Re9 = 1; }
64f1: b3,f6,6c,42         ldb   R42,[Rf6+6c]     R42 = [9414];
64f5: 7b,f6,6e,42         sb2b  R42,[Rf6+6e]     R42 -= [9416];
64f9: 98,b0,42            cmpb  R42,Rb0          
64fc: da,03               jle   6501             if (R42 > Rb0)  {
64fe: 71,fb,e9            an2b  Re9,fb           B2_Re9 = 0; }
6501: 33,e9,09            jnb   B3,Re9,650d      if (B3_Re9 = 1)  {
6504: b3,f6,75,40         ldb   R40,[Rf6+75]     R40 = [941d];
6508: 99,01,40            cmpb  R40,1            
650b: df,44               je    6551             if (R40 = 1) goto 6551; }
650d: b3,f6,6f,42         ldb   R42,[Rf6+6f]     R42 = [9417];
6511: 7b,f6,70,42         sb2b  R42,[Rf6+70]     R42 -= [9418];
6515: 9b,74,3f,42         cmpb  R42,[R74+3f]     
6519: d1,05               jleu  6520             if (R42 > [2bd])  {
651b: 33,ea,02            jnb   B3,Rea,6520      if (B3_Rea = 1)  {
651e: 20,06               sjmp  6526             goto 6526; } }

6520: 3a,e9,03            jb    B2,Re9,6526      if (B2_Re9 = 0)  {
6523: 37,c5,04            jnb   B7,Rc5,652a      if (B7_Rc5 = 0) goto 652a; }
6526: 91,40,47            orb   R47,40           B6_R47 = 1;
6529: f0                  ret                    return; }

652a: 3b,ea,0c            jb    B3,Rea,6539      if (B3_Rea = 0)  {
652d: a3,f6,72,40         ldw   R40,[Rf6+72]     R40 = [941a];
6531: 8b,74,98,40         cmpw  R40,[R74+98]     
6535: d9,02               jgtu  6539             if (R40 <= [216])  {
6537: 20,14               sjmp  654d             goto 654d; } }

6539: b3,f6,55,40         ldb   R40,[Rf6+55]     R40 = [93fd];
653d: 9b,74,97,40         cmpb  R40,[R74+97]     
6541: d9,0a               jgtu  654d             if (R40 <= [215])  {
6543: b3,f6,6f,40         ldb   R40,[Rf6+6f]     R40 = [9417];
6547: 9b,74,3f,40         cmpb  R40,[R74+3f]     
654b: db,02               jc    654f             if (R40 >= [2bd]) goto 654f; }
654d: 20,10               sjmp  655f             goto 655f; }

654f: 20,07               sjmp  6558             return; }

6551: 71,df,47            an2b  R47,df           B5_R47 = 0;
6554: 91,40,47            orb   R47,40           B6_R47 = 1;
6557: f0                  ret                    return;
decipha
Posts: 4955
Joined: 2021 Feb 15, 12:23
Location: Metairie, LA
Vehicle Information: Work Truck
'19 F-150 3.3L

Re: Electric fan control on Sd4x

Unread post by decipha »

the bidi port register is going to be different for every strategy you have to identify it

in rzasa I wrote some very basic code for fan control. would be significantly easier to just copy and paste it bit youd need to know the port reg
wwhite
Posts: 313
Joined: 2021 Feb 16, 15:53
Location: Victoria, BC, Canada
Vehicle Information: 1994 Flarside, XLT, 351w E4OD
SD48b, Quarter Horse, Burn2

Re: Electric fan control on Sd4x

Unread post by wwhite »

What is your exact hardware code?
I’m hacking SD48 and SD47, have a good understanding of circuit board traces and what caps, resistors are needed to add hardware inputs/outputs and mapping in software.
efloth
Posts: 274
Joined: 2021 Feb 15, 22:12
Location: Sacramento CA
Vehicle Information: 1991 F150 4.9L J1X 80lb Injectors E85
1995 F150 5.8L MOB1

Re: Electric fan control on Sd4x

Unread post by efloth »

I have sd48. Pins 13, 14, 15 & 18 are unused afaik
wwhite
Posts: 313
Joined: 2021 Feb 16, 15:53
Location: Victoria, BC, Canada
Vehicle Information: 1994 Flarside, XLT, 351w E4OD
SD48b, Quarter Horse, Burn2

Re: Electric fan control on Sd4x

Unread post by wwhite »

efloth wrote: 2023 Jan 04, 22:15 I have sd48. Pins 13, 14, 15 & 18 are unused afaik
And pin #34, some others, also #12.
So, what I know is #34 is for fuel consumption(Trip Minder), circuit board is missing the PWM chip and some resistors, so the circuit is broken.
From my quick references, pin #12 is for 4x4 low range dash light.
Other options could be utilizing the air injection outputs, pin #51(AIRB) or pin #31(canister purge output), but I think those are PWMs.

I'll go trace pin #12, see if it is actually connected to the CPU, probably the best bet.

Your not driving a 4x4 are you?
efloth
Posts: 274
Joined: 2021 Feb 15, 22:12
Location: Sacramento CA
Vehicle Information: 1991 F150 4.9L J1X 80lb Injectors E85
1995 F150 5.8L MOB1

Re: Electric fan control on Sd4x

Unread post by efloth »

Yes it's a 4x4. The archive.org link above has a good reference. I have an e4od so that column gets added in. 34 or 35 any good?
Post Reply