Display coming with Genuino UNO starter kit not displaying

Hi All,

first post here :slight_smile:

Just bought Genuino Starter Kit and wanted to see how to control the supplied LCD.
Using “Crystal Ball” project as a starting point, I stripped it down to a minimum, just to light up the LCD and write a line on it.

Connections are basically as in the cited project:

  • D4…D7 on the display to P5…P2
  • RS/EN to P12/P11 on the Genuino board.

Other connections:

  • LED- goes to GND, LED+ to 5V through a 220Ohm resistor

  • VCC goes to 5V, VSS to GND

  • R/W to GND (write mode)

  • VEE (called V0 in the book, it’s marked VEE in the display PCB): at the beginning I pulled it to 5V. Then, since I was not seeing anything, I connected the potentiometer (10k) and tap its voltage from there. I do not have a VMeter right now so I am feeding the pot tap back to A0 and doing a serial.print(analogRead).
    I can thus see the different voltages and they look “OK”.

However, the LCD does not show a single character. It’s just bright green :slight_smile:

Full Sketch:

#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
const int SensorPin = A0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
lcd.begin(16,2);
lcd.print("Hiaayaya");
}

void loop() {
// put your main code here, to run repeatedly:
int SensVal = analogRead(SensorPin);
Serial.println(SensVal);
delay(2);
}

Attached please find a pic of the connected board.

I’d be glad to know that I am missing something basic and not that I have to return the LCD…
Any help greatly appreciated, thank you in advance.

Mike

  • VEE (called V0 in the book, it’s marked VEE in the display PCB): at the beginning I pulled it to 5V. Then, since I was not seeing anything, I connected the potentiometer (10k) and tap its voltage from there. I do not have a VMeter right now so I am feeding the pot tap back to A0 and doing a serial.print(analogRead).
    I can thus see the different voltages and they look “OK”.

The voltage at pin 3 will typically be less than 0.5 volts with respect to GND in order to see anything on the display. If you pull it to +5v your display is guaranteed to be blank.

Most datasheets show the ends of the pot connected to +5 and GND (pins 1 and 2) and the wiper connected to pin 3. In order to get the required contrast voltage the wiper will be quite near (or at) the GND end of it’s range.

After connecting the power and contrast and before running your sketch you should adjust the contrast until you see a single row of dim boxes on the top row of your display.

You probably should remove the yellow wire between A1 and LCD pin 3 and get rid of the stuff in loop() until you get the display working.

Don

EDIT: That’s a really nice photo, I wish they were all like that.

You should go back and edit your original post. Highlight the part that is code and use the code button </> to properly display that code.

Nice socks.

Thanks Don for your reply, and of course between men of taste like us I appreciate your comment on my trendy socks :slight_smile:

I should have read the DS for the display, then I would have known that you need a relatively low voltage to see anything, as you say.

The yellow wire and the rest of the code isn’t harming anything of course, just reporting on the read voltage wherever I decide to hook up one end of it (the other being A0).

I probably wasn’t clear enough in that I did have the pot on, but could not find any position yielding to visualization.

The reason? Pot is lousy quality and does not produce 1/10 division very reliably. I went on and picked up the next one from the box and…Everything works fine now! Check the pick :slight_smile:
I also tap 3.3V for the hot side of the potentiometer, just to bring it into an easier range of ratios.

Many thanks for your help!!

/Mike

Paul will be here soon to tell you you can use a smaller pot, wired as a rheostat, between pin 3 and GND to get a finer adjustment. A fine adjustment really isn't necessary as the range of acceptable values is quite broad.

I guess you have figured out by now that the -4.5v shown on the datasheet for the typical voltage at pin 3 is measured with respect to the +5v supply.

Don

Yes, there's thousand ways once one knows you have to target 0.5V...and that your first pot is broken :slight_smile:
With a functioning pot out of 3.3V, there is approx 30 deg from nicely (full dial) to barely visible so yes, had I chosen any other of the two available pots, I would have missed the lesson :stuck_out_tongue_winking_eye:

Cheers,

/Mike

floresta:
Paul will be here soon to tell you you can use a smaller pot, wired as a rheostat, between pin 3 and GND to get a finer adjustment. A fine adjustment really isn't necessary as the range of acceptable values is quite broad.

And on that basis, just swapping in resistors in the range from zero to about 470 Ohms will generally work quite well.

Hey, this all happened in my sleep time, but thank you for doing my job for me! :grinning:

Yes, indeed I will soon move to a fixed ratio. I have only the values coming with the starter kit though, so I'll have to get some other R value.
It was a nice start into Arduino fiddling, thanks for your help guys :wink:

M

Interesting that you use the word “ratio”.

The point is that there is already an 11k resistor chain on the display board between Vo and Vcc, so you only ever need a single resistor between Vo and ground to set the voltage.

Paul__B:
Interesting that you use the word “ratio”.

The point is that there is already an 11k resistor chain on the display board between Vo and Vcc, so you only ever need a single resistor between Vo and ground to set the voltage.

Hmm Paul that’s interesting. Obviously I refrained to look at the DS so far but now I followed this link and opened the document:

There, on page 9 (sorry I can’t attach pictures from where I am now), you see a kind of “power supply” reference drawing.

As you say, there is a “rheostat connected” 10K pot, kinda mid-way, so probably 5K from Vo to VSS, this would not work if there wasn’t another R from Vo to some higher potential.

I find strange that the resistor string you mentioned is not to be found in the DS, and more than that I find strange the way this control is implemented in the Kit’s project.

Slightly misleading I would say.

/M

As you say, there is a "rheostat connected" 10K pot, kinda mid-way, so probably 5K from Vo to VSS, this would not work if there wasn't another R from Vo to some higher potential.

I find strange that the resistor string you mentioned is not to be found in the DS, and more than that I find strange the way this control is implemented in the Kit's project.

The HD44780U datasheet is for the controller itself whereas the resistor string is on the LCD module. I don't recall ever seeing a datasheet for an LCD module that includes the detail that would show how they are deriving the voltages required for the controller.

The required voltages are sort of shown at the very bottom of the Block Diagram which is on page 3 of my HD44780U datasheet.

Figure 21, on page 37 of that same datasheet shows two representative schematics of how those voltage could be derived from a tapped voltage divider (a resistor string) and it seems that most, if not all, module manufacturers have used such an implementation. Note that the on those diagrams the potentiometer is returned to -5V and not GND. This is required for some of the extended temperature devices but GND is OK for the regular duty ones.

Don

And the fact is that on figure 21, it is correctly shown as a variable resistor.

Somewhere early in the datasheets for the assembled modules, an "application" schematic showed this wired as a 10k potentiometer and this has been slavishly copied without thinking by successive assemblers, essentially word for word and line for line. Presumably the original reason was that particular potentiometer happened to be lying on the bench!

Given that the resistor ladder on all these modules consists of five 2.2k resistors ("222") - denoted (not surprisingly) R1 to R5 to total 11k, there is no benefit of using a potentiometer and a rather unnecessary wastage of 500 µA - which is actually relevant as it is apparently substantially greater than the operating current (page 48) of the chip itself and to no possible advantage whatsoever.

That is to say, if the chip itself draws nominal 150 µA, the 11k divider necessarily about 410 µA, but if you add the 10k potentiometer instead of a 1k variable resistor, you increase the current draw from 560 µA to 1.06 mA. All this of course, in the absence of LED illumination.

Guys,

many thanks for the inputs.
I’m into low power and good engineering so I’ll grab some resistor and set Vo for good :smiley:

I still feel that the project could be better written, and maybe also a pointer to the much more exhaustive HD44780U DS instead of the one linked in the site would help those willing…but not so willing as to read the controller’s part number.

What’s your opinion?

I guess I would have to have access to the project before I could offer an opinion.

Don

I understand your point, Don.

However, since I am now back home and can check, I can tell that there is no apparent way to get from the DS linked in the Starter Kit’s description, to the one you guys have been talking about.

I was under the impression that the controller chip was accessible, but this is not the case so I am wondering what steps could I have taken - besides posting in the Forum - to get to know the info you kindly shared. Including the controller’s DS, that is.

Re: the project, I guess the point is that it suggests the use of a potentiometer between 5V and GND, with the tap wired to Vo. I do not think this is a sensible solution:

a) for what we said about current consumption
b) as it obscures the underlying circuit between controller and display

I think one can have an opinion on this even without access to the full project pages, which I can scan if you are inclined to read them.

But I am fine also with closing the item, I do not think that’s a big deal :slight_smile:

Cheers,

Michele

Re: the project, I guess the point is that it suggests the use of a potentiometer between 5V and GND, with the tap wired to Vo. I do not think this is a sensible solution:

This is the setup that is put forth on most data sheets.

Paul suggests that it is the result of some early technician coming up with a solution that worked for him with the parts he had on hand. This technician then documented his solution in an 'application note' that was subsequently copied by almost everyone that succeeded him.

I wouldn't be surprised if some module manufacturer comes up with a circuit that doesn't use the aforementioned resistor string but so far that hasn't happened. So the single resistor or rheostat solution appears to be valid in spite of what most datasheets show as the 'correct' hookup.

Don

Hmm, maybe I am missing something…Because as crappy as this DS can be, it does show a right schematic. I.e., one in which there is a rheostat between Vo and VSS and not a potentiometer between VCC,Vo,VSS.

This is the schematic to be found on page 116 of the project book:

I’ve drawn the two solutions just for clarity:

Solution 1 is what the project book says, using a potentiometer to generate Vo

Solution 2 is what the DS to be found here says. This is not the best DS I’ve seen, but it is correct.

As a side point, the HD44780U DS you showed me is not reachable from the information in the Starter Kit and its description in this site.
If you have an alternative way to get to this information - other than asking in the Forum as I did - I’d be glad to hear it.
This being the case, I would say it would be nice if this information was available on the Starter Kit description page, directly.

/M

Do note that if using a series variable resistor, it should be a 1k rather than a 10k, otherwise you merely repeat the problem of it only functioning over a tiny fraction of its range.

Although if you use a 10k, then the working range is expanded by the variable resistor configuration as compared to the potentiometer configuration. It is thus beneficial if possible, to cut the track to the 5 V connection to the potentiometer on the modules.

Hmm, maybe I am missing something…Because as crappy as this DS can be, it does show a right schematic. I.e., one in which there is a rheostat between Vo and VSS and not a potentiometer between VCC,Vo,VSS.

This is the schematic to be found on page 116 of the project book:

Sorry. This awful schematic does in fact shows the potentiometer connected as a voltage divider, not as a rheostat. The left end of the potentiometer is connected to VCC, the right end is connected to VSS and the wiper is connected to VO.

If the potentiometer is physically mounted on the pc board it may or may not be possible to simply cut a trace to convert it to function as a rheostat, that would depend on the layout. If it is mounted externally then you can simply omit the connection to VCC.

Don