(Bio)Diesel Powered

Your chance to introduce yourself and your vehicle
Noxz
Posts: 135
Joined: Wed Jun 27, 2018 2:40 am

Re: (Bio)Diesel Powered

Post by Noxz »

if I decrease the Time resolution you can see the spikes in the high pressure pump pressure because of when I check the check valve status..

with increased resolution the spikes are not visible, because the plunger/volume for the pump is so small (0.5cc) in comparison to the rail (~44cc?) the amount of time/stroke it actually takes to build up to the pressure is not long, but it was graphable..

you can also see the "leveling" off at the end of the stroke because it's sinusoidal/cam driven

blue is pump, orange is rail
Attachments
pressures.jpg
pressures.jpg (51.77 KiB) Viewed 22746 times
Noxz
Posts: 135
Joined: Wed Jun 27, 2018 2:40 am

Re: (Bio)Diesel Powered

Post by Noxz »

Took a moment to re-learn the microcode and get the upload via SPI to work again (due to array lengths that were not updated in the header file so not all of the code was being uploaded).

First time hooking it up and I got a nice PWM generated from the MC33816. Ran it again and no such pulses, only an ON signal. Once the solenoid heats up (takes under 30s at full power from a 12v PSU to go from 3+A to under 2.5A) it takes less power to turn on, so the microcode was getting stuck waiting for a peak-current which never happened. Tweaking the values for Peak (and Hold) a small amount (although there is a tool in the dev studio to figure out the values, I spent a good deal yesterday reading the datasheet to learn the equation myself as it relates to the injectors) and I was able to get a consistent Peak-Current detection even from a "Warm" state. Further tweaking necessary but a good building block.

What annoyed me a bit was when I was trying to trace through the differences of the code that worked and the not too different one I was pushing on.. the code that gets xfered is under a small cipher, and you can't turn off that.. feature. So I couldn't easily trace the differences because I was initially using a provided generated loading code that was already encrypted.. Now that I know the setup a bit better, and I have working code that I at least compiled myself, things are going smoother.

So beyond learning the microcode and getting it to build and run what was the gain?
No longer using an external uC to drive the PCV via PWM, with current feedback. Allows a small savings of power (~12 watts), but more so, detected that this valve does not appear to be linear/proportional, merely ON/OFF - and should only go OFF to drop pressure (not counting PWM "off" state which is simply current metering). And, as stated earlier, when the SCV is used appropriately, the PCV should not relieve excess pressure (because the overshoot will be minimum). There was a small metric given, such as while idle the return amount should be under 10cc - I need to re-read this if it is just from the PCV or the entire return line which includes fuel return from the injectors, that are used to cool those solenoids down.

Onto the SCV.. I may rig it up on one of the fuel injector banks (of the two), and just recode to not use Vboost, so I can keep the PCV settings, and leverage another sense resistor. I am still unsure how I will go about varying the PWM signal (hopefully it is a linear solenoid as I think it is) just yet, but I think it would be as "easy" as sending a SPI write to the location of the Data RAM of the new Hold-Current and Time-Off (no reason to blank the entire 128 word ram every time) - There may be additional commands to tell the driver to either reload, or that we are sending it data (enable flags or similar)

Yellow is High Side (VBatt) Gate, Blue is Low Side Gate
Attachments
DS1Z_QuickPrint37.png
DS1Z_QuickPrint37.png (45.33 KiB) Viewed 22740 times
Noxz
Posts: 135
Joined: Wed Jun 27, 2018 2:40 am

Re: (Bio)Diesel Powered

Post by Noxz »

Including a small chart regarding the change of resistance due to the heat of a solenoid..
Temp. (℃) 0 20 60 100 120
Resistance Ratio 0.9 1 1.2 1.3 1.4
Current Ratio 1.1 1 0.8 0.75 0.7

Because less power, there is also less magnetomotive force.. might look into this further down the road.

.. For safety, I would hope it would not get near 100 C, but without a temp sensor near any of it (the Denso HP3 states it has one, but not on this rebranded GM model), the ratio of 75% current (from ambient / 20 C) seems to be a decent rule of thumb to use.

Doing a quick test on the SCV went from the expected 4.0 A (@ 12v) down to 3.3A within the minute, and the solenoid was noticeably warmer to the touch, at which time I stopped.. Setting the Peak current for it to 3.0A seems like a decent starting point.

Also, now that I can build the code (and know the microcode better) I can completely omit the current check for peak, or better yet include a timer, etc.. Without datasheets it will require a bit of experimentation.. Denso documents talk about ECU learning of the SCV current for replacement pumps, looking into that more for any tips/tricks.. but makes sense that every pump and valve can't be perfectly identical.
Noxz
Posts: 135
Joined: Wed Jun 27, 2018 2:40 am

Re: (Bio)Diesel Powered

Post by Noxz »

More blogging of info..

Denso finally has part numbers for the '18 Cruze diesel..

Pump: DCRP301000
SCV: DCRS301990
Injectors: DCRI300050
Glow Plugs: DG-625

they may have made the radiator and windshield wipers as well :)

Part numbers dont equate to datasheets, but some info is better than none.. especially if needing a replacement

"DENSO does not sell OEM (Original Equipment Manufacturing) parts direct to the consumer. We cannot release any information regarding product specifications, quality assurance and after-sales service of OEM parts"

.. a black box it is!
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: (Bio)Diesel Powered

Post by kb1gtt »

Your notes are good, mostly for your long term memory. For me they are more cryptic, as I do not know the wiring setup and several small details. I read it to learn your progress. However I don't comment much as I don't see the full picture. It sounds like you have it under control.

About temperature sensor, could they be measuring the coil resistance to detect the temperature? AKA measure the amps and volts and you know the ohms. The ohms will vary with temperature.
Welcome to the friendlier side of internet crazy :)
Noxz
Posts: 135
Joined: Wed Jun 27, 2018 2:40 am

Re: (Bio)Diesel Powered

Post by Noxz »

I was able to rewrite one of the injector microcores to handle pulsing the SCV, even though triggered from a non injector input (configurable per core, but I goofed up for a few hours as the layout of the eval board is strange.. 5-6-4-3-2-1).. I did not include a peak current/time functionality because there is no need to quickly close the valve (well, unless over-pressure to a large degree, but even then the relieve valve will do it's job) because it is supposed to be linear/proportional.

But so far I haven't tweaked it enough to give, say, 50%.. but I know it is near.. Right now it is basically fully on (even w/ PWM) or not, when on then no pressure builds up in the common rail, so it works to that end, I just have to figure out the required values to get it to where I need. The variables I am working with are the current sense and time-off. Plenty more counters if I need them.

I could potentially just remove the SCV from the pump and visually see what PWM is needed.. I dont think any of the seals are one-time-use.. have a torque wrench to record what everything should be set at if I cant find that data online..

I may want a longer USB cord.. unplugging 6+ wires to move it over to the computer to program and xfer back over to test in the kitchen every time (and then back again..) is time consuming. I could convince myself to put the table closer to the computer, but that is just asking for trouble.. I could figure out an interface/breakout for the KL25Z (I bet one exists?) and just pop it in/out when programming/testing..
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: (Bio)Diesel Powered

Post by kb1gtt »

About USB, remember cables are only supposed to be like 3ft or 6ft long. After that you start to get elevated Bit Error Rates (BER), which can corrupt data.
Welcome to the friendlier side of internet crazy :)
Noxz
Posts: 135
Joined: Wed Jun 27, 2018 2:40 am

Re: (Bio)Diesel Powered

Post by Noxz »

kb1gtt wrote:
Mon Jan 07, 2019 3:05 am
About USB, remember cables are only supposed to be like 3ft or 6ft long. After that you start to get elevated Bit Error Rates (BER), which can corrupt data.
right, my longest cord is specialy made for my bicycle power meter head unit, to make it so you can easily get to the bike, about 8ft long.. but t he flowbench is a good 16ft or so away from the computer..

I've actually taken out the digital torque wrench and got an initial cracking of one of the bolts to just above 10Nm.. trying to lookup the values but I am just going to pull it out and stick it in a plastic bag (to prevent contamination) and bring it over to the computer to quickly test..

Work smarter not harder!

Edit:
Per service manual
Install the 2 fuel injection pump metering valve bolts (1) and tighten to 10 N-m (89 lb in).

But it also states :Remove and DISCARD the seal ring from the metering valve.

Meh... we'll keep this one with 3 miles on it.. I know distance means nothing
Noxz
Posts: 135
Joined: Wed Jun 27, 2018 2:40 am

Re: (Bio)Diesel Powered

Post by Noxz »

Well, that was easy enough..

I was able to get varying amounts of the valve (the visible plunger is about 3mm long).. I first tried adjusting the SCV_Time_Off, but all that does is change the period, and too long audible noises start.. so I lowered it back down, then just played with the SCV_I_Hold variable and basically determined between 1.00 Amps to under 1.50 Amps is the range (for 12 volts).. The thing about this is that those numbers are translated through an equation (gain and sense resistor), and the actual hex values are about 16 (0xF) apart.. which is kinda crappy resolution if you ask me..

If the sense resistor is increased from the eval board's 0.015 Ohm to 0.05 Ohms (the datasheet for the chip uses 0.010 ohm throughout the text), then there are 49 (0x31) values for 1.00 to 1.50 Amps.. max value of 0.077 ohm to map to the upper limit (xFF, 1.5 = xFD or so, not sure what would happen if over current beyond that occurred..) (with the gain of 19.25 which per the docs is for the amperage range this valve experiences)

Will be looking at either modifying the one data word through SPI, or some other method.. I've thought about using a timer to determine a pulse on that activating pin which would set it, instead of trying to strobe through a whole word of data.. the chip is smart enough to code that. Other ideas accepted..

had to put jar under the pump as it started to leak out of the valve orifice, tried to shove a neoprene glove in there to stop it - but nope... smells like french fries in here again :)


Edit:
just rigged up a small control loop where I change the one specific variable in the Data RAM via SPI.. Because of the logic loop I have for the microcode, the variable is only loaded on the start of the trigger, so just setting the data isnt enough to change it, bringing the pin low then high again works like a charm though.. Was able to increase and decrease throughout the [limited] range. I wish there was better resolution but this should be plenty to get started. Really happy I yanked it out to visually see what it is doing.
Noxz
Posts: 135
Joined: Wed Jun 27, 2018 2:40 am

Re: (Bio)Diesel Powered

Post by Noxz »

Only real update is that because I did not know what material the seals were made of, and I dont want any leaks down the road, I ordered the correct sized Viton (biodiesel compatible) O-Rings for the SCV (2 diff sizes, one was the "replace") before I reinstall it (and test further, thus somewhat waiting).

I should also order some shunt resistors to test the better resolution goal..

For correct PID simulation/control, I want to detect how much leakage (assuming through the cooling channel on the injectors.. ? .. and I still have the high pressure manual gauge on one injector slot, so no leakage there) simply to have a number and factor it into the equation..

Edit Additional:
I Would like to see if the PCV is also linear, which I suspect it is.. but I really dont want to try and torque the thing back on to 100 Nm while on the 2x4 flow bench.. it could probably hold it fine, but not looking forward to it.. Knowing how the SCV operates I should be able to reprogram the microcode and get a better update/refresh than what I was initially testing against. I still think the PCV should have a peak-hold (albeit all 12v) methodology to ensure that the valve initially closes fully before trying to regulate it as it seems to make more sense as that is how I've been using it (and the idea that it isn't released unless overpressured)..
ik80
Posts: 1
Joined: Tue Jan 29, 2019 7:38 am

Re: (Bio)Diesel Powered

Post by ik80 »

Please keep up the good work! I`ve been lurking the forums and I`m really glad someone's finally poking around the diesel.
Noxz
Posts: 135
Joined: Wed Jun 27, 2018 2:40 am

Re: (Bio)Diesel Powered

Post by Noxz »

ik80 wrote:
Tue Jan 29, 2019 7:41 am
Please keep up the good work! I`ve been lurking the forums and I`m really glad someone's finally poking around the diesel.
I've been somewhat meaning to update once I had some more equations solidified.. I am modeling the pump a bit more (in Octave/Matlab), specifically that SCV.

I've somewhat switched over a chat and thus not daily updates here, but anything worth while posting for log purposes (and maybe a whole writeup of everything required for diesel direct-injection/common-rail) I will be sure to put up here.

Do you have a diesel that you want to put an opensource ecu on?
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: (Bio)Diesel Powered

Post by kb1gtt »

I can attest he's been making incremental progress and posting about it in chat land. Which has resulted in less posting here. He's been getting into lots of low level bits making sure he knows how they work and why they work that way. I kind of like it if he was more reckless, as that tends to result in making the garage smell like french fries :) Currently he's dealing with some valves and trying to control them properly. He recently figured out how to remove some parts, which allowed him to check out some of the internal parts. I believe he's using that new knowledge to make a simulated model of the system. Once he has this basic simulation model, he can then try to tune the controls in computer land where it is safe to run into the limits. I recall he's done a bunch of fairly basic tests on the valve, and controlling it has not been as straight forward as desired.

I believe that's how it's currently going. Incremental progress most days. It sounds like the finish line is still out there somewhere.
Welcome to the friendlier side of internet crazy :)
Jghidulu
Posts: 3
Joined: Fri Feb 08, 2019 12:23 pm

Re: (Bio)Diesel Powered

Post by Jghidulu »

Hi anyone manages to used the mc38816 with an Arduino it Stm32? I am worried about the spi part
Noxz
Posts: 135
Joined: Wed Jun 27, 2018 2:40 am

Re: (Bio)Diesel Powered

Post by Noxz »

Jghidulu wrote:
Fri Feb 08, 2019 5:36 pm
Hi anyone manages to used the mc38816 with an Arduino it Stm32? I am worried about the spi part
The only part where SPI is used is to sent the initial code... and maybe to update configs, it doesnt need to be much. the eval board came with a KL25Z which has arduino compatible library and pretty similar pinout from what I understand. Multiple device from a single SPI master is realtively easy, just a CS line per each..

I think the SPI is a non-issue.
Jghidulu
Posts: 3
Joined: Fri Feb 08, 2019 12:23 pm

Re: (Bio)Diesel Powered

Post by Jghidulu »

Hi thanks for the reply! I am seriously thinking of assembling the PCB Where can I find the Arduino compatible library?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: (Bio)Diesel Powered

Post by AndreyB »

Jghidulu wrote:
Sat Feb 09, 2019 12:33 pm
Where can I find the Arduino compatible library?
Please start your own thread for you questions, I believe you are not on-topic here.
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
Noxz
Posts: 135
Joined: Wed Jun 27, 2018 2:40 am

Re: (Bio)Diesel Powered

Post by Noxz »

I believe time for a well deserved update..

The flow bench was rearranged a bit for flow rate experiments. The hand drill was replaced with a (hitachi m12vc) router with a 1/4" shank to 3/8" square drive adapter I machined at school. This router was then connected to an imported 3K VA variac, and a digital tachometer rigged up giving the ability to adjust the voltage to obtain a certain RPM - and it worked decently enough. Output of the high pressure pump was redirected, instead of to the rail, through a "T" connector to either back to the jerry can tank, or to a 2L beaker via two solenoids and some relays that the uC controls with one signal. A timer was setup in the uC for 60 seconds and thusly the flow would direct to the collection beaker which would be subsequently weighed: The Mass Flow.. Through a simple density division we can easily obtain the volume flow rate.

First set of experiments were without charging up the SCV.
Two interesting findings.
First, it appears the one literature reference of 0.5cc/stroke of ea plunger, and thus 1cc per rev was infact -incorrect-, as the measured output was actually 2/3cc per rev, and thus 1/3cc per stroke. This would then give a baseline reading of 600rpm to be 400ml (which is how it was discovered, and this measurement was verified at other RPMs)
Second, Max flow was determined to be roughly 1.3L/min (~1150g/min) starting at about 2400 RPM. This was compared against the electric primer pump, through the filter, which was able to do 1.8L/min, and is thought to not be the bottle neck, but rather the fuel (biodiesel) & orifice combinations.

Next up was to run the flow tests with varying the SCV current. This was accomplished with adding a few more buttons and code to the uC to update the data config in the MC33816 via SPI. The first round of testing was done entirely at 1600 RPM to get a starting point. It was seen starting at "0x41" (=1.33 Amps) that flow started to decrease, all the way up to nearly 2 Amps where near flow occurred. Tests were then carried out with this basic information, such as either increasing or decreasing the SCV current threshold value at various RPMs in a fairly methodical manner, and also for verification.

There is a very clear picture of when the flow is inhibited.
SCV flow chart.jpg
SCV flow chart.jpg (1.7 MiB) Viewed 22247 times
The values are of the measured mass per 60 seconds, minus the weight of the beaker (500g). the "-500" values were tests NOT run, but colored with an assumption/trend based on the other data.

Some very interesting aspects to note here is that flow is suddenly hindered (within a decent 10% range).. it does not exactly taper off. We can use this to our advantage as it tells us that the limit flow at a given SCV is not based on RPM. For instance, if we need 800g/min and we are @ 1400 RPM we can have the SCV fully open and get that amount as that is the max flow of 1400 RPM, or we can look at the limit of 800g/min, between x41 and x42, if we use x41 (the lower) then we will still obtain that ~800g/min result. If we now want to half the output to 400g/min we see at 0x47 would give us that limit... throughout the entire RPM range (beyond lower because of max flow at those lower are obtainable)..

So we can format a trend/equation for returning a SCV Amperage (easily transposed to a value based on some equations, which uses values such as the shunt resistor - which may change in later implementations of this or the PT2000 chip) based on the desired flow rate limit - with no need for RPM input. (X = mass/minute, Y = SCV Amps)
flow_to_scv.jpg
flow_to_scv.jpg (44.23 KiB) Viewed 22230 times

I used Octave (because apparently openoffice can't make polynomial trend lines) to make some equations that seem to map nicely, at about the 5th order, or higher if need be. These will be used for future controllers of this setup.. Remember, this is specific to the fuel, pump, and SCV, amongst other things - so anyone else wanting to do a similar [diesel or GDI?] engine setup will need to run these flow experiments themselves- it is time consuming and a bit tedious.. could possibly be automated but that is beyond the scope of something that will only be used 'once'.

The idea of "Volumetric Efficiency" for these experiments were initially employed before it becoming noticeable when limits were hit, and then efficiency dropping. I don't feel the need to relate to this term any longer though as we are not trying to optimize the pump, in fact, we are almost doing the exact opposite, hindering it to give us the quantity of fuel we want - we really don't care if it is running at 20% of capacity or not, what we care about is how we make it possible to do so.

All fuel temps were recorded from between 20 to 25 C, and had little noticeable effect - plans to increase this temperature and re-run some settings to compare is on the list, but the OEM version of this pump does not have the fuel temp sensor.

Thanks to Matthew Kennedy in the chat for input and clarification (and pivot table magic before I had enough data) along the way.

One step closer.
Last edited by Noxz on Sun Mar 31, 2019 6:01 pm, edited 1 time in total.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: (Bio)Diesel Powered

Post by kb1gtt »

Graph units? If they are hard to add, they could be added in something like MS Paint or GIMP.

Also what fluid did you use?
Welcome to the friendlier side of internet crazy :)
Noxz
Posts: 135
Joined: Wed Jun 27, 2018 2:40 am

Re: (Bio)Diesel Powered

Post by Noxz »

just updated the graph to have the axis labeled..
also I state in the long bit that "biodiesel" was used - which is likely "Methyl Soyate" (methyl ester of soybean oil)
Noxz
Posts: 135
Joined: Wed Jun 27, 2018 2:40 am

Re: (Bio)Diesel Powered

Post by Noxz »

my kl25z broke, for whatever reason..

This pushed me to migrate the SPI code into the rusEFI and actually get a dev environment setup for the frankenso..

Although it was a small roadblock, actually using the frankenso and rusEFI is the proper path and should have been done a while ago..

Next up: pressure sensor migration
Attachments
DSC_0335.jpg
DSC_0335.jpg (224.59 KiB) Viewed 22110 times
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: (Bio)Diesel Powered

Post by kb1gtt »

I guess a picture is worth a thousand words. Each day in Slack when I get to check it, I get notifications that there are 100+ messages. After doing my best to read those thousand words. I then see the result is this picture.

Good to hear your making progress.

Also while I'm commenting, the MC33816 board is being made, so we should shortly-ish have a validated design. So it's some exciting times.
Welcome to the friendlier side of internet crazy :)
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: (Bio)Diesel Powered

Post by AndreyB »

Noxz wrote:
Fri May 24, 2019 9:48 pm
Next up: pressure sensor migration
A step at some point please: rusEfi code pull request or maybe limited access preview for me and a few other folks :roll:
I've missed the https://github.com/NOx-z/rusefi/tree/mc33816_spi mentioning on https://rusefi.slack.com/messages/CFP3QAJCW/details/

Since commit https://github.com/NOx-z/rusefi/commit/e8b5d6de25d45c294cc76f03f77024fc4eff9197 is also available as patch https://github.com/NOx-z/rusefi/commit/e8b5d6de25d45c294cc76f03f77024fc4eff9197.patch
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: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: (Bio)Diesel Powered

Post by AndreyB »

our board met a real board today!
Attachments
eval_board_vs_our_board.jpg
eval_board_vs_our_board.jpg (387.97 KiB) Viewed 22003 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
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: (Bio)Diesel Powered

Post by kb1gtt »

Wow I really made that much smaller than the example. Lets hope I didn't forget anything significant.
Welcome to the friendlier side of internet crazy :)
Noxz
Posts: 135
Joined: Wed Jun 27, 2018 2:40 am

Re: (Bio)Diesel Powered

Post by Noxz »

We have SPI w/ rusEFI & "HV" working..

After a few footprint goofs, and a few bodges.. r0.1

Still todo: test the drivers, both VBattery and VBoost, on all capable channels
basically, test injectors, but my personal procedure will be to get the SCV working well with the pressure sensor to maintain a specific pressure to ensure the injectors have the requirements / real operating conditions.
Attachments
DSC_0420.jpg
DSC_0420.jpg (177.62 KiB) Viewed 21937 times
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: (Bio)Diesel Powered

Post by AndreyB »

It has been a while! Any updates? :)
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
azm
Posts: 9
Joined: Fri Nov 06, 2020 5:38 pm
Location: Germany & Slovenia

Re: (Bio)Diesel Powered

Post by azm »

I am interested as well! Any updates! :)
Post Reply