Jump to content

Gp pwm output clamps


Lotussuper7

Recommended Posts

Looking to run my fan off a solid state relay, I have it wired up and working well. However, I have a small issue. The fan required around 25%DC to start reliably, but I cant find how to set the minimum clamp value for the Gp pwm output. Is this possible, I think it is in the pwm fuel pump option, but not on the gp pwm outputs?

I tried to set up a 'and'condition pointing at the gp pwm status being greater than 25%, this seems to stop the fan running below 25% if it already going, but will not let it start if that condition is active.

Any ideas?

Link to comment
Share on other sites

The problem is when the the table interpalates from a '0' cell to a populated cell, and the value is somewhere between. Even if I put 100% in a cell (say at 90 deg c) but the cell before it is 0,  there is a period where the interpolation is less than 25% and the fan struggles. 

Surely min and max clamps should be an option? 

 

I thought that putting in a 'and' condition - gp  pwm dc >= 25% would solve the issue, but it doesnt seem to read the value from the table unless the gp pwm table has become active. So that's why it stops the fan on cooldown at 25% dc, but will not let the fan start. 

Link to comment
Share on other sites

Thanks for the reply.

Attached is what I'm trying to achieve.

Basically a simple concept. Ramp the fan on slowly as Ect temp starts to rise above 80 or so. However, ramp the fan up if the Iat gets high also,  for this to happen the ect must be above 70 though. (The radiator and intercooler are stacked and share a fan)This bit works fine, the problem is because there seems to be no min duty cycle for the gp pwm outputs, the fan gets asked to come on at very low duty( interpolated value as temp rises slowly), so the fan wont start, and just makes buzzing sounds. This obviously isnt good for the fan or solid state relay. It will eventually start as the interpolated value climbs, but as ect climbs relatively slowly, this can take a while.

My work around did not work as expected because I cant seem to reference the value in the gp pwm table directly for my condition. As the conditions have not 'yet' been met, it doesnt output a duty cycle to monitor. It will however turn the fan off using the condition as a duty cycle is being output at that stage and it seems to recognize when it falls below (in my case) 25%.

I'm just confused how others have got around using the gp pwm tables, I would have thought most items that use pwm control do not like being driven at very low pwm values, things such as water pumps etc. 

Is this a bug or am I just missing something?

 

Any help greatly appreciated.

20201222_232850.jpg

20201222_232638.jpg

I think the problem with my workaround (that did not work) is that I need to reference the target dc from the gp pwm table, not the actual output. But I couldn't find a way to do that.

Link to comment
Share on other sites

Thanks for your help, I tested this a bit earlier today. However, it did not solve the problem. There still is a period where the fan is being driven stalled, then the ramp up is not smooth at all, and kinda defeates the purpose of having a pwm controlled fan.

Surely there must be a way to set a minimum dc for the dc pwm output. If this is not necessary, why would it be implemented on pwm fuel pump control? the boost solenoid also has min/max dc settings, and I know nitrous solenoids also require min duty settings.

My original setup worked beautifully (once the fan had started).

Would it be possible using a virtual aux setup as an intermediary, so the gp pwm output value could be collected and used in a condition before actually being implemented?

Any other ideas?

 

 

 

 

 

Link to comment
Share on other sites

An output clamp in the same style as the fuel pump control can be implemented by simply filling in your 0% cells with 25% values as once the fuel pump is activated by it does not drop below it's min DC, your application however you want values below 25 to be treated as 0 and values above to be taken as displayed.

Link to comment
Share on other sites

1 hour ago, Tim Ward said:

There still is a period where the fan is being driven stalled, then the ramp up is not smooth at all, and kinda defeates the purpose of having a pwm controlled fan.

Tim, why didnt it work?  That example that I gave will do excatly what you ask - at for instance 60IAT, it will jump straight from 0 to 25% with nothing in between.  Where is it being driven stalled?  If you want it to be ramped in slower at 50deg IAT where it jumps straight to 50%, then just put a smaller number in the 50% cell.  I was just copying the values you wanted...

Link to comment
Share on other sites

Again, thanks for looking into this. I will give Vaughans suggestion a try. Ps. the engine speed condition was just set to >= 0, so i could monitor what the fan was doing on cool down ( car not running) so i could see when it switched off.

Yeah, it didnt seem to work all that well, values below 25 were still being output as it transitioned from 89 - 90 deg. This wasnt for very long 3-5 seconds, but i suspect if the value in the 90 deg cell was lower, this transition phase would grow. It was a very choppy looking transition too, like a coarse stairstep.

I tried to upload a picture of the log taken using Adamws settings, but it wouldnt let me as i have run out of upload capacity, I will see if I can just upload the log instead and you could have a look? Edit, The log file is too big to upload also.

Will give the new suggestion a go and report back.

Link to comment
Share on other sites

Update time. 

Had a chance to test the fan code this afternoon. Although very complicated (still trying to get my head around how it works) it seems to work perfectly. Fan comes on at a min duty of 25 and off around the same! You are a genius.

Would still like to see a easier way to do this (maybe I should put min/max gp dc clamps in the wishlist? along with a 'kick' feature to temporarily bump the dc up)

But in the mean time, this workaround.... seems to work. 

Thanks for everybody's help, you guys are awesome.

 

Merry Christmas.

Link to comment
Share on other sites

15 hours ago, Adamw said:

Here is a table setup that will give you the same result as above but with no interpolation:

rbrtGQg.png

Other suggestion:

Set all 0 cells to 25

Set Output activation to: 

ECT> 70 deg AND IAT >60deg

OR Virtual AUX X = ON

Virtual AUX X

ECT >80 deg and IAT >50 deg

OR ECT > 90 deg

This should do the job just fine. I can not think of a situation where you have IAT> 60deg and ECT< 70deg. 

Btw don't see how the fan has any effect on IAT....

 

 

Link to comment
Share on other sites

8 hours ago, mapper said:

Other suggestion:

Set all 0 cells to 25

Set Output activation to: 

ECT> 70 deg AND IAT >60deg

OR Virtual AUX X = ON

Virtual AUX X

ECT >80 deg and IAT >50 deg

OR ECT > 90 deg

This should do the job just fine. I can not think of a situation where you have IAT> 60deg and ECT< 70deg. 

Btw don't see how the fan has any effect on IAT....

 

 

This is what I was thinking this whole thread also...  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...