feature request, pwm fan control

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

ashford
Super MS/Extra'er
Posts: 1605
Joined: Sun Apr 27, 2008 4:29 pm

feature request, pwm fan control

Post by ashford »

i don't know if there is enough hardware out in the wild yet for this to be an everyday thing but my fan died on my capri yesterday. scrounging around my fan collection i found a fan that fits nicely. it is from a 2008 crown vic police car, it has an intergral pwm controller built into the fan. http://www.rockauto.com/catalog/moreinf ... 497&jpid=7

i know this can be done easily with a generic pwm output but add in ac and connecting the 2 don't work.

my thoughts on this are a simple curve, start of fan on clt195= 25% to clt220=100%. then a setting for if ac on, min fan duty = 50%
arran
Master MS/Extra'er
Posts: 617
Joined: Mon Oct 29, 2012 2:34 am
Location: Brisbane Australia
Contact:

Re: feature request, pwm fan control

Post by arran »

I asked about a similar thing a few months ago. I am interested in a soft start:
http://www.msextra.com/forums/viewtopic ... 25&t=58122
RX7 Series 2 13B Turbo. Megasquirt 3 with 3X Expander and V3 CPU. Firmware 1.4.1
Knock module, twin EGT, real time clock, WBO2, full sequential fuel and spark
http://web.aanet.com.au/arran
brianj5600
Helpful MS/Extra'er
Posts: 96
Joined: Fri Oct 14, 2011 10:06 am
Location: Middle Tennessee

Re: feature request, pwm fan control

Post by brianj5600 »

It would be nice to be able to pwm the fan in the fan control set up. I will probably just use a generic pwm output, but would be nice to be able to have it turn off or slow down with VSS. It does not appear that the tables in generic pwm allows changing the "X" axis away from rpm. It would be nice if all the features in "fan control" worked with pwm.
1967 Mustang Coupe, 351w, S475 turbo, MS3.0 3x, c4, 8.8, ls coils, e85
Jamie V
Helpful MS/Extra'er
Posts: 45
Joined: Sun Mar 31, 2019 2:39 pm
Location: United States

Re: feature request, pwm fan control

Post by Jamie V »

I’m new to this but I can’t believe you’ve been asking for this for 5 years and it’s still not possible.

Why can’t a PWM feature (and a soft start only) be added to the fan control section?
Stinger Performance PiMPxshift
1994 Ford Lightning
Matt Cramer
Super MS/Extra'er
Posts: 17507
Joined: Thu Apr 16, 2009 8:08 pm

Re: feature request, pwm fan control

Post by Matt Cramer »

Easy way to do this is to use a generic PWM output that increases duty cycle with duty coolant temperature.
Matt Cramer -1966 Dodge Dart slant six running on MS3X
Jamie V
Helpful MS/Extra'er
Posts: 45
Joined: Sun Mar 31, 2019 2:39 pm
Location: United States

feature request, pwm fan control

Post by Jamie V »

If I use the generic PWM then I loose my ability to turn the fan on when the AC is on along with turning the fan off when the TPS and/or MPH are above a certain point.
Last edited by Jamie V on Wed Jan 22, 2020 2:43 pm, edited 1 time in total.
Stinger Performance PiMPxshift
1994 Ford Lightning
dontz125
Super MS/Extra'er
Posts: 4221
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: feature request, pwm fan control

Post by dontz125 »

Use two of the unpopulated outputs for the fan output and the PWM output; say, PK1 and PK3. You would then have the actual fan signal as a prog out coming on when [Portk] [AND} '10' Hyst '10'

The fan function turns on Port K bit 1 (=2) and the PWM function turns on Port K bit 3 (=8). If both bits are on (2+8=10), the output pin turns on and drives the fan controller.
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Jamie V
Helpful MS/Extra'er
Posts: 45
Joined: Sun Mar 31, 2019 2:39 pm
Location: United States

Re: feature request, pwm fan control

Post by Jamie V »

I was reading a post you made about this last night but this sounds like Chinese to me.
Stinger Performance PiMPxshift
1994 Ford Lightning
dontz125
Super MS/Extra'er
Posts: 4221
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: feature request, pwm fan control

Post by dontz125 »

Ni hau!

Heh - open up TS, and work your way through it. Set the fan function output to PK1 (aallll the way at the bottom); set the generic PWM A output to PK3. In the Programmable Outputs1 menu, select whichever output pin you have in mind (say, VVT); enable it, then set the "Active Conditions" fields. Instead of [RPM] {>} "0" "0", enter in [portk] [And] "10" "10". Select 'No Additional Conditions'. You're done!
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Jamie V
Helpful MS/Extra'er
Posts: 45
Joined: Sun Mar 31, 2019 2:39 pm
Location: United States

Re: feature request, pwm fan control

Post by Jamie V »

Ok, that’s a little more understandable.... LOL

Couple questions.

How do I adjust the Fan on Temperature & Fan off Temperature in fan control if I’m using the Generic PWM to now control at what temperature the fan comes on and off?

When the fan is told to come on (in fan control) because the AC is on will it come on if the ECT is not calling for the Fan to come on in the Generic PWM?

When the Fan is told to come on (in fan control) because the AC is on will it be a “switched” on or a PWM on?
Stinger Performance PiMPxshift
1994 Ford Lightning
dontz125
Super MS/Extra'er
Posts: 4221
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: feature request, pwm fan control

Post by dontz125 »

The 'Fan ON' and 'Fan OFF' functions under Fan Control are going to have to be set so the fan is always on within the envelope controlled by the PWM signal, but off otherwise. This way, you aren't wasting PWM cells down around -40F ensuring the fan is off.

Both the Fan Control and PWM have to be 'on' for the fan control signal to operate. An AC fan signal will operate at the PWM rate, not 100%.
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Jamie V
Helpful MS/Extra'er
Posts: 45
Joined: Sun Mar 31, 2019 2:39 pm
Location: United States

Re: feature request, pwm fan control

Post by Jamie V »

So if the PWM is calling for 10% fan speed at 180° and the AC is on it will only give 10% fan speed?

If the PWM is not calling for any fan speed at 150° and you turn the AC on the fan won’t come on until the ECT reaches a temperature that calls for the fan to come on?

Basically both criteria have to be met and the AC only makes the criteria and the PWM table determines fan speed?
Stinger Performance PiMPxshift
1994 Ford Lightning
dontz125
Super MS/Extra'er
Posts: 4221
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: feature request, pwm fan control

Post by dontz125 »

Pretty much.

What you can do if you don't normally want the fan on below 150F, but you DO want it on if the AC is on, is set the PWM to (say) 50% below 150F, with the Fan OFF set to 150. The AC ON overrides the Fan OFF, and the fan comes on at 50%.
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Jamie V
Helpful MS/Extra'er
Posts: 45
Joined: Sun Mar 31, 2019 2:39 pm
Location: United States

Re: feature request, pwm fan control

Post by Jamie V »

Could you add a 2nd Generic PWM table to the formula with a “this” and “that” or “that”
Stinger Performance PiMPxshift
1994 Ford Lightning
dontz125
Super MS/Extra'er
Posts: 4221
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: feature request, pwm fan control

Post by dontz125 »

Hmmm ... I suppose you could. The two PWM signals would have to be in phase, or else strange things might happen.

Instead of "No Additional Conditions", set that to [OR}. Set PWM B to use PK7 (=128); the bits in use would be bit 1 and bit 7 (2+128=130). The second operating condition would then be [portk] [And] "130" "130".
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Jamie V
Helpful MS/Extra'er
Posts: 45
Joined: Sun Mar 31, 2019 2:39 pm
Location: United States

Re: feature request, pwm fan control

Post by Jamie V »

When you say “in phase” do you mean the same HTZ?
Stinger Performance PiMPxshift
1994 Ford Lightning
dontz125
Super MS/Extra'er
Posts: 4221
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: feature request, pwm fan control

Post by dontz125 »

They'd have to be at the same frequency and in phase - both starting at the same time. If both were at 50% or more but offset, the effective duty cycle could be 100%
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Jamie V
Helpful MS/Extra'er
Posts: 45
Joined: Sun Mar 31, 2019 2:39 pm
Location: United States

Re: feature request, pwm fan control

Post by Jamie V »

I’m still trying to grasp all this.

So there wouldn’t be a way (even with 2 PWM tables) to have it come on at 100% when the AC turns on or ramp up to 100% if it was already on at a lower % due to ECT?
Stinger Performance PiMPxshift
1994 Ford Lightning
dontz125
Super MS/Extra'er
Posts: 4221
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: feature request, pwm fan control

Post by dontz125 »

I'm describing a workaround. There currently is no dedicated function that will PWM a fan while maintaining all other aspects of the Fan Control tab.
Temporarily shut down - back soon!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Jamie V
Helpful MS/Extra'er
Posts: 45
Joined: Sun Mar 31, 2019 2:39 pm
Location: United States

Re: feature request, pwm fan control

Post by Jamie V »

dontz125 wrote:I'm describing a workaround. There currently is no dedicated function that will PWM a fan while maintaining all other aspects of the Fan Control tab.

I understand that and am appreciative.

What would have to happen to get PWM added to the normal fan controls?
Stinger Performance PiMPxshift
1994 Ford Lightning
Post Reply