Showing posts with label serial. Show all posts
Showing posts with label serial. Show all posts

Tuesday, December 27, 2011

Sanguinololu 1.3a - Part 3:Not Out of The Woods Yet

See Also:
Part 1 - Build
Part 2 -  Trouble in Paradise


After the events of the last 2 parts I thought the Sanguinololu was finally working properly. But that would have been too easy, right? (I wouldn't have called it easy.) Of course not, something's still not right. Now I could upload and download firmware fine, and they seem to work. Except...
  • Both boards seem to reset or reboot at random.
  • One board gets a lot of serial errors, I resoldered the FTDI chip several times. I'm convinced my soldering is OK.
  • I noticed that touching my scope's 10x probe to the resonator pins produced serial errors and seemed to crash the 1284p some times
Turns out the Sanguino, from which I tried to use the bootloader and related software, as per the instructions on the Sanguinololu wiki page, is built with a crystal oscillator, not a ceramic resonator, so the fuse settings may be different. The Mighty 1284p bootloader is also set to a crystal oscillator.

I used http://www.engbedded.com/fusecalc/ to calculate new fuse settings

I burned Mighty 1284p bootloader with new fuse settings (changed in boards.txt):
Low 0xD6
High 0xDC
Ext  0xFD

I ran the controller connected to usb (no motors or external power) for over 3500 lines of g-code without error. Previously it would error some where between when it connected (before the build even started) and definitely before 200 lines of g-code.

I hooked up my motors and ran another build. I haven't built a frame yet, I've got other projects to finish first, but it ran the motors for a full build (11222 lines, the sample build-benchmart.stl), so we'll call it good for now.

From what I have been able to find the fuse settings for the Sanguino and Mighty 1284p are just plain wrong for the Sanguinololu. They are for a external crystal oscillator. Apparently the full sweep oscillator setting is required for a resonator. The above settings seem very stable so far.

UPDTATE: I just got a 644p to play with, I haven't had a lot of time for testing yet, but it seems stable on both the default settings (ext crystal osc) and my modified fuse settings. I think almost everyone uses the 644p and this may be the reason I haven't found anyone else with this problem. I'm inclined to believe that my setting (full swing osc - ceramic resonator) is correct for both micros, but the 644p doesn't mind the wrong setting nearly as much as the 1284p. I've still got more tests to run on it, so I'll update as I go.