Welcome! Log In Create A New Profile

Advanced

Ramps1.2/Mega2560 - Unable to connect.

Posted by charlie 
Ramps1.2/Mega2560 - Unable to connect.
November 10, 2011 04:40PM
Hi,
I've had a Gen2 RAMPS board since earlier this year, but only recently found the time to create the mechanical frame of a Prusa Mendel. When I try to connect through the Java interface or RepSnapper, the connection fails. I've configured it on the correct port and baud rate, and the board will briefly "activate" the steppers (audible whine) when the software attempts to connect, but after a few seconds the connection times out in Repsnapper. Arduino Studio Serial console shows "start" and activates the stepper drivers briefly, just like the other software, but nothing more. The Java software says the following:


Quote
Console
DEBUG: GCode opening port COM4 [0.039s/35ms]
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
comms: G-code: N0 M110 *3 dequeued and sent [3.311s/3272ms]
comms: Response: ok [3.317s/6ms]
comms: G-code: N1 T0 *27 dequeued and sent [5.605s/2288ms]
ERROR: GCodeWriter.waitForResponse() - dud response from RepRap:Unknown command:
(hex: 556e6b6e6f776e20636f6d6d616e643a) [5.615s/10ms]
comms: Response: Unknown command: [5.615s/0ms]
comms: G-code: N1 T0 *27 dequeued and sent [5.617s/2ms]
ERROR: GCodeWriter.waitForResponse() - dud response from RepRap:N1 T0 *27 (hex:
4e31205430202a3237) [5.617s/0ms]
comms: Response: N1 T0 *27 [5.618s/1ms]
comms: G-code: N1 T0 *27 dequeued and sent [5.619s/1ms]
comms: Response: ok [5.619s/0ms]
comms: G-code: N1 M113 *1 dequeued and sent [5.620s/1ms]
ERROR: GCodeWriter.waitForResponse() - dud response from RepRapconfused smileyerial Error: Li
ne Number is not Last Line Number+1, Last Line:1 (hex: 53657269616c204572726f723
a204c696e65204e756d626572206973206e6f74204c617374204c696e65204e756d6265722b312c2
04c617374204c696e653a31) [5.628s/8ms]
comms: Response: Serial Error: Line Number is not Last Line Number+1, Last Line:
1 [5.629s/1ms]
comms: G-code: N1 M113 *1 dequeued and sent [5.630s/1ms]
ERROR: GCodeWriter.waitForResponse() - dud response from RepRap:Resend:2 (hex: 5
26573656e643a32) [5.630s/0ms]
comms: Response: Resend:2 [5.631s/1ms]
comms: G-code: N1 M113 *1 dequeued and sent [5.632s/1ms]
comms: Response: ok [5.632s/0ms]
comms: G-code: N1 M105 *6 dequeued and sent [5.633s/1ms]
ERROR: GCodeWriter.waitForResponse() - dud response from RepRapconfused smileyerial Error: Li
ne Number is not Last Line Number+1, Last Line:1 (hex: 53657269616c204572726f723
a204c696e65204e756d626572206973206e6f74204c617374204c696e65204e756d6265722b312c2
04c617374204c696e653a31) [5.641s/8ms]
comms: Response: Serial Error: Line Number is not Last Line Number+1, Last Line:
1 [5.642s/1ms]
It seems that the Arduino isn't responding correctly to G-code instructions, if I'm interpreting the log correctly.

I've tried Tonokip and Sprinter, have as far as I can tell configured the pins correctly, but had no success. Earlier in the year (when I first soldered the boards) I remember having the same issue (not sure of the firmware I was using - maybe Tonokip), and I also remember that it might have been due to not having anything connected to the thermistor pins? I've definitely had the board working with RepSnapper at one point, but only after fiddling with the thermistor pins. I'm afraid I can't remember quite what I did to make it work back then...

I don't think the hardware is damaged - the RAMPS1.4 test code (with pin numbers changed appropriately for 1.2) works fine, and moves all the motors. Programming and re-programming the Arduino is also fine, no upload errors.

I can't connect to the board with the shield disconnected either - same issue.

Complete hardware:
Prusa Mendel/Wade+J-Head V2
RAMPS1.2
A4983 boards with current limiter about half-way
NEMA 17 motors x5 (z-axis series)
Nothing on heater pins
Nothing on endstop pins
30k fixed resistor for testing using the reprapsource.com thermistor board
12v 50w PSU (for testing motion only - hence no heater yet)
Desktop with Win7 x64

Can anyone suggest the problem, or any way of me tracking down/investigating the issue further? Have I missed some aspect of the RepRap's behaviour (Not "booting" fully/being unable to respond to G-code without a good reading from the thermistor? Not "liking" 12v + usb power simultaneously? Something else?) Or should I check for loose solder joints? Is the PSU a possible problem?

Thanks
Charlie

NINJA EDIT:
The dud response bit in the log corresponds with

Quote
Sprinter

if(strstr(cmdbuffer[bufindw], "N") != NULL)
{
strchr_pointer = strchr(cmdbuffer[bufindw], 'N');
gcode_N = (strtol(&cmdbuffer[bufindw][strchr_pointer - cmdbuffer[bufindw] + 1], NULL, 10));
if(gcode_N != gcode_LastN+1 && (strstr(cmdbuffer[bufindw], "M110") == NULL) ) {
Serial.print("Serial Error: Line Number is not Last Line Number+1, Last Line:");
Serial.println(gcode_LastN);
//Serial.println(gcode_N);
FlushSerialRequestResend();
serial_count = 0;
return;
}

from the firmware. Still not sure precisely why it's doing that...

EDIT 2:
Will gladly provide photos if that'd help.


EDIT 3: I have a method to get the board working! Disconnecting everything, switching to a different USB port, connecting first the USB lead, connecting with RepSnapper, then finally powering the shield seems to work. Anyone have a clue why? It also looks like I'm going to have to be pretty careful with heatsinking - the stepper controllers are running warm, though I guess all A4983-based boards have that.

Edited 3 time(s). Last edit at 11/10/2011 06:08PM by charlie.
Re: Ramps1.2/Mega2560 - Unable to connect.
November 10, 2011 08:07PM
I have the same board. It connects up on port 5. if I happen to touch any other port and try to connect it won't simply reconnect on port 5. I have to unplug the usb cable, close Repsnapper plug the cable back in, turn repsnapper back on and connect using port5. There were some earlier posts on this with no real answer but the cause is something having to do with the USB driver. I got use to dealing with it. I have found that I can turn off power to the unit and leave it connected to Repsnapper for as long as I want and simply turn the power back on to resume operation.
Re: Ramps1.2/Mega2560 - Unable to connect.
November 11, 2011 06:40PM
I'm having some trouble with my Mega 2560 (that replaced a 1280 that was giving me another problem) when I use it with my desktop: USB port gets disconnected as soon as the printer starts moving some steppers (port is disconnected due to EMI interference). All works nicely when used from my notebook.

Can you try the same: printing from a battery powered laptop to see if it works?

misan
Sorry, only registered users may post in this forum.

Click here to login