Welcome! Log In Create A New Profile

Advanced

error uploading code to sanguino

Posted by slade 
error uploading code to sanguino
January 14, 2009 05:41AM
I've looked through all the documentation and can't figure out what's wrong here. I set up the arduino program for use with the sanguino board, set the USB port to /dev/ttyUSB0, and can compile the code successfully. but, when I try to upload the software I get:

 problem uploading to board
 avrdude:  stk500_recv(): programmer is not responding

when I plug the sanguino USB into my computer the power LED turns on and the debug LED starts flashing red. I tried pressing the reset button both before and after hitting upload with no luck. If I turn the power to everything else on and leave it for a while, eventually the axis motors start pulsating in place. does anyone know how i can get the code to upload?

I'm using ubuntu 8.10.

Edited 1 time(s). Last edit at 01/14/2009 05:50AM by slade.
sid
Re: error uploading code to sanguino
January 14, 2009 07:02AM
First:
folow this guide:
[www.arduino.cc]

You sure its USB0 ?

I'd check that too, since I don't have Linux running I cannot tell how to do that unfortunately.

'sid
Re: error uploading code to sanguino
January 14, 2009 04:53PM
hmm, looks like I just had to unplug the sanguino from the motherboard, and it uploads fine. I probably should have thought to check that last night. that makes it sort of a pain to upload and test code, though. now I can run the stepper motor test code successfully... on to everything else now.
Re: error uploading code to sanguino
January 14, 2009 05:04PM
when I try compiling/uploading the Gcode interpreter, I get:

"In member function 'void extruder::wait_for_temperature()':
In member function 'void extruder::valve_set(bool, int)':
In member function 'void extruder::set_direction(bool)':
At global scope:
In member function 'int extruder::get_temperature()':
At global scope:
In member function 'void extruder::manage()':"

any idea what that means or what I do to fix it?
Re: error uploading code to sanguino
January 14, 2009 06:46PM
okay, i'm really confusing myself here because all the information is so spread out, there's mixed documentation relating to PIC controllers, the arduino, and the sanguino, and it looks like the gcode interpreter isn't finished yet. I have all the hardware set up with a sanguino and i've verified that i can upload to it. I have the host software installed on my computer. what do I have to upload to the sanguino to get it to work with the host software and print a part?
Re: error uploading code to sanguino
January 15, 2009 12:05AM
okay, I fixed most of my problems, (hopefully all, we'll see) and I'll post here in case anyone has similar problems.

The compilation error with the gcode is due to the new arduino software. I downgraded to version 011 and now the code uploads to my sanguino. Also I got the following error while trying to create the gcode:

"Exception in thread "Producer" java.lang.OutOfMemoryError: Java heap space"

so I edited the execution code in the "reprap" executable to become:

"java -Xms32m -Xmx1024m -cp $CLASSPATH -Djava.library.path=. org.reprap.Main"

I think for some reason the heap space definition already included didn't work because I'm using java 1.6.0 instead of OpenJDK. -Xms32m sets the starting java heap space, and -Xmx1024m sets the max heap space.

Another error I had was listed on the opto end stop build page, on some of the end stops high and low are inverted, so you have to edit #define ENDSTOPS_INVERTING 1 in parameters.h

the last error I had (so far) was when I tried controlling the sanguino from within the host software, nothing worked. I realized that when I was starting the host software, it was automatically setting the sanguino as /dev/ttyUSB0, while the arduino software (tools>serial port) listed it as /dev/ttyUSB1. I don't know how to change what it's set as within the host software, so I just unplugged the sanguino, plugged it back in, and everything works.

now, on to see if I can make a part.
Re: error uploading code to sanguino
January 15, 2009 04:22AM
the only thing still not working is the temperature sensor. I double checked the connections, +5V and ground are connected and the signal leads to A4 (D27). I checked the signal voltage and it's around 4.7V, so that means the problem must be either in the sanguino or in software. When I upload the test software to the sanguino nothing happens. it doesn't return the temperature values. And, when I run the full software, it just displays 0 for the temperature. Is it supposed to be a different pin than A4? or is there something else I'm missing?
emt
Re: error uploading code to sanguino
January 15, 2009 09:23AM
Which are you using, Thermistor or Thermocouple?

Did you change the defines in thermistortable.h to match your setup?


Regards

Ian
Re: error uploading code to sanguino
January 15, 2009 01:29PM
Check your pins.h file to see what it is set to. These settings are the pin number on the chip mine is set to pin 4 I think at least I will check tonight.

I just ran into this when I was trying to use the I2c bus for the LCD board and it did not work.

Let me know

Bruce Wattendorf
Re: error uploading code to sanguino
January 15, 2009 04:30PM
strangely enough, it's working now and I didn't change anything. oh well - i'm not complaining.

although, now the Z axis is acting a bit strange. i can jog it down, but when i try jogging it back up there's just a tiny blip and then it stops. if I press home, nothing happens. i have to put something in between the upper opto end stop and remove it, then press home, and then the axis will move back up for ~3 seconds before stopping. I'm not sure what's going on here. the hardware/software overall seems pretty flakey at the moment. I'll take another look at it when i get the time.

Edited 1 time(s). Last edit at 01/15/2009 04:30PM by slade.
Re: error uploading code to sanguino
January 15, 2009 04:49PM
humm, I have the same issue I thought it was my z axis stepper board now I will have to look into it more. Well it is good to see you are somewhat up and running..

Bruce
Re: error uploading code to sanguino
January 15, 2009 05:25PM
yeah, I'm so close but I just wish I could finally print out a part - between family, friends and professors (and people i borrowed equipment from), I have a dozen or so people waiting to see this. I have to do work for my classes first, though.

Let me know if you find anything out, if not I'll take a look at it this weekend. Since we both have the same problem with the same axis, it's most likely software, unfortunately.
Re: error uploading code to sanguino
January 15, 2009 06:29PM
I have been able to print using the old PIC electronics and have been printing on that for a while. And I can say the new stuff is a lot smoother. One thing I do is operate the z axis by hand just for testing and adjusting the printer at least you would be able to start printing.

I will make sure my board is working ok by switching to one of the other axis's and let you know..

Bruce
Re: error uploading code to sanguino
January 15, 2009 11:51PM
also, the z axis moves a lot further per jog than either other axis. i noticed that the default parameter "steps per mm" was different for the z axis than the other two, so i set it to the same value. I started playing around with the values, and it doesn't seem to update anything. I changed it by more than an order of magnitude, but the axes moved the same amount.
Re: error uploading code to sanguino
January 15, 2009 11:57PM
hmm, and it looks like there's a problem with my extruder. it turns, and the plastic has melted, but nothing's being extruded.
Re: error uploading code to sanguino
January 16, 2009 07:14PM
Slade,

I checked everything and it seems to be the Gcode software it self I even check my wiring and swaped my board.

The problem I am having is that the z axis only moves in one direction and also it will not home. it might be caused by the host software it self I am using the host software to talk to the gcode software..

Also your extruder motor might be wired backwards?

Bruce Wattendorf
Re: error uploading code to sanguino
January 16, 2009 07:43PM
I actually tried running the Gcode and the Z axis started working fine, as in I had to manually position it for the first pass, but the Z axis would move back up for the second layer, etc. My makeshift solution until I can figure out how to jog the Z axis is just to put a tap handle on the motor and turn it manually. I can home the Z axis by putting something in the opto end stop and removing it, then clicking home, so you could try that.

as for the extruder, it looks like there's just too much aluminum in the parts that I got from Zach to fully heat the tip. I took it apart and found out that the plastic was melting and then re-cooling before it got extruded. Aluminum has a relatively low specific heat, and there's a lot of aluminum in the tips that Zach has. So, I sawed the tip off a steel bolt, and machined it down into a much smaller tip with the nichrome coil extending almost to the tip. the downside is that i can't change the tip size without a new nichrome coil and thermistor, unless i decided to drill it out and jbweld a new tip on. hopefully this will work. I'm still trying to figure out the problem with the axis multiplication coefficient.
Re: error uploading code to sanguino
January 20, 2009 03:00PM
Hi Slade

The firmware im using is from Chris Meighan called "New, improved G-code firmware for RepRap " How did you resolve the Z axis jog resolution problem in the host SW.. here is a bit from my blog.

"the only problem seen using the Host software is some kind of resolution problem with the Z axis where instead of 400 steps per mm you need to set this to 200mm don't know why yet. The firm ware from Chris seems to be correct in stand alone mode, not yet down loaded the source for the Host to investigate."


Bodge It [reprap.org]
=======================================

BIQ Sanguinololu SD LCD board BIQ Stepcon BIQ Opto Endstop
BIQ Heater Block PCB BIQ Extruder Peek clamp replacement BIQ Huxley Seedling
BIQ Sanguinololu mounting BIQ standalone Sanguinololu or Ramps mounting Print It Stick It Cut it


My rep strap: [repstrapbertha.blogspot.com]

Buy the bits from B&Q pipestrap [diyrepstrap.blogspot.com]
How to Build a Darwin without any Rep Rap Parts [repstrapdarwin.blogspot.com]
Web Site [www.takeaway3dtech.com]
Re: error uploading code to sanguino
January 21, 2009 10:08AM
Bodge,

You might just have to adjust your z-axis steps per mm setting this will vary from machine to machine depending on what you use as gears to drive the belt. It will be a lot slower then the x and y axis, which can be a pain if you have a tight zaxis system.


Bruce
Re: error uploading code to sanguino
January 21, 2009 10:11AM
Not to change the subject but I found that because of the size of the Gcode firmware you need to wait 10 sec. and then press the reset button on the Sanguino to get the code to load. This is because of the size of the program causing this and that it has to compile it first and it takes longer to compile causing the Sanguino to time out.

Bruce Wattendorf
Re: error uploading code to sanguino
January 21, 2009 11:40AM
I make a habit of always compiling before I select an upload. After selecting upload I imedately punch the reset button.
Re: error uploading code to sanguino
January 21, 2009 12:12PM
If I don't wait for around 10 sec. after hitting upload to press the reset it will fail. even if I have compiled. I only get this with larger files like the Gcode interpiter.

Bruce
Re: error uploading code to sanguino
January 21, 2009 01:24PM
Freds - It appears that the software will always recompile the code before uploading into the sanguino. Even if you just complied it. So the wait for 10 sec is required to reliably reload the chip.


Bob Teeter
"What Box?"
Re: error uploading code to sanguino
January 21, 2009 01:27PM
it didn't do that for me, with arduino software 0011. I can compile, then hit reset and immediately upload the code.
Re: error uploading code to sanguino
January 21, 2009 01:40PM
I was using arduino software 0012.


Bob Teeter
"What Box?"
Re: error uploading code to sanguino
January 21, 2009 01:47PM
it looks like 0012 has some bugs. I couldn't even get the code to compile in 0012, so I downgraded.
Re: error uploading code to sanguino
January 21, 2009 02:03PM
I am using 0011 and it works 50% if I don't wait but if I wait for the 10 Sec it works 100% of the time. I have been uploading a ton because I have been working on getting the SD card to work. I am also using the Sanguino motherboard not that there is a difference.

Bruce
Hi Bruce,

Thats exactly the problem all three axis are 6mm thread with 400 step stepers. using Chris's firm ware all axies work corectly to the mm works correctly.
It is only when using the host SW that the settings on the host need to be set diffrently just for the Z axis Setting it to 200 steps/mm resolves the problem.
This is not the correct value for a 6mm x 1mm thread with 400 step motor.
Re: error uploading code to sanguino
January 22, 2009 12:19PM
I got you. I just adjusted mine using a caliper till it was correct. I am using 3/8 inch rod and nuts.

I have not tried Chris's firmware and I think I will take a look at it this weekend.

The problem you might be having might be caused by the host software overriding the preferances set in the gcode interpiter.

Bruce
Re: error uploading code to sanguino
January 25, 2009 08:25AM
When I tried to install I got the error

c:/documents and settings/customer/desktop/arduino-0011/hardware/tools/avr/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr5/crtm644p.o: In function `__vectors':


../../../../../avr-libc-1.4.6/crt1/gcrt1.S:51: undefined reference to `main'


Couldn't determine program size: C:\Documents and Settings\customer\Desktop\arduino-0011\hardware/tools/avr/bin/avr-size: 'C:\Documents and Settings\customer\Desktop\gcode_interpreter\applet\gcode_interpreter.hex': No such file


avrdude: stk500_getsync(): not in sync: resp=0x30
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51


The problem of needing a file called gcode_intepreter.hex seems to pop up. I tried using version 12 but without getting it to load. I just tried this on another computer using version 11 and this error came up. Any ideas? I tried resetting the sanguino for 10 seconds and no change.


Edit: And I can't get it to normally compile either, the error I get then is























c:/documents and settings/customer/desktop/arduino-0011/hardware/tools/avr/bin/../lib/gcc/avr/4.1.2/../../../../avr/lib/avr5/crtm644p.o: In function `__vectors':


../../../../../avr-libc-1.4.6/crt1/gcrt1.S:51: undefined reference to `main'


Couldn't determine program size: C:\Documents and Settings\customer\Desktop\arduino-0011\hardware/tools/avr/bin/avr-size: 'C:\DOCUME~1\customer\LOCALS~1\Temp\build5394.tmp\gcode_interpreter.hex': No such file



I think that I'll need to learn C at some point in future.

Edited 1 time(s). Last edit at 01/25/2009 08:31AM by Peter Hillier.
Sorry, only registered users may post in this forum.

Click here to login