Welcome! Log In Create A New Profile

Advanced

any suggestions?

Posted by stephen george 
any suggestions?
October 29, 2009 01:57AM
Hi

Any suggestions much appreciated

I have the arduino. (gen 2)
I have connected this to three stepper driver boards (1.2) as described for gen 2.
I have connected these boards to a min optical senser and a motor.

With test code each board drives the correct motor and the optical sensors
display a green light when home. Therefore I have wired it correctly.
and the usb works fine as it is compiled via arduino compiler.

However when I loaded the firmare as per
[www.reprap.org]
and run the reprap host software and click home nothing happens and the code freezes. In fact any xyz co-ordinare freezes.

Is there some sort of diagnostic code I can run between the system to work out where the fault is? ie firm ware or the host software?

Should I be running code from the reprap arduino firmware 1.3 or the code I am told to download as per instuctions

[reprap.svn.sourceforge.net]

which seems to be different IE it's only a few files.


Thanks

Stephen


Has it ever worked ever?
Yes - before I fried my 1.1 stepper boards it worked fine.

Have compiled the code correctly?
- Well I have read the instructions three times and done strictly as it says
so I assume so. It compiles and uploads fine.

Have I installed the host software correctly?
- No errors come up and the arduino software works fine. I run the software in terminal mode to make sure there are no errors.

did you rename the .dist to there correct name
- yes the code compiled fine

Did you edit out the #define SANGUINO
- yes otherwise it does not compile

Did you set #define EXTRUDER_COUNT 1
- I left this alone later I tried #define EXTRUDER_COUNT 0 but it still did not work.

Did you uncomment #define USE_THERMISTOR
Grin yes I have tried both commented and uncommented

Is it pluged in?
-yes all the lights come on and motors works with test code.

Notes
I have not wired up the extruder. - just the xyz

I had to install java 6 jre as well as java 5 as instructed to get the arduino
compiler to work.

I noticed that the XYZ controller screen no longer fits in the space provided.
It used to before I installed the java 6 jre as recommended by the arduino compiler software.

I am running host 20090804
I am running v17 arduino compiler
I am running ubuntu 8.04
emt
Re: any suggestions?
October 29, 2009 05:36AM
Hi

My suggestion is that you first try to communicate to the firmware with a terminal programme. You should get a response an "ok" from the Arduino if you send a valid command. I would try G01 X10. F100 which should move your X axis 10mm.

I don't know how the end stops work in your version but if you don't get movement they may need inverting in software.

Unfortunately I use Windows and Sanguino so I cant replicate your set up.


Regards

Ian
Re: any suggestions?
October 29, 2009 09:59AM
In the host software preferences, you can set the "Comms Debug" option to true and then restart the application. Then, in the console you will see some debugging info to see what is going on in the communication.

You should see something like 'Sent M105' followed by 'T:25'. This indicates that your microcontroller is alive and the software is polling for the temperature correctly. It doesn't matter if you don't have a thermistor connected, you will just get a default value (I think T:0).

After that, move the X-axis using the exerciser and then check the console. It should still be polling for the temperature like before. If it stops, look at the last few lines to see what happened. You should see that G1 was sent with some arguments and followed by something like 'response acknowledged'. If, instead you get something like 'dud response 'start'', your microcontroller has crashed and restarted for some reason. If you get no response then your microcontroller is stuck in a loop somewhere.

You can also do these tests with a terminal program like minicom on linux. This is a little easier to follow since it won't be polling the temperature constantly. The first test would be to send 'M105' and see if you get the expected response. Then send 'G1 X10' and see if you get 'ok' as a response.
Re: any suggestions?
October 29, 2009 08:53PM
Thanks guys

Tried minicom and all I could get was the word
START - 19200 8bits 1 stop no parity
That was it. Nothing. ATZ - X101 whatever nothing
Gave up

Went to arduino compiling environment (v17)
Ran Comunications manager
Got start when I set comms to 19200
after that nothing

Is there a reprap page on controlling the system with minicom?

Ran host softyware with debug options as directed
Got lots of temerature readings T:129 and M105 which would seem to indicate it is working.
As soon as I clicked something it stopped with
F1500.0 dequed

Still none the wiser. will can the firmaware for the start word.

Grin

Stephen

P.s. I got to say this reprap business is way to hard. I wonder how many people have just given up? Sad and broken?
Re: any suggestions?
October 29, 2009 09:45PM
Okay

I decided to try the firmware code which comes with arduino 1.3
copied the files over to the library of the arduino as instructed.
tried a compile.

Failed

complained that the word "word" was defined as an int in a hardware subroutine
in the arduino compiler. Decided the best way to proceed was to rename
word to word2. after a little fun the system compiled.
I uploaded it.

Accessed the comunications manager. The conversation went something like this.

Start
M105
Start
G1 X10
Start
G01 X10. F100
Start

I think I am getting somewhere.

Anyway fired up the reprap host software and the same thing seemed to happen
and it freezed.

Does anyone have a known working set of Arduino firmware that will compile on v17?
I am running pure gen 2 electronics. Nothing fancy.

Sigh

Stephen
Re: any suggestions?
October 29, 2009 11:51PM
Ah, I think the old versions you are trying won't compile on newer Arduino IDE's due to that "word" definition. To use one of the old versions, you're going to need to find an older version of the Arduino IDE, or redefine that "word" thing, as you did.

Also, I'm not sure what you mean by "communications manager", but when you use the Arduino IDE's serial monitor, it doesn't send CR/LF's when you press enter, so it won't talk to the RepRap firmwares without modifying them. Lots of folks have complained to the Arduino guys about that, but it hasn't been fixed yet.

I've been using "screen" for short tests, but it's a pain because it doesn't echo what you type to the screen, so typos are a mystery.

Ralith's gcdump is great for debugging on Ubuntu. Get it here:
[ralith.github.com]

The firmware sends start when it reboots - something is rebooting your firmware if you're getting it more than once. And I just found out the RepRap host will freeze if it doesn't get an OK back, so check your serial port com# and speed settings. If it reboots in the middle of something, that will cause a problem too.

Hope that helps.

Wade
Re: any suggestions?
October 30, 2009 12:13AM
Went to another machine and hooked up the reprap.

Reprap host still did nothing
Reloaded the firmware
Reprap did stuff. z-x-y all worked

Would appear that the setup of the system is causing a problem.
Will blow away the operating system software and start again.

Thanks for all your help guys.

Nasty problem to have as a newbie.

Stephen
Re: any suggestions?
October 30, 2009 12:19AM
Dang, that reminds me - 8.04 had a bug in the AVR compiler I think - some sketches wouldn't run for me when compiled on Ubuntu 8.04. I spent ages on that too.

What system did work for you?

Wade
Re: any suggestions?
October 30, 2009 12:24AM
Just read the post before

Also, I'm not sure what you mean by "communications manager", but when you use the Arduino IDE's serial monitor,
> yep that's what I meant

it doesn't send CR/LF's when you press enter, so it won't talk to the RepRap
firmwares without modifying them.
> bummer

I don't care because the sucker moves. (currently in only one direction but this is progress)

Stephen
Re: any suggestions?
October 30, 2009 01:46AM
Hey, awesome if it works with the Arduino IDE - the versions I've been playing with don't and it's a pain in the rear.

If your axis are only going one way, try playing with the opto endstops - some versions are inverting, some not, although you've probably sorted that out by now.

Also, Tim just pointed out to me the following problem in Ubuntu 8.04 -

>It's a bug in older version (prior to 4.3.0 IIRC) of avr-gcc.
>Something to do with long ints being represented wrong.

I think that's what I was running into in 8.04.

Wade
Re: any suggestions?
October 30, 2009 02:36AM
Hi

>> It's a bug in older version (prior to 4.3.0 IIRC) of avr-gcc.
>> Something to do with long ints being represented wrong.
> I think that's what I was running into in 8.04.

This would make sense. The laptop is 8.04 and fails. The one one that works is using the later version of Ubuntu 9.04.

Thankyou. I was begining to pull my hair out on this one. I had just reinstalled everything from scratch and it still did not work. (9.04 does not work on the laptop)

>If your axis are only going one way, try playing with the opto endstops - some versions are inverting, some not, although you've probably sorted that out by now.

Err no I am not that clever. Makes sense though. Will look at this tomorrow.
Thanks again.

Stephen
Re: any suggestions?
October 31, 2009 12:25AM
This is nuts!

I download the latest avr-gcc and avr-libc and now my sketch is too big
(yes //fato SanGuino code has been commented out)

I recon this could make a good monty python sketch

How on earth did I get it working before?

Grin

Stephen
Re: any suggestions?
October 31, 2009 12:54AM
Got the code to compile by commenting out

//#define USE_THERMISTOR

Which is a pain (as I have a thermistor) but at least it compiles and works in ubuntu 9.04. (is this an evil plan to try and get people to buy the thermocouple ?)

Strangely it still does not work with ubuntu 8.04 even though I am using the same avr-gcc - weird.

Will keep pluging away.

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

Click here to login