SlideShare a Scribd company logo
Methanol Injection Progressive Controller
By Terrance Hubbard & Quyen Vu
California State Polytechnic University, Pomona
ETE4830
Advisor: Dr. Scott Boskovich
2
Table of Contents
SECTION PAGE List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Water/Methanol Injection Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Project Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
CAN Bus for Automotive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
Development Boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
CAN Bus System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Arduino IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
Preliminary Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19
System Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
Electromechanical Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Issues Identified . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
Testing & Refining The System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
3
Work Cited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
List of Figures
FIGURE PAGE
1. 4 Courses Books . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
2. Project Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3. CAN Bus Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4. CAN Frame Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5. Development Boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
6. Source Code Convert Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
7. CANbus_H Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
8. Image_Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
9. SPI Code for Slave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
10. SPI Code for Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18
11. Working Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
12. Sport Mode Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
13. Economy Mode Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
14. Sport Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
15. Economy Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
16. Electromechanical Drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
17. Graph 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
18. Graph 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
19. Graph 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
20. Dynamometer/Dyno Graph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4
Background
We would like to introduce a short background of the class materials incorporated in our project.
The 4 courses that help us tremendously in this project is the Control System course (ETE3501),
C++ Language (ETE1151), Microcontroller and PIC18F (ETE3441), Data Communication and
Networking (ETE4351). The course ETE3501 helps us understand the transfer function of our
system and how to implement a PID for controlling our desired response. The C++ course helps
us to better understand the coding language and to program the Arduino IDE. The ETE344
course helps us understand the input/output of the controller and how to navigate through the pin
mapping of the Nucleo Board. The course ETE4351 helps us understand how CAN bus network
protocol works in automotive or (Local Area Network).
Figure 1: These are the books from the courses that we found helpful to design and program our
project.
5
Abstract
Water/methanol injection has been used on gas powered race engines as a means of reducing air
inlet temperatures and to suppress knocking. The reason this is important is because knocking is
not good for engine performance. When fuel and air are igniting too soon, the forces want to
push down the piston when it has yet to complete a full cycle. These forces could lead to piston
damage and cause the vehicle to run very poorly if left unchecked. As a result, the goal for our
project was to create a progressive injection system that would spray a 50/50 concentration of
water/methanol into the intake system. We have two modes of operation: sport and economy
mode. In sport mode, the pumps will activate progressively after a certain boost pressure which
is 10 psi while in eco mode, the pumps will activate with temperatures above 120 degrees
Fahrenheit. We incorporated a CAN bus into our system as far as capturing which then had to be
filtered out to allow the data that was most useful for us to go through. We modeled the behavior
of our system and the engine using Simulink. Due to time constraints and Covid we are not able
to finish our project, however in the future we plan on creating the physical design to our system
and incorporate an embedded processor such as FPGA.
6
Introduction
Our senior project is designing a progressive injection controller for vehicles that are forced
induction. Forced induction vehicles tend to run hotter than conventional naturally aspirated
engines. Due to the extra components of supercharger and turbocharger creating more thermal
heat in the engine bay. Automotive manufactures use heat exchangers like the air-to-air
intercooler and water to air intercooler for the cooling effect of the intake temperature going into
the engine. However, that alone is not enough to cool the intake temperature low enough to
prevent knocks on a hot summer day. The reason why we use methanol in our project is because
methanol is a fuel additive. It raises the octane of the gasoline and burns cooler than regular
gasoline. As a result, the fuel burns more efficiently and creates less heat in the combustion
chamber which lowers the exhaust gas temperature (EGT). This is a very useful additive because
it will prevent the engine from knocking and the catalytic converter from overheating. The
advantage of spraying a mixture of 50/50 concentration of water/methanol into the intake
manifold pre-throttle body will cool the air mixture entering the engine and making the air
denser.
7
Water/Methanol Injection Process
Water/methanol injection is a way of introducing atomized air into a cars intake system as a way
of lowering intake temperatures and preventing knocking or pre detonation of the engine. It is
used in gas powered race engines that are equipped with turbocharged and supercharged engines
as a means of increasing boost without having to rely on high octane fuel. How it is able to do
this is by spraying the air that’s flowing through intake with a mist of water/methanol. The
water/methanol will change state from a liquid to a gas and cool the air that’s going through the
intake. The cool air will then finish off in the combustion chamber where fuel is introduced. As a
result of having denser air in the combustion chamber the fuel can be burned more efficiently
since we can pack more air molecules per unit volume. When there is less air in the combustion
chamber the piston has to work harder to burn the fuel which is why knocking is more imminent.
That is why Water/Methanol injection is good for improving gas mileage, increasing horsepower
up to 20%, and you can use it with low octane fuel.
8
Objective
Different techniques have been employed to improve the water/methanol injection. The common
technique is using the boost pressure reference for controlling and the duty cycle of the fuel
injector. The Progressive Injection Controller team overall objective is to develop and research to
implement CAN-bus capability. The solution is to use the CANbed board device to capture serial
data from the car on-board diagnostic port. The next challenge is to map out the address and
filter out the unnecessary data we do not need for the controller. The main parameters that we
want to capture from the serial data is the manifold intake temperature and the manifold boost
pressure. The second possible solution can be utilizing external sensors offered from the Nucleo
board expansion shields. The team decided to stick with the first solution and continue the
research and development of CAN-bus into our controlling system. As a result, the team
successfully filtered the signal from the car. Our next step is to send it through a serial parallel
interface port using our knowledge in the ETE344 microcontroller. We reference the materials
and book from the class to understand the pin mapping and I/O to get connectivity from Nucleo
and CANbed boards. Our goal for the rest of the semester is to complete a physical design and
implement PID into our Nucleo Board. Also, to test the system using a dynamometer to get a
reference of where the system is at and efficiency of spraying water/methanol into our engine.
9
Purpose
The purpose of the project is from the existing water/methanol injection kit in the automotive
industry. We are inspired by the design and the advantages of using this system in our car.
However, we seek an opportunity for improvement with the existing product. The kit that we use
to compare our design is the AEM water/methanol injection kit; it uses a closed-loop system for
injection. It only has a preset parameter from the end users to start and end injection activation.
Their design uses the manifold pressure to get the pressure reference for controlling. The system
is a feed forward design because it only turns the pump on or off. We want to create a controller
that is progressive and closed loop PID. Our project incorporates the CAN-bus signal as the input
to our controller which none of the kits in the industry have that capability. The purpose of this
project is to create a robust design and because it comprises all the sub-disciplines of electrical
mechanical. We are both car enthusiasts and interested in automotive engineering.
We want to use this project as a canvas to showcase our understanding and incorporate the
technical course in the Electronic System Engineering Department. Using this opportunity to
research and develop soft skills and project outside of the classroom. My partner and I both want
to take a deeper dive into understanding control system theory and how to incorporate industry
software like MATLAB/Simulink and Microcontroller for managing the I/O of our system.
10
Project Schedule
Figure #2: Project Schedule and tasks for each member
This is a schedule that we implemented to stay on track for the design and building of the
project. Our team met up twice a week to research and work on the design of the injection
controller. Every week we submit a 5-15 report to our advisor to keep us honest and discuss our
achievements and challenges for the week. The schedule includes tasks for each member which
helps us break down the workload for each week.
11
Materials
Item Quantity Cost
CAN bed board 2 $40.00
Nucleo STM-32 144
Microcontroller
1 Free (Donated from Dr. Boskovich)
12V Water Pump 1 Free
Water Tank (2.3 Liters) 1 Free
Nozzle 1 $4.99
Methanol/Water 1 Free
Car (Mini Cooper) 1 Free
Total 44.99
The list above is the materials and cost we spend for the overall project. Granted, the expensive
parts like the Nucleo STM32 were leased to us by Dr. Boskovich for the project. We take
advantage of my personal car as the test vehicle and the reservoir tank and 12v water pump for
the rear washer wiper. The car has the rear wiper delete so the 2.3 liters gallon reservoir and 12v
pump is available to us for the methanol/water injection. Preferably we would want to upgrade
the pump to a Shurflo pump for higher GPM (gallon per minute) and higher PSI rating for
injection.
12
CANBUS for Automotive
What is a CAN bus?
The Controller Area Network (CAN bus) is the nervous system, enabling communication.
In turn, 'nodes' or 'electronic control units' (ECUs) are like parts of the body, interconnected via
the CAN bus. Information sensed by one part can be shared with another. CAN bus is a robust
vehicle bus standard designed to allow microcontrollers and devices to communicate with each
other's applications without a host computer.
Figure 3. The interconnection of the CAN bus network in a automotive vehicle
CAN uses a differential signal with two logic states, called recessive and dominant. Recessive
indicates that the differential voltage is less than a minimum threshold voltage. Dominant
indicates that the differential voltage is greater than this minimum threshold. Interestingly, the
dominant state is achieved by driving a logic '0' onto the bus, while the recessive state is
achieved by a logic '1'. This is inverted from the traditional high and low used in most systems.
Using our knowledge from the course ETE4351 we learned that the CAN is a CSMA/CD
protocol, meaning each node on the bus can detect collisions and back off for a certain amount of
time before trying to retransmit. This collision detection is achieved through a priority arbitration
based on the message identifiers.
13
Figure 4. Standard CAN frame format.
The standard CAN message frame consists of a number of bit fields. The frame begins with the
start of the frame and the 11 bit ID for priority control, which establishes the priority of the CAN
message. The lower the bit size the higher the priority of the message. The cyclic redundancy
check (CRC) is a 16-bit checksum for detecting errors in the transmitted data. If the message is
properly received, the receiving node overwrites the recessive acknowledge bit (ACK) with a
dominant bit. The ACK also contains a delimiter bit to keep things synchronized. From the data
network course, we learned the importance of the CRC32 function in a communication network.
The CRC is an error-detecting code commonly used in digital networks and storage devices to
detect accidental changes to raw data. Blocks of data entering these systems get a short check
value attached, based on the remainder of a polynomial division of their contents.In order to
capture data from the CAN bus network from the car we need a system that could read the CAN
bus protocol and filter the serial data signals to utilize for our project.
Development Boards
14
Figure 5: Shows the two development boards that
were used in this project; the CANbed and the STM32
Nucleo-144. The CANbed contains an onboard processor: ATmega32U4 microcontroller while
the Nucleo-144 uses an onboard processor: Arm Cortex-M4. It has a clock speed of 80Mhz and
supports Arduino connectivity.
CANBUS System
In the CAN bus network, each message contains coded information indicating the message
beginning and ending, and an identifier or address to route the message to the correct destination.
The signal also contains a check function which a receiving control unit uses to check the
plausibility of the signal. The transmitting control unit monitors the return of the signal on the
bus from the receiving control unit. This way the transmitting control unit confirms the signal
received is the same as the one transmitted and any faults can be dealt with. A priority system of
control unit or message importance is established providing a smooth flow of information,
ensuring that important messages are processed first. Furthermore, we need to use the CANbed
Board because it utilizes MCP2515 CAN Bus controllers with SPI interface and MCP2551 to
achieve the CAN-Bus capability. On-board diagnostics (OBD) is a self-diagnostic and
reporting capability that car dealers and. mechanics use it to identify car issues. OBD2
specifies diagnostic trouble codes (DTCs) and real-time data (e.g. speed, RPM), which can
15
be recorded via OBD2 loggers. Using this port to tap into our CAN bus interface to capture
the data we need for our water/methanol injection controller.
Arduino IDE
Using the Arduino IDE for the CANbed Board. We included the existing library that is in the
IDE to write our code to filter the serial messages coming from the CANbus interface.
Figure 6: The source code to convert the serial value into numerical values for temperature, rpm,
and speed.
In figure 6, we utilized the Arduino IDE library to help us capture serial data coming from the
OBD2 port of the car. The source code shows how we filter the CAN-bus data coming from the
OBD2 port. We managed to do this with the help of the Arduino IDE library with its default
16
library for CAN PID. We just need to adapt the library to our project which is filtering the RPM,
Intake temperature, MAF sensor for the boost. The filtered data is ready to be sent out using SPI
to the Nucleo Board.
We use Wikipedia to map out the serial data coming into our CANbed. Using the pre-existing
OBD-2 PID chart we were able to distinguish the hex value to predetermined data. We were able
to find the values and math calculation for intake temperature, coolant, rpm, mph, and throttle
position. However, we need to convert our values from celsius to fahrenheit because we want to
keep the unit consistent when we do PID controlling for our injection.
Figure 7: The code above is the predetermined hex values for each data variable.
17
We successfully tested the code and connected the CANbed board to the car OBD-2 port and
captured serial data. The next step is to filter the serial data and send that to the SPI line to the
Nucleo Board for processing.
SPI using Nucleo Board
Instead of using the STM32 IDE to code our Nucleo Board. We decided to write the C code in
Arduino IDE for the Nucleo board because of the robustness of the Arduino libraries. The library
includes CAN_Bus and SPI libraries that we can use for our design. Using the same software for
the two boards makes the process of establishing slave and master for the SPI communication
less complicated.
The Arduino IDE to code the Nucleo board is simple and trouble-free because of the resources
available online. However, the issue that we faced was mapping out the STM32 Nucleo Board to
the existing board that is available for the Arduino IDE. The library manager in Arduino IDE
cloud does not allow users to modify the source code without the original owner permission. We
tried a different method of mapping the I/O of the Nucleo STM32 144 pins to work with the
Arduino IDE. However, the Arduino IDE does not support our specific board. We would need to
buy a different STM32 board that is less capable for our project to run SPI on the Nucleo Board.
18
Figure 8: The picture shows the connection between the CANbed board and Nucleo successfully
wired up.
Figure 9: SPI code for Slave (Arduino)
Figure 10: SPI code for Master (Nucleo STM32)
The CANbed board and Nucleo board both come with the SPI, UART, and I^2C ports for
transferring data from one device to another. It is easier for us to wire up the SPI port because it
only requires 6 ports for transport data and synchronization.
19
Figure #11: The picture shows the working register MISO and MOSI working at the SPI clock
speed to receive and transfer serial data from slave to master. This is also called a half duplex
communication system.
20
Preliminary Design
Figure #12: Sport mode activation: This is the design for the sport mode when the controller gets
10 psi from the manifold it will start the pump at 15% duty cycle. For every psi increment the
PWM will increase the duty cycle by 15% up until 17 psi which is around 100% duty cycle for
the pump.
Figure #13: Economy mode activation: In order to control the pump we use a case statement to
trigger the pump on or off based on the error. When the error is greater and equal to zero it will
turn off. When the error is greater than zero the PWM will get a value to activate the pump.
21
System Block Diagram
Figure #14: Sport mode design block diagram
Figure #15: Economy mode design block diagram
Here in figures # and #, we have a closed system for sport mode and economy mode. The engine
lookup table represents the plant for our system and models the behavior you normally see in an
engine. The sport mode includes a pressure sensor where after a certain amount pressure, the
water/methanol incrementally sprays a mist into the intake. Eco mode includes a temperature
sensor where after a temperature of 120 degrees Fahrenheit, water/methanol is immediately
sprayed.
22
Electromechanical Design
Figure #16: To begin the water/methanol injection process, first we had to fill our water tank
with a 50/50 concentration of water/methanol. The microcontroller in combination with the
water pump is used to syphon out the water/methanol out of the water tank and feed it through
the pumps. The pumps will spray a mist of water/methanol into the engine which will be located
in the intake system before the throttle body.
Analysis: The reason for spraying a mist of water/methanol into the manifold is to cool down the
charged air entering the engine. The mist of water/methanol will evaporate and cool down the
hot air in the intake manifold causing the air molecule to turn denser.
23
Analysis
This system will reduce air inlet charge temperature and the pump will atomize the
water/methanol into the airstream and evaporate which makes the air denser and cooler before
entering the combustion chamber. This system can reduce detonation (knock inside the engine)
and for direct injection motor it can clean and reduce the carbon deposits prone to these types of
engine. In the future we will try to dyno test the car and establish a base horsepower and torque
of the motor. To be able to see the performance gain running water/methanol into the motor. We
successfully simulate the design through Simulink and our next step is to incorporate the
physical sensors and test out the pump. Also, we will be working on the CANBed for the car
once the circuit arrives. Using Simulink we will be driving the pumps with a PWM signal into
the Nucleo. For eco mode, the PWM signal will turn on when intake temperature goes past
120°F and for sport mode the PWM signal will turn on incrementally at 10 psi. We will create a
user interface that will give the option to change from eco to sport mode. We will also need to
figure out the frequency to drive our pumps. Overall, the simulation was a success, and we will
continue to implement the CAN bus into our controller. However, our second option will be
using an external sensor for our PID if it is more suitable for our project.
24
Issues Identified
The problem our team was facing regarding the CAN-bus interface was we did not know how
the automotive network would run and operate. We had to do some research on the topic in order
to implement it into our design. CAN-bus is a tricky system because every car manufacturer has
different techniques that they adopt for their vehicles. Since we are using the MINI Cooper S
2006, we narrowed our research to the Bentley manufacturer. The second challenge that we
faced was pin mapping the Nucleo STM32 board to gain connectivity with the CANbed board.
The CANbed board has an on-board processor ATmega32U4. The board is controlled and
processed by the Arduino Leonardo. We had to figure out the pin mapping of the two boards to
get the serial parallel interface to work (SPI). For our project we wanted to use the SPI technique
to send filtered data from the CANbed to the Nucleo for controlling.
COVID-19 mitigation effort, the team were not able to meet up because of the school closure.
We were unable to utilize the engineer lab to diagnose our issue with the circuit. We have limited
resources offered to us. As a result, we moved our design to a virtual environment using
MATLAB/Simulink to model and simulate our design. We successfully modeled the sensors
including the boost pressure and intake temperature to operate in our PID controller. We
managed to design and create the block diagram of our system. Due to the time constraints and
the failure of our CANbed board during testing we could not implement the engine model in
Simulink. We had a backup plan of including the lookup table in Simulink to model the engine
behaviors. We were then able to continue our design using Simulink to complete the PID using
this lookup table method and system ID in MATLAB/Simulink.
25
Results
Figure 17 : Through the Simulink simulations, temperature is rising and slowly cooling down
once it reaches a maximum value of 140 degrees Fahrenheit. We want the pumps on at 120
degrees Fahrenheit.
Figure 18: The amount of error between the current temperature and ideal temperature of 120
degrees Fahrenheit
26
Figure 19: PWM signal will be turning on depending on when current temperature surpasses
ideal temperature of the intake. It turns on right when temperature exceeds 120 degrees
Fahrenheit and turns off below 120 degrees Fahrenheit.
27
Testing & Refining the system
3 Test Consider Performing
1. Perform a dynamometer test for the base Horsepower and Torque
2. Test with Water/Methanol Injection
3. Tune the PID for spray efficiency
Figure #20: Dynamometer/ Dyno graph
In figure #20, A dynamometer or "dyno" for short, is a device for simultaneously measuring the
torque and rotational speed (RPM) of an engine, motor or other rotating prime mover so that its
instantaneous power may be calculated, and usually displayed by the dynamometer itself as kW
or horsepower.
In figure #20, A typical dyno graph will show the power and torque of a vehicle through the full
rev range at full throttle. Often this will show a before and after graph, overlaid on the same
sheet to make the differences clear, with a peak power and sometimes peak torque figure. We
can use the dyno graph to compare the efficiency of the system and visually see the gain of
injection water/methanol into the engine.
Why testing?
The reason for testing is to improve our system and gather data for analysis. We want the system
to run at maximum efficiency and to compare previous data with updated design.
28
Furthermore, we consider optimizing the spraying duty cycle based on the rpm of the engine.
Reason being the engine speed is very sensitive and we want to scale our injection based on the
rpm load.
Conclusion
There are many different perspectives when it comes to what kit to buy to achieve
water/methanol injection. There are kits out there that are inexpensive but the danger of buying
a cheap kit is that you end up with cheap parts such as the hoses and nozzles that damage your
engine in the long run. Then you have kits out there that are expensive that have high quality
parts and are controlled electronically. The great thing about electronic controllers is that they
use a pressure sensor that monitors how much boost is present and then determines how much
water/methanol should be sprayed. By having an electronic controller, you are less likely to run
the risk of hydro locking the engine. From our results and research, we know that
water/methanol decreases intake temperature due to how quickly it evaporates when it is in
contact with air. This system will reduce air inlet charge temperature. The water pump will
atomize the water/methanol into the airstream and evaporate which makes the air denser and
cooler before entering the combustion chamber. This system can reduce detonation (knock inside
the engine) and for direct injection motor it can clean and reduce the carbon deposits prone to
these types of engine. In the future we will consider dyno testing the car and establish a base
horsepower and torque of the engine. To be able to see the performance gain running
water/methanol into the system. We will create an interface that will give the user an option to
switch from eco to sport mode. Overall, we successfully designed a closed loop injection
controller and simulated the engine behavior of the system via Simulink using a lookup table.
29
We were able to establish a connection between the Nucleo and CANbed boards. For future
improvement, we will complete a physical design, fine tune our PID, and implement our system
with an embedded processor through FPGA.
30
Work Cited
CSS Electronics. (n.d.). CAN Bus Explained - A Simple Intro (2021). CSS Electronics.
https://www.csselectronics.com/screen/page/simple-intro-to-can-bus/language/en.
Wikimedia Foundation. (2021, May 15). Dynamometer. Wikipedia.
https://en.wikipedia.org/wiki/Dynamometer.
Thakur, M. R. (2019, January 3). Arduino SPI Communication Example. Circuits4you.com.
https://circuits4you.com/2019/01/03/arduino-spi-communication-example/.

More Related Content

PPT
Structures and Materials- Outline and Introduction
PPTX
Mohr's circle
PPT
Crystal for teaching
PDF
Characteristics of crystalline solid
PDF
Polymettalic Nodules - Oceanography
DOCX
Deflection and member deformation
PPTX
CHEMICAL ENGG. MATERIALS- CRYSTALLINE & NON-CRYSTALLINE SOLIDS
PPTX
The Finite Element Analysis for Dynamic Soil-Structure Interaction with ABAQU...
Structures and Materials- Outline and Introduction
Mohr's circle
Crystal for teaching
Characteristics of crystalline solid
Polymettalic Nodules - Oceanography
Deflection and member deformation
CHEMICAL ENGG. MATERIALS- CRYSTALLINE & NON-CRYSTALLINE SOLIDS
The Finite Element Analysis for Dynamic Soil-Structure Interaction with ABAQU...

Similar to Senior Project: Methanol Injection Progressive Controller (20)

DOCX
Spi research paper
PDF
Grundfos Wincaps Manual Guide
PDF
Placement Portfolio
PDF
S Pii Plus+C+Library+Programmer+Guide
PDF
S Pii Plus+C+Library+Programmer+Guide
DOCX
REPORT IBM (1)
PDF
Grid connected pv power system
PDF
Solar Energy - A Complete Guide
PDF
Ifc+solar+report web+ 08+05
PDF
Supplier-PPAP-Manual.pdf
PDF
PDF
PDF
Utility-Scale Solar Photovoltaic Power Plants - A Project Developer’s Guide
PDF
01 introduction tovulcanmanual_v81_20120817-libre
PDF
project Report on LAN Security Manager
PDF
PDF
SMA - SUNNY DESIGN 3 and SUNNY DESIGN WEB
PDF
The Readiness Plan A Spotlight on Customer Success
PDF
C sharp programming
Spi research paper
Grundfos Wincaps Manual Guide
Placement Portfolio
S Pii Plus+C+Library+Programmer+Guide
S Pii Plus+C+Library+Programmer+Guide
REPORT IBM (1)
Grid connected pv power system
Solar Energy - A Complete Guide
Ifc+solar+report web+ 08+05
Supplier-PPAP-Manual.pdf
Utility-Scale Solar Photovoltaic Power Plants - A Project Developer’s Guide
01 introduction tovulcanmanual_v81_20120817-libre
project Report on LAN Security Manager
SMA - SUNNY DESIGN 3 and SUNNY DESIGN WEB
The Readiness Plan A Spotlight on Customer Success
C sharp programming
Ad

Recently uploaded (20)

PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Lecture Notes Electrical Wiring System Components
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
DOCX
573137875-Attendance-Management-System-original
PDF
Well-logging-methods_new................
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
composite construction of structures.pdf
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPT
Mechanical Engineering MATERIALS Selection
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
web development for engineering and engineering
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Lecture Notes Electrical Wiring System Components
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
573137875-Attendance-Management-System-original
Well-logging-methods_new................
R24 SURVEYING LAB MANUAL for civil enggi
composite construction of structures.pdf
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
bas. eng. economics group 4 presentation 1.pptx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
UNIT 4 Total Quality Management .pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
CYBER-CRIMES AND SECURITY A guide to understanding
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
Mechanical Engineering MATERIALS Selection
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
web development for engineering and engineering
Automation-in-Manufacturing-Chapter-Introduction.pdf
Ad

Senior Project: Methanol Injection Progressive Controller

  • 1. Methanol Injection Progressive Controller By Terrance Hubbard & Quyen Vu California State Polytechnic University, Pomona ETE4830 Advisor: Dr. Scott Boskovich
  • 2. 2 Table of Contents SECTION PAGE List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Water/Methanol Injection Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Project Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 CAN Bus for Automotive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12 Development Boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14 CAN Bus System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Arduino IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 Preliminary Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19 System Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20 Electromechanical Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Issues Identified . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25 Testing & Refining The System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
  • 3. 3 Work Cited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 List of Figures FIGURE PAGE 1. 4 Courses Books . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 2. Project Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3. CAN Bus Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4. CAN Frame Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5. Development Boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 6. Source Code Convert Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 7. CANbus_H Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 8. Image_Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 9. SPI Code for Slave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 10. SPI Code for Master . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18 11. Working Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 12. Sport Mode Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 13. Economy Mode Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20 14. Sport Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 15. Economy Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 16. Electromechanical Drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 17. Graph 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 18. Graph 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 19. Graph 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 20. Dynamometer/Dyno Graph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
  • 4. 4 Background We would like to introduce a short background of the class materials incorporated in our project. The 4 courses that help us tremendously in this project is the Control System course (ETE3501), C++ Language (ETE1151), Microcontroller and PIC18F (ETE3441), Data Communication and Networking (ETE4351). The course ETE3501 helps us understand the transfer function of our system and how to implement a PID for controlling our desired response. The C++ course helps us to better understand the coding language and to program the Arduino IDE. The ETE344 course helps us understand the input/output of the controller and how to navigate through the pin mapping of the Nucleo Board. The course ETE4351 helps us understand how CAN bus network protocol works in automotive or (Local Area Network). Figure 1: These are the books from the courses that we found helpful to design and program our project.
  • 5. 5 Abstract Water/methanol injection has been used on gas powered race engines as a means of reducing air inlet temperatures and to suppress knocking. The reason this is important is because knocking is not good for engine performance. When fuel and air are igniting too soon, the forces want to push down the piston when it has yet to complete a full cycle. These forces could lead to piston damage and cause the vehicle to run very poorly if left unchecked. As a result, the goal for our project was to create a progressive injection system that would spray a 50/50 concentration of water/methanol into the intake system. We have two modes of operation: sport and economy mode. In sport mode, the pumps will activate progressively after a certain boost pressure which is 10 psi while in eco mode, the pumps will activate with temperatures above 120 degrees Fahrenheit. We incorporated a CAN bus into our system as far as capturing which then had to be filtered out to allow the data that was most useful for us to go through. We modeled the behavior of our system and the engine using Simulink. Due to time constraints and Covid we are not able to finish our project, however in the future we plan on creating the physical design to our system and incorporate an embedded processor such as FPGA.
  • 6. 6 Introduction Our senior project is designing a progressive injection controller for vehicles that are forced induction. Forced induction vehicles tend to run hotter than conventional naturally aspirated engines. Due to the extra components of supercharger and turbocharger creating more thermal heat in the engine bay. Automotive manufactures use heat exchangers like the air-to-air intercooler and water to air intercooler for the cooling effect of the intake temperature going into the engine. However, that alone is not enough to cool the intake temperature low enough to prevent knocks on a hot summer day. The reason why we use methanol in our project is because methanol is a fuel additive. It raises the octane of the gasoline and burns cooler than regular gasoline. As a result, the fuel burns more efficiently and creates less heat in the combustion chamber which lowers the exhaust gas temperature (EGT). This is a very useful additive because it will prevent the engine from knocking and the catalytic converter from overheating. The advantage of spraying a mixture of 50/50 concentration of water/methanol into the intake manifold pre-throttle body will cool the air mixture entering the engine and making the air denser.
  • 7. 7 Water/Methanol Injection Process Water/methanol injection is a way of introducing atomized air into a cars intake system as a way of lowering intake temperatures and preventing knocking or pre detonation of the engine. It is used in gas powered race engines that are equipped with turbocharged and supercharged engines as a means of increasing boost without having to rely on high octane fuel. How it is able to do this is by spraying the air that’s flowing through intake with a mist of water/methanol. The water/methanol will change state from a liquid to a gas and cool the air that’s going through the intake. The cool air will then finish off in the combustion chamber where fuel is introduced. As a result of having denser air in the combustion chamber the fuel can be burned more efficiently since we can pack more air molecules per unit volume. When there is less air in the combustion chamber the piston has to work harder to burn the fuel which is why knocking is more imminent. That is why Water/Methanol injection is good for improving gas mileage, increasing horsepower up to 20%, and you can use it with low octane fuel.
  • 8. 8 Objective Different techniques have been employed to improve the water/methanol injection. The common technique is using the boost pressure reference for controlling and the duty cycle of the fuel injector. The Progressive Injection Controller team overall objective is to develop and research to implement CAN-bus capability. The solution is to use the CANbed board device to capture serial data from the car on-board diagnostic port. The next challenge is to map out the address and filter out the unnecessary data we do not need for the controller. The main parameters that we want to capture from the serial data is the manifold intake temperature and the manifold boost pressure. The second possible solution can be utilizing external sensors offered from the Nucleo board expansion shields. The team decided to stick with the first solution and continue the research and development of CAN-bus into our controlling system. As a result, the team successfully filtered the signal from the car. Our next step is to send it through a serial parallel interface port using our knowledge in the ETE344 microcontroller. We reference the materials and book from the class to understand the pin mapping and I/O to get connectivity from Nucleo and CANbed boards. Our goal for the rest of the semester is to complete a physical design and implement PID into our Nucleo Board. Also, to test the system using a dynamometer to get a reference of where the system is at and efficiency of spraying water/methanol into our engine.
  • 9. 9 Purpose The purpose of the project is from the existing water/methanol injection kit in the automotive industry. We are inspired by the design and the advantages of using this system in our car. However, we seek an opportunity for improvement with the existing product. The kit that we use to compare our design is the AEM water/methanol injection kit; it uses a closed-loop system for injection. It only has a preset parameter from the end users to start and end injection activation. Their design uses the manifold pressure to get the pressure reference for controlling. The system is a feed forward design because it only turns the pump on or off. We want to create a controller that is progressive and closed loop PID. Our project incorporates the CAN-bus signal as the input to our controller which none of the kits in the industry have that capability. The purpose of this project is to create a robust design and because it comprises all the sub-disciplines of electrical mechanical. We are both car enthusiasts and interested in automotive engineering. We want to use this project as a canvas to showcase our understanding and incorporate the technical course in the Electronic System Engineering Department. Using this opportunity to research and develop soft skills and project outside of the classroom. My partner and I both want to take a deeper dive into understanding control system theory and how to incorporate industry software like MATLAB/Simulink and Microcontroller for managing the I/O of our system.
  • 10. 10 Project Schedule Figure #2: Project Schedule and tasks for each member This is a schedule that we implemented to stay on track for the design and building of the project. Our team met up twice a week to research and work on the design of the injection controller. Every week we submit a 5-15 report to our advisor to keep us honest and discuss our achievements and challenges for the week. The schedule includes tasks for each member which helps us break down the workload for each week.
  • 11. 11 Materials Item Quantity Cost CAN bed board 2 $40.00 Nucleo STM-32 144 Microcontroller 1 Free (Donated from Dr. Boskovich) 12V Water Pump 1 Free Water Tank (2.3 Liters) 1 Free Nozzle 1 $4.99 Methanol/Water 1 Free Car (Mini Cooper) 1 Free Total 44.99 The list above is the materials and cost we spend for the overall project. Granted, the expensive parts like the Nucleo STM32 were leased to us by Dr. Boskovich for the project. We take advantage of my personal car as the test vehicle and the reservoir tank and 12v water pump for the rear washer wiper. The car has the rear wiper delete so the 2.3 liters gallon reservoir and 12v pump is available to us for the methanol/water injection. Preferably we would want to upgrade the pump to a Shurflo pump for higher GPM (gallon per minute) and higher PSI rating for injection.
  • 12. 12 CANBUS for Automotive What is a CAN bus? The Controller Area Network (CAN bus) is the nervous system, enabling communication. In turn, 'nodes' or 'electronic control units' (ECUs) are like parts of the body, interconnected via the CAN bus. Information sensed by one part can be shared with another. CAN bus is a robust vehicle bus standard designed to allow microcontrollers and devices to communicate with each other's applications without a host computer. Figure 3. The interconnection of the CAN bus network in a automotive vehicle CAN uses a differential signal with two logic states, called recessive and dominant. Recessive indicates that the differential voltage is less than a minimum threshold voltage. Dominant indicates that the differential voltage is greater than this minimum threshold. Interestingly, the dominant state is achieved by driving a logic '0' onto the bus, while the recessive state is achieved by a logic '1'. This is inverted from the traditional high and low used in most systems. Using our knowledge from the course ETE4351 we learned that the CAN is a CSMA/CD protocol, meaning each node on the bus can detect collisions and back off for a certain amount of time before trying to retransmit. This collision detection is achieved through a priority arbitration based on the message identifiers.
  • 13. 13 Figure 4. Standard CAN frame format. The standard CAN message frame consists of a number of bit fields. The frame begins with the start of the frame and the 11 bit ID for priority control, which establishes the priority of the CAN message. The lower the bit size the higher the priority of the message. The cyclic redundancy check (CRC) is a 16-bit checksum for detecting errors in the transmitted data. If the message is properly received, the receiving node overwrites the recessive acknowledge bit (ACK) with a dominant bit. The ACK also contains a delimiter bit to keep things synchronized. From the data network course, we learned the importance of the CRC32 function in a communication network. The CRC is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data. Blocks of data entering these systems get a short check value attached, based on the remainder of a polynomial division of their contents.In order to capture data from the CAN bus network from the car we need a system that could read the CAN bus protocol and filter the serial data signals to utilize for our project. Development Boards
  • 14. 14 Figure 5: Shows the two development boards that were used in this project; the CANbed and the STM32 Nucleo-144. The CANbed contains an onboard processor: ATmega32U4 microcontroller while the Nucleo-144 uses an onboard processor: Arm Cortex-M4. It has a clock speed of 80Mhz and supports Arduino connectivity. CANBUS System In the CAN bus network, each message contains coded information indicating the message beginning and ending, and an identifier or address to route the message to the correct destination. The signal also contains a check function which a receiving control unit uses to check the plausibility of the signal. The transmitting control unit monitors the return of the signal on the bus from the receiving control unit. This way the transmitting control unit confirms the signal received is the same as the one transmitted and any faults can be dealt with. A priority system of control unit or message importance is established providing a smooth flow of information, ensuring that important messages are processed first. Furthermore, we need to use the CANbed Board because it utilizes MCP2515 CAN Bus controllers with SPI interface and MCP2551 to achieve the CAN-Bus capability. On-board diagnostics (OBD) is a self-diagnostic and reporting capability that car dealers and. mechanics use it to identify car issues. OBD2 specifies diagnostic trouble codes (DTCs) and real-time data (e.g. speed, RPM), which can
  • 15. 15 be recorded via OBD2 loggers. Using this port to tap into our CAN bus interface to capture the data we need for our water/methanol injection controller. Arduino IDE Using the Arduino IDE for the CANbed Board. We included the existing library that is in the IDE to write our code to filter the serial messages coming from the CANbus interface. Figure 6: The source code to convert the serial value into numerical values for temperature, rpm, and speed. In figure 6, we utilized the Arduino IDE library to help us capture serial data coming from the OBD2 port of the car. The source code shows how we filter the CAN-bus data coming from the OBD2 port. We managed to do this with the help of the Arduino IDE library with its default
  • 16. 16 library for CAN PID. We just need to adapt the library to our project which is filtering the RPM, Intake temperature, MAF sensor for the boost. The filtered data is ready to be sent out using SPI to the Nucleo Board. We use Wikipedia to map out the serial data coming into our CANbed. Using the pre-existing OBD-2 PID chart we were able to distinguish the hex value to predetermined data. We were able to find the values and math calculation for intake temperature, coolant, rpm, mph, and throttle position. However, we need to convert our values from celsius to fahrenheit because we want to keep the unit consistent when we do PID controlling for our injection. Figure 7: The code above is the predetermined hex values for each data variable.
  • 17. 17 We successfully tested the code and connected the CANbed board to the car OBD-2 port and captured serial data. The next step is to filter the serial data and send that to the SPI line to the Nucleo Board for processing. SPI using Nucleo Board Instead of using the STM32 IDE to code our Nucleo Board. We decided to write the C code in Arduino IDE for the Nucleo board because of the robustness of the Arduino libraries. The library includes CAN_Bus and SPI libraries that we can use for our design. Using the same software for the two boards makes the process of establishing slave and master for the SPI communication less complicated. The Arduino IDE to code the Nucleo board is simple and trouble-free because of the resources available online. However, the issue that we faced was mapping out the STM32 Nucleo Board to the existing board that is available for the Arduino IDE. The library manager in Arduino IDE cloud does not allow users to modify the source code without the original owner permission. We tried a different method of mapping the I/O of the Nucleo STM32 144 pins to work with the Arduino IDE. However, the Arduino IDE does not support our specific board. We would need to buy a different STM32 board that is less capable for our project to run SPI on the Nucleo Board.
  • 18. 18 Figure 8: The picture shows the connection between the CANbed board and Nucleo successfully wired up. Figure 9: SPI code for Slave (Arduino) Figure 10: SPI code for Master (Nucleo STM32) The CANbed board and Nucleo board both come with the SPI, UART, and I^2C ports for transferring data from one device to another. It is easier for us to wire up the SPI port because it only requires 6 ports for transport data and synchronization.
  • 19. 19 Figure #11: The picture shows the working register MISO and MOSI working at the SPI clock speed to receive and transfer serial data from slave to master. This is also called a half duplex communication system.
  • 20. 20 Preliminary Design Figure #12: Sport mode activation: This is the design for the sport mode when the controller gets 10 psi from the manifold it will start the pump at 15% duty cycle. For every psi increment the PWM will increase the duty cycle by 15% up until 17 psi which is around 100% duty cycle for the pump. Figure #13: Economy mode activation: In order to control the pump we use a case statement to trigger the pump on or off based on the error. When the error is greater and equal to zero it will turn off. When the error is greater than zero the PWM will get a value to activate the pump.
  • 21. 21 System Block Diagram Figure #14: Sport mode design block diagram Figure #15: Economy mode design block diagram Here in figures # and #, we have a closed system for sport mode and economy mode. The engine lookup table represents the plant for our system and models the behavior you normally see in an engine. The sport mode includes a pressure sensor where after a certain amount pressure, the water/methanol incrementally sprays a mist into the intake. Eco mode includes a temperature sensor where after a temperature of 120 degrees Fahrenheit, water/methanol is immediately sprayed.
  • 22. 22 Electromechanical Design Figure #16: To begin the water/methanol injection process, first we had to fill our water tank with a 50/50 concentration of water/methanol. The microcontroller in combination with the water pump is used to syphon out the water/methanol out of the water tank and feed it through the pumps. The pumps will spray a mist of water/methanol into the engine which will be located in the intake system before the throttle body. Analysis: The reason for spraying a mist of water/methanol into the manifold is to cool down the charged air entering the engine. The mist of water/methanol will evaporate and cool down the hot air in the intake manifold causing the air molecule to turn denser.
  • 23. 23 Analysis This system will reduce air inlet charge temperature and the pump will atomize the water/methanol into the airstream and evaporate which makes the air denser and cooler before entering the combustion chamber. This system can reduce detonation (knock inside the engine) and for direct injection motor it can clean and reduce the carbon deposits prone to these types of engine. In the future we will try to dyno test the car and establish a base horsepower and torque of the motor. To be able to see the performance gain running water/methanol into the motor. We successfully simulate the design through Simulink and our next step is to incorporate the physical sensors and test out the pump. Also, we will be working on the CANBed for the car once the circuit arrives. Using Simulink we will be driving the pumps with a PWM signal into the Nucleo. For eco mode, the PWM signal will turn on when intake temperature goes past 120°F and for sport mode the PWM signal will turn on incrementally at 10 psi. We will create a user interface that will give the option to change from eco to sport mode. We will also need to figure out the frequency to drive our pumps. Overall, the simulation was a success, and we will continue to implement the CAN bus into our controller. However, our second option will be using an external sensor for our PID if it is more suitable for our project.
  • 24. 24 Issues Identified The problem our team was facing regarding the CAN-bus interface was we did not know how the automotive network would run and operate. We had to do some research on the topic in order to implement it into our design. CAN-bus is a tricky system because every car manufacturer has different techniques that they adopt for their vehicles. Since we are using the MINI Cooper S 2006, we narrowed our research to the Bentley manufacturer. The second challenge that we faced was pin mapping the Nucleo STM32 board to gain connectivity with the CANbed board. The CANbed board has an on-board processor ATmega32U4. The board is controlled and processed by the Arduino Leonardo. We had to figure out the pin mapping of the two boards to get the serial parallel interface to work (SPI). For our project we wanted to use the SPI technique to send filtered data from the CANbed to the Nucleo for controlling. COVID-19 mitigation effort, the team were not able to meet up because of the school closure. We were unable to utilize the engineer lab to diagnose our issue with the circuit. We have limited resources offered to us. As a result, we moved our design to a virtual environment using MATLAB/Simulink to model and simulate our design. We successfully modeled the sensors including the boost pressure and intake temperature to operate in our PID controller. We managed to design and create the block diagram of our system. Due to the time constraints and the failure of our CANbed board during testing we could not implement the engine model in Simulink. We had a backup plan of including the lookup table in Simulink to model the engine behaviors. We were then able to continue our design using Simulink to complete the PID using this lookup table method and system ID in MATLAB/Simulink.
  • 25. 25 Results Figure 17 : Through the Simulink simulations, temperature is rising and slowly cooling down once it reaches a maximum value of 140 degrees Fahrenheit. We want the pumps on at 120 degrees Fahrenheit. Figure 18: The amount of error between the current temperature and ideal temperature of 120 degrees Fahrenheit
  • 26. 26 Figure 19: PWM signal will be turning on depending on when current temperature surpasses ideal temperature of the intake. It turns on right when temperature exceeds 120 degrees Fahrenheit and turns off below 120 degrees Fahrenheit.
  • 27. 27 Testing & Refining the system 3 Test Consider Performing 1. Perform a dynamometer test for the base Horsepower and Torque 2. Test with Water/Methanol Injection 3. Tune the PID for spray efficiency Figure #20: Dynamometer/ Dyno graph In figure #20, A dynamometer or "dyno" for short, is a device for simultaneously measuring the torque and rotational speed (RPM) of an engine, motor or other rotating prime mover so that its instantaneous power may be calculated, and usually displayed by the dynamometer itself as kW or horsepower. In figure #20, A typical dyno graph will show the power and torque of a vehicle through the full rev range at full throttle. Often this will show a before and after graph, overlaid on the same sheet to make the differences clear, with a peak power and sometimes peak torque figure. We can use the dyno graph to compare the efficiency of the system and visually see the gain of injection water/methanol into the engine. Why testing? The reason for testing is to improve our system and gather data for analysis. We want the system to run at maximum efficiency and to compare previous data with updated design.
  • 28. 28 Furthermore, we consider optimizing the spraying duty cycle based on the rpm of the engine. Reason being the engine speed is very sensitive and we want to scale our injection based on the rpm load. Conclusion There are many different perspectives when it comes to what kit to buy to achieve water/methanol injection. There are kits out there that are inexpensive but the danger of buying a cheap kit is that you end up with cheap parts such as the hoses and nozzles that damage your engine in the long run. Then you have kits out there that are expensive that have high quality parts and are controlled electronically. The great thing about electronic controllers is that they use a pressure sensor that monitors how much boost is present and then determines how much water/methanol should be sprayed. By having an electronic controller, you are less likely to run the risk of hydro locking the engine. From our results and research, we know that water/methanol decreases intake temperature due to how quickly it evaporates when it is in contact with air. This system will reduce air inlet charge temperature. The water pump will atomize the water/methanol into the airstream and evaporate which makes the air denser and cooler before entering the combustion chamber. This system can reduce detonation (knock inside the engine) and for direct injection motor it can clean and reduce the carbon deposits prone to these types of engine. In the future we will consider dyno testing the car and establish a base horsepower and torque of the engine. To be able to see the performance gain running water/methanol into the system. We will create an interface that will give the user an option to switch from eco to sport mode. Overall, we successfully designed a closed loop injection controller and simulated the engine behavior of the system via Simulink using a lookup table.
  • 29. 29 We were able to establish a connection between the Nucleo and CANbed boards. For future improvement, we will complete a physical design, fine tune our PID, and implement our system with an embedded processor through FPGA.
  • 30. 30 Work Cited CSS Electronics. (n.d.). CAN Bus Explained - A Simple Intro (2021). CSS Electronics. https://www.csselectronics.com/screen/page/simple-intro-to-can-bus/language/en. Wikimedia Foundation. (2021, May 15). Dynamometer. Wikipedia. https://en.wikipedia.org/wiki/Dynamometer. Thakur, M. R. (2019, January 3). Arduino SPI Communication Example. Circuits4you.com. https://circuits4you.com/2019/01/03/arduino-spi-communication-example/.