Hello, everybody!
I have a Xerox 4118p MFP, that is situated in another building. I'm printing on it using network. So I have to know if toner is empty or if paper is jammed.
There is no LED that will be active during error. The only thing, that determine, that there is some error with MFP - is a phrase "Toner empty" or "Paper Jam" on MFP's LCD display. So I decided to use Arduino Diecimila to read data from LCD display, analyze it and send to USB port of the nearest server. I know that this solution is funny but I have no other choice.
The LCD display is 2x16 symbols and looks like display, used in article Arduino Tutorial - connecting a parallel LCD
The difference is in the number of pins. Mine has 16 pins. The one in the article - 14.
There is no function for reading symbols FROM LCD in LiquidCrystal Library (LiquidCrystal - Arduino Reference), only for writing symbols TO LCD. I don't know how to detect what phrase was sent by MFP to LCD. As I understand I have to read 8bit data but have no expirience with this.
I will be very grateful for any idea!
p.s. I've attached photos of my LCD and marked its pins.
pic1 - frontside - http://tsurenko.kiev.ua/arduino/1.jpg
pic2 - backside - http://tsurenko.kiev.ua/arduino/2.jpg
Once again help in advance!!!
I'm not sure it's possible to read FROM a display like this. I think I'd be inclined to stick a USB webcam on the nearest server pointing at the LCD screen and look at its picture...
Andrew
I don't think that is possible either.
And even if it was possible i don't think that you can control the display from two sources (the printer and Arduino ) at the same time.
Well the good news is that it is possible to read the data area from the LCD controller.
The bad news is that in order to do this with a display being controlled with another processor you will have to break the connections into the display and install a data select switch (or multiplexer) between the existing connections and the display. Then you will have to switch between the two remembering that if the Xerox wants to put something on the display and it is switched to the controller then you will miss it.
You will also need a good story for when the service man comes round.
Hello again
I've read a lot of stuff about LCD displays and understood, that it uses 8bit data transmition.
I also found interesting table Sitemap - PC Guide which tells me that if I need to print for example capital letter "A" I have to send LCD display command 01000001. For this action all 8 pins (D0-D7) will be used. So to read data sent to LCD by MFP I have to "listen" these 8 data pins.
I have few questions:
- How can I define which type of LCD is used in my MFP: serial or parallel?
- For example MFP sent to LCD phrase "ABC".
According to table "A" is 01000001, "B" - 01000010, "C" - 01000011. What data will I get on D0 - D7 pins? Please, write me an example.
Many thanks in advance!
2MikMo
Oh no, I do not need to control the LCD, I only need to read data, sent to LCD from MFP, from it.
2Grumpy_Mike
Many thanks for reply!
But I do not understand one thing. For example MFP sent "1" or "0" to LCD's data pin #3. Why is it necessary to multiplex or intercept this signal? If I solder one of my Arduino digital input to LCD's data pin #3 will I be able to "catch" this "1" or "0" on this digital input by Arduino?
You can capture the signals without multiplexing but you will not be able to read what is already on the display without multiplexing the signals.
Therefore you are relying on capturing the stream of data sent to the LCD from the Xerox, this is likely to be a lot of data and the arduino has limited storage capacity. I am assuming that you are shipping it out over the serial line as fast as you read it. In which case you will need some RS232 drivers. Or are you planning to use an Ethernet interface?
I think that this is a bit of an advanced project for your current state of knowledge but hey nothing ventured nothing learned.
if you can identify any kind of control bit( r/w ) which will flag when data is being written to the display, you might be able to watch for a string being sent to the display.
might I suggest you learn as much as you can about how to drive that display and then get one and drive it with an arduino to make sure you have it working as it does in the printer. ie using the same number of data and control lines. When you have this working, wire up another arduino as you would inside the printer and try to capture that data being clocked into the display on that 2nd arduino. The trick is going to know when to capture the data from D0-D7 and do it when it's stable.
The other way to do this would be to get a logic analyzer on the display in the printer and have it capture the data stream before, during and after the error is displayed. This way you'll see for sure what kind of stream you'll be looking for and should know how the display is being used so you can snarf the stream with an Arduino.
Doug
2Grumpy_Mike
All I need from Arduino - is no "listen" to that zeros and ones from data pins D0-D7 and to send them to USB. USB will be plugged into the PC, where Python-based application will be running. And this application will make all the job.
I understand that I have no knowledge and expirience, but I'll try to perform next thing: I'll connect 8 LCD data pins to 8 Arduino digital inputs. I'll be monitoring the output, trying to find any regularities.
Also I have one small question:
Can You please using http://tsurenko.kiev.ua/arduino/1.jpg image tell me where D0-D7 pins are (I've numbered LCD pins)? Many thanks!
The problem even with just "listening in" is that the printer is sending lot of information to the display, including a lot of control commands.
It would be very difficult to differentiate between the control data and the actual text data. I might be possible. by listening to some of the control lines as well.
Understood. And it seems to me, that everything is bad for me :-[
But I'll try.
Anyway many-many-many thanks, everybody!
I always knew that Arduino - is great stuff and now I also know, that Arduino forum is very friendly and helpful with good guys!
If you can get the datasheet for your display than it may not be difficult to read the data.
It's the inverse of writing to the display so it will help if you understand the data sheet. If your LCD uses the Hitachi HD44780U, the basic principle is that you monitor the Enable line (probably using an interrupt) and when the Enable signal goes from HIGH to LOW you will check if the RS line is HIGH, and if so, read the 8 bit data. This will be the ascii code being written to the display. You may want to read about direct port IO so you can read all 8 data bits at the same time
All the commands to set the cursor and clear the display are sent when the RS line is LOW, so you can probably just ignore these.
Hope that helps.
Wel that was actually simpler than i expected.
Not too complex to implement.