Nematoduino – Wormbot – 2

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. So I started to port the project to an Atmega 1284p. I’ve quite a lot of these PDIP chips “in stock”, as I bought a big amount at Mouser 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.

I found a cheap PDIP40 dev-board in my “something I bought sometimes” 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.

To work with a “breadboard” Atmega1284 in Arduino I found MightyCore on GitHub. It is well documented and the setup and usage worked straight forward as described in the readme files. I used my Diamex-AVR programmer to flash an initial optiboot bootloader. Afterwards I used a FTDI  serial2usb breakout, as described on the MightyCore Github page, to flash code directly from the Arduino IDE.

The main functions seem to work fine. ASAP I’ll test it “on the road”. If it behaves comparable to the Ardunio Uno version I’ll try adding more sensors and features again.

Leave a Reply