An ESP-01 based thermal printer. Could be used for many things; I decided to create a shopping list printer with a simple web interface
To make the experience fit your profile, pick a username and tell us what interests you.
This is actually my first 3D CAD project, so I had to look for CAD software first. I started with SketchUp, but that was a real pain. Next candidate was FreeCAD, but I couldn't really get that hang of it (although much better than SketchUp), and in the end I used Autodesk Fusion 360.
After creating simple models of the printer, a board for the ESP-01 and a board for the indicator LED and print button, I designed an enclosure around those:
The top is front is attached to the back with 4 screws and hex nuts. The hex nuts are inserted into hexagonal holes from the back:
To make that printable I made the end of those holes countersunk, so I needed some kind of countersunk hex nut washer:
This is inserted into the hex hole to create a flat surface for the nut:
I've already sent the files to a friend for printing and will release them if I'm satisified with the results.
I pushed the schematic (or what I think it should be) to github.
Until now the repo just contained a license and a readme, which just changed. I've uploaded the sketch. It includes a settings.cpp file which you have to edit to your needs.
First of all, after being pointed at the smartness of arduino's Serial.print(int) method, I'm now using write() to actually write out the escape sequences to configure the printer. It works now, so I can set the correct heating parameters and character code table.
Here's a picture of the breadboard (including some unused components and inefficient wiring):
The red LED next to the buttons indicates that there is something on the list, but not printed yet. Pressing the print button (in this case the center button of those five) makes the device print the list and clear it. The LED is off again:
The printing quality seems to good. The first line is a bit fainter than the following ones, but well readable.
I had to replace my power supply (USB wall wart) with a "real" 5V/1.6A wall wart to get this printing quality. The USB one I used earlier, although rated for 2A, didn't supply enough current. I was advised in chat to place a short or low value resistor between D+ and D-, but simply replacing it was easier. I'll now clean up the code and put it on github.
The web interface is dead simple. When the list is empty, it shows a text edit and an add button:
Items can be added by entering a name and clicking "Add". They appear on the list and the red LED is on (see above):
Checking the boxes and hitting delete does the obvious thing. Printign the list clears it, and the LED is off again.
Edit: the below is bullshit because I didn't remember that arduino's Serial converts integers to a human readable string. I'll try the initialization again with explicit casts...
My printer came with an already printed test page, which specified correct settings for heated points, heating time, and heating interval. I used those to initialize my printer after reset. Setting the code page and international character set didn't really do much, though. The printer will print configuration commands when they are sent, so this is what comes out after initialization:
The only thing that apparently worked as desired was the printer parameter adjustment. The first line looks a bit faint, whereas the following lines are reasonably crisp.
As special characters are not printed correctly even though I selected latin 1 I might have to create a conversion table from <what I think I want to print> to <what the printer thinks I want to print>.
Before I got this to work I tried adafruit's thermal printer library, which apparently doesn't like the ESP's Tx-only Serial1. After I changed the code to initialize the printer directly things started to work
Become a member to follow this project and never miss any updates