{"id":1356,"date":"2019-11-16T22:21:11","date_gmt":"2019-11-17T04:21:11","guid":{"rendered":"https:\/\/www.protowrxs.com\/?page_id=1356"},"modified":"2019-11-16T22:21:12","modified_gmt":"2019-11-17T04:21:12","slug":"chomper","status":"publish","type":"page","link":"https:\/\/www.protowrxs.com\/index.php\/robotics\/chomper\/","title":{"rendered":"Chomper"},"content":{"rendered":"\n<p>March 2013<\/p>\n\n\n\n<p><strong>Chomper came about from another silly notion.<\/strong>\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"373\" height=\"500\" src=\"https:\/\/www.protowrxs.com\/wp-content\/uploads\/2019\/11\/Chomper3.jpg\" alt=\"\" class=\"wp-image-1357\" srcset=\"https:\/\/www.protowrxs.com\/wp-content\/uploads\/2019\/11\/Chomper3.jpg 373w, https:\/\/www.protowrxs.com\/wp-content\/uploads\/2019\/11\/Chomper3-224x300.jpg 224w\" sizes=\"(max-width: 373px) 85vw, 373px\" \/><\/figure>\n\n\n\n<p>After my wife opened one of her stocking stuffers this past  Christmas, a small ring, I couldn\u2019t help but save the jewelry box from  the trash noticing how it looked like a square head and with an opening  mouth. Scary imagination no? Soooo anyhow I found some simple linkage  from my radio control race truck box, drilled a hole in the back of the  box, glued the servo up inside, hooked up the linkage and TaDa! \u2026 the  box could now talk. I actually left it like that for a while &#8211; a  \u201cdis-emboxed\u201d head and even had it yapping to speech and music for a bit  with the LED bar graph code floating around here. Fun and silly enough  but&#8230;\u00a0 <\/p>\n\n\n\n<p class=\"has-medium-font-size\">Chomper Body&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"373\" height=\"500\" src=\"https:\/\/www.protowrxs.com\/wp-content\/uploads\/2019\/11\/Chomper1.jpg\" alt=\"\" class=\"wp-image-1358\" srcset=\"https:\/\/www.protowrxs.com\/wp-content\/uploads\/2019\/11\/Chomper1.jpg 373w, https:\/\/www.protowrxs.com\/wp-content\/uploads\/2019\/11\/Chomper1-224x300.jpg 224w\" sizes=\"(max-width: 373px) 85vw, 373px\" \/><\/figure>\n\n\n\n<p>Surely Chomper deserved a body of some sorts so I dug out my super el cheapo motors and wheels\/tires I had picked up on ebay and then had to find something to mount them on. Fortunately, for me, not my wife who has to put up with all my junk, I had saved the aluminum support metal out of some of my old carpal tunnel wrist support gloves (yes, yet another result of too much technology, coding and keyboarding work). They seemed to look rather dumb BUT gave the curve needed up top to allow Chompers jaw to open. I wanted more than just a flopping jaw so yet another servo was added to allow Chomper to swivel his head back and forth. Now he could yap AND he could look at you with that question mark look. <\/p>\n\n\n\n<p class=\"has-medium-font-size\">Power UP&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"373\" height=\"500\" src=\"https:\/\/www.protowrxs.com\/wp-content\/uploads\/2019\/11\/Chomper4.jpg\" alt=\"\" class=\"wp-image-1359\" srcset=\"https:\/\/www.protowrxs.com\/wp-content\/uploads\/2019\/11\/Chomper4.jpg 373w, https:\/\/www.protowrxs.com\/wp-content\/uploads\/2019\/11\/Chomper4-224x300.jpg 224w\" sizes=\"(max-width: 373px) 85vw, 373px\" \/><\/figure>\n\n\n\n<p>Power was needed to do anything so a couple 2 x AA boxes fit nicely \nup front on his \u201clegs\u201d and a third different type I had around was \nmounted out back. With Chomper\u2019s big head he was pretty front heavy so I\n made some simple aluminum rear dragger supports, mounted the other AA \nbox on that and some furniture \u201csliders\u201d to make it a little less sticky\n back there. I had to get him leaning back pretty far to keep from \nfalling forward every time he stopped but that kind of added some \ncharacter to him.\n\n<\/p>\n\n\n\n<p>I\u2019d never used an H-Bridge on an Arduino yet and I had a bunch of  754410 chips sitting around so I put together a little H-Bridge board  to use. I did learn a bit about the differences of H-Bridges and Arduino  vs using a BX\/ZX 24 in the process. I could not figure out how to  invert the control signals and PWM one for movement like I remember  doing on the other platform. I ended up using a third pin to drive the  modulation and two pins each for motor direction. Works but seems to use  a lot of pins. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"500\" height=\"460\" src=\"https:\/\/www.protowrxs.com\/wp-content\/uploads\/2019\/11\/ChomperHBridge.jpg\" alt=\"\" class=\"wp-image-1360\" srcset=\"https:\/\/www.protowrxs.com\/wp-content\/uploads\/2019\/11\/ChomperHBridge.jpg 500w, https:\/\/www.protowrxs.com\/wp-content\/uploads\/2019\/11\/ChomperHBridge-300x276.jpg 300w\" sizes=\"(max-width: 500px) 85vw, 500px\" \/><\/figure>\n\n\n\n<p>Power was needed to do anything so a couple 2 x AA boxes fit nicely \nup front on his \u201clegs\u201d and a third different type I had around was \nmounted out back. With Chomper\u2019s big head he was pretty front heavy so I\n made some simple aluminum rear dragger supports, mounted the other AA \nbox on that and some furniture \u201csliders\u201d to make it a little less sticky\n back there. I had to get him leaning back pretty far to keep from \nfalling forward every time he stopped but that kind of added some \ncharacter to him.\n\n<\/p>\n\n\n\n<p>I\u2019d never used an H-Bridge on an Arduino yet and I had a bunch of  754410 chips sitting around so I put together a little H-Bridge board  to use. I did learn a bit about the differences of H-Bridges and Arduino  vs using a BX\/ZX 24 in the process. I could not figure out how to  invert the control signals and PWM one for movement like I remember  doing on the other platform. I ended up using a third pin to drive the  modulation and two pins each for motor direction. Works but seems to use  a lot of pins. <\/p>\n\n\n\n<p class=\"has-medium-font-size\">Chomper Chomping&#8230;<\/p>\n\n\n\n<p>Right now Chomper really only has two \u201cmodes\u201d of operation &#8211; the \n\u201cHeadBite\u201d mode where he sits there and waits for something to get \nwithin range of his sonar \u201ceyes\u201d. Once in range he starts opening his \nmouth the closer you get until you get too close and then he \u201cChomps\u201d it\n shut &#8211; thus, \u201cChomper\u201d is his name. \n\n<\/p>\n\n\n\n<p>It\u2019s fun how you can take a pencil and move towards him until you\n get close enough and he\u2019ll bite down on the pencil and hold it. (See \nthe video &#8211; but note I\u2019m not a very good aim with my left hand having \nmissed his mouth a couple times). I also added my normal \u201cBlip\u201d sounds \neffects from the sonar data &#8211; but this time it only starts when you\u2019re \nclose enough for him to start opening his mouth.\n\n<\/p>\n\n\n\n<p>Chomper does have a PIR sitting in his mouth kind of like a  tongue at the moment. No real idea what to do with it but figure I\u2019ll  have another mode that he sits with mouth open looking for something to  move and then bites it. OR if he closes his mouth while moving around  the PIR may not trigger until he opens his mouth and settles down. <\/p>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Chomper\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/5h0gGcfqqcM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>The other mode is a normal roam mode &#8211; just drive around and try not \nto run into stuff. However, using the CCR head rotate code makes Chomper\n swivel his head instead of rotate it making him look even sillier. \nMoving the sonar around like that has an unintended effect of false \npositive sonar hits which adds a little more flavor to his actions as he\n randomly stops in the middle of the floor and does the \u201cavoid\u201d routine.\n \n\n<\/p>\n\n\n\n<p>His \u201cavoidance\u201d isn\u2019t too great however with the sonar pointing \nup like it does&#8230; although this way is much more fun to interact with \nhim when he\u2019s on the floor or cabinet top. Unfortunately he can\u2019t really\n see where he\u2019s going down low and gets confused and stuck much easier \nthan my other bots. I\u2019m still thinking about adding another sonar down \nlow and kind of hidden to provide better object avoidance.\n\n<\/p>\n\n\n\n<p>Or maybe I\u2019ll just leave him like he is so he can wander about \nuntil he runs into the wall, gets too close and puts himself into \u201cBite \nme\u201d mode&#8230;.&nbsp;\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>March 2013 Chomper came about from another silly notion. After my wife opened one of her stocking stuffers this past Christmas, a small ring, I couldn\u2019t help but save the jewelry box from the trash noticing how it looked like a square head and with an opening mouth. Scary imagination no? Soooo anyhow I found &hellip; <a href=\"https:\/\/www.protowrxs.com\/index.php\/robotics\/chomper\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Chomper&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":19,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"spay_email":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/www.protowrxs.com\/index.php\/wp-json\/wp\/v2\/pages\/1356"}],"collection":[{"href":"https:\/\/www.protowrxs.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.protowrxs.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.protowrxs.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.protowrxs.com\/index.php\/wp-json\/wp\/v2\/comments?post=1356"}],"version-history":[{"count":1,"href":"https:\/\/www.protowrxs.com\/index.php\/wp-json\/wp\/v2\/pages\/1356\/revisions"}],"predecessor-version":[{"id":1361,"href":"https:\/\/www.protowrxs.com\/index.php\/wp-json\/wp\/v2\/pages\/1356\/revisions\/1361"}],"up":[{"embeddable":true,"href":"https:\/\/www.protowrxs.com\/index.php\/wp-json\/wp\/v2\/pages\/19"}],"wp:attachment":[{"href":"https:\/\/www.protowrxs.com\/index.php\/wp-json\/wp\/v2\/media?parent=1356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.protowrxs.com\/index.php\/wp-json\/wp\/v2\/categories?post=1356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.protowrxs.com\/index.php\/wp-json\/wp\/v2\/tags?post=1356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}