Raspberry Pi won't connect to 3D Printer


7 posts
by amzeratul » Fri Dec 21, 2012 2:39 pm
Hi,

I've recently purchased a Ultimaker 3D printer (RepStrap printer based on Arduino Mega 2560), and while it works fine on my Windows machine, I just can't for the life of me get the Raspberry Pi to talk to it properly. The printer is running the Marlin firmware (whichever version is installed by Cura 12.10).

I've done a fresh install of Raspbian (October release, was latest at the time), and tried several different programs to connect to the printer - sendg (via Mono), printerface (pronsole.py), pronterface, Cura (which crashes in the UI), and had no success.

After that round of failures, I've tried doing apt-get update and apt-get dist-upgrade. I've also run rpi-update. Same results on all four programs.

The printer is supposed to be at /dev/ttyACM0, and it does exhibit some reaction when I first open the port to it (it makes sounds as if motors are making a very subtle movement), but I receive a bunch of gibberish as response and none of the programs behave as expected. I've tried connecting with baud rates 115200, 230400 and 250000 (which is, I understand, the ideal baud rate). 250000 seems to behave differently, crashing the pronsole.py immediately (no error messages, it just immediately terminates) instead of estabilishing a borked connection. I've also tried overclocking the UART by 1.085x and connecting at 230400 (which would then actually be 250000), but that didn't work either (I've since reverted that change). I have not tried patching the printer firmware because it's my understanding that it shouldn't matter (though correct me if I'm mistaken) and I didn't want to risk causing issues on Windows as well.

The hardware setup is a Model B Raspberry Pi (256 MB version) with an 8 GB SDHC Sandisk card, an Edimax EW-7811UN wireless adapter connected to the top USB port and a powered USB hub on the bottom USB port. The printer is connected to the powered hub. I'm SSHing into the RPi, though I've also tried keyboard and monitor, to no success.

I know that this might be a shot in the dark, but does anyone have any ideas on what I could try next? Lots of people seem to be able to drive their Ultimakers with the Raspberry Pi, and I don't seem to be doing anything particularly different from their instructions...

[EDIT] I forgot to mention, I also tried austerusG, to no avail: https://github.com/greenarrow/austerusG
Posts: 3
Joined: Sat Nov 24, 2012 10:24 pm
by mich » Tue Mar 12, 2013 9:35 am
Hi,

I am lost in the same situation! Really the same (the only difference is that I used the "2012-12-16-wheezy-raspbian" SD image).

And I don't know what to try next, so I'm joining the help request :)

Many thanks in advance, Mich.
Posts: 1
Joined: Tue Mar 12, 2013 9:26 am
by jorabo » Tue Mar 12, 2013 6:15 pm
How is it connected to the serialport?
did you use an TTL->RS232 converter ?


Did you try it with a USB->Serial converter ? This works fine with my serialprinter (/dev/ttyUSB0)


Jonny
User avatar
Posts: 28
Joined: Thu Feb 21, 2013 8:31 am
Location: Nuernberg
by rurwin » Tue Mar 12, 2013 7:14 pm
This StackOverflow question may help:

http://raspberrypi.stackexchange.com/qu ... an-arduino

So far as I can understand, it should work as you have it. But the baud rate should not matter if the Arduino appears as /dev/ACM0, because the data never actually gets to serial -- the USB is decoded and encoded in the AVR CPU. If it appears as /dev/USB0, then it will matter because a chip is being used to convert the USB to serial and that serial data is handled by the AVR.

The printer firmware will matter, but if it works on Windows I would not have thought you would have a problem on Linux.
User avatar
Forum Moderator
Forum Moderator
Posts: 2901
Joined: Mon Jan 09, 2012 3:16 pm
by Solenoid » Thu May 02, 2013 10:41 am
I'm in the very same situation, using OctoPrint it gets gibberish at whatever baud I'm trying to connect to it, but there's something when I first connect to it. I'm using the default Marlin firmware from Cura on a Windows machine which works extremely well.

Have you found a solution? A clean install perhaps?

SOLUTION
Upload the Marlin firmware at 115200 baud (located somewhere in the install files), from Cura itself on Windows, works perfectly.
Posts: 16
Joined: Fri Nov 30, 2012 2:41 pm
by xorrbit » Wed May 08, 2013 5:00 pm
We had a similar problem recently with a MendelMax 2.

Basically you have to modify the Marlin firmware to use a standard baud rate. 250000 is not standard and linux kernel has issues with it. We changed our firmware to use 230400 and then were able to connect at that speed fine under linux.

There is more information here https://github.com/ErikZalm/Marlin/issues/205.
software craftsman | hardware hacker | open source advocate
Posts: 2
Joined: Wed May 08, 2013 4:47 pm
Location: Winnipeg, Canada
by jbernal » Sat May 11, 2013 11:11 pm
I have the same problem. Using both Sanguino rev3a and a new Rumba, both with Sprinter firmware. With the original baudrate settings (115200) I could get the sanguino to sort of act like it was interested in connecting to the Pi, it would make some sad little noises and then quit. I never got any messages other than "Connecting..."
After changing the baudrate in the firmware to 56k it no longer made its sad noises.
The Rumba doesn't connect either, no matter how I fiddle with baudrate.
The printers run just fine on both Mac and PC using Pronterface.
Posts: 2
Joined: Sat May 11, 2013 11:05 pm