Pages: [1]   Go Down
Author Topic: My first CNC router -->fixed :D  (Read 825 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Finished my CNC router I'm quite happy with it, this awesome feeling when you see it finally moving ^^.
Some pics



As you can see circular interpolation as well as linear interpolation work well.

I've used the G-code interpreter posted by aventgps(is or was also member here) apparently it's reprap firmware, however the newer versions don't look alike.

You can find my code below.
http://pastebin.com/A7tRGgd7

Bit more info
Steppers do 48 steps per revolution
Were initially unipolar but I cut the center wire so they act as bipolar now.
The one for the X axis is a pm55l048
I do suggest stronger steppers these probably won't be moving a mill even if it's through balsa.

If anyone can suggest some good ones would be appreciated.

I used two l239d quadruple H-bridges to drive the steppers. The circuit can be found on the main site.
I hope to gain some more experience with it before I move to a bigger model smiley-grin

Probably will spend the hollidays writing a spoonfeeder and  some programs which output G-code.

When I see it moving it remembers me of that one song "She's incredible math. Just incredible math" ^^

Special thanks to johnwasser and PeterH for the quick response while troubleshooting.

« Last Edit: June 26, 2012, 07:54:03 am by Tentationem » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8653
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't see how it might be causing your symptom but the search_string() function doesn't put a terminator on 'temp' before calling strtod(temp, NULL).

If X and Y only go in one direction, how did you draw the square?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

UK
Offline Offline
Shannon Member
****
Karma: 222
Posts: 12520
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

AT the moment it isn't clear whether the problem is in the control logic, the motor driver software or the motor driver hardware.

Ignoring your full sketch and going back to basics, have you actually driven the motors in both directions?

Have you driven them in both directions using the driver library that your sketch uses?

Have you confirmed that your sketch is executing the code that you believe will reverse the motors?
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the responses I've found the problem.

The limiting switches. Even though there aren't any connected.

I've noticed some particles file-dust  under the arduino perhaps it allowed some current to pass or the arduino might be having some trouble.
May check it tomorrow.
Anyways I've changed the min and max pin numbers
Everything works fine now.



Logged

UK
Offline Offline
Shannon Member
****
Karma: 222
Posts: 12520
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


The limiting switches. Even though there aren't any connected.


If the switch inputs are floating, they'll return arbitrary values and could be affected by the tiniest things. If they aren't connected, make sure your sketch doesn't read them or else pull the inputs to the normal position.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Pages: [1]   Go Up
Jump to: