How to build a Boost & Air Fuel Ratio LCD Gauge
By Paul Vang
Description: This tutorial will demonstrate how to build an LCD boost and AFR (air fuel ratio) gauge and displaying it on a 20x2 Hitachi LCD screen. An Innovate LC-1 will feed the wideband 0-5v for 8-22afr readings. The boost reading was setup to work with a Honda MAP sensor however any map sensor can be used with some change in the code.
The LCD will display Air fuel ratio with an indicator bar ranging from 8-22afr. The LCD will also display current boost/vacuum and peak boost. There will be 4 buttons to enable the menu, navigate and clear the peak boost.
Video Clip of the assembled project working:
4 Push buttons
4 10k resistor
1 10k potentiometer
20x2 LCD (Hitachi compatible)
Usb cable for the Uno
Arduino IDE version 1.0.1 to 1.0.4 (tested)
BMP085 Bosch pressure sensor (for sensing atmosphere if using absolute sensors)
Wire up the project on a breadboard or test board.
Follow the schematic below if needed. Please do note that the schematic has the LCD header upside down. Pin one is at the top right.
Once the unit is wired up, upload the Project file to your Arduino (or compatiple) board. This has been tested on the Uno and Mega2560. Download the code and full details below.
Navigation Push Buttons
There are 4 buttons to navigate the Menu System. In order to invoke the menu, press, the Enter button for 1 second. To navigate the menu, push the Previous/Next button for 2seconds. Press Enter to select the menu, submenus or to commit a change.
Previous (or Peak Boost reset when not in Menu mode)
Exit (Return to monitor screen)
Enter (or commit changes)
The project was developed in Arduino 1.0.1 on a Mac and has been tested up to version 1.0.4 on both Mac and PC. The menu system uses menubackend so that library will need to be included to your Arduino libraries. (How to add libraries: http://www.arduino.cc/en/Hacking/Libraries)
There are 4 tabs when you open the project in Arduino. There are codes next to the each line to give you a general idea of what it’s doing. The first tab houses the void setup and void loop statement. The second tab (Menu_Action) stored the menu commit command. The third tab (Boostafr) stores the boost and air fuel ratio computation formulas. The last tab stores the notes.
EEPROM address 1 is used for Peak boost (Used sparingly as the EEPROM has a life cycle of about 100k writes.
EEPROM address 2 is used for backlight
If you improve or add to it, please let me know so we can update the code on the Tutorial page.
Download the code below in the download link.
The download includes:
1. The Libraries used
2. The Arduino Schetch
3. The Fritzing drawing and schematic
4. The PDF HOW TO document
WARNING: Build and use at your own risk. I do will not be liable for any damages occurred from the project build.
Libraries: Some of the libraries were open source. The respectful owner deserves the credit for creating the libraries.
Go to paulsvang.com for more tutorials in the future.
More details here: http://paulsvang.com/mylife/how-to-build-a-boost-a...
Tested in a car here: http://paulsvang.com/mylife/arduino-air-fuel-ratio...