{"id":16629,"date":"2021-02-15T18:44:56","date_gmt":"2021-02-15T23:44:56","guid":{"rendered":"https:\/\/scruss.com\/blog\/?p=16629"},"modified":"2021-02-15T19:14:57","modified_gmt":"2021-02-16T00:14:57","slug":"visualizing-pwm","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2021\/02\/15\/visualizing-pwm\/","title":{"rendered":"Visualizing PWM"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Visualizing PWM with a DSO150 oscilloscope\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/Uhs5zjfSeN8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><figcaption>my desk is not usually this tidy<\/figcaption><\/figure>\n\n\n\n<p>I built a <a href=\"https:\/\/jyetech.com\/dso-150-shell-oscilloscope\/\">DS0150<\/a> \u00e2\u20ac\u201d successfully, on my second try \u00e2\u20ac\u201d and wanted to measure something. My demo MicroPython program from <a href=\"https:\/\/scruss.com\/blog\/2020\/05\/11\/micropython-on-the-terrible-old-esp8266-12-development-board\/\">MicroPython on the terrible old ESP8266-12 Development Board<\/a> has been running since May 2020, and the RGB LED&#8217;s red channel is conveniently broken out to a header. Since the DSO150 has precisely one channel, it let me see the how the PWM duty cycle affects the voltage (and brightness) of the LED.<\/p>\n\n\n\n<p>I can&#8217;t think of oscilloscopes without being reminded of a scene from one of my favourite sci-fi books, <em>The Reproductive System<\/em> by John Sladek. Cal, the hapless new hire in the Wompler toy factory-turned-military research lab, is showing the boss some equipment while making up more and more extravagant names for them for the clueless owner:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><em>At each exhibit, Grandison <\/em>[Wompler]<em> would pause while Cal named the piece of equipment. Then he would repeat the name softly, with a kind of wonder, nod sagely, and move on. Cal was strongly reminded of the way some people look at modern art exhibitions, where the labels become more important to them than the objects. He found himself making up elaborate names.<\/em><br><em>\u00e2\u20ac\u0153And this, you\u00e2\u20ac\u2122ll note, is the Mondriaan Modular Mnemonicon.\u00e2\u20ac\u009d<\/em><br><em>\u00e2\u20ac\u0153\u00e2\u20ac\u201donicon, yes.\u00e2\u20ac\u009d<\/em><br><em>\u00e2\u20ac\u0153And the Empyrean diffractosphere.\u00e2\u20ac\u009d<\/em><br><em>\u00e2\u20ac\u0153\u00e2\u20ac\u201dsphere. Mn. I see.\u00e2\u20ac\u009d<\/em><br><em>Nothing surprised Grandison, for he was looking at nothing. Cal became wilder. Pointing to Hita\u00e2\u20ac\u2122s desk, he said, \u00e2\u20ac\u0153The chiarascuro thermocouple.\u00e2\u20ac\u009d<\/em><br><em>\u00e2\u20ac\u0153Couple? Looks like only one, to me. Interesting, though.\u00e2\u20ac\u009d<\/em><br><em>A briar pipe became a \u00e2\u20ac\u0153zygotic pipette,\u00e2\u20ac\u009d the glass ashtray a \u00e2\u20ac\u0153Piltdown retort,\u00e2\u20ac\u009d and the lamp a \u00e2\u20ac\u0153phase-conditioned Aeolian.\u00e2\u20ac\u009d Paperclips became \u00e2\u20ac\u0153nuances.\u00e2\u20ac\u009d<\/em><br><em>\u00e2\u20ac\u0153Nuances, I see. Very fine. What\u00e2\u20ac\u2122s that thing, now?\u00e2\u20ac\u009d<\/em><br><em>He pointed to an oscilloscope. Cal took a deep breath.<\/em><br><em>\u00e2\u20ac\u0153Its full name,\u00e2\u20ac\u009d he said, \u00e2\u20ac\u0153is the Praetorian eschatalogical morphomorphic tangram, Endymion-type, but we usually just call it a ramification.\u00e2\u20ac\u009d<\/em><br><em>The old man fixed him with a stern black eye. \u00e2\u20ac\u0153Are you trying to be funny or something? I mean, I may not be a smart-aleck scientist, but I sure as hell know a television when I see one.\u00e2\u20ac\u009d<\/em><br><em>Cal assured him it was not a television, and proved it by switching it on. \u00e2\u20ac\u0153See,\u00e2\u20ac\u009d he said, pointing to a pattern of square waves, \u00e2\u20ac\u0153there are the little anapests.\u00e2\u20ac\u009d<\/em><\/p><cite>\u00e2\u20ac\u201d The Reproductive system, by John Sladek (text copypasta from <a href=\"https:\/\/omnivorenz.wordpress.com\/2012\/11\/17\/grey-goo-in-the-1960s\/\">Grey Goo in the 1960s<\/a>)<\/cite><\/blockquote>\n\n\n\n<p>So we were displaying roughly 500 anapests\/s there. Not bad, not bad at all \u00e2\u20ac\u00a6<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I built a DS0150 \u00e2\u20ac\u201d successfully, on my second try \u00e2\u20ac\u201d and wanted to measure something. My demo MicroPython program from MicroPython on the terrible old ESP8266-12 Development Board has been running since May 2020, and the RGB LED&#8217;s red channel is conveniently broken out to a header. Since the DSO150 has precisely one channel, [&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":[3094,2506,3215,1770],"class_list":["post-16629","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-micropython","tag-oscilloscope","tag-pwm","tag-sladek"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-4kd","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/16629","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=16629"}],"version-history":[{"count":2,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/16629\/revisions"}],"predecessor-version":[{"id":16631,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/16629\/revisions\/16631"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=16629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=16629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=16629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}