Tuesday, April 16, 2013

Setting up a Sanguinololu on a Mac

The printer kit we'd bought previously came with a Sanguinololu board as the controller.  This is basically a RAMPS device that has been squashed into one board with all the functions for controlling a printer built in.   You can read more about it here: http://reprap.org/wiki/Sanguinololu.


It's a pretty nice bit of kit and is certainly easier to wire up than your standard RAMPS, but is limited to one extruder, no support for fans and we're using it with a relay to turn the heated bed off and on.  From what I've read I think this is just the original kit designer being cautious.

It's also missing the extra LEDs present on some RAMPS which let you know when the heaters are on, and the expansion header is different so it won't work with the standard LCD screens or SD readers.

Anyway, it's what we have and I got it nicely wired up to drive our new printer.  When we setup the first one, we did so with Windows and there are plenty of instructions on how to do that.  This time I wanted to use my Mac to do the initial flash and setup.  Figured I'd share my experiences.

Now, I'm not saying everything I did is correct -- but it worked for me and hopefully it might work for you too...

First, I installed the FTDI drivers for the serial USB chip that's on the board.  I downloaded this from http://www.ftdichip.com/Drivers/VCP.htm as directed by the standard Arduino website (http://arduino.cc/en/Guide/MacOSX).

On the FTDI page there are a few options - for me (OSX 10.8.3) I grabbed the 64-bit Intel file and mounted the disk image once it was downloaded.

From the disk image, I then installed the latest version which seemed to work fine for me.

Now I had the driver installed, I next downloaded the Arduino software for Mac OSX from http://arduino.cc/en/Main/Software.  The Mac version is provided as an App and you can just execute the downloaded file directly.  I did copy the App into my Applications folder so I could find it later, and it would show up on LaunchPad.

We're used to using Marlin, so I downloaded the latest version of the Marlin firmware from https://github.com/ErikZalm/Marlin -- just download the latest release, unzip it and put it some where you can find it later.

So, before you can build the firmware and send it to your Sanguinololu you need to modify the Arduino tools so they know about your board.  This is pretty straightforward, but neccessary.

From http://code.google.com/p/sanguino/downloads/list download the latest release and unzip it.  Now go back to the Arduino App you put in your Applications folder and right click it.  Select 'Show Package Contents' and left-click.

This will open a Finder window - double click the Contents folder, Resources folder, Java folder and finally the Hardware folder.

Grab the sanguino folder you downloaded and unzipped earlier (from http://code.google.com/p/sanguino/downloads/list) and drag it into the Hardware folder.  Your hardware folder should now look like:

With that done, you can close the Finder window and run the Arduino App from either LaunchPad or from your Applications folder.  If you installed the Sanguino folder correctly, you should see the Sanguino options at the bottom of the board list:

If the Sanguino options are not there, then you did something wrong -- maybe you already had the Arduino software running when you added the Sanguino extensions - if so quit it completely and re-launch it.

Now you can load the Marlin firmware and configure it for your Sanguinololu.  Navigate to the folder you had downloaded and extracted the firmware you downloaded earlier.  This should be a folder called Marlin-Marlin_v1. Open the folder, then open another folder called Marlin.  There should be a file called Marlin.pde.  That's the project file the Arduino software opens.  You can right click on the Marlin.pde and tell Finder to open it the Arduino App.  Once loaded, save the file and the Arduino App will let you know that the project extension has changed.  Go ahead and let it save a new copy of the project file as Marlin.ino.  In future, you can just double click Marlin.ino to load the project.

There are just a few more steps to get this working on the Mac -- you need to select your board type from the Tools/Board menu - I have a Sanguino ATmega1284p 16Mhz, so that's what I selected - you'll have to pick the entry to match your board.

You need to select the serial port that your board is on - this will only appear if the board is connected to the Mac and is powered up (USB power will do for this).  In my case I use the following setting:
dev/tty.usbserial-A104M4B

Yours might be different, but it should have tty. at the start of it. You can try compiling the firmware and sending it to your board to make sure the connection works, but before you do that, make sure you set the board type to 62 in configuration.h.

That's it - you now should have your Mac talking with your Sanguinololu and you can configure the firmware to suit your printer.

Enjoy!













1 comment:

  1. I'm not sure.. but I hav just installed Sanguinolo on a macbook pro & downloaded the FTDI dirvers. I did not need to load Arduino as Marlin firmware comes already loaded on the Sanguinololu board.

    This might only be the bcase if you scratch build the board with no firmware. (most Sanguinolulu boards come stock with Marlin these days.)

    I am also using "Repetier" Host software which connects really well.

    ReplyDelete