For anything you'd like to see added to Speeduino
By Jama
#47573
CCS wrote: Wed Jan 13, 2021 10:03 pm Sorry I've been Ill with covid for a while now, before that day work along with other family members projects have kept me out of the garage. The cold air just wrecks my lungs, sucks.

I'm going to slap on some new bosch CoPs & find someone with a rolling road; or buy one. Got a new garage away from home that has three phase so I should be able to pickup an uncoverted rolling road for cheap.

Hooking up this ME100, going to log the output and spit out a graph for comparison.
Oh man, I hope you are feeling better.
I've known a few people knocked back by it.

I've created a second ardustim definition with no VVT on which I can share if you like.

I wired my speedysim into my ME221 and played back both patterns.
It showed -12 degrees and 50 degress.
So the patterns aren't perfect but do work.

I briefly hacked up the 4-1 decoder to a point where it would sync up with the ST170 pattern and read the angle but it was worlds out.

If you are happy to share what you have done so far drop me a message and I can run it up on my bench, I've currently got A speedysim running both the Speeduino and ME221.

Also that'd be real nice if you get a Dyno.
That's something on my long term radar if I move into the countryside.
By miker
#47587
If you go to git i've updated the ST170 pattern. It had an issue and was under reporting the rpm by about 5/6ths. Their is a pull request for it which you'll need to pull. I've also documented the issue and described the fix (its changing 1 value) if you don't want to get into the world of git.

I don't tend to spend much time (any) on here, but do hang out on slack if you want to ask any questions. I've spent the last few months looking at trigger patterns so may be able to offer advice if you're just getting started).
User avatar
By gruhalski
#47591
CCS wrote: Wed Jan 13, 2021 10:03 pm Sorry I've been Ill with covid for a while now, before that day work along with other family members projects have kept me out of the garage. The cold air just wrecks my lungs, sucks.

I'm going to slap on some new bosch CoPs & find someone with a rolling road; or buy one. Got a new garage away from home that has three phase so I should be able to pickup an uncoverted rolling road for cheap.

Hooking up this ME100, going to log the output and spit out a graph for comparison.
I'm sorry to hear that man, but I'm also glad you're recovering! Fingers crossed!

Let me know how I can help, as I mentioned in my previous post, I have ST170 running in my Sierra, so does James in his Capri. I'm open to provide any logs and do tests, rubber-duck debugging - anything that's needed.
User avatar
By gruhalski
#48079
Hi everyone,

I watched YT video about decoders by Josh, took a glance at the code and it turned out that my limited Python experience seems to be sufficient to develop new decoder, that code is really clean and well commented - big kudos to Josh and all the people who contributed in development.
I attaching the code I came up with, this is basically a missing tooth decoder with hard-coded values and sequential parts removed, it's also looking for a third cam tooth when certain amount of crank teeth has passed. Is there anyone willing to review the code and possibly test it out using Ardustim? I'm also open to jump on a call and have a live review/debugging session.
https://drive.google.com/file/d/1jhzcbw ... sp=sharing
By miker
#48080
Most of the people found actual development hang out on the slack messaging platform. It would be worth you joining.

To get this to work you'll need to modify init.ino (file name is from memory, hopefully got it right) to add in the calls. The system works be having default calls that you replace with different decoders. The core system can then always call a default routine that ends up with your code in the background. As the st170 is the same as 36-1 for primary you can reuse the existing missing tooth code for everything except secondary, hence that should be the only code you need to write.

To allow your device to be selected you need to modify speeduino.ini located in a different directory to the code. Look up 420a (another decoder) to get an idea of where things need modifying.

I've modified ardustim so it worked correctly (original st170 crank speed was out by a large margin). You'll struggle to get someone to test your code on ardustim as we're usually all busy writing out own, investing in a second Arduino mega2650 or an Uno is definitely worth while.
User avatar
By gruhalski
#48111
Thenk you @miker for your input.

I modified decoders.h, init.ino and speeduino.ini, package below:
https://drive.google.com/file/d/11MGQZL ... sp=sharing
Trigger angle should be set to 285, both edges set to FALLING, cam angle @ 0% duty for VVT control = 330 EDIT: this should be 240
I also created a spreadsheet with all crank teeth#s, angles and secondary teeth, at both full retarded and advanced.
https://drive.google.com/file/d/15Hc7WN ... sp=sharing
Hope that helps...
Last edited by gruhalski on Sun Feb 07, 2021 3:58 pm, edited 1 time in total.
By Jama
#48119
Hey,

I tried this on the bench, albeit with a few changes, I need 90 degree trigger angle and rising for the setup in my car due to the DSC.
On the bench with the patterns I created I see 3 degrees with now VVT and 42 degrees with full VVT.
This differs from the ME221.

For the fun of it I went and loaded it onto my car, it did not do what was expected and the angle pretty much stayed at 3-4 degrees and the duty cycle never seemed to rise.
I did capture a log and have attached it.

Part was through I switch to open loop VVT and flick between 0-100% duty cycle to check the output it working, it was as the engine behavior changed and also the ME221 showed about 50deg cam advance.

Tune and log attached, I had to append .txt to the log file to allow the upload.
Attachments
(381.61 KiB) Downloaded 229 times
(72.6 KiB) Downloaded 223 times
User avatar
By gruhalski
#48121
Hey James,

this might be because the difference where rising/falling edge occurs. I've been looking for a FALLING edge in the logs, 3rd cam tooth should occur between 26th and 33rd (fully advanced to fully retarded). RISING edge on the other hand can occur between 23rd and 30th, though. My code is actually looking for a 3rd cam tooth only when 24 teeth have passed on a crank. So if you want to set it for RISING edge you might want to change following condition in decoders.ino:
Code: Select all
if( (configPage6.vvtEnabled > 0) && (toothCurrentCount > 24) && ((secondaryToothCount == 3) || (revolutionOne == 1)) )
To something like this:
Code: Select all
if( (configPage6.vvtEnabled > 0) && (toothCurrentCount > 21) && ((secondaryToothCount == 3) || (revolutionOne == 1)) )
We might want to add a condition based on the values in the config page. It'd probably be a good idea to parametrize this value depending on last VVT angle... :roll:

Could you please, also bench test it with the parameters I provided above? (both edges FALLING, trigger angle = 285 and cam angle @ 0% duty = 240)

I would expect VVT angle to get negative when advanced, and I think our target values should be negative as well.

I can't see any VVT values in your log, apart from VVT duty, so no target and no readout, am I missing something?

EDIT:
BTW I'd need some assistance installing Ardustim on Ubuntu. Is there anyone having such an experience?
By Jama
#48151
I made the change suggested, and all looked good on the bench (I didn't get any logs, I will tomorrow).
So I thought I'd try it on the car.

Even though I have full sync, the VVT angle remains at 0 the entire time, and consequently the closed loop duty cycle does as well, although the dial is actually showing it has a duty cycle.

Have a watch of my test here.
https://photos.app.goo.gl/MtD7gmiGtiDppH7h9

The ME221 happily sees the cam angle, and we can see it go from -10 to 50 degrees.

Why would you expect the VVT angle to go negative when advanced, I would expect positive, that's how the ME221 and others work.
User avatar
By gruhalski
#48255
Hello James,

this one works for me on a bench: https://drive.google.com/file/d/1y0mojc ... sp=sharing

Please remember to adjust the condition on line 3985 of decoders.ino to (toothCurrentCount > 21) if you're looking for a RISING edge. You might also want to play around with 'Cam advance @ 0% duty'. I reversed the cam angle BTW so it's going up when advanced and down when retarded back.

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?