Help with building your Speeduino, installing it, getting it to run etc.
#41070
Hello everyone,

I have been fiddling around with the CL stepper idle control feature and I am noticing some strange behaviour with it.
The engine runs perfectly fine with in OL mode.
I tried to tune the PID settings by following these guides:
viewtopic.php?f=11&t=2544&hilit=closed+loop+idle
viewtopic.php?f=18&t=3194&p=38092&hilit ... PID#p38092

Now when in OL mode you could see the stepper motor value by going onto Realtime Display under the tuning menu and then AllOutputChannels. In my case I set it to 26, and without any surprise, 26 shows up on the idleLoad channel. It also shows up on the IAC gauge if you choose to make it visible.
Image
When I tried to do the same thing in CL mode I realized that the idleLoad value is being displayed as 2, which does not make any sense as the stable value is 31. If the idleLoad really was at 2, the engine should stall.

I did manage to get a stable CL control on some occasions and I would try to disrupt the engine by tuning on the AC or the headlamps. I have noticed that when under load the CL control would get the required rpm right, but when the load is removed, the rpm stays up. I would then try to increase the load further by switching on the AC, headlamps and thermo fan. The system would compensate by further opening the IAC and the AFR/02 would add more fuel and I would get the target rpm. When I remove all loads I end up with a very high rpm, which again does not go back to the target value.
With the loads removed, the IAC gauge and idleLoad channel would show 2 steps.

Image

Is this some kind of bug where the system thinks that the IAC is closed and hence it makes no attempt to reduce the rpm? It is as though the system forgets about the position of the stepper motor, but I could be wrong.

In other instances the CL control does not work at all.

I am using the latest February 2020 firmware version.
#41072
First thing I would do is try and verify whether the idle load (which is the stepper position for closed or open loop stepper) matches the physical position of the stepper when the fault is active. To do this, replicate the fault and then disconnect the electrical plug from your stepper. Turn off the engine and remove the stepper to check the physical position of the pintle. Get it in the same load position but working, do the same thing and compare the physical position. The stepper system does not feed back a position so the ECU has no way of knowing whether the physical position matches the commanded position. If you find they do not match then this implies missed steps which is a relatively common occurrence on steppers unfortunately. My own stepper doesn't work with closed loop because steps get missed relatively quickly and as a result the closed loop algorithm hits the stops and loses control since it thinks the stepper is closed when physically it isn't.

Something else you can try to help understand whether you are missing steps is to replicate the fault and then, while the engine is running, switch from closed loop to open loop, then change back to closed again. Wait a few seconds between the changes. This causes the stepper code to go through a reset process which will re-home the stepper. If the system regains control over RPM then that implies missed steps again.

Another thing to check is whether you have 'idle up' enabled. This is active with closed loop stepper control - it adds an amount to the target idle. If it is enabled, but not connected, then the floating pin could cause issues. Obviously if it is enabled and connected then you'll need to check it is pulled to 0v and 5v or again it'll have odd effects.

How well tuned is your fuel table? It needs to be pretty good around the areas you are hitting for the stepper operation to work successfully otherwise stuff like lean surge will cause it issues.
#41073
Thank you for reply, I am suspecting that there are missed steps as I sometimes see this weird behaviour with the OL too and a simple re-homing triggered by changing the stepper control to CL and then back to OL would fix the problem. I am curious as to how mr Toyota solves this issue with the standard ECU.

As for the fuel table I did tune it to get maximum vacuum (23Kpa) at idle.
My own stepper doesn't work with closed loop because steps get missed relatively quickly and as a result the closed loop algorithm hits the stops and loses control since it thinks the stepper is closed when physically it isn't.
This is reassuring to some extent as it could very well be that my own stepper can't work with CL control, again it would be cool if I knew how toyota control the stepper on a 1kr-fe engine.
#41074
Xortex wrote: Sat Feb 22, 2020 2:44 pm This is reassuring to some extent as it could very well be that my own stepper can't work with CL control, again it would be cool if I knew how toyota control the stepper on a 1kr-fe engine.
My guess is that a couple of things are in play; they probably match the stepper motor control electronics to the stepper motor better than we do. I don't know about you but I'm using a cheap-as-chips chinese stepper controller and I know that isn't what's in my original Lucas 14CUX ECU. And I suspect they have a software strategy for managing lost steps. Speeduino has no strategy for that at all at the moment.

In my own installation I have a stepper reset button on my touch screen at the moment, so that I can do a reset if it seems like it is needed, and I only run open loop. This sends a reset command via serial 3. I keep meaning to try a different stepper motor to see if mine is just worn out, but the weather has been terrible here for weeks so I have not got around to it yet.
#41076
This sends a reset command via serial 3. I keep meaning to try a different stepper motor to see if mine is just worn out, but the weather has been terrible here for weeks so I have not got around to it yet.
Do you know if there is a thread/guide on how to use the secondary serial interface? I need to try and implement something myself, where the AC switch or headlamp relay would send a signal to the speeduino and cause the idle to go up. I am already using the idle up pin for the radiator fan.
#41077
Xortex wrote: Sat Feb 22, 2020 3:03 pm
This sends a reset command via serial 3. I keep meaning to try a different stepper motor to see if mine is just worn out, but the weather has been terrible here for weeks so I have not got around to it yet.
Do you know if there is a thread/guide on how to use the secondary serial interface? I need to try and implement something myself, where the AC switch or headlamp relay would send a signal to the speeduino and cause the idle to go up. I am already using the idle up pin for the radiator fan.
The wiki has details on how to use it. However, that interface is data request only. I am running some custom firmware that does the additional stuff.
#41079
The wiki has details on how to use it. However, that interface is data request only. I am running some custom firmware that does the additional stuff.
Does your screen use an additional arduino to handle the serial communication? The wiki says that the speeduino would send an "R" followed by the CAN address that can be ignored. The data source should then send a "G", followed by a "1" and then the CAN channel. The part which I did not understand was:

Then send 8 bytes of data. The Data you wish to send is placed in bytes 0 and 1 (LSB and MSB respectively)if it is two bytes long or in byte 0 if it is only a single byte long .

Do you mind sharing the part of the code that handles the serial communication, that is if you are using a secondary arduino to do this?

Thanks.
#41085
Xortex wrote: Sat Feb 22, 2020 4:12 pm
The wiki has details on how to use it. However, that interface is data request only. I am running some custom firmware that does the additional stuff.
Does your screen use an additional arduino to handle the serial communication? The wiki says that the speeduino would send an "R" followed by the CAN address that can be ignored. The data source should then send a "G", followed by a "1" and then the CAN channel. The part which I did not understand was:

Then send 8 bytes of data. The Data you wish to send is placed in bytes 0 and 1 (LSB and MSB respectively)if it is two bytes long or in byte 0 if it is only a single byte long .

Do you mind sharing the part of the code that handles the serial communication, that is if you are using a secondary arduino to do this?

Thanks.
I'm not using an Arduino I'm using a Raspberry PI but without Linux.

The text you're looking at in the Wiki I believe is related to passing data back to speeduino in order for it to be displayed in Tunerstudio. Speeduino doesn't actually provide any means to issue commands to tell it to do things over either serial3 or CAN which is why my firmware is custom. In my case I just added a new serial command letter in cancomms.ino. I know this won't make it into the master I'll have to maintain it myself which is why it is only a temporary solution until I address the underlying stepper issue.

If you do add a serial command you must be careful to limit the processing to something very small as the engine can't be run at the same time as serial 3 processing.

As far as the bit you didn't understand is concerned, it kinda looks like you should read it literally. i.e. send your value either 1 or two bytes and then pad it out with either 7 or 6 bytes respectively. However the code (cancomms.ino, case 'G') actually uses some data from configpage9 to decide which bytes hold the values, and this looks like it is the "External Auxiliary Input Channel Configuration" dialog. In there you can see it is possible to define the data items, their source, and the start byte and length within the 8 byte section being mentioned. They probably default to 0 position which is why the text says what it does, but I haven't used it so I don't really know.

I'm afraid I have no idea what the difference between External and the related Local Auxiliary input Channel configuration is. To my mind this part of speeduino lacks decent descriptions about what it is for and how to use it, and is a bit of a mystery to me.
#41087
First up there are a few code examples on my GitHub may help get you started , there should be a link in the wiki ( my GitHub is autohome2)

Second I do agree the info in the wiki has some bits missing, it's something I am looking at while adding the new teensy can use info.

There is no real difference between the local and external configs , infact the two pages are linked together, but each page has more specific options according to if it is a local or external io.
#41093
I'll have a look a the repository and try to come up with something myself. I suppose I can add my own letter like ric355 did.

I also noticed that when the idle up pin is activated, the idle does go up but it never goes down completely, so the stepper must be losing steps when reversing. Everytime the fan goes on, the rpm crepps up a little to the point where the DFCO is activated.

It could be that the DRV8825 I'm using is a cheap imitation and is causing me the issues.

Hi, I am trying to assign Signed values to the x-a[…]

Vr Conditioner Noise when cranking

New version 202305 don't fix the issue. Now after[…]

blitzbox

I've finally figured out why MAP and Lambda weren'[…]

Hello, I bring news!! Let me tell you that after […]

Still can't find what you're looking for?