Welcome! Log In Create A New Profile

Advanced

eye rolling smiley X and Y axis hiccups with Teacup on MSP430

Posted by Sruk 
eye rolling smiley X and Y axis hiccups with Teacup on MSP430
October 17, 2012 06:37AM
Hi!

For an intro. My team and I are currently developing a version of the Teacup firmware for the MSP430 (16bit, 25MHz) processor. We sure hope that this isn't a problem for all ATMEG or ARDUINO fans.

The whole project is a 'for students' type of project. Also, we plan to redistribute the MSP430 compatible code with the RepRap society if that is possible here.

Yesterday we found ourselves in a quite of a problem.

Running a test routine written in the G code we found out that our X and Y motors are running with hiccups. By this i mean that they don't get all of the step signals from the processor. We checked everything and there is no possible way that the malfunction is connected with the hardware. Because there are situations where everything works great. I'll write them down below. The whole G code is at the end of message.

System forks fine when:
- runs only one axis with ramping
- runs only one axis with ramping or/and extruding
- runs two axis with ramping and no extruder
- runs two axis with ramping and extruder where 'E' constant is related to 50 (E50, E100, E150 etc.)

System works with malfunction:
- runs two axis with ramping and extruder where 'E' constant is NOT related to 50 (E35.35, E70.7, E232 etc.)

Watching the STEP terminal of the processor via oscilloscope we managed to find missing step signals in the intervals while running the fault code described above. It's like the processor lacks to generate all of the steps needed for proper motor drive (X & Y ax).

If You can, and You are willing to suggest possible place of this error in the code we would be more than thankful!

Kind regards,

Sruk, Croatian 3DP team!

;start

G92

G1 F1500
G1 X50 Y50 E50
G1 X0 Y0 E50
G1 X100 Y100

G1 X12 Y11 E89           ;it works even though 'E' it is not related to '50'
G1 X90 Y45 E23		;error

G1 X159 Y45


G1 X0 Y50 E50
G1 X50 Y50 E50
G1 X50 Y0 E50
G1 X0 Y50 E70.7		;error


G1 X25 Y75 E35.35 	;error
G1 X50 Y50 E35.35 	;error

G1 X0 Y0 E70.7 		;error
G1 X50 Y0 E50
G1 Z1

;layer 2
G1 X0 Y50 E50
G1 X50 Y50 E50
G1 X50 Y0 E50
G1 X0 Y50 E70.7 	;error
G1 X25 Y75 E35.35 	;error
G1 X50 Y50 E35.35 	;error
G1 X0 Y0 E70.7 		;error
G1 X50 Y0 E50
G1 Z2

G1 X0 Y0 Z0 F500
;G1 X50 Y50 Z50 
;G1 X0 Y0 Z0 E0 F500
;G1 X50 Y50 Z50 E0 F750
;G1 X0 Y0 Z0 E0 F1000
M0
Re: eye rolling smiley X and Y axis hiccups with Teacup on MSP430
October 17, 2012 07:54AM
Hello Sruk, welcome th the RepRap forum.

Looks like you have to debug dda_create() and the timer code a bit. The step timer code is pretty tricky because on the ATmega it's a timer with only 16 bits and stepping slow motions requires a wider range. Also, the code in dda.c can suffer integer variable overflow easily. Hence all the explicite casts.

First question I'd search an answer for is: does dda_create() calculate the right number of steps for each movement? Uncommenting some of the existing serial_writestr_P()'s (or commenting the if() before it) should help.

Another thing to mention is: there's muldiv() and muldivQR() in dda_maths.c, which works very well. Still, not all fitting places in dda.c were changed to use this function, yet. There might be room for improvement.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Sorry, only registered users may post in this forum.

Click here to login