For anything you'd like to see added to Speeduino
By Trevor Getty
#51039
Hi mike.
I have just got the code to compile from RoverMEMS branch, but I needed to fork your code and make some quick fixes.
Your most recent merge had accidentally left some merge conflict markers in the actual file.

I have raised a Pull Request to your GitHub fork, so you can just merge these fixes back into your main branch if you wish.
https://github.com/mike501/speeduino/pull/1

So now I have got the code compiled - I do see a warning about the amount of RAM left for local variables.
Code: Select all
Sketch uses 177102 bytes (69%) of program storage space. Maximum is 253952 bytes.
Global variables use 7895 bytes (96%) of dynamic memory, leaving 297 bytes for local variables. Maximum is 8192 bytes.
Low memory available, stability problems may occur.
- is this a concern, and if so should I turn my optimization back from the recommended -O3 to -O2 or something?
I am not sure if 297 bytes is enough to run normally, or if I should have a slightly smaller package that runs slightly slower?

I had followed the recommended steps which said this;
There is an option available for changing the compiler optimization level, which can improve . By default, the IDE uses the -Os compile option, which focuses on producing small binaries.
As the size of the Speeduino code is not an issue but speed is a consideration, changing this to -O3 produces better results (Approximately 20% faster, with a 40% larger sketch size)
By miker
#51040
Will look at the merge conflicts in the next few days.

The memory warning is fine, 90% of the variables are global for performance (normal in embedded systems). Keep the optimisation for performance.
By Trevor Getty
#51043
Thanks for assistance - the project compiled just fine, and loaded firmware onto ecu and into TS.
Ive selected the new trigger options for RoverMEMS-36 crank, and the 5-3-2 cam for testing.

I didn't ask whether the primary and secondary trigger edge should be rising or falling, but I guess I will try and see what responds best.

I will mark my crankshaft with a 10 BTDC and TDC, so that I can remove any ignition advance temporarily from TS, and check to see if it aligns while cranking, then again when idling - although i am not fitting an IACV initially.
I wish to setup a good idle and fueling before adding the IAC to the mix.

If all checks out then I can allow a fixed ignition offset to 10degrees and see if it aligns again, if it does I can then turn on the crank angle adjustment, and similar items.

I will only move onto AFR checks and fueling once I check the ignition is firing at the correct time.

Fingers crossed ...

- I am just finishing some tweaks to the engine loom, as I have changed over to using an external analogue WB controller output (innovate PSB-1). So some slight rewiring to use it instead of my current narrow band sensor which was wired into the standard harness.

If there is any additional setup steps or, checks I should make when starting it up for the first time, please let me know.
Thanks, t.
By Trevor Getty
#51307
Hi mike good and bad news.
so new vr now has crank and cam showing in composite logger see attached pics and logger output.
now for some reason it logs and saves fine but i can not reopen without failure , see attached pic.

finally i am getting wasted spark fine but no inj due to high sync loss i think.

i have taken some more scoped logs when cranking to assist the logs and timings.

another note composite logger shows perfectly but tooth logger shows nothing.
could u check if its related to the fork code or am i not doing something .

included is full rar of TS project with tune and logs.

I

thanks. trev
Attachments
composite logging.png
composite logging.png (122.28 KiB) Viewed 5581 times
(1.63 MiB) Downloaded 351 times
error_opening_logs.png
error_opening_logs.png (126.75 KiB) Viewed 5581 times
crank_and_cam_snc_spark_1_rising_cam_crank.png
crank_and_cam_snc_spark_1_rising_cam_crank.png (112.62 KiB) Viewed 5581 times
By miker
#51312
Will look later, until then done standard questions,

when cranking generating the logs did you have the spark plugs out?

Are the cables shielded cables?

Are they grounded only at the speeduino end?
By theonewithin
#51322
What does a tooth log look like?

VR conditioner settings correct? (see wiki as conditioners need the triggering edge to be correct)
By miker
#51330
Without things connected run hardware test and check lights light up. (With connected you risk injectors filling your cylinders with fuel)
By Trevor Getty
#51340
Regarding posts above:
Without things connected run hardware test and check lights light up. (With connected you risk injectors filling your cylinders with fuel)
I have done this and the injectors turn on fine - leds fire and I can see output no probs.
Code: Select all
Will look later, until then done standard questions,
when cranking generating the logs did you have the spark plugs out?
Are the cables shielded cables?
Are they grounded only at the speeduino end?
Shielded cables, and the signals in the waveforms attached are actually very clean and show little noise.
Grounding on the shielding is to the cam/crank shielding cable
VR + and VR- connected to the + and - on the VR conditioner for cam and crank, which shows correctly in as pulses in the composite logger, although I never see gaps of more than 1, so for 2 tooth gap i expect to see 2 on top of each other?

When connected I thought we needed the sync between cam / crank to be able to use sequential fire on injectors - which is what mode my injectors are in. The Spark is wasted - so it doesn't mind not being in sync, as it can be 360 out and still work. ( correct me if I am wrong, maybe if I used paired mode it might fire the injectors, but in pairs, which might just run, but not be fully correct ).

I think I followed the wiki recommendations, and my settings are:
MAX based VR conditioner using DSC which are non inverted so should be using Rising Edge trigger, that is what I set for cam and crank signals.
This shows up correctly in the composite logger, as the 3 waveforms above.

My thoughts are, that the high sync loss, means it doesn't quite know where the cam is in relation to the crank and its why sequential isn't working, I could even try sequential ignition and it might also suffer the same.
It might also explain why the logs show no injector dwell time and nothing for injector status as on/off.

Note.( the sync loss counter is very high and I am only cranking for a short time ( like 40+ count ).

I have a feeling this may be related to the decoding timer - and it not seeing the cam sync patterns correctly, the crank seems to have 16 or 17 pulses correctly in the composite logger, but I cannot see the expected 5/3/2 cam signals.

The picture attached (from my scope), does show that the cam pattern (5 tooth) log where its a lower middle tooth as its coming up on compression and the flywheel is turning slower - seen by smaller amplitude, I am not sure if this affecting it overal - I can't read the log output as well as some of you guys.
By Trevor Getty
#51341
Does anyone have any thoughts on the error stopping my loading the log back into TS once it captures to file?
Error states -
"Error reading trigger Log File, could not understand header rows".

I attached picture in my post with attachments above., the logs do show correctly in TS while saving, but not if I try to load them to view afterwards.
By Trevor Getty
#51343
Quick PS note.
I have looked at my scope picture, and I am going to make sure the VR+ and VR- aren't mixed up.

I see that as the VR approaches voltage should increase and as it leaves it should decrease - we see this for the crank signal.
On cam it seems inverted - going down then up per tooth logger - so I will quickly confirm which is going into speedy.

I am saying this as there is only 2.5 peaks in the cam signal, in the section of 3 teeth but there is 3 lower troughs which are the 3 teeth.

I will double check my wiring on the scope and speedy to make sure both are in agreement and correct now if necessary.

But can you guys look right in the middle of this picture, the blue line is the cam signal, which is showing from the left.
Its shows -> 3 gap 2 gap gap 5 gap gap ( cycles around 3 gap .... )

right in the middle of the 5 tooth sequence there is what I would call a weird smaller amplitude section.
We know the crank and flywheel are turning slower as the pulses above in the matching crank signal are getting much smaller, and as its turning faster they are at least still visible, but is the middle one is quite small - is it still being recognised as a valid tooth in the cam tooth decoder?

I suppose the tooth logger might tell us more, so hopefully a step above, or one of my questions, will help get a full picture of what is happening..

Anything else I can do please let me know. thanks - trev.
  • 1
  • 5
  • 6
  • 7
  • 8
  • 9
  • 12

you could set 'skip revolutions' to 3, then it wou[…]

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

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?