Circuit Wiring

This is my first ever post on here and it is due to a recent personal project i started on a Mega 2560 board. (I was attempting to build a temp and humidity sensor for which i would need to display the values on a LCD display). At first, i built the circuit according to a reference project and i noticed the LCD screen would light up only the first half of the screen (it would be lit up white boxes) img1

Then, assuming my LCD display is not working, i took everything apart and built an initialization LCD circuit.. in which i have read that it should display boxes on the top row. But, when i wire it up very basically, it just lights up but nothing happens. Can anyone tell me whether my LCD might be broken? (I have purchased 3 up till now and would hate to return to the store for ANOTHER broken LCD)

Kindly provide any advice or insight you may have to offer ( I am a complete beginner in Arduino)

I have attached all the pictures of my circuit wiring and of the LCD display.

EDIT 1: I rewired the circuit to include a resistor for contrast (V0; did not use a potentiometer because when i did use it.. it did not make any difference when changing the resistance) I also placed a 100ohm resistor for the backlight (pin A).

The code I used:

#include <LiquidCrystal.h>

const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;

LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() { // set up the LCD's number of columns and rows:
lcd.begin(16, 2); // Print a message to the LCD. lcd.print("hello, world!"); }

void loop() { // set the cursor to column 0, line 1 // (note: line 1 is the second row, since counting begins with 0): lcd.setCursor(0, 1); // print the number of seconds since reset: lcd.print(millis() / 1000); }

Also, i have uploaded a close up picture of my LCD and there seems to be a faint 'Dark' spot towards the middle of the display.. does that imply it is damaged?

  • Can you please share your code and as per the connection I can only see the supply connected to the display the data line pins are not connected to it if you connect them it might get started working but if there is an issue in the code also we will need to check your code – Maaz Sk Feb 22 at 4:48
  • Hi,I updated my post with the code i used for this application. Kindly have a look and any insight will be much appreciated. – TabbyCat585 Feb 24 at 19:39
  • It looks like you're plugged into 12 and 13 rather than 11 and 12, but the image is not really good enough to have any confidence in that. You camera will likely take pictures under natural light. – timemage Feb 25 at 0:32

It is normal that these displays start up with some lines displaying as all white (and others all dark). That's just how they look before they were initialized.

However, as mentioned above, you forgot to wire the data lines. Pins 7-14 from the display need to be wired to the Arduino, typically pins 4-11. But that depends on the configuration in your sketch. It may also work with only 4 lines, then you would connect pins 11-14 from the display to the Arduino pins 4-7 and configure the display to use 4-bit mode in your sketch.

That said, there are more wiring errors in your picture. The lower pin of your potentiometer is unused, and so like this it has no use (and you cannot control the contrast of the display, also making the text, if there is any, hard to read). The bottom pin of the potentiometer must go to pin 3 of the display (remove the line that is already there).

  • The wiring on this is the most basic wiring (>> Connect the pin vcc pin to 5v>>Connect pin Vee and gnd pin to ground>> Connect Led+ to 5v>>Connect led- pin to ground) i did this to ensure, before coding the arduino, that the lcd works or not. Does that look like the proper start of an LCD.. or is it supposed to display some boxes to show it is functioning properly.. I appreciate your help! – TabbyCat585 Feb 23 at 20:24
  • It would normally show some boxes, yes (not all of these 16x2 displays are exactly equal, but most show boxes in the top row and nothing in the bottom row after connecting power). The reason it doesn't show anything is probably the contrast. If I can see it properly from your image, you need to connect the black wire to the potentiometer (bottom pin) and adjust it until you see the boxes. – PMF Feb 24 at 6:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.