Monday, 22 October 2012

Rostock marlin on Sanguinololu 1.2


I got some time this weekend to look at a few reprap things.

Firstly I upgraded my old Sanguinololu 1.0 board to 1.2 compatibility by following this


This took some time as its quite fiddly!  Also when I tested I found that my solder had re-bridged one of the cuts in the PCB, so I had to scrape away more copper. The moral is always test everything!

I upgraded the board to 1.2 as Marlin software needs Sanguinololu 1.2 or greater.


I uploaded the Rostock firmware, and had the same issue I originally had on my 1.3a board, the temperature reads 175C in a 20C room.  All setting are correct.

So next I upgraded the 644p to a 1284p chip.

If you zoom into this picture you can just make out the 1284 written on it, other than that it just looks like a 644p (it is fully pin compatible)

I went threw a few iterations of trying to get a boot loader onto this chip, but here is the way that worked for me.

Download the needed files from https://github.com/jmgiacalone/sanguino1284p  

I already have Sanguino-0023r4.zip installed in my arduino, and it comes with boot loaders for 1284p, but they don't seem to work. Copy the / Sanguino / bootloaders / standard directory from the github file into your arduino/hardware/Sanguino/bootloaders directory. Then edit your boards.txt file edit the
ATmega1284p 16mhz section to match the one in the github file above.

I then manually flashed the bootloader with my pololu avr. (I cant get this to work from within arduino, there is no easy way to set the -B options)

>avrdude -B3 -pm1284p -cavrispv2 -P/dev/ttyACM0 -U flash:w:ATmegaBOOT_1284P.hex -C avrdude.conf

Then I set the Fuses. These are different from a standard 644p

1284p fuses
Low 0xD6
High 0xDC
Ext  0xFD

As mentioned in the boards.txt in the github files.

>avrdude -B5 -pm1284p -cavrispv2 -P/dev/ttyACM0 -U lfuse:w:0xd6:m -U hfuse:w:0xdc:m -U efuse:w:0xfd:m  -C avrdude.conf

The fuses are now set.

A quick test in the Arduino IDE setting the board to be  "Sanguino W/ ATmega1284p 16mhz" and compiling and uploading the Example program blink worked as expected (I have to press reset and a moment later click upload)  NB there is no flash-able LED on the SL board unless you add one, so if your expecting a led to blink you will be disappointed.

I then compiled and uploaded Rostock firmware to the 1284p. It compiled and uploaded fine.


I connected to the Sanguinololu with Rostock firmware on the 1284p with Pronterface. For the first time the temperature reads 20C as it should!

Next step is to test the rest of the board works as expected on the Rostock.


1 comment:

  1. Had the same problem this last week with the Delta firmware on a Sangiuinololu 1.3. I think it boils down to a memory issue with the 4k SRAM on the 644p just not enough. I went about it a little differently (http://hardwired.cc/) as I couldnt get JMG's firmware to load but that might have been a compound error on my part. (Read: desperation!)

    ReplyDelete