Arduino voltmeter using an LCD

Hi everyone,

I am building an arduino voltmeter and using an lcd as a display

The backlight is showing but I cant seem to read any values on my LCD display.( dont know if I have a problem with the sketch)

Please help

Thank you very much

dont know if I have a problem with the sketch)

Me neither.

Which LCD?
How is connected to your Arduino?
What sketch are you running?

To diagnose a problem you have to post your schematic and your code, otherwise there is nothing to diagnose. Most people here seem to use Fritzing http://fritzing.org/ to post schematics because it is very simple to use.

Okay..

My bad I would go ahead and post the sketch

and its 16x2 parallel lcd display

/* Project A Voltmeter: Voltmeter based on voltage divider concept*/

#include <LiquidCrystal.h> //include the library code

LiquidCrystal lcd(7,8,9,10,11,12);

//variables for input pin and control LED

int analogInput =1;
float vout=0.0;
float vin=0.0;
float R1=50000.0; //resistance of R1
float R2=4400.0; //resistance of R2

//variable to store the value

int value=0;

void setup(){
pinMode(analogInput, INPUT); //declaration of pin modes

lcd.begin(16,2);
lcd.print("Vin="); //set up LCD'S number of rows and columns

}

void loop() {
value=analogRead(analogInput); //read the value on analog input

vout=(value*5.0)/1024.0;
vin=vout/(R2/(R1+R2));

lcd.setCursor(4,0); //print result to LCD display
lcd.print(vin);
lcd.print("V");

delay(500);

}

Well, maybe it is hardware. What you say about the backlight being on but no text showing has happened to me before prior to adjusting the potentiometer. Do you have a pot installed on the LCD and have you run it through the whole range? The other time I had no text show on an LCD was because I had two of the data wires wired in backwards so it is always good to double check the wiring and make sure all the 8 (if I remember correctly - 4 for data, 2 for control) pins you have wired are receiving data. If you have a logic probe you can actually hear the data as it is being sent from the Atmel to the LCD controller. Just general hints...

Divide and conquer.
Debug the conversion using serial prints.
Debug the LCD using constants.
Never debug two unknowns.

AWOL:
Divide and conquer.
Debug the conversion using serial prints.
Debug the LCD using constants.
Never debug two unknowns.

Hi AWOL I do not understand what you mean please

Please explain

Thank you

Do you know if your LCD works?
No.
Do you know if your conversion hardware works?
No.

So why try to debug both at the same time?

Serial prints nearly always work, so, prove one thing at a time.

AWOL:
Do you know if your LCD works?
No.
Do you know if your conversion hardware works?
No.

So why try to debug both at the same time?

Serial prints nearly always work, so, prove one thing at a time.

My LCD is showing backlight so I guess its working..Please I'm new to this
what is conversion hardware and what should I prove?

Please assist.

Thank you

My LCD is showing backlight so I guess its working

But it is just a guess.

Which pins on the LCD are connected to which pins on the Arduino?

dxw00d:

My LCD is showing backlight so I guess its working

But it is just a guess.

Which pins on the LCD are connected to which pins on the Arduino?

The pins on the LCD connected to arduino are

PINS 12,11,10,9,8,7 on arduino to

14(DB7),13(DB6),12(DB5),11(DB4),6(E),4(RS) on the LCD respectively '

THANK YOU

abbyo:
My LCD is showing backlight so I guess its working..Please I'm new to this
what is conversion hardware and what should I prove?

That proves that you have two pins right, the two backlight pins. If memory serves there are 9 others to get right, power, ground, the contrast adjust, 4 data pins, and 2 control pins. It's best to double check all of those with a logic probe to make sure they are what they should be and you can hear the arduino sending data. That's what I was pointing out.

You have read this and double checked against it, right:


http://arduino.cc/en/Tutorial/LiquidCrystal

You do have a pot in there, right? It is a 10k pot, right? You have run it through the entire range, right?

Start arduino IDE, go to File->Examples->LiquidCrystal->HelloWorld.

Open that sketch, connect the wires according to the sketch instruction and test your display.

Your argument regarding the LCD working is fairly weak. I wouldn't call the display working when I see back light working. I would call the display working when I see the HelloWorld sketch running and displaying message on the LCD. Just like what AWOL said, solve the LCD problem before solve the next problem. If you posted this on the display sub-forum, someone will have asked for hi-res picture showing how you connected the wires. ATM you're just all talking. There is no proof you actually did the wiring right.