Recommended Posts

This was a project for the science week at my highschool

We have to share our results of the science week on a webpage, so I decided that Eurobricks could be a good choice.

About us

We are a group of four people, around 16 years old. Nobody of us has a lot of experience at programming, but we all tried to give our best. I, Swisstechnic, know how to build a stable CNC milling machine out of LEGO, but it would be impossible for me to do the whole programming part. Huge thanks to my mates!

The Construction

I've already made a construction of a CNC-milling machine some weeks ago, but I never had the motivation to start programming it. The design of our milling machine is inspired by Arthur Sacek's on youtube, which impressed us a lot. It uses for each axle a touch sensor to calculate the driller's position. Because of the huge battery waste, we ran the NXT directly via a transformer, as well as the Power Functions M motor for the driller.

post-127757-0-06669600-1411718896_thumb.jpg

Drilling Material

The grey Material is a flower foam, which is quite blowy and easy to drill through. The driller is the only party that isn't LEGO.

Programming

We've used the BricxCC Command Center. I think you can all imagine that the coolest thing would be if you could just take a 3D object (from Blender/CAD) and directly calculate it's positions how it should move etc.. There is a way to do this with "G-Code" that you can generate, but we all had no idea how to use this in the BricxCC Command Center. That's why it was quite hard to program objects with curves, such as a circles or cosinus/sinus curvers. Straight objects are easy.

This is the code for one cosine curve:

#define GESCH 35
#define VERSCH 3
int durchgang;
float tiefe;

sub fahren(){
RotateMotor(OUT_A,GESCH,-2620);
RotateMotor(OUT_B,GESCH,VERSCH);
RotateMotor(OUT_C,GESCH,tiefe);
durchgang ++;
RotateMotor(OUT_A,GESCH,2620);
RotateMotor(OUT_B,GESCH,VERSCH);
RotateMotor(OUT_C,GESCH,tiefe);
durchgang ++;
}


task main ()
{
while(durchgang<=360)
{


if (durchgang>0)
{
tiefe = ((1-cos(durchgang*PI/180)-(1-cos((durchgang-1)*PI/180)))*1928);

fahren();

}

else
{
tiefe = ((1-cos(durchgang*PI/180))*1928);

fahren();

}
}
} 

It takes the milling machine around 1,5 hours for the cosinus curve.

If someone knows how to handle G-Code with the BricxCC Command Center for a milling machine like ours, we all would be really thankful!

Perhaps I'll upload a youtube film.

(I can't post more images, I'll try it later)

Edited by swisstechnic

Share this post


Link to post
Share on other sites

Are you doing side cutting with a drill? If yes, consider getting an endmill, possibly a ball nose endmill if you are interested in real 3D milling (angled surfaces). They cut much better on the side than a drill and it will speed up the machining time. You can get them from places like McMaster-Carr.

Also, Sacek's "mill" offloads the path calculations to a computer, which then sends coordinates to the Mindstorms controller. There could be a couple of advantages to doing that: you don't need to handle an exotic file type on the controller brick, and you are not doing heavy calculations with a comparatively weak processor.

In any case, nice job on this build. I look forward to seeing a video.

Share this post


Link to post
Share on other sites

Hello swisstechnic,

I think you have to build a code translator to fit gcode in bricxcc.

Gcode isn't too hard to understand, as they are simple commands to drive the 3 axis.

Here's a link to simple understand it:

https://www.ntnu.no/wiki/display/digilab/Understanding+G-Code

If Bricxcc let you work in c++ then you can load gcode file and then translate commands one-by-one to c++ functions to drive your steppers.

I don't know Bricxcc environment so I can't help you further, but as BusterHaus states, maybe you should get an endmill to do a better work!

Share this post


Link to post
Share on other sites

Are you doing side cutting with a drill? If yes, consider getting an endmill, possibly a ball nose endmill if you are interested in real 3D milling (angled surfaces). They cut much better on the side than a drill and it will speed up the machining time. You can get them from places like McMaster-Carr.

Also, Sacek's "mill" offloads the path calculations to a computer, which then sends coordinates to the Mindstorms controller. There could be a couple of advantages to doing that: you don't need to handle an exotic file type on the controller brick, and you are not doing heavy calculations with a comparatively weak processor.

In any case, nice job on this build. I look forward to seeing a video.

.

Thanks for the tips! I think the driller isn't the problem, and I've used it because it's all the way sharp not like an endmill.

Yes I think so too, that he sends the coordinates directly to the NXT. But I I'm sorry that I haven't any idea how this could work. Perhaps the link from bitbang helps.:)

(Video is now online)

Hello swisstechnic,

I think you have to build a code translator to fit gcode in bricxcc.

Gcode isn't too hard to understand, as they are simple commands to drive the 3 axis.

Here's a link to simple understand it:

https://www.ntnu.no/...standing G-Code

If Bricxcc let you work in c++ then you can load gcode file and then translate commands one-by-one to c++ functions to drive your steppers.

I don't know Bricxcc environment so I can't help you further, but as BusterHaus states, maybe you should get an endmill to do a better work!

Hey Bitbang thanks for the support! I'll have a look at it as soon as possible. (film is now online)

Greetz

Share this post


Link to post
Share on other sites

Thanks for embedding the video! How can I do this? :)

The answer is in what you quoted in your post! You need to put the youtube URL between the media and /media bbcode tags. Make sure you use http, not https.

Here is an example:

[media]http://www.youtube.com/watch?v=eIM-M1sGv6c[/media]

Edited by m0dulo

Share this post


Link to post
Share on other sites

The answer is in what you quoted in your post! You need to put the youtube URL between the media and /media bbcode tags. Make sure you use http, not https.

Here is an example:

[media]http://www.youtube.com/watch?v=eIM-M1sGv6c[/media]

Thank you very much!

Share this post


Link to post
Share on other sites

Wow, well done!

Oh the things teens do for science week at my highschool... I can't wait to see what my kids will do, I'll probably be very envious... I am already! :D

Share this post


Link to post
Share on other sites

Wow, well done!

Oh the things teens do for science week at my highschool... I can't wait to see what my kids will do, I'll probably be very envious... I am already! :D

Haha thank you! :)

Impressive. TFOLs will rule the world eventually :thumbup: :thumbup: :thumbup:

You mean teenagers? :laugh: thanks!

Share this post


Link to post
Share on other sites

Is this an adaptation of Arthur Sacek's machine? Looks very similar

Edited by DrJB

Share this post


Link to post
Share on other sites

Is this an adaptation of Arthur Sacek's machine? Looks very similar

Hey DrJB

Yes, it's inspired by his milling machine! Especially the unique frame and his idea of using the rotate-cylinders for the driller (move up/down). But it was only some inspiration, the gears and stuff works different.:)

Share this post


Link to post
Share on other sites

Hi swisstechnic,

this milling machine is very impressive. I am very new to mindstorms and really like to rebuilt this machine. Are your construction plans freely available or are they closed?

Cheers,

r2ke

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.