First plots! Well, first computer-controlled plots!

Shown here: HP 7045A analogue X-Y recorder with signals generated by an STM32F103. X and Y are generated with PWM and an extremely basic 2nd order low pass filter.

,

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).

Option 007 isn’t listed in the partial manual scan I found online so maybe it’s something cooler I haven’t discovered yet.

Looked a bit more into why the electrostatic adhesion plate isn’t working. The power supply is fine but there are reports of dust and moisture impacting these tables severely. I’ll give it a clean, hopefully it’s just too dirty to work.

Yep, much better after a gentle wipe-down with a damp cloth and some dish soap. The more thorough cleaning will have to wait, though.

Follow

Update: Plotter got its more thorough clean-up today. I cleaned both encoders and lubricated everything as well. It’s still far from spotless, especially since I’d have to disassemble it basically completely to clean all front panel controls properly…

Will try to add a video later.

· · Web · 1 · 0 · 0

Alright, there we go. Audio is pretty terrible since it was recorded using an earbuds’ microphone taped to the tripod.

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).

In the video, there’s also something weird going on for the small diagonal lines of the ‘pins’. Probably some fun bug in my code.

Hmm, looks like PWM actually works and would only be moderately noisy. It would need careful calibration though, as there is strong positive feedback.

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.

Sign in to participate in the conversation
Mastodon

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!