Automate Printing Test on HP Printer

Hello there! I am trying to write up a project that will do the following:

  1. Automatically print 500 copies of one Word document (it is a simple page with a dash around the edge).

  2. Wait for 20 minutes

  3. Repeat for 10k pages (every 10k pages, I will print a "Menu Map" for my records. The Menu Map option is in the printer itself and has the printer information on it)

I would refill the paper tray. This is for my job where we are testing the heater in the printer and we must print up to 200,000 pages. The only issue with this would be refilling the paper tray, but for now let's assume that isn't an issue. :stuck_out_tongue:

I have some basic experience in code, I took a couple of classes in basic coding since I'm an EE but I do not know how to print a Word doc through the arduino.

Thank you for your help!

You can't print a Word document with an Arduino - it has neither the memory nor the processing power.

The project you are describing needs to be (and can be) done on a PC.

...R

Do you have a printer driver already?
otherwise it will not work from a PC.

If you do not have a PD, what kind of interfaces does the (proto)printer have?

You can send printable ASCII documents from an SD card over a parallel interface.
(has been done before..)
I think given some time you can even send bitmaps from SD card with an Arduino, but it will take some time to get to the 200K ... will probably so slow that the system will not heat up enough..

what do you want to proof?

If you've got Word, you've got VBA (Microsoft's Visual BASIC for Applications).
You can program that task on your computer very easily using VBA.
400 reams (80 boxes) of paper is going to cost you/your employer how much?
Lets assume your printer is fairly fast and prints 8ppm.
That's about an hour for 500 pages, plus 20 minutes 'cooling' time, times 400 reams =550 hours =nearly 23 days (working 24/7)
How many sheets does the out tray hold before it needs emptying?
I'd guess that it's about 50, so you'd need to empty it every 6 minutes.
And you'd need to fill the paper tray every hour and a half. That's if the paper tray takes a full ream. Most don't.
Assuming that it's a laser printer, toner cartridges are usually good for about 5000 prints.
That's 40 cartridges it'll need, almost two a day. Check the price of the cartridges!

At a rough guess, it'll cost about US $5000 in paper and cartridges, plus the cost of the printer[1], electricity and the cost of staff 24/7 for 23 days.
[1] The printer will be virtually useless after that, if it even manages to complete the task.
Good luck!

@HB
You've convinced me :art:

I assume that your printer connects using USB? If so, you'll need a USB host shield to communicate with it from the arduino.

If your arduino is expected to run autonomously,it will also need some way of storing that Word file. You could achieve this with a simple SD card interface. If you shop around you may even find a USB host shield that includes an SD card reader.

NOTE, however, it is NOT the word file itself you want to store, but the raw data that needs to be sent to the printer. To get this file, on a windows machine edit the properties of the HP printer. Change the port to "print to file". Open your word document and print it. You'll then get prompted for the name of a file. Once you have made this "print" you will now have the file you need for your SD card.

KenF:
I assume that your printer connects using USB?

This is why I in Reply #1 I said this is not an Arduino project. Sending data to a printer over USB is not simple like it used to be in the days of the parallel printer port - even if you had the megabytes of raw printer data on an SD card.

Someone who knows how to connect an Arduino to a printer using a USB Host shield would NOT be asking questions here.

...R

Thank you all for the replies!

I guess I should have made myself more clear....What I had in mind was to write a code on the Arduino (I believe I have an Atmega, I have to double check) and connect it to the laptop that is connected to the printer. The arduino would then print the Word doc every 20-30 minutes.

So instead of having someone "manually" printing the doc (i.e. walking over and hitting print in Word after the printer has cooled down) the Arduino would do it automatically.

We are currently looking into extended trays, right now the tray can hold 500 pages.

I'm just more curious if I would be able to do this and how? I know it would probably not be as efficient because of paper-limitations and such, but let's just assume that doesn't matter.

thank you!

OliveMeow:
So instead of having someone "manually" printing the doc (i.e. walking over and hitting print in Word after the printer has cooled down) the Arduino would do it automatically.

You don't need an Arduino to do that. It would be easier to write a PC program to do it.

...R

I once calculated how long it would take to print a whole one sheet spreadsheet (every cell on the sheet filled) from Excel 2010 to A4 paper in a readable size.....over 60 years at 6 PPM!!

JohnLincoln:
It's like asking "was my 1980s dot matrix printer a good investment, or not?"

Can you still get the tractor feed paper and ribbons for it? :slight_smile: :slight_smile:

Hi, I suggest you read reply #3, it is the most feasible and you have all the programming tools.
You need someone familiar with VBA.

Tom..... :slight_smile:

I wonder if the OP is really planning something quite different (and which won't take from here to eternity) but using the printer description as a disguise ?

...R

So you want to print a document every 20 minutes from an unattended laptop?
Just use autohotkey. Something like this should do it for the script.

#k::
InputBox, number
sleep,2000
loop %number%
{
send,^P
sleep,1000
send,{ENTER}
sleep,1200000
}
return

With that script loaded in ahk, windows +k to start, enter number of copies... and off it'll go. Alt+tab to word within 2 seconds of hitting enter (that's the first sleep), and then it'll send ctl+p, wait 1 second, hit enter (adjust if that's not how the version of word you're using behaves), and then wait 20 minutes before doing it again.

Note that you need to leave word with focus.

This is much easier than using an arduino to do the EXACT SAME THING (that is, spoof keyboard input), and free.

I suspect the 20-30 minute delay is because he's printing a monster document with tons of pages, so fewer print commands are necessary, and it's a better test of the printer's handling of large documents. (assuming he's not misleading us about the nature of his project)

Robin2:
I wonder if the OP is really planning something quite different (and which won't take from here to eternity) but using the printer description as a disguise ?

...R

You may be right. Why does he need an Arduino when this can easily be done in VBA on his laptop? Homework project?