{"id":5745,"date":"2018-04-13T20:09:24","date_gmt":"2018-04-14T00:09:24","guid":{"rendered":"http:\/\/www.plastibots.com\/?p=5745"},"modified":"2019-12-29T16:36:43","modified_gmt":"2019-12-29T21:36:43","slug":"usb-dial","status":"publish","type":"post","link":"https:\/\/www.plastibots.com\/index.php\/2018\/04\/13\/usb-dial\/","title":{"rendered":"USB Dial"},"content":{"rendered":"<p><a href=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-5746 alignright\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/1-300x247.jpg\" alt=\"\" width=\"178\" height=\"155\" \/><\/a>This is another one of those &#8220;did it because I can&#8221; projects.\u00a0 It&#8217;s a USB dial that uses a Teensy 2.0 Arduino unit at it&#8217;s core and allows me to emulate my mouse.\u00a0 I use TinkerCAD avidly to design my 3D printed models.\u00a0 \u00a0I wanted to have both this and my mouse at the same time.\u00a0 The mouse would be used for some activities (i.e object selection\/rotation\/editing) while the dial would fill in to\u00a0perform rotate\/zoom in\/out actions.\u00a0 It makes for an interesting dynamic with both units operating at the same time.<\/p>\n<p><strong>In Action:<\/strong><\/p>\n<p><iframe loading=\"lazy\" title=\"DIY USB Dial\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/cOecxV_oPiM?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><\/p>\n<p><strong>How it Works:<\/strong><\/p>\n<p>The knob is connected to a rotary encoder (which has a push button switch built in).\u00a0 Encoded\/switch actions are sent through to the Teensy, then over USB acting as a HID mouse\/keyboard.\u00a0 Actions are as follows:<\/p>\n<ul>\n<li>Single-click:\u00a0 Mode 1: Rotates the workspace view in TinkerCAD.<\/li>\n<li>Double-click:\u00a0 \u00a0Mode 2: Zooms in\/out in TinkerCAD.\u00a0 Also scrolls in other apps like Chrome.<\/li>\n<li>A small vibration motor provides haptic feedback when turning the dial.<\/li>\n<li>Third and subsequent clicks can be added later if need be.<\/li>\n<\/ul>\n<p><strong>The Guts:<\/strong><\/p>\n<ul>\n<li>Teensy 2.0 micro controller. Arduino <a href=\"https:\/\/www.banggood.com\/Pro-Micro-5V-16M-Mini-Leonardo-Microcontroller-Development-Board-For-Arduino-p-1077675.html?p=R90804949020201412E\" target=\"_blank\" rel=\"noopener noreferrer\">Pro Micro<\/a> will likely work as well, or\u00a0 any controller that emulates a HID device.<\/li>\n<li>Alps <a href=\"https:\/\/www.banggood.com\/Wholesale-12mm-Rotary-Encoder-Switch-with-Key-Switch-with-2-bit-gray-scale-p-41613.html?p=R90804949020201412E4\" target=\"_blank\" rel=\"noopener noreferrer\">rotary encoder<\/a>.<\/li>\n<li><a href=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/TheDial.zip\">3D printed base unit<\/a>.<\/li>\n<li>micro <a href=\"https:\/\/www.banggood.com\/3Sets-1027-Flat-Vibrating-Vibration-Motor-p-1148590.html?p=R90804949020201412E4\" target=\"_blank\" rel=\"noopener noreferrer\">vibrating motor<\/a> from old cellphone.<\/li>\n<li>24-30GA <a href=\"https:\/\/www.banggood.com\/search\/silicone-wire.html?p=R90804949020201412E4\" target=\"_blank\" rel=\"noopener noreferrer\">silicone wire<\/a>.<\/li>\n<li><a href=\"https:\/\/www.amazon.ca\/gp\/product\/B077S25SS9\/ref=oh_aui_detailpage_o01_s00?ie=UTF8&amp;psc=1\" target=\"_blank\" rel=\"noopener noreferrer\">Machined aluminum knob<\/a> (6mm bore).\u00a0 You could print or use others but the metal dial provides a professional feel with the weight.<\/li>\n<li>Arduino Sketch: <div class=\"sdm_download_button_box_default\"><div class=\"sdm_download_link\"><a href=\"https:\/\/www.plastibots.com\/?sdm_process_download=1&download_id=6236\" class=\"sdm_download green\" title=\"USBDial Sketch\" target=&quot;_blank&quot;>Download Now!<\/a><\/div><\/div> ( specific to Teensy 2.o but probably works with the Pro Micro as is, but YMMV.)<\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-5749\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/4-300x272.jpg\" alt=\"\" width=\"300\" height=\"272\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/4-300x272.jpg 300w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/4-768x695.jpg 768w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/4.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-5750\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/5-300x250.jpg\" alt=\"\" width=\"300\" height=\"250\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/5-300x250.jpg 300w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/5-768x641.jpg 768w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/5.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/td>\n<\/tr>\n<tr>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-5751\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/dial2-294x300.png\" alt=\"\" width=\"294\" height=\"300\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/dial2-294x300.png 294w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/dial2.png 465w\" sizes=\"auto, (max-width: 294px) 100vw, 294px\" \/><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5752 size-medium\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/dial1-300x273.png\" alt=\"\" width=\"300\" height=\"273\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/dial1-300x273.png 300w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/dial1.png 519w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/td>\n<\/tr>\n<tr>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-5748\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/3-300x287.jpg\" alt=\"\" width=\"300\" height=\"287\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/3-300x287.jpg 300w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/3-768x734.jpg 768w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/3.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5747 size-medium\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/2-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/2-300x225.jpg 300w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/2-768x576.jpg 768w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/2.jpg 1024w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/2-640x480.jpg 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-5746\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/1-300x247.jpg\" alt=\"\" width=\"300\" height=\"247\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/1-300x247.jpg 300w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/1-768x632.jpg 768w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/1.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a href=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/1.jpg\">\u00a0<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is another one of those &#8220;did it because I can&#8221; projects.\u00a0 It&#8217;s a USB dial that uses a Teensy 2.0 Arduino unit at it&#8217;s core and allows me to emulate my mouse.\u00a0 I use TinkerCAD avidly to design my 3D printed models.\u00a0 \u00a0I wanted to have both this and my mouse at the same time.\u00a0 The mouse would be used for some activities (i.e object selection\/rotation\/editing) while the dial would fill in to\u00a0perform rotate\/zoom &hellip; <a href=\"https:\/\/www.plastibots.com\/index.php\/2018\/04\/13\/usb-dial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":5746,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[156,65,6,57],"tags":[64,181,180],"class_list":["post-5745","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-3d-printing","category-arduino-electronics","category-dyihacks","category-electronics","tag-arduino","tag-teensy","tag-usb","has_thumb"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2018\/04\/1.jpg","jetpack_shortlink":"https:\/\/wp.me\/pK41j-1uF","jetpack_sharing_enabled":true,"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts\/5745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/comments?post=5745"}],"version-history":[{"count":5,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts\/5745\/revisions"}],"predecessor-version":[{"id":6242,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts\/5745\/revisions\/6242"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/media\/5746"}],"wp:attachment":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/media?parent=5745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/categories?post=5745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/tags?post=5745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}