The STM32 acts as an USB-CDC serial interface and runs a very basic HPGL interpreter (barely enough for the HPGL subset Inkscape uses). This means I can just `cat drawing.hpgl > /dev/ttyACMx` to plot. Well, I could, if I’d find out how I can set the write timeout, because at some point the MCU’s HPGL buffer will be full and it will its receive endpoint until it has drawn some stuff, naturally leading to a serial timeout and a half-done plot.
I wanted to add a video, but
- I can’t figure out how to disable the auto focus on my phone (I probably can’t) and it gets extremely confused by the plotter all the time;
- DSLR can do video, but without sound and the pen lift mechanisms punching the pen into paper with a BRRNG is too impressive to not share.
TODOs/musings for now:
- Recorder is seriously filthy, needs quite a clean-up. Probably including the encoders. Basically all pots and range switches have contact issues.
- The big gap at the top, where the gantry comes out is great for dropping tools and parts into and subsequent cursing.
- The electrostatic paper ‘autogrip’ seems to be broken, even though I remembered it as working from the last time I used this recorder.
- This thing can go seriously fast. For now I can only plot as fast as I want, but only when disregarding any corners the image is supposed to have. I’m curious how fast I can get it with a better filter design than slamming random parts into a breadboard or maybe with some signal pre-processing.
- Previously mentioned Z-axis clonking will be a problem for various pens I’ll end up using. Dampening the pen holder will have to be a mechanical solution and I don’t really want to modify this beauty.
By the way, if you’re interested in the HP 7045A itself, here’s a picture with the bottom taken off from when I last had it open 5 years ago. Beautiful old-school HP hand-routed gold-plated PCBs! In my experiments here, I’m attaching to the DC-37 connector at the top, which carries X, Y, pen and time control signals. Not more though, because it’s missing the TTL control board, which would be in the lower left hand side corner, which might be my Option 007 (like Tek’s option 01 = no read-out).
I’m still not too sure how I’ll dampen the Z axis. I don’t want to make any irreversible changes to the plotter but something needs to be done: the plotter slams the pen into the paper so hard that it actually bounces off at first.
The record/lift signal is purely digital, so I can’t feed it a slow ramp to set the pen down slowly. I could check if using PWM helps (rather than just making a bunch of noise).
Predictably, the diagonal line problem was a numerical issue. Because I was incrementally updating the position and using fixed-point arithmetic, the line direction snapped to a few discrete values, which only got worse for slower speeds (smaller updates per time interval). As soon as the error got too large, the direction changed and I got these lines with a bend in the middle instead of straight ones.
Added PWM for the pen output. The pen no longer jumps on activation, but there’s still strong positive feedback and a ‘tipping point’, after which it accelerates towards the paper, so the small dot at each line start isn’t avoidable yet.
I used 120 Hz because the behaviour seemed less consistent at higher PWM frequencies. Maybe the lower frequency vibrates the solenoid loose? Also, there’s now a nice honking sound when plotting.
@fruchti cleaning is good, but if it gets unusably bad, the caps have probably degenerated.
And yeah, plotters are hard to video cos the autofocus wants to track the moving thing
@scruss Interestingly, it doesn’t use that high of a voltage, just shy of 500 V. There is no cascade in there, just a dedicated transformer winding and Delon rectifier. The plastic coating does have a few nicks though, which might be/become a problem.
@fruchti this X-Y-plotter is seriously pretty! 😍
what I did for my HPGL capable plotter, or rather for the generated files: sort the lines, so that movements are minimized, and the plotter prefers to continue its direction of travel, e.g.
@vogelchr Thanks! For now, I generate the HPGL with Inkscape, which is more than configurable enough for me. That also means I can limit the parser to the HPGL subset Inkscape emits (e.g. no circles).
The Inkscape plugin also claims to do some path optimisation. I haven’t checked that so far. For the test plot above, the problem is mostly duplicate lines and really the SVG’s fault.
Server run by the main developers of the project It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!