{"id":1188,"date":"2017-11-01T22:22:33","date_gmt":"2017-11-01T21:22:33","guid":{"rendered":"https:\/\/www.admindu.de\/wordpress\/?p=1188"},"modified":"2017-11-01T22:29:10","modified_gmt":"2017-11-01T21:29:10","slug":"nematoduino-wormbot-2","status":"publish","type":"post","link":"https:\/\/www.admindu.de\/wordpress\/?p=1188","title":{"rendered":"Nematoduino \u2013 Wormbot &#8211; 2"},"content":{"rendered":"<p>I tried to add an I2C lux sensor <a href=\"https:\/\/www.amazon.de\/digitale-Lichtst%C3%A4rke-Sensor-Modul-Arduino\/dp\/B00UIZ2I20\">BH1750<\/a> to the Wormbot to feed the chemotaxis, but I was running out of memory on the Arduino Uno after just adding the I2C library. <!--more-->So I started to port the project to an <a href=\"http:\/\/www.microchip.com\/wwwproducts\/en\/ATmega1284P\">Atmega 1284p<\/a>. I&#8217;ve quite a lot of these PDIP chips &#8220;in stock&#8221;, as I bought a big amount at <a href=\"https:\/\/www.mouser.de\/\">Mouser<\/a> some time ago as it was possible to get the blow 4 EUR per part. The Atmega 1284p has 16KB of RAM which is 8 times the RAM of an Arduino Uno with an Atmega 328.<\/p>\n<p><a href=\"https:\/\/www.admindu.de\/wordpress\/wp-content\/uploads\/2017\/11\/IMG_3474.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1189\" src=\"https:\/\/www.admindu.de\/wordpress\/wp-content\/uploads\/2017\/11\/IMG_3474-650x1024.jpg\" alt=\"\" width=\"525\" height=\"827\" srcset=\"https:\/\/www.admindu.de\/wordpress\/wp-content\/uploads\/2017\/11\/IMG_3474-650x1024.jpg 650w, https:\/\/www.admindu.de\/wordpress\/wp-content\/uploads\/2017\/11\/IMG_3474-191x300.jpg 191w, https:\/\/www.admindu.de\/wordpress\/wp-content\/uploads\/2017\/11\/IMG_3474-768x1209.jpg 768w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/a><\/p>\n<p>I found a cheap PDIP40 dev-board in my &#8220;something I bought sometimes&#8221; box, which you can see on the lower right in the picture above. Unfortunately it is that cheap, it does not even have a voltage regulator. So I soldered a module with a 7805 linear regulator. You can see it on the lower left next to the PDIP board. The motor control board and the other components are unchanged and now attached to the 1284p.<\/p>\n<p>To work with a &#8220;breadboard&#8221; Atmega1284 in Arduino I found <a href=\"https:\/\/github.com\/MCUdude\/MightyCore\">MightyCore<\/a> on GitHub. It is well documented and the setup and usage worked straight forward as described in the readme files. I used my <a href=\"https:\/\/www.diamex.de\/dxshop\/DIAMEX-USB-ISP-Programmer-Stick-fuer-AVR\">Diamex-AVR<\/a> programmer to flash an initial optiboot bootloader. Afterwards I used a FTDI\u00a0 serial2usb breakout, as <a href=\"https:\/\/github.com\/MCUdude\/MightyCore#minimal-setup\">described on the MightyCore<\/a> Github page, to flash code directly from the Arduino IDE.<\/p>\n<p>The main functions seem to work fine. ASAP I&#8217;ll test it &#8220;on the road&#8221;. If it behaves comparable to the Ardunio Uno version I&#8217;ll try adding more sensors and features again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I tried to add an I2C lux sensor BH1750 to the Wormbot to feed the chemotaxis, but I was running out of memory on the Arduino Uno after just adding the I2C library.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[],"class_list":["post-1188","post","type-post","status-publish","format-standard","hentry","category-atmega-bastelei"],"_links":{"self":[{"href":"https:\/\/www.admindu.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.admindu.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.admindu.de\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.admindu.de\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.admindu.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1188"}],"version-history":[{"count":5,"href":"https:\/\/www.admindu.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1188\/revisions"}],"predecessor-version":[{"id":1195,"href":"https:\/\/www.admindu.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1188\/revisions\/1195"}],"wp:attachment":[{"href":"https:\/\/www.admindu.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.admindu.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.admindu.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}