Arduino read as printer IN Laptop or PC

Good day! I would like to ask for your opinion if my project given to me by my teacher is possible or not and if it is possible, can you give me an idea or guide how to do it? I am making a project of which I am using an Arduino mega 2560 as a replacement of the formatter of the CANON LBP2900 Laser printer. I would like the Laptop or PC read it as a printer once I inserted it to a Laptop or PC port. is there any way how to do this or any resources I can read?

From the knowledge level of the subject indicated by your question, I would say if it is possible, it could only be accomplished after months (if not years) of dedicated effort on your part. The final result would likely be far inferior to the performance of the original printer.

What do you actually mean; what's a "formatter"?

Do you want the Arduino to act as a CANON LBP2900 Laser printer, in other words respond to the PC as if it was one? Pretend in all respects to be one?

If so does that mean to respond with all the things the driver expects like (I'm guessing here, don't know that actual model) toner levels and what paper's in what tray? Must it then ingest print data? Then what?

Are you trying to replace the electronics of the printer with a roll your own version?

Reverse engineering the whole thing?

neiklot:
What do you actually mean; what's a "formatter"?

Do you want the Arduino to act as a CANON LBP2900 Laser printer, in other words respond to the PC as if it was one? Pretend in all respects to be one?

If so does that mean to respond with all the things the driver expects like (I'm guessing here, don't know that actual model) toner levels and what paper's in what tray? Must it then ingest print data? Then what?

Are you trying to replace the electronics of the printer with a roll your own version?

Reverse engineering the whole thing?

Thank you very much for your replies. I am sorry for not elaborating the problem. My Project is about making an Arduino Mega 2560 as the formatter of the CANON LBP2900. The formatter system in a laser printer receives and organizes the print data from the computer and accordingly transforms it into an image and finally transfers it to the Engine control system which then printed the file. I wanted the Arduino Mega 2560 to act as a CANON LBP2900 Laser printer and respond to the PC as if it was one. I just wanted to be able to do basic printing of alphanumeric symbols and characters. So far, as much as possible I would like to retain all parts except the formatter of the CANON LBP2900 Laser Printer such that i can probably finish my project on time.

pert:
From the knowledge level of the subject indicated by your question, I would say if it is possible, it could only be accomplished after months (if not years) of dedicated effort on your part. The final result would likely be far inferior to the performance of the original printer.

if it is possible is there any resources that i can read because so far I am in the middle of the ocean with no compass which direction I should go first.

paulcastor30:
I just wanted to be able to do basic printing of alphanumeric symbols and characters.

Think about how that happens.

You take in a line of data, and let's for now assume there's little if any formatting in there, perhaps just the crlf at the end, nothing about positioning on the page for example . Further assume there's a default font in the printer so it can at least print if no further font details are sent in. So visulalise the line of text, in the right font. Now you essentially need to consider a 1/1200" (or whatever the resolution is) scan line across the page through that line of text. Then construct a scan line of black or white dots for where there is going to be toner or not on the page, and do that 1200 (or whatever, it's been decades since laser printers were as crap as 300) times an inch for a page over 10" long.

Then send that let's just call it "dot knowledge" into the laser electronics (in a format you don't know and which Canon are surely not going to tell you) to control the laser being on or off at the right moment as it scans the photo receptor drum inside for ultimate attraction or not of toner particles.

pert:
I would say if it is possible, it could only be accomplished after months (if not years) of dedicated effort on your part.

You won't do even that in a million years.

neiklot:
in a format you don't know and which Canon are surely not going to tell you

That format to include by the way, its electronic format (connectors, what wire does what, what voltages blah blah) and it's data format (what the signals mean).

AFAIK for most modern (made in the last 10 years) printers a lot of the formatting takes place within the PC.

Whether that is true or not it is my guess that an Arduino Mega has neither the processing speed nor the memory needed for dealing with print data. Back in the day when computer printers were just automatic typewriters it may have been possible but would not have been necessary.

And, as said in Reply #2, this seems like one of those questions where if you have to ask it means it is beyond your capability.

Almost no matter how cheaply you value your time the amount of hours of work that would be needed by you would make a brand new printer seem very cheap indeed.

...R

Robin2:
AFAIK for most modern (made in the last 10 years) printers a lot of the formatting takes place within the PC.

Yes that's actually true, I was thinking of older ones. Even from PCL6 I think, what was sent to the printer is more of a large graphic than discrete characters.

Point is still though, whatever comes in has to be converted to the electrical signals internally that will drive the laser and the associated optics to charge the drum. Whether that's the graphic of a page, or discrete characters for a font, only Canon will know what's going on inside there. And they won't tell.

Maybe OP should try salvage on old dot matrix printer, send it characters at 300 baud and see if s/he can build a front-end for that. Just take in a few ascii codes, and see if you can get it to print the characters. That's many orders of magnitude easier than controlling the internals of a laser printer.

Good Evening Sir, sorry for the late reply, as of the moment when it comes to laser printer operations, I have knowledge for it and also scanned manuals about CANON LBP2900. I studied and realized that if I recreate those electronic parts like laser assembly, sensors, power supply and stepper motor of the laser printer from the scratch and be controlled by Arduino Mega 2560 itself as its core would take me a lifetime to do it so as of the moment I decided to make the Arduino Mega 2560 as a formatter just to start.
If I would like my computer or laptop to detect Arduino Mega 2560 as a printer, do I need to create a printer driver to emulate it as a printer? or is there any way to do it? because maybe if I can do this step first then somehow I can figure something from it that would be very helpful in the future for this project.

neiklot:
Yes that's actually true, I was thinking of older ones. Even from PCL6 I think, what was sent to the printer is more of a large graphic than discrete characters.

Point is still though, whatever comes in has to be converted to the electrical signals internally that will drive the laser and the associated optics to charge the drum. Whether that's the graphic of a page, or discrete characters for a font, only Canon will know what's going on inside there. And they won't tell.

Maybe OP should try salvage on old dot matrix printer, send it characters at 300 baud and see if s/he can build a front-end for that. Just take in a few ascii codes, and see if you can get it to print the characters. That's many orders of magnitude easier than controlling the internals of a laser printer.

may I ask Sir how to send data from PC/Laptop to the printer? is there specific application or steps or guide or reference to do it? i am very willing to try it for the sake of knowledge.

What you want to do is impossible.

The computer chip, memory and firmware inside a modern printer is as powerful as some laptop computers.

That cannot be replaced by an Arduino, which is a toy intended for learning and for very simple tasks.

Pick another project.

my project given to me by my teacher

Show your teacher the responses from forum members.

If I would like my computer or laptop to detect Arduino Mega 2560 as a printer,

There is no simple way to make the PC see your Arduino as any thing but an Arduino The Mege cannot be another USB device type.

A leonardo could but .........

Mark

Is it possible to tweak Arduino Mega2560 such that PC or Laptop will detect it as a printer? because I have seen that some Arduino board version can be programmed as a Human Interface Device ( HID ).

Is it possible to tweak Arduino Mega2560 such that PC or Laptop will detect it as a printer?

That question was answered in your other post.

paulcastor30:
Good day! I would like to ask for your opinion if my project given to me by my teacher is possible or not and if it is possible, can you give me an idea or guide how to do it? I am making a project of which I am using an Arduino mega 2560 as a replacement of the formatter of the CANON LBP2900 Laser printer. I would like the Laptop or PC read it as a printer once I inserted it to a Laptop or PC port. is there any way how to do this or any resources I can read?

From several years experience in reverse engineering data communications, you need two things: Complete documentation for the product you are attempting to replace, and the ability to record and analyze the message traffic between the PC and the printer. It is a two-way communication, you know.

Paul

Is it possible to tweak Arduino Mega2560 such that PC or Laptop will detect it as a printer? because I have seen that some Arduino board version can be programmed as a Human Interface Device ( HID ).

Mega2650, no. Use a Leonardo or Micro or anything with a 32u4 microcontroller. And write the USB code for USB printer. See the document below for the USB printer protocol. I suspect real printers use vendor specific descriptors which adds even more complexity.

https://usb.org/document-library/printer-device-class-document-11