More on fabduinos

April 25th, 2013

So again, this is about making your own arduinos using fablab inventory parts and milling the circuit on a modela.

fabduino 328

So you can make these boards as listed on the fab academy website, including using the components,traces, interior, and cad file.

Then, if instead of a 168 like listed on the schematic, you only had 328s (and not 328ps), you’d have to solder on a 20MHz crystal, and follow the steps in the previous blog post to get your avrisp recognized in linux correctly, and edit the avrdude.conf file to tell avrdude about the existence of atmega328s, and then….

Step 4: We make our own hardware folder containing this board.

Put the contents of this zip into your sketchbook folder. You should now have a file structure like sketchbook>hardware>fabduino328. This zip file includes a compiled bootloader for the 328 using a 20MHz external crystal, a boards.txt description file of the fabduino, and a shell script to flash the bootloader, and some other crap.

To flash the bootloader, run ./burnbootloader.sh. This assumes you are using an avrisp2.

Now when you run the arduino IDE, you should be able to program your fabduino as expected.

Addendum: some more notes

So the burn bootloader script just runs these two avrdude scripts:
avrdude -c stk500v2 -p atmega328 -P usb -b 115200 -e -u -U lock:w:0×3f:m -U efuse:w:0×05:m -U hfuse:w:0xDC:m -U lfuse:w:0xFF:m
avrdude -c stk500v2 -p atmega328 -P usb -b 115200 -U flash:w:optiboot_fabduino328.hex -U lock:w:0×2f:m
The reason you can’t burn the bootloader from within arduino is because after burning the bootloader I pretend the mcu is actually a 328p so you can use the regular arduino compilation.

Should for some reason zips break the internet, here’s the boards.txt file:

fabduino328-20.name=Fabduino with Atmega328 (not p) with 20MHz external clock

fabduino328-20.upload.protocol=arduino
fabduino328-20.upload.speed=115200

fabduino328-20.bootloader.low_fuses=0xDC
fabduino328-20.bootloader.high_fuses=0xFF
fabduino328-20.bootloader.extended_fuses=0×05
fabduino328-20.bootloader.upload.maximum_size=31744
fabduino328-20.bootloader.file=optiboot_fabduino328.hex
fabduino328-20.bootloader.unlock_bits=0×3F
fabduino328-20.bootloader.lock_bits=0×0F

fabduino328-20.build.mcu=atmega328p
fabduino328-20.build.f_cpu=20000000L
fabduino328-20.build.core=arduino:arduino
fabduino328-20.build.variant=arduino:standard








infosyncratic.nl is by nadya peek. she'd love to hear from you.