Electronic Pressure Sensor / Turbo Boost Controller – drawn and etched in house. Side project outside of our shop for my car.
Update 3/7/2016 Pressure sensors and Lambda sensors installed, along with board into the car
Lots of stuff happening recently on the project. I have two different LCD touchscreens that I bought, both are made by NEXTION. One is a 4.3″ and one is a 3.2″ (picture above is the 3.2″). The displays simplify using touch-screens with projects by using serial communication rather than 30+ connections to the Arduino. The screens themselves contain all of the GUI information on them, which means most of the heavy lifting for having a GUI is done by the screen itself ( normally this is very cumbersome for a microcontroller project and takes up a lot of memory). There is an Arduino library for the screens here, I found it easier to work with than what the manufacturer provided. There is an instruction set wiki page made by the manufacturer that explains all of the serial commands, and that coupled with the Arduino library make this a very very powerful and user friendly screen, once you get over the learning curve. Other than learning the command set, the only other barrier to using the screen is designing a good looking UI (there are no pre-made screens, you have to create everything).
I purchased 4 – 100 psi pressure sensors that are compatible with air, water, fuel and oil (very versatile and reasonably priced). I hooked up the manifold pressure sensor to my circuit (revision 2 below), and the circuit board to our Xantrex power supply and measured the output voltage of the 5v regulator on the circuit board @ 14v input (normal for a running car) – it read 5.064v on our BK Precision multi-meter. I then did some testing with an air compressor and a pressure gauge, taking measurements at various points to create a pressure curve vs. voltage measured by the Arduino. After this, I hooked the sensor to one of our vacuum pumps and tested how far down the sensor would read in vacuum and plotted all points in excel to make a linear regression. Here are the results (X axis is voltage in counts, Y axis is pressure in PSI):
As you can see, the sensor slope was nearly identical to the one given by the seller on Amazon, and the offset was noticeable (caused by the 5.064V output of my voltage regulator), but nothing crazy. I used the equation from the PSI vs Count in my Arduino code. If you do not have access to testing equipment, I would say you are probably safe using the sensor with the theoretical curve shown above. I would at least test the sensor and the readings against a good quality mechanical vacuum/boost gauge on the car. Even with this testing, the readings that I am getting from my project are ~ 1 psi higher than my Autometer mechanical boost gauge. But, better to err on the gauge reading too high then too low 🙂
The next phase of testing involved connecting the Lambda sensors. Two 14.7 Spartan2 controllers were installed, one on each bank (the car is a twin turbo V8). The lambda meters were wired per the instructions with the sensor ground shared with the circuit board, and the heater ground point as far away as possible from the circuit ground (truthfully it is not that far, and my offsets suffered just like the seller said). I programmed the display to show the startup voltages (~1.66v and ~3.33v) on the screen initially, and as of yesterday, I have the Arduino calibrating a slope and offset compensation based on the math found in this excel file provided by 14.7, and applying it to the readings being output to the screen. I went through and simplified the math of the file, and used lambda instead of AFR. Here is what I did:
Slope calibration in the excel file is = (Ideal High lambda – Ideal Low lambda)/(Actual High Lambda – Actual Low lambda). This creates a proportion that cancels out all of the variables in the two readings except for the voltage coming into the unit. Essentially, it is = (Ideal High Volts – Ideal Low Volts)/(Actual High Volts – Actual Low Volts). Each sensor during startup ouputs a low voltage for the first 5 seconds = 1.667 volts, and a high voltage at 3.333 volts for the next 5 seconds (Ideal high, ideal low). Knowing the voltage being put out during this startup sequence, you take the reading in counts being put out by the Arduino, convert it to volts, and use it to calibrate your sensors. Once you have calculated the proportion, you can then calculate the slope compensation. The excel file used (Ideal Low lambda – (Slope compensation * ideal low lambda) to calculate the offset, which simplified becomes (y*(1-x)) where y is the ideal low lambda and x is the slope compensation.
After calculating the slope compensation and the offset compensation, you can have the Arduino calculate a new linear regression based on the ideal line equation (Lambda = 0.136x + 0.68). To create a new slope you will use (y2 – y1)/(x2 -x1), and the y intercept = y1 (the compensated point at 0v). The ideal reading at 5v is 1.36 lambda, and ideal at 0v = 0.68. You have the two points you need, so the equation of the new line is (((1.36 * slope compensation + offset compensation) – (0.68 * slope compensation + offset compensation)) / 5.0 – 0.0) + (0.68 * slope compensation + offset compensation). Easy peasy right? Here is a breakdown of the math:
Now all you have to do is take the readings you get from the sensors and multiply them by the STOICH point of the fuel you are using to get the Air to Fuel Ratio, in my case it is gasoline which is 14.7. You may wonder why I did not just start with AFR and use the math that the excel file used. The main reason is that my car is set up to also run ethanol, and doing that math this way allows me to easily change that final stoich value that I multiply the compensated curve with. Lambda meters read lambda, not AFR. Lambda gets converted to AFR based on your fuel. Technically the fuel we buy at the pump can be anywhere from 0-10% ethanol, which means that the stoich AFR ratio can be anywhere from 14.7 t0 14.04. If I chose to use a higher ethanol blend (or any other fuel with a known stoich AFR), I can easily change the multiplier for this compensation curve so that I get accurate readings. Better still would be to leave the gauge in Lambda, but right now it is not something I am used interpreting while driving.
Here are some images of the screen installed in the car:
More to follow…..
Revision 2: Double sided PCB, solder mask, 2 MOSFETS, 5V regulated, two ground planes for electrical noise reduction
Dual Solenoid Control, 6 external 100 psi pressure sensor inputs (oil, water, air, fuel compatible), external serial touchscreen LCD, SMD resistors, double sided PCB, 8 extra digital in/outs for expanded sensor capability (exhaust temperature, air temperature, etc.). Board is 2.5″ x 4″
Revision 1: Expanded circuit board, added second MOSFET, added diode protection on MOSFETs and regulator
Dual solenoid control, integrated LCD mounting
Original design: PWM modulated solenoid control using NPN MOSFET, MPX4250AP pressure sensor integrated into circuit, 5v regulation
Single Solenoid control, external LCD