kliment / 4pi-firmware

18 stars 21 forks source link

SD Printing Problem #25

Closed amittel closed 10 years ago

amittel commented 10 years ago

Hi! I have a problem printing from the SD card. I connect to the 4pi over usb. Then I fire up Pronterface and select SD -> Print and choose the file. Everything is fine. I hit disconnect in pronterface and still everything is fine. But if I unplug the usb cable the 4pi gets hiccups. I made a video: https://drive.google.com/file/d/0BwsR5PJceNxMbzM3clFhUGtjV2s/edit?usp=sharing

amittel commented 10 years ago

Hi! Did a little research and asking around. The problem seems to be Pin PC19 (USBDET). After pulling the cable the sam3u might fall into a kind of sleep or energy saving mode, which would explain the behavior.

kliment commented 10 years ago

Can you confirm that sd print works correctly if you leave the USB cable connected?

On 11/10/2013 02:26 PM, amittel wrote:

Hi! Did a little research and asking around. The problem seems to be Pin PC19 (USBDET). After pulling the cable the sam3u might fall into a kind of sleep or energy saving mode, which would explain the behavior.

— Reply to this email directly or view it on GitHub https://github.com/kliment/4pi-firmware/issues/25#issuecomment-28150527.

amittel commented 10 years ago

The problem seems a bit more complicated. I got a tip, that an active USB hub would be a workaround. So I tried it and it worked. Then I became curious. After a while I also unplugged the hub and it still printed. So the first time real SD printing. Then I plugged the printer usb cable directly in the pc and connected via pronterface. It said Printer now online, but nothing else. So I clicked disconnect and pronterface crashed. Then I pulled the USB cable and we got again stuttering. Very, very strange. When I get home in the evening I'll run some test cases with different connecting patterns.

Am 11.11.2013 13:40, schrieb kliment:

Can you confirm that sd print works correctly if you leave the USB cable connected?

On 11/10/2013 02:26 PM, amittel wrote:

Hi! Did a little research and asking around. The problem seems to be Pin PC19 (USBDET). After pulling the cable the sam3u might fall into a kind of sleep or energy saving mode, which would explain the behavior.

— Reply to this email directly or view it on GitHub

https://github.com/kliment/4pi-firmware/issues/25#issuecomment-28150527.

— Reply to this email directly or view it on GitHub https://github.com/kliment/4pi-firmware/issues/25#issuecomment-28195800.

amittel commented 10 years ago

I made some testing. My model to test was this one: http://www.thingiverse.com/thing:27053

First I printed with the active USB-Hub attached. This was the result: octoalone

After that I printed with PC attached pronterface connected. octopc pronterface

Also I tried to print this one from SD: http://www.thingiverse.com/thing:154516 But this was the result: pencilholder

So when I'm printing from SD Card with an active hub connected it works, but there is some kind of drift in x-axis.

And printing without the hub is still not possible.

amittel commented 10 years ago

I made a new test run to investigate the drift. Came out, that the drift comes from the usb hub. I printed a shark (blue) with the hub connected in between but not powered and another shark (red) usb cable directly connected to the printer. shark2 shark1

se5a commented 10 years ago

I'm getting this same issue. I've not printed anything high enough yet to see a drift, but definitely see stutter if the USB cable is disconnected. I've yet to test if anything detrimental happens if the PC goes into sleep or hibernate mode while printing.

se5a commented 10 years ago

Well, I'm getting some sort of drift with USB connected straight to laptop, I can't rule out missed steps from some other source completely, though movement is smooth with no binding, motors and drivers are fairly warm but not overheating at 1.3A, I've turned acceleration down and jerk down, speed at 60. on the other hand, I don't see how USB would affect steps...

Edit: I've come to the conclusion that my drift is caused by the belt holder on the Y axis softening from the bed heat. not being able to remove my laptop after I've started a print is still a big problem though.
Edit2: and now proved that the belt holder was not the problem by attempting to print a new one on a cold bed, and still getting a drunk lean. Edit3: I think I've finally figured out why I'm getting a lean - noisy endstops. I noticed sometimes when I homed, it didn't always hit the endstop. on a hunch I triggered the endstop manually while it was printing I had assumed that the firmware ignored endstops when printing, but I guess this assumption was false. I doubt there's any relation to the USB lean you're amittel is seeing but..?

Lodran commented 10 years ago

This is likely to be related to https://github.com/kliment/4pi-firmware/issues/30

The firmware is attempting to send OK messages to the host software during the print. Because the connection has been broken, you get a large number of "usb_printf timeout" messages in the debugging log.

Interestingly, if you reconnect the cable, the timeout messages continue.