BMW M52Bxx engine PnP board, first startup...

Hardware inside and outside of the ECU
Post Reply
User avatar
Snake____1
Posts: 37
Joined: Sun Sep 04, 2016 6:05 pm
Location: Norway

BMW M52Bxx engine PnP board, first startup...

Post by Snake____1 »

Hello,

I'm trying to get my first startup with the M52Bxx board I made earlier.

Attached are the .MSQ and a log of me trying to start the engine. It almost fires, but then trembles and fails.

I've currently wired each injector and ignition coil:
Cyl1 -> IGN1\INJ1
Cyl2 -> IGN2\INJ2
Cyl3 -> IGN3\INJ3
Cyl4 -> IGN4\INJ4
Cyl5 -> IGN5\INJ5
Cyl6 -> IGN6\INJ6

Currently in MAF mode for ease of integration, will later go over to MAP\SpeedDensity.

Trigger is the bosch 60\2 on the crank, only using this at the moment as there is an error in my CAM hardware. Trigger angle is set up so it's spot on at 0deg.

Injection is where I'm currently questioning my abilities, is this supposed to be at -180 deg?

Below is the schematics used for the current "modules"...

I'm new to the rusEFI console, but I added some snapshots of the Sensor\Engine Sniffer...
If anyone has any suggestions, I'm open to them! :)


Trigger:
Trigger circuit
Trigger circuit
Trigger Module.png (14.34 KiB) Viewed 11986 times
Injection:
Injection Driving circuit
Injection Driving circuit
Injector Driving.png (10.09 KiB) Viewed 11986 times
Ignition:
Ignition Driving circuit
Ignition Driving circuit
Ignition Driver.png (8.39 KiB) Viewed 11986 times
Sensor Sniffer:
2017-04-14_22_42rpm_216_sensor.png
2017-04-14_22_42rpm_216_sensor.png (9.1 KiB) Viewed 11980 times
Engine Sniffer:
2017-04-14_22_42rpm_215_maf_NaN.png
2017-04-14_22_42rpm_215_maf_NaN.png (37.3 KiB) Viewed 11980 times
2017-04-13_12_54rpm_235_maf_NaN.png
2017-04-13_12_54rpm_235_maf_NaN.png (33.57 KiB) Viewed 11980 times
Attachments
2017-04-14_20.05.48.msl
Datalog of me trying to start the engine
(131.38 KiB) Downloaded 744 times

[The extension msq has been deactivated and can no longer be displayed.]

Last edited by Snake____1 on Sun Apr 16, 2017 1:44 pm, edited 1 time in total.
(X) BMW E36 318i M50B50 Turbo (MegaSquirt (KdFI v1.3))
(X) BMW E36 325tds M70B50 (ViPEC V88)
(X) BMW E36 328i M52B28 Turbo (rusEFI PnP @me)
(✓) BMW E36 320i M70B50 (rusEFI project car)
(✓) BMW E46 325Xi M57D30 (daily)
User avatar
kb1gtt
contributor
contributor
Posts: 3730
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: M52Bxx board, having startup issues...

Post by kb1gtt »

For @, keep an eye on sync issues. This should work, but I can see potential areas of concern with different frequencies and such. I have not studied it very much, so it might be OK, but it might also have some issues which would result in sync issues. So keep an eye on sync issues in the logs and such.

For @, what is D1 about? The opto already has a diode, so I'm not following the need for D1.
Welcome to the friendlier side of internet crazy :)
User avatar
AndreyB
Site Admin
Posts: 13029
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: BMW M52Bxx engine PnP board, having startup issues...

Post by AndreyB »

Very little info but I will try to piece all this together :) Sounds like a continuation of http://rusefi.com/forum/viewtopic.php?f=3&t=1099 right?

Can we please see a pictore of assembled board we at least deserve that! :)

Both TunerStudio and rusEfi console have bench testing buttons. Have you bench tested injectors and coils - do you hear injector clicking, do you see spark fire?

Do you have oem or else ECU to pre-warm your engine prior to first start?

Engine sniffer pictures look pretty optimistic, there are pulses scheduled so looks like there is sync.

Trigger offset if probabably at least part of your problem - do you know the angular position of the skipped tooth in relation to TDC? Do you have a timing gun to confirm timing while disabling injection?

A video could also help since sometimes having audio gives a lot of info.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 13029
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: BMW M52Bxx engine PnP board, having startup issues...

Post by AndreyB »

Cranking fuel 53ms is larger than anything I've seen - but I have not seen much and usually simultaneous injection is used during cranking.

Your injection modes look weird - sequential for cranking and simultaneous for running, usually it's the other way around. Also since you do not have cam sensor I believe sequential is not suitable for your - your options are simultaneous or batched.
Attachments
screenshot.png
screenshot.png (161.44 KiB) Viewed 11961 times
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
Snake____1
Posts: 37
Joined: Sun Sep 04, 2016 6:05 pm
Location: Norway

Re: BMW M52Bxx engine PnP board, having startup issues...

Post by Snake____1 »

@kb1gtt, D1 is used both as a protection and as an additional 0.7v voltage drop. As the Hall sensor of the M52 works at +12v :)

@russian, indeed it is. Finally have some time at hand to continue the project! :geek: Also had some time to implement KiCad to my designs, so once I'm finished and have a nice and working design I'll get them uploaded here :P

Tested all outputs, everything was working ok hardware wise...

But I have to say, Oooops! You were completely right on the fuelling, 53ms... Stupid of me to not notice this, I lowered this all the way to 1.8ms :o And what do you know, It's alive! :mrgreen:

I will upload some pictures once I get home again! ;)

Timing gun is confirmed so ignition is spot on at 324deg.

You are completely right on the injection modes, supposed to be simultaneous on both...

To much fuel probably! :roll: :mrgreen:
IMAG0130.jpg
IMAG0130.jpg (1.09 MiB) Viewed 11920 times
(X) BMW E36 318i M50B50 Turbo (MegaSquirt (KdFI v1.3))
(X) BMW E36 325tds M70B50 (ViPEC V88)
(X) BMW E36 328i M52B28 Turbo (rusEFI PnP @me)
(✓) BMW E36 320i M70B50 (rusEFI project car)
(✓) BMW E46 325Xi M57D30 (daily)
User avatar
AndreyB
Site Admin
Posts: 13029
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: BMW M52Bxx engine PnP board, having startup issues...

Post by AndreyB »

Snake____1 wrote:It's alive!
Well, now we need even more pictures and a video would be great!
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
Snake____1
Posts: 37
Joined: Sun Sep 04, 2016 6:05 pm
Location: Norway

Re: BMW M52Bxx engine PnP board, first startup...

Post by Snake____1 »

I went over to the preveously planned MAX9926, but I'm having sync errors at 3.500rpm+ is it the layout maybe? I'll upload the schematics in a bit...

Short video of error symptoms. Also, is there a way of telling the rusEFI to start at 38% idle after tps event or recovery? At the end of the video you see it jumping up to 50%...

[video][/video]
rusEFI :)
rusEFI :)
IMAG0136.jpg (983.19 KiB) Viewed 11895 times
Budge wires up the wahoo!
Budge wires up the wahoo!
IMAG0135.jpg (1.24 MiB) Viewed 11895 times
Currently running
Currently running
IMAG0137.jpg (1.22 MiB) Viewed 11895 times
Current trigger schematic
Current trigger schematic
MAX9926.png (60.44 KiB) Viewed 11892 times
Last edited by Snake____1 on Mon Apr 17, 2017 3:04 pm, edited 1 time in total.
(X) BMW E36 318i M50B50 Turbo (MegaSquirt (KdFI v1.3))
(X) BMW E36 325tds M70B50 (ViPEC V88)
(X) BMW E36 328i M52B28 Turbo (rusEFI PnP @me)
(✓) BMW E36 320i M70B50 (rusEFI project car)
(✓) BMW E46 325Xi M57D30 (daily)
User avatar
AndreyB
Site Admin
Posts: 13029
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: BMW M52Bxx engine PnP board, first startup...

Post by AndreyB »

Thank you for the video! Welcome engine #35!

Extremely limited telepathic abilities :( Please post a log file.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
Snake____1
Posts: 37
Joined: Sun Sep 04, 2016 6:05 pm
Location: Norway

Re: BMW M52Bxx engine PnP board, first startup...

Post by Snake____1 »

russian wrote:Extremely limited telepathic abilities :( Please post a log file.
Haha! So true, sorry for that! :mrgreen:

I started a new log, and added current tune. :D

At startup engine Idle position is ~53%, then slowly corrects itself. Also revving past 3350rpm gives trigger error, it does so if I select rising or falling edge of trigger PA5...
Attachments
2017-04-17_17.08.01.msl
Log from startup to IDLE
(264 KiB) Downloaded 734 times

[The extension msq has been deactivated and can no longer be displayed.]

(X) BMW E36 318i M50B50 Turbo (MegaSquirt (KdFI v1.3))
(X) BMW E36 325tds M70B50 (ViPEC V88)
(X) BMW E36 328i M52B28 Turbo (rusEFI PnP @me)
(✓) BMW E36 320i M70B50 (rusEFI project car)
(✓) BMW E46 325Xi M57D30 (daily)
User avatar
AndreyB
Site Admin
Posts: 13029
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: BMW M52Bxx engine PnP board, first startup...

Post by AndreyB »

Let's focus on trigger since that's probably more important, also idle needs https://github.com/rusefi/rusefi/issues/4

This one should be easy to address

Code: Select all

	/**
	 * This error happens if some pinout configuration changes were applied but ECU was not reset afterwards.
	 */
	CUSTOM_OBD_ANALOG_INPUT_NOT_CONFIGURED = 6038,
Other than that, you have a very nice log and CUSTOM_SYNC_ERROR = 6036 is shockingly persistent always at exactly same RPM. Do you have a logic analyzer to record MAX output? Cheap ones on eBay start at $10.

Just in case do you want to try 'release' version of the firmware? If rusEfi performance would be an issue I would expect 'release' version of the binary to work better. Another option is to run rusEfi with externally generated simulated signal (maybe another rusEfi piece just for signal generation)

Between these tests we would pin point the problem at either MAX or rusEfi firmware.

Well, technically we have at least two other cars with 60/2 trigger without this issue so it's probably not the firmware.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
kb1gtt
contributor
contributor
Posts: 3730
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: BMW M52Bxx engine PnP board, first startup...

Post by kb1gtt »

I'm also flying blind right now. It could be a coupling issue, or it might be some other issue. I believe this is hall, is that correct? Hall is generally less susceptible to noise issues. How is your GND for the hall done? If it shares the ECU GND's the combined currents might cause the voltage to rise and cause a failed trigger.

A scope picture or at least digital capture would likely help.
Welcome to the friendlier side of internet crazy :)
User avatar
Dron_Gus
contributor
contributor
Posts: 339
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: BMW M52Bxx engine PnP board, first startup...

Post by Dron_Gus »

Snake____1 wrote:
MAX9926.png
Are you really have 'IN1-' connected to C8 only? No pull to BIAS1?
User avatar
AndreyB
Site Admin
Posts: 13029
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: BMW M52Bxx engine PnP board, first startup...

Post by AndreyB »

kb1gtt wrote:I believe this is hall, is that correct?
60/2 on the crank, I bet it's a VR.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 13029
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: BMW M52Bxx engine PnP board, first startup...

Post by AndreyB »

Dron_Gus wrote: Are you really have 'IN1-' connected to C8 only? No pull to BIAS1?
For Hall I believe we usually leave IN1- floating?
For VR I believe we ususally GND IN1-?

Not sure if we are looking at Hall or VR. Does R23 pull-up confirm Hall?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
kb1gtt
contributor
contributor
Posts: 3730
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: BMW M52Bxx engine PnP board, first startup...

Post by kb1gtt »

Looks like Crank is Hall and CAM is VR.

Yes for hall you leave one lead floating, which will float to about 2.5V. When ever the hall passes this floating voltage, it will change the output status.

The VR IN1 to GND thing is vehicle specific. Usually you are best off not connecting to GND, but that depends on the vehicle wiring. So far certain Miata's have had less noise on the VR wires with a wire connecting to GND.
Last edited by kb1gtt on Mon Apr 17, 2017 9:11 pm, edited 1 time in total.
Welcome to the friendlier side of internet crazy :)
User avatar
Dron_Gus
contributor
contributor
Posts: 339
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: BMW M52Bxx engine PnP board, first startup...

Post by Dron_Gus »

I think C8 should be removed. Because with C8 it is phase shifter. https://www.circuitlab.com/circuit/e5r287/phase-shift-delay/
User avatar
AndreyB
Site Admin
Posts: 13029
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: BMW M52Bxx engine PnP board, first startup...

Post by AndreyB »

I believe only crank used so let's ignore cam?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
Snake____1
Posts: 37
Joined: Sun Sep 04, 2016 6:05 pm
Location: Norway

Re: BMW M52Bxx engine PnP board, first startup...

Post by Snake____1 »

@Dron_Gus, I'm currently at Crank sensor only. And this is a Hall sensor, Cam is going to be VR. Why should i pull C8 to BIAS1? I'm using hall, so VR- needs to be floating at 2.5v.

@russian, I'll try to get some good captures up. I have both logic analyser and a cheap DSO.

@kb1gtt, using seperate GND point from power and mcu/sensors. So hall sensor shares the mcu ground, but not inj/ign.

Thanks for all the help so far guys! At least she's purring nicely at low rpms :)
At engine cutoff ~3500rpm "to high frequency for the dso probably" See other picture at .2ms
At engine cutoff ~3500rpm "to high frequency for the dso probably" See other picture at .2ms
IMG_005.BMP (37.62 KiB) Viewed 11871 times
Idle'ish at 1200rpm
Idle'ish at 1200rpm
IMG_004.BMP (37.62 KiB) Viewed 11871 times
At engine cutoff ~3500rpm
At engine cutoff ~3500rpm
IMG_003.BMP (37.62 KiB) Viewed 11871 times
(X) BMW E36 318i M50B50 Turbo (MegaSquirt (KdFI v1.3))
(X) BMW E36 325tds M70B50 (ViPEC V88)
(X) BMW E36 328i M52B28 Turbo (rusEFI PnP @me)
(✓) BMW E36 320i M70B50 (rusEFI project car)
(✓) BMW E46 325Xi M57D30 (daily)
User avatar
kb1gtt
contributor
contributor
Posts: 3730
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: BMW M52Bxx engine PnP board, first startup...

Post by kb1gtt »

Ooops, in my prior post I flipped CAM and Crank. I just corrected that.

Can you keep doing a single scan capture until you capture the skipped tooth. If you do it enough you'll catch one I'm sure. Also it looks like your zoomed in. Each capture appears to have much more data if you move your currser left to right. You might find you have captured a skipped tooth, but it was simply not in the view-able window.

Also is this a battery powered scope, or does it have a mains voltage ground? Also where exactly are you connecting your probe? Both gnd strap and poky end of scope probe. Pictures work great for showing where and how it's connected :)

Looks like you could stand some tuning to get that hall a bit more square. You could probably change your cap to do that. Perhaps try removing the C8 cap. The C8 cap may be pushing and pulling the 2.5V reference away from 2.5V.

14V / 1k = 14mA. This is likely a bit high for hall sensors. They commonly range from 2mA to 20mA, so your in the correct range, but perhaps try lower mA. It's possible that it's saturating the sensors and then getting mangled.
Welcome to the friendlier side of internet crazy :)
User avatar
AndreyB
Site Admin
Posts: 13029
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: BMW M52Bxx engine PnP board, first startup...

Post by AndreyB »

How about logic analyzer capture file?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
Dron_Gus
contributor
contributor
Posts: 339
Joined: Wed Nov 13, 2013 1:11 pm
Location: S-Pb
Github Username: dron0gus

Re: BMW M52Bxx engine PnP board, first startup...

Post by Dron_Gus »

Snake____1 wrote:@Dron_Gus, I'm currently at Crank sensor only. And this is a Hall sensor, Cam is going to be VR. Why should i pull C8 to BIAS1? I'm using hall, so VR- needs to be floating at 2.5v.
Because through C8 you are inputing same signal to IN-. :)
I think C8 here is from VR input filter, where both input (In+ and In-) were driven by VR sensor.
User avatar
AndreyB
Site Admin
Posts: 13029
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: BMW M52Bxx engine PnP board, first startup...

Post by AndreyB »

Snake____1 wrote:currently at Crank sensor only. And this is a Hall sensor, Cam is going to be VR.
Learned something new today - usually it's the other way around.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
Snake____1
Posts: 37
Joined: Sun Sep 04, 2016 6:05 pm
Location: Norway

Re: BMW M52Bxx engine PnP board, first startup...

Post by Snake____1 »

russian wrote:Learned something new today - usually it's the other way around.
As did I, flashed the newest firmware and guess what? No trigger errors... No issues at all :D Time to get the car bench tested this weekend! :roll:

I must say, WOW! Keep up the good work on the firmware! I see alot of new features. 8-) Missing a base setting for IDLE position tho' :roll: Stays at 60% before startup, and then slowly creeps down to about 33% at 850rpm.

Regarding the analyser file, this screwed up the trigger output. Maybe the dupoint leads capture too much noise :? But everything is fine now :lol:

@Dron_Gus, you are on to something there. I will leave this out in my final design! :geek:

@kb1gtt, measured directly on the brainboard, clamp on the GND pin beside +5v and the poky bit on PA5. But no worries now :)

Regarding sensor inputs:
BMW M52 sensors
BMW M52 sensors
Sensors.png (33.32 KiB) Viewed 11816 times
(X) BMW E36 318i M50B50 Turbo (MegaSquirt (KdFI v1.3))
(X) BMW E36 325tds M70B50 (ViPEC V88)
(X) BMW E36 328i M52B28 Turbo (rusEFI PnP @me)
(✓) BMW E36 320i M70B50 (rusEFI project car)
(✓) BMW E46 325Xi M57D30 (daily)
Post Reply