nokia 5110 and ethernet shield

Hi Everyone,

I am working on an arduino project for automated gardening. I am using an arduino mega 2560, nokia 5110, ethernet shield and various sensors. I has everything working great till I hooked up the ethernet shield. When the Ethernet.begin() and server.begin() code starts the nokia 5110 goes blank.. I am using the standard ethernet library that comes with the arduino ide and I am using Nokia5110_Basic library for the screen but have also tried the Adafruit library with the same results. I have been searching and trying different things for months and I would really like to get this going so figured I should turn here and give it a shot to see if someone can help. Can anyone give me any advice on how to make these 2 play nice?

Thank you in advance for any advice. Thank You, David

Very likely a clash of pins, and probably pin4. I would leave the Ethernet alone and address the display by calling different pins. I don't know that library, so if your code does not provide that, you might change to a library that does. Try the one from Henning Karlsen. I have not used it myself, but it is probably the easiest to use. Note that the 5110 can go on the SPI bus.

These are the pins I am using for the 5110:

SCK - Pin 52
MOSI - Pin 51
DC - Pin 9
RST - Pin 8
CS - Pin 50

OK, so much for that little idea.... The 5110 is already on SPI, and there are no obvious groundss for being suss about pins 8,9.

So here is another guess - inadequate power. I assume the Ethernet shield is a standard W5100 shield. They consume about as much power as a Mega, and get power off the VIN pin, not 5v like a sensor would, hence the regulators like, and in the same place as, those on the Mega. You may be trying to run this gear remotely in a garden, and on battery power. If the power is marginal, adding a Ethernet shield would be a pretty sure way to kill it altogether. Please don't tell us you are using a 9v PP3.

If you are using any type of battery power, you can verify all this with a 9v wall wart. At least that would verify that the code is kosher.

There are several avenues to a battery-powered project, none of which go past a PP3. I doubt many would go past an Ethernet shield either, which goes some way to explain the provision on most shields for getting power over the Ethernet cable.

Thank you in advance for any advice.

There are three posts at the top of this forum. Read them. We don't help people that can't be bothered doing something that simple.

Thank you Nick and sorry for not replying back sooner. I have the power to the LCD separate and still the same thing. Screen goes blank but still lit up. Anyway thanks for your help :slight_smile:

OK some guessing...

You should not need to have a separate power supply. The Ethernet shield is the power hog, not the LCD, and they both should work fine off the back of the Mega anyway, provided that you do the job in a sensible manner - i.e. a wall-wart.

You have not said what you are using for power. If it isn't a wall-wart, I suggest you use one just to prove that point.

It is just possible that you have incurred a grounding problem, bearing in mind that some 5110s have a separate ground for the backlight and thus could conceivably work when the display doesn't.

Yes am using a 12V 2A wall wart for power... The only thing I am using at the moment is the Arduino Mega, Nokia 5510 Screen, and the Arduino W5100 Ethernet shield. I have tried using the Phillips PCD8544 library, the LCD5110_BASIC and the adafruit pcd8544 library and have the same result.

I was having the exact same issue with a ENC28J60 ethernet module and a SPI 5110 display.

I solved the issue by putting the 5510 on separate I/O pins, rather than sharing the SPI pins with the Ethernet module.

It used more I/O pins on the Arduino, but it resolved the issue.

Hm, I've used the PCD8544 (it's not a Nokia 5110 - that's a phone! It's the screen used in the Nokia 5110) on the same SPI as an SD card, and they worked there... I wonder if DC, RST, or CS are not wired right...

Oh, yeah, CS is wrong, assuming you meant it when you said:
CS - Pin 50

Pin50 on the mega is (according to the pinout maps on google at least) MISO for the SPI, so when communicating with the W5100, pin50 will be going low, and the PCD8544 will think you're talking to it, and the other SPI lines will be active....

Use a different pin for CS on the display.