{"id":12920,"date":"2016-05-17T08:07:36","date_gmt":"2016-05-17T12:07:36","guid":{"rendered":"http:\/\/scruss.com\/blog\/?p=12920"},"modified":"2025-04-12T14:22:39","modified_gmt":"2025-04-12T18:22:39","slug":"pen-plotters-not-just-output-devices","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2016\/05\/17\/pen-plotters-not-just-output-devices\/","title":{"rendered":"Pen plotters: not just output devices \u2026"},"content":{"rendered":"\n<p>Pen plotters were pretty expensive and complex pieces of electromechanical equipment. While they often earned their keep in the CAD office, they also had a function that&#8217;s almost forgotten: they could be used as <em>input <\/em>devices, too.<\/p>\n\n\n\n<p>As a kid, we sometimes used to drive past the office of Ferranti-Cetec in Edinburgh. They specialized in <strong>digitizers<\/strong>: great big desk or wall mounted devices for capturing points from maps and drawings. Here&#8217;s one of their 1973 models:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><a href=\"http:\/\/www.gracesguide.co.uk\/File:Im1973IME-Ferranti.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"438\" height=\"600\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/438px-Im1973IME-Ferranti.jpg\" alt=\"Ferranti EP210 Freescan Digitiser. Source: Grace's Guide, http:\/\/www.gracesguide.co.uk\/File:Im1973IME-Ferranti.jpg\" class=\"wp-image-12921\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/438px-Im1973IME-Ferranti.jpg 438w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/438px-Im1973IME-Ferranti-117x160.jpg 117w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/438px-Im1973IME-Ferranti-234x320.jpg 234w\" sizes=\"auto, (max-width: 438px) 100vw, 438px\" \/><\/a><figcaption class=\"wp-element-caption\">Ferranti EP210 Freescan Digitiser. Source: Grace&#8217;s Guide, http:\/\/www.gracesguide.co.uk\/File:Im1973IME-Ferranti.jpg<\/figcaption><\/figure>\n\n\n\n<p>While the technology and size have changed a bit, these huge bits of engineering kit are the ancestors of today&#8217;s track pads and touch screens.<\/p>\n\n\n\n<p>Realizing that their plotters had very precise X-Y indexing and that they had two-way communications to a computer, HP made a drafting sight that fitted in place of a pen on their plotters:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi1.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi1-1024x768.jpg\" alt=\"HP drafting sight, part no 09872-60066\" class=\"wp-image-12923\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi1-1024x768.jpg 1024w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi1-160x120.jpg 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi1-320x240.jpg 320w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi1-768x576.jpg 768w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi1.jpg 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">HP drafting sight, part no 09872-60066.<\/figcaption><\/figure>\n\n\n\n<p>This is a very pleasing piece of kit, all metal, thick plastic and polished optical glass. They show up on eBay occasionally, and aren&#8217;t cheap. With a bit of coercion, it fits into my HP plotter like this:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi4.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"1024\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi4-768x1024.jpg\" alt=\"Drafting sight in HP7470A plotter\" class=\"wp-image-12926\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi4-768x1024.jpg 768w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi4-120x160.jpg 120w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi4-240x320.jpg 240w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi4.jpg 1200w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><figcaption class=\"wp-element-caption\">Drafting sight in HP7470A plotter<\/figcaption><\/figure>\n\n\n\n<p>The image is very bright and clear:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi2.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi2-1024x1024.jpg\" alt=\"Drafting sight near an axis label\" class=\"wp-image-12924\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi2-1024x1024.jpg 1024w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi2-160x160.jpg 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi2-320x320.jpg 320w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi2-768x768.jpg 768w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi2.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Drafting sight near an axis label<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi3.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi3-1024x1024.jpg\" alt=\"Drafting sight over a point\" class=\"wp-image-12925\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi3-1024x1024.jpg 1024w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi3-160x160.jpg 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi3-320x320.jpg 320w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi3-768x768.jpg 768w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/digi3.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Drafting sight over a point, showing cursor dot<\/figcaption><\/figure>\n\n\n\n<p>If one has a digitizing sight, one needs to find something to digitize&nbsp;<em>post haste<\/em>. I&#8217;m sure <em>everyone<\/em> can sense the urgency in that. So I found this, a scan from my undergraduate project writeup (centrifugal pump impeller design ftw, or something), which was probably made on an Amiga or Atari ST:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/graph-001g.png\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"242\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/graph-001g-320x242.png\" alt=\"It's a graph, with pointy bits on it\" class=\"wp-image-12929\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/graph-001g-320x242.png 320w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/graph-001g-160x121.png 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/graph-001g-768x581.png 768w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2016\/05\/graph-001g.png 948w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a><figcaption class=\"wp-element-caption\">It&#8217;s a graph, with pointy bits on it<\/figcaption><\/figure>\n\n\n\n<p>I printed this as large as I could on Letter paper, as it&#8217;s the only size my HP7470A plotter can take. Now all it needed was a small matter of programming to get the data from the plotter. Here&#8217;s a minimally-useful digitizer for HP and compatible serial plotters. Although I ran it on my little HP grit wheel plotter attached to a Raspberry Pi, I developed it with my larger Roland plotter. The only fancy module it needs is <a href=\"https:\/\/github.com\/pyserial\/pyserial\">pySerial<\/a>.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n#!\/usr\/bin\/env python\n# -*- coding: utf-8 -*-\n# a really crap HP-GL point digitizer\n#  scruss - 2016\n\nfrom time import sleep\nfrom string import strip\nimport serial\n\nser = serial.Serial(port='\/dev\/ttyUSB1', baudrate=9600, timeout=0.5)\nlbl = ''\npoints = &#x5B;]\nlabels = &#x5B;]\nk = 0\nretval = 0\n\nser.write('DP;')                # put in digitizing mode\nwhile lbl != 'quit':\n    ser.write('OS;')\n    ret = strip(ser.read(size=5), chr(13))\n    print ('Retval: ', ret)\n    if ret != '':\n        retval = int(ret)\n    if retval & 4:              # bit 2 is set; we have a point!\n        print ('Have Point! Retval: ', retval)\n        retval = 0\n        ser.write('OD;')\n        pt = strip(ser.read(size=20), chr(13))\n        print ('OD point: ', pt)\n        lbl = raw_input('Input label &#x5B;quit to end]: ')\n        points.append(pt)\n        labels.append(lbl)\n        k = k + 1\n        ser.write('DP;')        # put in digitizing mode again\n    sleep(1)\nser.close()\n\nf = open('digit.dat', 'w')\nfor i in range(k):\n    f.write(points&#x5B;i])\n    f.write(',')\n    f.write(labels&#x5B;i])\n    f.write('\\n')\nf.close()\n<\/pre><\/div>\n\n\n<p>In the unlikely event that anyone actually uses this, they&#8217;ll need to change the serial port details near the top of the program.<\/p>\n\n\n\n<p>The program works like this:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Move the drafting sight to the point you want to capture using the plotter&#8217;s cursor keys, and hit the plotter&#8217;s <strong>ENTER<\/strong> key<\/li>\n\n\n\n<li>Your computer will prompt you for a label. This can be anything <em>except<\/em> <strong>quit<\/strong>, that ends the program<\/li>\n\n\n\n<li>When you have digitized all the points you want and entered <strong>quit <\/strong>as the last label, the program writes the points to the file <em>digit.dat<\/em><\/li>\n<\/ol>\n\n\n\n<p>I didn&#8217;t implement any flow control or other buffer management, so it can crash in a variety of hilarious ways. I did manage to get it to work on the lower trace of that graph, and got these data:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">9649,2428,1,300,0\n357,2428,1,0,0\n357,7217,1,0,0.60\n733,3112,1,first\n826,3167,1,\n968,3256,1,\n1122,3334,1,\n1290,3405,1,\n1588,3583,1,\n1891,3725,1,\n2215,3880,1,\n2526,4051,1,\n2830,4194,1,\n3143,4280,1,\n3455,4516,1,\n4077,4767,1,\n5008,5229,1,\n6543,5954,1,\n8067,6548,1,\n8740,7195,1,\n8740,7195,1,last\n8740,7195,1,quit<\/pre>\n\n\n\n<p>The first two columns are X and Y, in HP-GL units \u2014 that&#8217;s 1\/40 mm, or 1\/1016 inches. The third column will always be 1 if you have the sight down. The last columns are the label; if you put commas in them, opening the file as CSV will split the label into columns. I used it to fudge axis points. You&#8217;ll also note that the last three lines of data are my valiant attempts to quit the program.<\/p>\n\n\n\n<p>Assuming the axes are not skewed (they are, very slightly, but <em>shhh<\/em>) some simple linear interpolation gives you the results below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;12.1&nbsp;&nbsp; &nbsp;0.086\n&nbsp;15.1&nbsp;&nbsp; &nbsp;0.093\n&nbsp;19.7&nbsp;&nbsp; &nbsp;0.104\n&nbsp;24.7&nbsp;&nbsp; &nbsp;0.114\n&nbsp;30.1&nbsp;&nbsp; &nbsp;0.122\n&nbsp;39.7&nbsp;&nbsp; &nbsp;0.145\n&nbsp;49.5&nbsp;&nbsp; &nbsp;0.162\n&nbsp;60.0&nbsp;&nbsp; &nbsp;0.182\n&nbsp;70.0&nbsp;&nbsp; &nbsp;0.203\n&nbsp;79.8&nbsp;&nbsp; &nbsp;0.221\n&nbsp;89.9&nbsp;&nbsp; &nbsp;0.232\n100.0&nbsp;&nbsp; &nbsp;0.262\n120.1&nbsp;&nbsp; &nbsp;0.293\n150.2&nbsp;&nbsp; &nbsp;0.351\n199.7&nbsp;&nbsp; &nbsp;0.442\n248.9&nbsp;&nbsp; &nbsp;0.516\n270.7&nbsp;&nbsp; &nbsp;0.597<\/pre>\n\n\n\n<p>Good enough for a demo.<\/p>\n\n\n\n<p>(For prettier things to do with plotter digitizing commands, Ed Nisley KE4ZNU has made some rather lovely <a href=\"https:\/\/softsolder.com\/2015\/11\/02\/hp-7475a-plotter-one-button-demo-madness\/\">Superformula patterns<\/a>)<\/p>\n\n\n\n<p>If you don&#8217;t have a plotter, or even if you do and you don&#8217;t have hours to waste mucking about with Python, obsolete optics and serial connections, Ankit Rohatgi&#8217;s excellent <a href=\"https:\/\/automeris.io\/WebPlotDigitizer\/\">WebPlotDigitizer<\/a> (or <a href=\"https:\/\/markummitchell.github.io\/engauge-digitizer\/\">Engauge<\/a>, as I found out when this article hit <a href=\"https:\/\/news.ycombinator.com\/item?id=26990920\">HackerNews<\/a> in 2021) gets numbers out of graphs quickly. It handles all sorts of graphs rather well.<\/p>\n\n\n\n<p><strong>Update, 2025<\/strong>: eek, but WebPlotDigitizer is now login-only and has been infested by AI shite. Run away now, run away fast &#8230; or try to find an old mirror online, such as <a href=\"https:\/\/web.eecs.utk.edu\/~dcostine\/personal\/PowerDeviceLib\/DigiTest\/index.html\">WebPlotDigitizer at utk.edu<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pen plotters were pretty expensive and complex pieces of electromechanical equipment. While they often earned their keep in the CAD office, they also had a function that&#8217;s almost forgotten: they could be used as input devices, too. As a kid, we sometimes used to drive past the office of Ferranti-Cetec in Edinburgh. They specialized in [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[2975,2788,2789,2540,2510],"class_list":["post-12920","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-digitizer","tag-hpgl","tag-plotter","tag-python","tag-raspberrypi"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-3mo","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/12920","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=12920"}],"version-history":[{"count":14,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/12920\/revisions"}],"predecessor-version":[{"id":17820,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/12920\/revisions\/17820"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=12920"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=12920"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=12920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}