swisstechnic Posted September 25, 2014 Posted September 25, 2014 (edited) 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. 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 September 26, 2014 by swisstechnic Quote
BusterHaus Posted September 25, 2014 Posted September 25, 2014 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. Quote
bitbang Posted September 25, 2014 Posted September 25, 2014 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! Quote
swisstechnic Posted September 25, 2014 Author Posted September 25, 2014 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 Quote
kieran Posted September 25, 2014 Posted September 25, 2014 Well done looks good, how do I see the video Quote
m0dulo Posted September 25, 2014 Posted September 25, 2014 Well done looks good, how do I see the video There is a link in the OP but here it is embedded: Quote
swisstechnic Posted September 26, 2014 Author Posted September 26, 2014 There is a link in the OP but here it is embedded: Thanks for embedding the video! How can I do this? :) Quote
m0dulo Posted September 26, 2014 Posted September 26, 2014 (edited) 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 September 26, 2014 by m0dulo Quote
swisstechnic Posted September 26, 2014 Author Posted September 26, 2014 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! Quote
kieran Posted September 26, 2014 Posted September 26, 2014 Thanks looks nice well done, I looked and looked and missed the link Quote
swisstechnic Posted September 27, 2014 Author Posted September 27, 2014 Thanks looks nice well done, I looked and looked and missed the link Thank you! Quote
__________________________ Posted September 27, 2014 Posted September 27, 2014 Impressive. TFOLs will rule the world eventually :thumbup: Quote
miguev Posted September 28, 2014 Posted September 28, 2014 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 Quote
swisstechnic Posted September 29, 2014 Author Posted September 29, 2014 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: You mean teenagers? thanks! Quote
DrJB Posted October 2, 2014 Posted October 2, 2014 (edited) Is this an adaptation of Arthur Sacek's machine? Looks very similar Edited March 2, 2015 by DrJB Quote
swisstechnic Posted October 2, 2014 Author Posted October 2, 2014 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.:) Quote
r2k3 Posted March 2, 2015 Posted March 2, 2015 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 Quote
9v system Posted March 2, 2015 Posted March 2, 2015 Your creation loos awesome but I can't watch the video because it is blocked in my country Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.