Author Topic: Dual Solenoid PID Idle  (Read 19780 times)

Offline Benzmac16v

  • Jr. Member
  • **
  • Posts: 86
  • BHP: 4
Dual Solenoid PID Idle
« on: April 25, 2010, 01:16:08 am »
Hi,

I installed VEMS (Firmware 1.0.73) in my 1985 Mercedes 190E 2.3-16v last summer.  Car ran pretty well, particularly when compared to the failing CIS-E system that was in it.  I half-assed a few things (TPS and Idle control) and just recently installed a real TPS sensor and the hardware for idle control.  The new TPS works great but I am having some issues with setting up my idle control valve.

The valve is a 3 wire dual solenoid bosch unit that came stock on the car.  I think my main issue is that I may have wired it up improperly.  I put it on 2 extra ignition drivers rather than the spare injector ports.  I thought this would be a none issue, after i realized what I did, because I can tell VEMS to run idle off ignition drivers.  Is this ok?  Everything is already all buttoned up so I would rather not dive into the wiring again.

Do the ignition drivers need to be enabled like the injector drivers do?  With injector drivers you go to Settings -> injector outputs and enable the mask for the pin you want.  This doesn't seem to exist in the ignition settings.

Thanks,
Jim
1985 Mercedes-Benz 190E 2.3-16v - VEMSv3.3 1.1.92

MemberWiki: http://www.vems.hu/wiki/index.php?page=MembersPage%2FBenzmacx

Offline gunni

  • Hero Member
  • *****
  • Posts: 1492
  • BHP: 37
Re: Dual Solenoid PID Idle
« Reply #1 on: April 25, 2010, 03:23:27 am »
No you just select the output in the Idle control valve section or output channel section.

I have ran boost control solenoid of ignition output and it worked like a charm.

Offline Benzmac16v

  • Jr. Member
  • **
  • Posts: 86
  • BHP: 4
Re: Dual Solenoid PID Idle
« Reply #2 on: April 25, 2010, 06:12:36 am »
Excellent.

I have been searching and reading up and I found a few things about the PWM frequency and using ports i5 and i6.  Seems to have helped as there is much more action in the idle section of the realtime display in megatune.  The car will idle just fine when it is warm, but when it is cold it likes to stall and idle very low (600-800 rpm).  The car has been warm pretty much all day so Ill have to test that tomorrow or tonight.  I am also thinking the throttle plate might be too closed, but I went to try and adjust it today and my damn hood wouldn't open!!  Going to have to figure that one out too...

Thanks for the quick reply,
Jim
1985 Mercedes-Benz 190E 2.3-16v - VEMSv3.3 1.1.92

MemberWiki: http://www.vems.hu/wiki/index.php?page=MembersPage%2FBenzmacx

Offline mattias

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1075
  • BHP: 41
    • Sävar Turbo Site
Re: Dual Solenoid PID Idle
« Reply #3 on: April 26, 2010, 03:36:57 pm »
i5 and i6 = inverted signal from channel 5 and 6.
You should never have to use inverted functionality.

Your reference idle PWM table must be set correctly for this to work. Set your integral decrease/increase to 0 and work from there (disabled PID control). Check "IAC int" for deviation from optimal opening, minimize that by changing the table.

Offline Benzmac16v

  • Jr. Member
  • **
  • Posts: 86
  • BHP: 4
Re: Dual Solenoid PID Idle
« Reply #4 on: April 27, 2010, 05:23:08 am »
Yeah, I was able to take it for a quick test drive and  nothing changed when cold.  Ill set the outputs back to 5 and 6. 

Where do I find the IAC int?

Sorry, I am still very new to VEMS, I understand most of the conceptual stuff, but the settings and whatnot are still all new to me.

Thanks,
Jim
1985 Mercedes-Benz 190E 2.3-16v - VEMSv3.3 1.1.92

MemberWiki: http://www.vems.hu/wiki/index.php?page=MembersPage%2FBenzmacx

Offline mattias

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1075
  • BHP: 41
    • Sävar Turbo Site
Re: Dual Solenoid PID Idle
« Reply #5 on: April 27, 2010, 06:22:52 am »
Any gauge in VemsTune can be changed to monitor what you want, in this case change them to monitor IAC values. The dutycycle and integral values are what you need. The dutycycle is actual % opening of the valve, the integral is how far off from target rpm you are.

Go through all the IAC setting dialogs to get familiar with the concepts and words used.

Offline Benzmac16v

  • Jr. Member
  • **
  • Posts: 86
  • BHP: 4
Re: Dual Solenoid PID Idle
« Reply #6 on: April 27, 2010, 07:51:53 am »
I am still on megatune, but it still has the IAC int gauge.  However, this stays pegged at -128 cold or warm, off idle or on idle, and with or without numbers in the integral values.

I would assume this has to be a set up issue...  I will get some screen shots of all my idle stuff and post them up in a bit.

Jim
1985 Mercedes-Benz 190E 2.3-16v - VEMSv3.3 1.1.92

MemberWiki: http://www.vems.hu/wiki/index.php?page=MembersPage%2FBenzmacx

Offline Benzmac16v

  • Jr. Member
  • **
  • Posts: 86
  • BHP: 4
Re: Dual Solenoid PID Idle
« Reply #7 on: April 27, 2010, 09:00:49 am »
I just played with it a little and here is what I found:

If I zero the increase decrease limit nothing will happen on the IAC int gauge no matter what.  With my old values in it, it would flip between -127 and +127.  I lowered my decrease limit and put a value of 1 in my idle table.  Then the idle int gauge went to -73.  I assume this is an indication that my throttle plate needs some serious adjusting as the idle valve cannot compensate for it...  Hopefully Ill get some time tomorrow to tune this a bit.

Here are the screen shots of the idle settings:










Thanks,
Jim
1985 Mercedes-Benz 190E 2.3-16v - VEMSv3.3 1.1.92

MemberWiki: http://www.vems.hu/wiki/index.php?page=MembersPage%2FBenzmacx

Offline Benzmac16v

  • Jr. Member
  • **
  • Posts: 86
  • BHP: 4
Re: Dual Solenoid PID Idle
« Reply #8 on: May 01, 2010, 07:45:16 am »
Finally got my hood open and some work done today.  Found out I wasn't even powering the control valve.  I had it hooked up to a fuse that was powered by a relay and the relay was off... GENIUS!  Until I can figure out how to control that relay (have an email out to the guy who built it) I am going to test it jumped.

It seemed to start reacting, but I couldn't get it to work right (it is working though) as the engine will race.  It seems I may have wired it up backwards?  I didn't think this was possible, but I cannot swap the outputs, when I do it will change the outputs...  The idle valve is on ignition 5 and 6, if I try to order it to 6 being the "1st" coil and the 5 as the second it will make the first 6 and the second 7.  This is somewhat aggravating... but does it even matter?

Jim
1985 Mercedes-Benz 190E 2.3-16v - VEMSv3.3 1.1.92

MemberWiki: http://www.vems.hu/wiki/index.php?page=MembersPage%2FBenzmacx

Offline rob@vems.co.uk

  • Hero Member
  • *****
  • Posts: 3115
  • BHP: 49
    • VEMS Forum
Re: Dual Solenoid PID Idle
« Reply #9 on: May 01, 2010, 04:19:20 pm »
It shouldnt matter as you can invert the primary output and the opposite action will occur to what you currently have.
The idle controller will take a fair amount of setting up, the chances of the PID setting being anything close to what you need are very low indeed.

Offline Benzmac16v

  • Jr. Member
  • **
  • Posts: 86
  • BHP: 4
Re: Dual Solenoid PID Idle
« Reply #10 on: May 02, 2010, 02:52:46 am »
I got my settings from a guy in Sweden who hops up these 190Es and EFIs them with VEMS.  I knew it wouldn't be plug and play (murphy's law pretty much defines my life).  Not really sure I wanted it to be perfect plug and play anyway... I wouldn't really know whats going on if nothing went wrong.

At any rate, I have some strange things going on... Something is just sending my idle controller to its limits.  When I set it to channels 5 and 6 it surges (sometimes even going past my overrun, other times hitting the overrun limit and bouncing back and forth).  If I invert it it will turn off (a closed TB will make it stall and wont start without some applied throttle).  Both of these cases hold true no matter what I enter in the reference table.

I even tried setting the I and D values to 1 and the P value to 100 just to see if I could get it to surge back and forth around the idle value I wanted but I get nothing. Just holds hard on the extreme values...

Jim
1985 Mercedes-Benz 190E 2.3-16v - VEMSv3.3 1.1.92

MemberWiki: http://www.vems.hu/wiki/index.php?page=MembersPage%2FBenzmacx

Offline mattias

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1075
  • BHP: 41
    • Sävar Turbo Site
Re: Dual Solenoid PID Idle
« Reply #11 on: May 02, 2010, 04:07:44 am »
If I zero the increase decrease limit nothing will happen on the IAC int gauge no matter what. 
That's the point. It disables the PID controller so the valve runs only on what you input in the reference table (% vs coolant temp).

The increase/decrease integral (aka "IAC int") is the max/min adjustment that the PID controller can push the valve away from the reference table to maintain the target idle rpm. That is why you first disable the PID controller and tune the reference table roughly. When you later enable the PID controller the "IAC int" will show you how far off the reference table you are.

If you have a negative "IAC int" it means the controller is closing the valve more than what the reference table dictates for the current coolant temperature.

Offline Benzmac16v

  • Jr. Member
  • **
  • Posts: 86
  • BHP: 4
Re: Dual Solenoid PID Idle
« Reply #12 on: May 02, 2010, 05:16:09 am »
ahhh ok, I wasn't quite sure what the IAC int actually represented.

I have been playing with it and the surging has stopped.  Now that I know what the IAC value actually means I will hopefully be able to get it working.

So, zero the increase/decrease, play with the reference table until it idles at the correct rpm per coolant temp.  Then put values back in to re-enable PID control.  Then use the PID values to make the idle stabilize quick and doesn't bounce.

Jim
1985 Mercedes-Benz 190E 2.3-16v - VEMSv3.3 1.1.92

MemberWiki: http://www.vems.hu/wiki/index.php?page=MembersPage%2FBenzmacx

Offline Benzmac16v

  • Jr. Member
  • **
  • Posts: 86
  • BHP: 4
Re: Dual Solenoid PID Idle
« Reply #13 on: May 02, 2010, 06:20:24 am »
OK, again, still playing with it all.

What are the 'pwm frequency' and 'max steps to extend' values?  I have done plenty of motor control before (although not with anything as involved as an ICE is, I have also done some PID control before as well, so I get what I am trying to do, vems is just still new to me) and generally a higher pwm frequency is 'better' assuming your controller support the resolution needed at that speed.  But really, so long as your frequency is fast enough to make the coil have an averaging effect to the voltage and isn't reacting to individual pulses you are good.

However, when I play with these numbers I can change what is going on and it is somewhat confusing as the frequency, so long as it is fast enough, shouldn't be screwing with how the idle performs...

Jim
1985 Mercedes-Benz 190E 2.3-16v - VEMSv3.3 1.1.92

MemberWiki: http://www.vems.hu/wiki/index.php?page=MembersPage%2FBenzmacx

Offline mattias

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1075
  • BHP: 41
    • Sävar Turbo Site
Re: Dual Solenoid PID Idle
« Reply #14 on: May 02, 2010, 06:58:37 pm »
There are a couple of pages in the Wiki at vems.hu written about it, I collected some random data but there is a PID tuning guide too:

http://www.vems.hu/wiki/index.php?page=MembersPage%2FMattiasSandgren%2FIdleValveTuningGuide
http://www.vems.hu/wiki/index.php?page=PIDControlTuning

The PWM frequency is a drop-down menu if you upgrade to 1.1.7x firmware, much easier to understand. '5' according to the table on my page is about 100 Hz. The 3-pin valves seem to use 50 Hz in their standard application, others are different.

The 'max steps to extend' must be set to 255 (max) when using  solenoids to avoid limiting the motion. This is commonly used for stepper motors so the motor doesn't step out of bounds.

Do note that the PWM signal was not really perfect until later 1.1.x firmware, which means idle control is improved if you upgrade - hopefully you will notice this.