{"id":164,"date":"2012-11-23T16:21:39","date_gmt":"2012-11-23T23:21:39","guid":{"rendered":"http:\/\/www.meanboyfriend.com\/overdue\/?p=164"},"modified":"2012-11-30T05:51:27","modified_gmt":"2012-11-30T12:51:27","slug":"arduino-powered-dinosaur","status":"publish","type":"post","link":"http:\/\/www.meanboyfriend.com\/overdue\/2012\/11\/arduino-powered-dinosaur\/","title":{"rendered":"Arduino powered dinosaur"},"content":{"rendered":"<p>Bryn&#8217;s recent 5th birthday brought with it an extremely cool Dinosaur toy (available from <a href=\"http:\/\/www.maplin.co.uk\/create-your-own-moving-dinosaur-kit-635542a\">Maplins<\/a> in the UK). It consisted of a set of cleverly engineered cardboard cutouts which you fold and join to make a T-Rex, coupled with a motor, cogs, wires, battery box, switch and plastic stick, which all join together to make the cardboard T-Rex move and gnash it&#8217;s teeth when you&#8217;ve put it all together.<\/p>\n<p>Bryn and I built it (although to be honest the cardboard folding\/joining was pretty fiddly, and while he pushed the motor, battery box etc. in the base confidently, I had to do most of the construction of the cardboard model. The result was much much better than I really expected. The dinosaur moved (on the spot) and it&#8217;s teeth gnashed pretty effectively &#8211; enough for Bryn to play a game of putting his finger near it&#8217;s mouth and getting &#8216;bitten&#8217;.<\/p>\n<p><a href=\"http:\/\/www.meanboyfriend.com\/overdue\/wp-content\/uploads\/2012\/11\/Photo-11-11-2012-11-16-02.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-168\" title=\"He bit my finger!\" src=\"http:\/\/www.meanboyfriend.com\/overdue\/wp-content\/uploads\/2012\/11\/Photo-11-11-2012-11-16-02.jpg\" alt=\"\" width=\"480\" height=\"320\" srcset=\"http:\/\/www.meanboyfriend.com\/overdue\/wp-content\/uploads\/2012\/11\/Photo-11-11-2012-11-16-02.jpg 480w, http:\/\/www.meanboyfriend.com\/overdue\/wp-content\/uploads\/2012\/11\/Photo-11-11-2012-11-16-02-300x200.jpg 300w, http:\/\/www.meanboyfriend.com\/overdue\/wp-content\/uploads\/2012\/11\/Photo-11-11-2012-11-16-02-450x300.jpg 450w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p>The next day, I had an idea that if the dinosaur&#8217;s motor could be driven off our arduino, we could wire the dinosaur up. I asked Bryn, if he&#8217;d like to do this as a project and he was keen, so the next day we sat down to do this.<\/p>\n<p>The most recent project we&#8217;d done with the arduino had been using a light sensitive resistor to detect light levels and switch an LED on\/off, so making the dinosaur light activated seemed an obvious way to go. I got the basic motor circuit design out (details at\u00a0<a href=\"http:\/\/www.oomlout.com\/oom.php\/products\/ardx\/circ-03\">http:\/\/www.oomlout.com\/oom.php\/products\/ardx\/circ-03<\/a>) and started to try to work out how wire the photo-resistor.<\/p>\n<p>While I was doing this, I was pretty impressed that Bryn just got on and wired up the motor circuit from the diagram pinned to the breadboard. While I had to put the more fiddly components in, all the wires Bryn did without prompting or help.<\/p>\n<p>I was able to wire up the photo-resistor separately on the same breadboard (using\u00a0http:\/\/www.oomlout.com\/oom.php\/products\/ardx\/circ-09) &#8211; including (at Bryn&#8217;s request) an LED also to be controlled by light levels. I have to admit it took me a little while to work out the wiring, and this led me to just write the code to run the circuit without really getting Bryn to help &#8211; which I was sorry about afterwards.<\/p>\n<p>I&#8217;d got some concerns about whether the arduino board would drive the motor OK, as I hadn&#8217;t been able to establish what voltage\/current was required for the motor. The circuit above uses a transistor to enable the arduino to drive a small toy motor, but I wasn&#8217;t sure if it would be enough for the dinosaurs motor (which usually runs off two AA batteries).<\/p>\n<p>We covered the photo-resistor &#8211; and success. The dinosaur leapt (if slightly lethargically as the motor clearly not quite getting the power it really needed) to life. A dinosaur that comes to life when you switch the lights off!<\/p>\n<p><a href=\"http:\/\/www.meanboyfriend.com\/overdue\/wp-content\/uploads\/2012\/11\/Photo-17-11-2012-18-41-48.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-167\" title=\"Arduino dinosaur\" src=\"http:\/\/www.meanboyfriend.com\/overdue\/wp-content\/uploads\/2012\/11\/Photo-17-11-2012-18-41-48-1024x764.jpg\" alt=\"\" width=\"567\" height=\"423\" srcset=\"http:\/\/www.meanboyfriend.com\/overdue\/wp-content\/uploads\/2012\/11\/Photo-17-11-2012-18-41-48-1024x764.jpg 1024w, http:\/\/www.meanboyfriend.com\/overdue\/wp-content\/uploads\/2012\/11\/Photo-17-11-2012-18-41-48-300x224.jpg 300w, http:\/\/www.meanboyfriend.com\/overdue\/wp-content\/uploads\/2012\/11\/Photo-17-11-2012-18-41-48-401x300.jpg 401w\" sizes=\"auto, (max-width: 567px) 100vw, 567px\" \/><\/a><\/p>\n<p>I guess the next step would be to get some LEDs on wires to push through the cardboard as eyes, and some sound effects &#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bryn&#8217;s recent 5th birthday brought with it an extremely cool Dinosaur toy (available from Maplins in the UK). It consisted of a set of cleverly engineered cardboard cutouts which you fold and join to make a T-Rex, coupled with a motor, cogs, wires, battery box, switch and plastic stick, which all join together to make&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":""},"categories":[1],"tags":[7,8,9],"class_list":["post-164","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-arduino","tag-coding","tag-codingforkids"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.meanboyfriend.com\/overdue\/wp-json\/wp\/v2\/posts\/164","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.meanboyfriend.com\/overdue\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.meanboyfriend.com\/overdue\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.meanboyfriend.com\/overdue\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.meanboyfriend.com\/overdue\/wp-json\/wp\/v2\/comments?post=164"}],"version-history":[{"count":7,"href":"http:\/\/www.meanboyfriend.com\/overdue\/wp-json\/wp\/v2\/posts\/164\/revisions"}],"predecessor-version":[{"id":171,"href":"http:\/\/www.meanboyfriend.com\/overdue\/wp-json\/wp\/v2\/posts\/164\/revisions\/171"}],"wp:attachment":[{"href":"http:\/\/www.meanboyfriend.com\/overdue\/wp-json\/wp\/v2\/media?parent=164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.meanboyfriend.com\/overdue\/wp-json\/wp\/v2\/categories?post=164"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.meanboyfriend.com\/overdue\/wp-json\/wp\/v2\/tags?post=164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}