Tuesday, August 23, 2016

Designing a better diesel tuning box - part 4 - improved design results

If you are following the project you might've seen that the new source code for the firmware and (Android) client application are up:

Arduino firmware: https://github.com/ligius-/DieselTuningBox
Mobile UI: https://github.com/ligius-/DieselBoosterClient

With that out of the way, I've had about a month of testing with the new prototype and several months already with the old one. The definitive result is that there are significant fuel savings.

Outside city limits I now get better than 6L/100km, at highway speeds (130 km/h) better than 6.5/%. I believe the highway consumption can be further improved but I haven't used the car so much lately to be able to fine-tune the settings.

Previously I would get 7.6L/100km at best on country/county roads and 7.4/% on highways. So that would be a 12% mileage increase on highways and 21% on slower roads.

Inside the city is where the story changes since that's where I did most of my driving and had time to tune the parameters. I am now getting an average of 9L/100km (actually better) compared to 11L stock or 12.5L with RaceChip. So that's 18% mileage increase from stock and 28% increase from RaceChip..

Why such a difference?

The issue is a bit more complicated and I found it related to matching between sensor output impedance and ECU input impedance. That's why the improved prototype has provisions for adjusting this. On my car, with the default 'Arduino' circuit I need to set the offset correction to -50mV and gain correction to +3% in order to match the factory settings.
I doubt any of the aftermarket solutions account for this and is the reason why I get such poor city mileage with the commercial tuning unit.
The commercial units are likely ok at higher rpms since the gain correction is built-in (part of the tuning) and the offset error becomes insignificant.

The app

Building a mobile app was a great idea since it allows me to connect to the module, adjust the settings on-the-fly and save them.

I would probably redesign it now since I know now the usage pattern: adjust gain and offset once, play with the curve point gains indefinitely, save them. Currently the gain and offset are the biggest UI elements since the majority of the improvements can be achieved through those.

The 'Apply immediately' checkbox is also really useful as it allows the user to play with the values without having to hunt for the 'Apply' button. As soon as some settings are changed the application waits for a while (1-2s) and sends the new settings to the car.

It's cool showing the phone to someone and watch the consumption modify as you play with the values. A bit silly, but makes for a 'wow! never thought this would be possible' moment.

Adjusting the individual gains however is a bit tricky to do while driving (or stopped for that matter) since they are quite small and a lot of them.

I opted to add +/- buttons on the sides of each point setting instead of the classic numpad editor which is impossible to use at the wheel.

The app will also helpfully highlight the currently selected point (in blue) so you can see where the engine is at.

With the 'Apply immediately' feature it's just a matter of tapping '-' and wait 1-2s and see the effect.

Speaking of effect, the whole concept now seems a bit wrong to me - you are adjusting the END value not the START value so anything that you've adjusted affects where the next value will be. E.g. if you adjust the value for 200 (ADC = .244V) to lower it by 10% the ECU will compensate and now the new value will be 200+10%. I cannot explain this properly in words but I'm working on the EFFECT rather than the CAUSE.

Another interesting issue is that the engine does not run well at very low fuel rates, regardless of the setting. As long as the stationary consumption is above 0.7L/h the engine sounds fine, as soon is it goes below that it starts shaking. The 'solution' is to raise the consumption back by putting it in gear or starting A/C. So a 'cold engine' tuning should be different than a 'warm engine' one since consumption decreases as the engine warms up (emissions-related). At 0.4l/h the engine shakes badly.

Speaking of shaking, the automatic gear shift is not so smooth anymore since it's probably hand-tuned for specific torque values.

I haven't noticed any significant loss of power but I'm not the street racer type.


I'll probably stop working on this project for a while and deal with the other pending projects since I think the goal was achieved.

I would like to integrate real-time reading of OBD2 values: fuel rail pressure (PID 59?), engine RPM (PID 0C), oil temperature (PID 5C), fuel rate (5E) and vehicle speed (0D). This would allow better data logging and perhaps some auto-tuning, through the app.

Would be nice to have a separate control module with real buttons and knobs instead of a smartphone.

Would be nice to use the internal Arduino temperature sensor to select different curves or values depending on ambient (engine) temperature. It should be good enough for most purposes.

Would like to find out if there is any damage that can occur when setting an extremely low consumption. I'm using the engine sound (smooth, rough, shaking, ...) to tune the settings now but I don't actually know why it's behaving like that since the rail pressure is well within parameters.

Tuesday, August 2, 2016

Cost analysis of a Lexmark inkjet printer

Six years ago I bought a Lexmark Pro205 all-in-one printer, one of the few affordable ones that had WiFi. This has proven a disastrous investment, so let's go quickly through the numbers:

  • purchasing price (10 Mar 2011): 140 EUR
  • black cartridge replacement (21 May 2012): 12E
  • full ink refill set (21 Dec 2013): 18E
  • full cartridge replacement (25 Mar 2014): 13E
  • full cartridge replacement (12 Mar 2015): 12E
In total 195E, there might be other expenses as well.
Electricity costs are not included and the printer is not very economical in standby.

Printed pages - as per printer counter - 691. I would estimate the total number of usable pages to be ~200, out of which ~15 were full-color photos. This is because most of the pages from beyond number 80 had streaks and the printer required at least 50 deep cleaning cycles. About one page in five is usable, but certainly not great.

So running costs until now are 1 EUR / page. That's definitely the most expensive printer I have owned.

In comparison, around 5 years ago I bought a Kyocera FS-1020D laser printer refurbished for 30 EUR. It has printed around 1000 pages with a discard rate of 1:50. That is, 1 in 50 pages came out bad because of the printer. So the running cost for this printer is <4 cents/page. No maintenance required other than the thermal fuse blowing out because it was sitting in an enclosed area (2h, see a recent article about fixing that).