Comparison with my handwriting:
Can you identify which ones were written by the machine? (It's close but not perfect yet)
So lemme explain...
Rote memorization is not a path to understanding. Yet still, it is the bread and butter of the education system in many countries- mostly in Asia. Copy pasting 100 pages of lab records from a pdf by hand, writing the same problem 20 times, solving repetitive problems like a robot, etc won’t help us understand and apply the content. It is important to note that this is a problem with the system. I wouldn't blame teachers for teaching us the way they are taught to teach.
Here's a video that discusses the problem. (The point really starts at 2:00)
Here's another one:
It's hard for us to change the system, but we engineers can create solutions.
I was fed up with copy pasting assignments and 100 pages of lab record from a pdf by hand. I decided to make a pen holder tool for my ToolChanger 3D Printer to write the lab record for me. Here's what I did
- Measured the dimensions of my lab record book and created a template
- Opened the template in Inkscape and copy pasted the content to be written
- Converted the text to Hershey's text using the KM Laser plugin.
- Adjusted the text to align with the page template
- Converted the text to Gcode using the 4XiDraw plugin
- Align and clamp down the book to the machine
- Sent the Gcode to the printer to print.
- Repeat from step 2 for all the pages
Homework machine is not a new idea. It has been attempted before. This attempt where they taped a pen to their 3D printer and did a similar thing got 14M views and 250K likes on Twitter. ('Homework machine' is an extremely popular idea!) Almost all of the attempts on the internet uses the same workflow (Except this one that costs 200$ per font?) . Here are the problems with this workflow:
Problem with the existing solution:
- Easy to get caught: My teacher ended up catching me as the font was too perfect to be written by a human. All letters are the same and it does not look similar to my handwriting.
- The stroke path is not the same as written by a human.
- The Gcode generation workflow is cumbersome. The whole process to generate the Gcode takes around 1 minute per page. The Gcode generation plugin alone takes over 20 seconds to process.
- Having to manually turn pages, clamp the book and run the next gcode is too too much work to be worthwhile.
- Most pen plotter use a hobby servo to lift the pen. They are slow and are not meant for continuous operation. Hobby servos die very often in a pen plotter.
- Writing fast will make the machine vibrate and the vibration will be visible in the print.
(Image showing a page written by my ToolChanger using Gcode generated using Inkscape and a single line font that came with one of the plugins. This got caught by the teacher)
After the lab teacher caught me and asked me to rewrite the 100 pages by hand, I decided to double down. Starting from software, I set out to create a machine to efficiently and effectively do your homework without getting caught by the teacher. Here's how:
Record your handwriting
The software needs to know your handwriting to write in your handwriting. Your handwriting stroke is recorded and saved in a format suitable for the Gcode generation python script to process. Please see the project log section to see how it's done now.
(Image shows the python GUI app I hacked together to record handwritings)
The access to ChatGPT is a gamechanger. The upcoming Wolfram Alpha plugin will likely make ChatGPT do accurate math. these plugins should fix the achilleas heel of ChatGPT. All you have to do is generate answers and / or copy paste the content for the Gcode generation software to process.
(Image showing an assignment I wrote with the 1st generation handwriting font written by ChatGPT)
Generate Gcode for the machine
The software to generate Gcode does the following:
- Takes in all the content you want it to write and your handwriting font file as input.
- Places the text correctly in the correct line of the page.
- Move to the next line either if all content in the line is written or of the line is filled.
- Move to the next page if all the lines in the page are finished or if a page break is added
- Apply randomization to the letters for making the text look more natural
- Create the Gcode for the machine as output.
The python script I made to generate Gcode does all this with roughly 10X the speed of the Inkscape plugin that generates Gcode in the previous workflow. You can copy everything you want at once. No need to copy paste it page by page- unlike the previous workflow! You can add page break tags in the content if you want it to continue from the next page.
(Image showing the current Gcode processing script, the output Gcode and the text input for the script.)
- It's a purpose designed light, fast and rigid CoreXY cartesian gantry CNC pen plotter running on linear rails.
- It runs on Klipper firmware. The input shaper feature (vibration cancellation) built into the firmware will enable the machine to work fast without vibrations.
- It has a fast cable driven remote actuator driven by a stepper motor. This will last a lot longer than hobby servos.
- The machine will have fixtures to align the text properly in the machine. Automated fixturing and page turning system will definitely make using the machine effortless.
Overall, the custom software and hardware makes writing homework with the machine effortless and effective. I have been writing assignments and lab records using the machine since June 2022. With the latest software, my teachers were unable to accurately distinguish machine written text and human written text.