Welcome! Log In Create A New Profile

Advanced

[GCode firmware] Arduino resets

Posted by ErikDeBruijn 
[GCode firmware] Arduino resets
September 17, 2008 06:48PM
When I manually enter 'G1X1Y1' or something similar, I always get 'start' with the 1.3 firmware. After placing a lot of println()'s I found out that at least in the 1.2 firmware I could get it to stop resetting itself (I think it crashes). What I did wat add a string_length = sizeof(instructions); in the function and not using the 256 that's provided from the function call (sizeof the allocated word[256]). With the 1.3 firmware it's not so simple, I never got anything out of it. I've also tried ReplicatorG and this was probably also the reason I didn't get anywhere with Chris Meighan's controller (with which was nothing wrong, probably).

The software seems to hang, but I guess that's because there's no 'done' retrieved but only 'start' every time a command is issued. It will never get past the first instruction. With my modified 1.2 firmware I sometimes got the firmware to run, but there were no movements and it was almost instantly finished with all its steps.

I don't understand where this weird behavior comes from. I've also tried several _init.pde settings, including the default file (all I/O pins are correct in default positions).

I can succesfully run SNAP and using host software, so the hardware seems to be OK. All tests were done with and without the RepRap connected to the I/O pins of the Arduino.

I don't think it's the hardware since I've tried two different arduino's (the official ones produced in italy). At least one of them wasn't out of the packaging until today.

Any pointers on what to try? How can I more effectively debug this situation?
I don't see anyone else having GCode firmware problems. How can my situation be any different?

T.I.A. for any help!!


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
emt
Re: [GCode firmware] Arduino resets
September 18, 2008 04:52AM
Linux or Windows?

How are you sending commands?

The arduino is reset every time the comm port closes and opens.

I only know about windows. I debug using terminal to send commands and check response.

I know the response from the firmware is different in some versions. I think it is "ok" in the latest version


Regards

Ian
Re: [GCode firmware] Arduino resets
September 18, 2008 05:40AM
Hi Ian, thanks for your respons. I'm using linux. I've been sending the commands from ReplicatorG and directly from the "Serial Monitor" in the Arduino environment. These are both based on the same code. Earlier I've done it with Chris Meighan's software which was made differently but also used libtxrx for the purpose.

Using minicom I cannot complete a command since it uses each char I send and somehow inserts a newline or waits too long?
[I type G]
done
[I type 1]
done
WARN: unknown instruction - 1
[I type X]
done
WARN: unknown instruction - X
[I type 1]
done
WARN: unknown instruction - 1
done

I've been trying to do in on windows XP but I run it in virtual box and this doesn't seem to play well with the FTDI USB2Serial chip using the official drivers. I'll try some more.


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Re: [GCode firmware] Arduino resets
September 18, 2008 06:12AM
erik, I had the same problem when I compiled the firmware in Ubuntu. Compiling in windows or Xandros worked fine. I haven't figure out why yet, but till then I use Xandros.
Re: [GCode firmware] Arduino resets
September 18, 2008 02:40PM
Hi Wade, I'm milling successfully now with G-Code!!! Thanks a lot!


Regards,

Erik de Bruijn
[Ultimaker.com] - [blog.erikdebruijn.nl]
Re: [GCode firmware] Arduino resets
September 18, 2008 04:20PM
You should try the avr-libc version from ubuntu 8.10 (1.6.2), i'm pretty sure it shoud do it. I posted about this regarding the sanguino, but it seems to be a general problem after all...
Re: [GCode firmware] Arduino resets
October 09, 2008 04:50PM
Hey, I ran into this problem again, but I'm having trouble getting avr-libc 1.6.2 on Ubuntu 8.04. Any tips on where to find this or how to install it?

Ack, ok, I'm installing it from source. Hope this works... smiling smiley

So, I ran the following commands on a bog standard Hardy 8.04 install, found on Lady Ada's forums:

wget [download.savannah.gnu.org]
tar jxfv avr-libc-1.6.2.tar.bz2
cd avr-libc-1.6.2/
./configure --host=avr
make
sudo make install
cd ..

and it all seemed to work, although there was about a half a megabyte of status messages scrolling by.

But, I still get resets when I try to run any Gcodes. Damn. I'm not sure if I have a problem installing avr-libc 1.6.2, or the problem is something else. Think I'll have to go back to Xandros in the meantime.

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

Click here to login