{"id":447,"date":"2021-12-08T22:56:24","date_gmt":"2021-12-08T22:56:24","guid":{"rendered":"http:\/\/www.thelemmingfarm.uk\/?p=447"},"modified":"2021-12-08T22:57:21","modified_gmt":"2021-12-08T22:57:21","slug":"did-i-set-fire-to-the-servo-controller","status":"publish","type":"post","link":"http:\/\/www.thelemmingfarm.uk\/?p=447","title":{"rendered":"Did I set fire to the Servo Controller"},"content":{"rendered":"\n<p>Short answer: No<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<p>The test setup used the same cable as before, but with the V+ cable removed. Thusly it was powered from the 2xAA battery pack<\/p>\n\n\n\n<p>The Pan \/ Tilt camera mount was a good test.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"336\" src=\"http:\/\/www.thelemmingfarm.uk\/wp-content\/uploads\/2021\/12\/20211208_211335.jpg\" alt=\"\" class=\"wp-image-448\" srcset=\"http:\/\/www.thelemmingfarm.uk\/wp-content\/uploads\/2021\/12\/20211208_211335.jpg 640w, http:\/\/www.thelemmingfarm.uk\/wp-content\/uploads\/2021\/12\/20211208_211335-300x158.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\">\n<p>For this I was using the <a href=\"https:\/\/learn.adafruit.com\/16-channel-pwm-servo-driver\/python-circuitpython\" target=\"_blank\" rel=\"noreferrer noopener\">Adafruit instructions found here<\/a>, but using a new file to drive the pan from one end to the middle and the other end and back. For each step it does the same with the tilt.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code has-small-font-size\"><code lang=\"python\" class=\"language-python line-numbers\"># SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries\n# SPDX-License-Identifier: MIT\n\n\"\"\"Simple test for a standard servo on channel 0 and a continuous rotation servo on channel 1.\"\"\"\nimport time\nfrom adafruit_servokit import ServoKit\n\n# Set channels to the number of servo channels on your kit.\n# 8 for FeatherWing, 16 for Shield\/HAT\/Bonnet.\nkit = ServoKit(channels=16)\n# with more time will test if this helps with the range\n#kit.servo[8].set_pulse_width_range(1000, 2000)\n# with more time will test if this helps with the range\n#kit.servo[9].set_pulse_width_range(1000, 2000)\n# if a max range is set, will use this to limit it.\n#kit.servo[0].actuation_range = 160\n\n\ndef move_tilt():\n  kit.servo[9].angle = 170\n  time.sleep(0.5)\n  kit.servo[9].angle = 90\n  time.sleep(0.5)\n  kit.servo[9].angle = 10\n  time.sleep(0.5)\n  kit.servo[9].angle = 90\n  time.sleep(0.5)\n\ndef move_pan():\n  kit.servo[8].angle = 170\n  time.sleep(0.5)\n  move_tilt()\n\n  kit.servo[8].angle = 90\n  time.sleep(0.5)\n  move_tilt()\n\n  kit.servo[8].angle = 10\n  time.sleep(0.5)\n  move_tilt()\n\n  kit.servo[8].angle = 90\n  time.sleep(0.5)\n  move_tilt()\n\n\ntime.sleep(5)\n\nfor x in range(5):\n  move_pan()\n\nkit.servo[8].angle = 90\nkit.servo[9].angle = 90\n\n<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<p>It doesn&#8217;t quite have the full range of motion I thought it would, but I&#8217;m able to control the servos sufficiently well.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"380\" src=\"http:\/\/www.thelemmingfarm.uk\/wp-content\/uploads\/2021\/12\/pan_titlt_servo.gif\" alt=\"\" class=\"wp-image-449\"\/><\/figure><\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Short answer: No The test setup used the same cable as before, but with the V+ cable removed. Thusly it was powered from the 2xAA<\/p>\n","protected":false},"author":1,"featured_media":449,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[],"class_list":["post-447","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electronics"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Did I set fire to the Servo Controller - The Lemming Farm<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.thelemmingfarm.uk\/?p=447\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Did I set fire to the Servo Controller - The Lemming Farm\" \/>\n<meta property=\"og:description\" content=\"Short answer: No The test setup used the same cable as before, but with the V+ cable removed. Thusly it was powered from the 2xAA\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.thelemmingfarm.uk\/?p=447\" \/>\n<meta property=\"og:site_name\" content=\"The Lemming Farm\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-08T22:56:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-08T22:57:21+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.thelemmingfarm.uk\/wp-content\/uploads\/2021\/12\/pan_titlt_servo.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"320\" \/>\n\t<meta property=\"og:image:height\" content=\"380\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"author\" content=\"matt\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"matt\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/?p=447#article\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/?p=447\"},\"author\":{\"name\":\"matt\",\"@id\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/#\\\/schema\\\/person\\\/ad3da4bf1895ba680ee4c6a0cdcfe5c3\"},\"headline\":\"Did I set fire to the Servo Controller\",\"datePublished\":\"2021-12-08T22:56:24+00:00\",\"dateModified\":\"2021-12-08T22:57:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/?p=447\"},\"wordCount\":109,\"image\":{\"@id\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/?p=447#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/pan_titlt_servo.gif\",\"articleSection\":[\"Electronics\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/?p=447\",\"url\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/?p=447\",\"name\":\"Did I set fire to the Servo Controller - The Lemming Farm\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/?p=447#primaryimage\"},\"image\":{\"@id\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/?p=447#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/pan_titlt_servo.gif\",\"datePublished\":\"2021-12-08T22:56:24+00:00\",\"dateModified\":\"2021-12-08T22:57:21+00:00\",\"author\":{\"@id\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/#\\\/schema\\\/person\\\/ad3da4bf1895ba680ee4c6a0cdcfe5c3\"},\"breadcrumb\":{\"@id\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/?p=447#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/www.thelemmingfarm.uk\\\/?p=447\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/?p=447#primaryimage\",\"url\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/pan_titlt_servo.gif\",\"contentUrl\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/pan_titlt_servo.gif\",\"width\":320,\"height\":380},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/?p=447#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Did I set fire to the Servo Controller\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/#website\",\"url\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/\",\"name\":\"The Lemming Farm\",\"description\":\"An Entry to the Pi Wars Competition 2024\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/#\\\/schema\\\/person\\\/ad3da4bf1895ba680ee4c6a0cdcfe5c3\",\"name\":\"matt\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6384a0c4df2a2e69eff9a84163bce14869cb2bde2aa2d0757ccafb22cd711e2c?s=96&d=mm&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6384a0c4df2a2e69eff9a84163bce14869cb2bde2aa2d0757ccafb22cd711e2c?s=96&d=mm&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6384a0c4df2a2e69eff9a84163bce14869cb2bde2aa2d0757ccafb22cd711e2c?s=96&d=mm&r=pg\",\"caption\":\"matt\"},\"url\":\"http:\\\/\\\/www.thelemmingfarm.uk\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Did I set fire to the Servo Controller - The Lemming Farm","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.thelemmingfarm.uk\/?p=447","og_locale":"en_GB","og_type":"article","og_title":"Did I set fire to the Servo Controller - The Lemming Farm","og_description":"Short answer: No The test setup used the same cable as before, but with the V+ cable removed. Thusly it was powered from the 2xAA","og_url":"http:\/\/www.thelemmingfarm.uk\/?p=447","og_site_name":"The Lemming Farm","article_published_time":"2021-12-08T22:56:24+00:00","article_modified_time":"2021-12-08T22:57:21+00:00","og_image":[{"url":"http:\/\/www.thelemmingfarm.uk\/wp-content\/uploads\/2021\/12\/pan_titlt_servo.gif","width":320,"height":380,"type":"image\/gif"}],"author":"matt","twitter_card":"summary_large_image","twitter_misc":{"Written by":"matt","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.thelemmingfarm.uk\/?p=447#article","isPartOf":{"@id":"http:\/\/www.thelemmingfarm.uk\/?p=447"},"author":{"name":"matt","@id":"http:\/\/www.thelemmingfarm.uk\/#\/schema\/person\/ad3da4bf1895ba680ee4c6a0cdcfe5c3"},"headline":"Did I set fire to the Servo Controller","datePublished":"2021-12-08T22:56:24+00:00","dateModified":"2021-12-08T22:57:21+00:00","mainEntityOfPage":{"@id":"http:\/\/www.thelemmingfarm.uk\/?p=447"},"wordCount":109,"image":{"@id":"http:\/\/www.thelemmingfarm.uk\/?p=447#primaryimage"},"thumbnailUrl":"http:\/\/www.thelemmingfarm.uk\/wp-content\/uploads\/2021\/12\/pan_titlt_servo.gif","articleSection":["Electronics"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"http:\/\/www.thelemmingfarm.uk\/?p=447","url":"http:\/\/www.thelemmingfarm.uk\/?p=447","name":"Did I set fire to the Servo Controller - The Lemming Farm","isPartOf":{"@id":"http:\/\/www.thelemmingfarm.uk\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.thelemmingfarm.uk\/?p=447#primaryimage"},"image":{"@id":"http:\/\/www.thelemmingfarm.uk\/?p=447#primaryimage"},"thumbnailUrl":"http:\/\/www.thelemmingfarm.uk\/wp-content\/uploads\/2021\/12\/pan_titlt_servo.gif","datePublished":"2021-12-08T22:56:24+00:00","dateModified":"2021-12-08T22:57:21+00:00","author":{"@id":"http:\/\/www.thelemmingfarm.uk\/#\/schema\/person\/ad3da4bf1895ba680ee4c6a0cdcfe5c3"},"breadcrumb":{"@id":"http:\/\/www.thelemmingfarm.uk\/?p=447#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.thelemmingfarm.uk\/?p=447"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"http:\/\/www.thelemmingfarm.uk\/?p=447#primaryimage","url":"http:\/\/www.thelemmingfarm.uk\/wp-content\/uploads\/2021\/12\/pan_titlt_servo.gif","contentUrl":"http:\/\/www.thelemmingfarm.uk\/wp-content\/uploads\/2021\/12\/pan_titlt_servo.gif","width":320,"height":380},{"@type":"BreadcrumbList","@id":"http:\/\/www.thelemmingfarm.uk\/?p=447#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.thelemmingfarm.uk\/"},{"@type":"ListItem","position":2,"name":"Did I set fire to the Servo Controller"}]},{"@type":"WebSite","@id":"http:\/\/www.thelemmingfarm.uk\/#website","url":"http:\/\/www.thelemmingfarm.uk\/","name":"The Lemming Farm","description":"An Entry to the Pi Wars Competition 2024","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.thelemmingfarm.uk\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"http:\/\/www.thelemmingfarm.uk\/#\/schema\/person\/ad3da4bf1895ba680ee4c6a0cdcfe5c3","name":"matt","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/6384a0c4df2a2e69eff9a84163bce14869cb2bde2aa2d0757ccafb22cd711e2c?s=96&d=mm&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/6384a0c4df2a2e69eff9a84163bce14869cb2bde2aa2d0757ccafb22cd711e2c?s=96&d=mm&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6384a0c4df2a2e69eff9a84163bce14869cb2bde2aa2d0757ccafb22cd711e2c?s=96&d=mm&r=pg","caption":"matt"},"url":"http:\/\/www.thelemmingfarm.uk\/?author=1"}]}},"jetpack_featured_media_url":"http:\/\/www.thelemmingfarm.uk\/wp-content\/uploads\/2021\/12\/pan_titlt_servo.gif","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.thelemmingfarm.uk\/index.php?rest_route=\/wp\/v2\/posts\/447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.thelemmingfarm.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.thelemmingfarm.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.thelemmingfarm.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.thelemmingfarm.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=447"}],"version-history":[{"count":2,"href":"http:\/\/www.thelemmingfarm.uk\/index.php?rest_route=\/wp\/v2\/posts\/447\/revisions"}],"predecessor-version":[{"id":451,"href":"http:\/\/www.thelemmingfarm.uk\/index.php?rest_route=\/wp\/v2\/posts\/447\/revisions\/451"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.thelemmingfarm.uk\/index.php?rest_route=\/wp\/v2\/media\/449"}],"wp:attachment":[{"href":"http:\/\/www.thelemmingfarm.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.thelemmingfarm.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=447"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.thelemmingfarm.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}