Connect USB HP printer to Arduino UNO

Hi, i want to connect a USB printer to an arduino to control it, i know that i can connect a Printer by using the Parallel cable, but my printer only works with usb.
Any ideas????

sort by: active | newest | oldest
Nighter3D3 years ago

Oh...that is tricky to do with a Arduino. You first need a USB-Host device (there are various USB host shields around that give the arduino the ability to be a USB host). However you would still need to learn how to get the arduino to send something the printer likes and can use which is challenging for an ambitious project like yours. There is also the considerable lack of memory to have a decent sized database.

A better solution is to look at a more robust platform that can handle this kind of thing out-of-box like an embedded ARM system. What you want to do sounds more like a job for a Raspberry Pi then an arduino. Also something worth remembering: in such projects its not uncommon to pair up an arduino as Peripheral controller (like for the Barcode scanner) with a raspberry pi (for the Printing/database checking).

Hope this is of any help

rickharris3 years ago

Send the print data to your main PC over the USB connection and print from there?

gastonbr100 (author)  rickharris3 years ago
The thing is that i wan't to do a printing station in my school, with a barcode scanner and a database, the arduino is to control the printer, in order to authorize the printing when the student shows the barcode to the scanner

You HAVE to have a USB master, the arduino won't do it. Consider a Raspberry Pi instead.

You wouldn't be able to connect the printer to the Arduino over USB. You would have to hack it so you can connect the Arduino pins to the motor drivers inside the printer. Then you would need to develop or find code that can run the motors in the manner you want. As for controlling the print head the UNO may not be powerful enough or offer enough I/O pins to do that. You may have to use a Mega.

Not with an arduino uno. The printer is a USB slave, the Arduino is a USB slave. You need a computer that can be a USB master, like an MBED.