Part2:DIGITAL LPG METER PROJECT: Connecting and identifying the LCD

LCD Model: LCD-AC-0802E-MIA A/K-E6 C
Bought it on Ebay from Artronic for less than 6 Euro, shipping included.






PIN 1 2 3 4 5 6 7 8 9 10 11 12 13 14 A K
CONNECTION VSS VDD VO RS R/W E DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 LED+ LED-



// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

If you like you can change the pin connections to keep the PWM channels free.
Change the physical wire and make sure you change this pin number in the code.



sources http://pa6.nl/
http://www.dancefusion.nl/
https://sites.google.com/view/nl-marketing/
http://likes-kopen.simplesite.com/


Part1:Introduction:Digital LPG Fuel Meter with radius of action counter in KM

Introduction

My car has a bi-fuel system. This means I can drive on regular Euro95 Benzine and LPG gas.
To toggle between these different fuel types there is a switchbox.
This (Necam) switchbox has 4 leds to indicate the fuel level of the LPG.
Because of the poor indication I would like to get a better view how much is left in the fuel tank and how far I can drive with it.


To get a better view I would like to present this information on a LCD.
The 4 leds or the signal which controls these leds are gonna be used for a 0-100% scale.
I use a math formula to calculate the distance how far I can drive based on the scale and the total radius of action.

Because this LCD must be small and I don't have many characters to display I choose for a 2x8 LCD. This LCD is based on the HD44780 controller and has 2 lines with 8 characters each.


I want to use the Arduino/Atmega328 to calculate the output of the switchbox and drive the LCD.
With the little test code you can see how it looks (animation) on the LCD.

// include the library
#include <LiquidCrystal.h>
int i;
unsigned int KM = 4.2; //How much KM I can you drive on a full tank divided by 100
// initialize the interface pins
LiquidCrystal lcd(4,5,6,7,8,9 ); // digital pins which are used by the LCD


void setup()
{
  // sets the LCD's rows and colums:
  lcd.begin(16, 2);lcd.clear();delay(500);
}


void loop(){
//{lcd.setCursor(0,0);lcd.print("LPG CHK");delay(2000);lcd.clear();delay(1000);
for (int i=100 ; i>=1 ; i--) {lcd.setCursor(0,0);lcd.print("LPG ");lcd.print(i);lcd.print("% ");


lcd.setCursor(0,1); lcd.print("+/-");lcd.print(i*KM); lcd.print("KM");delay(1300);
}
}

The video below gives you an example of the above script. This is just a test with a different LCD.