Tonight was an extremely productive and satisfying build night. After the success of last night, I absolutely had to see this project through. I did quite a few things:
First, I fixed the sticking problem, hopefully once and for all. I took apart the entire XY table sled assemble and cleaned everything with rags, water, and a toothbrush. Then, I generously slathered everything in mineral oil. Quite generously, actually. The parts were so slippery they nearly jumped out of my hand. After putting everything back together, the problems dissolved and haven't reared their ugly heads since. I am quite happy about this, since the X axis had become unusable due to its sticking problem.
I also added anti-backlash code. To do this, I set a variable to keep track of the direction the motor moved last. If the new direction for the motor to move is opposite its last direction, the motor moves a few hundred extra microsteps in the new direction to counteract the backlash. It does not update its position variable, because the actual axis has not moved relative the the laser beam. I was able to use this new functionality quite effectively to eradicate all backlash on my X and Y axes.
Finally, I did some test code. The axes never stuck and my circles came out perfectly circular. I also figured out how to do complicated drawings using Inkscape and the laser cutter extension, so I had my machine do an amazing job of drawing its name (click the picture for a bigger view):
That engraving of the name "PiKnife" represents so much - the culmination of hours and hours of work. It means so a lot to me to finally have a beautiful piece of proof that this actually does stuff. I was truly amazed when I saw such fine, curving lines meeting up perfectly. I look forward to a lot of future use of this machine.
My next goals will be to add in the limit switches and look into the timing issues. However, neither of these affected the engraving above, so I am currently a very happy engineer.
Experiment 29: Lost Foam Casting a Slingshot
After seeing some cool videos on lost foam casting and also becoming addicted to Joerg Sprave's videos on YouTube, I decided that I had to try this method of metal casting. I used some StyroFoam as my foam material to carve into a slingshot and then put it in sand for casting. After pouring, it turned out quite well! It has a few pits and imperfections, but it looks pretty awesome otherwise. Although its rubber doesn't perform very well in the wintry cold, it should be powerful enough for squirrel hunting in the spring and summer. I look forward to blasting some stuff to tiny bits as soon as it warms up!
Also, check out its Instructable for more detailed information! If you want to watch the pour, check out this video and this ingot casting video on my YouTube channel. I have included a few pictures of the casting session (I also cast a few nice-looking ingots in the same session):
Also, check out its Instructable for more detailed information! If you want to watch the pour, check out this video and this ingot casting video on my YouTube channel. I have included a few pictures of the casting session (I also cast a few nice-looking ingots in the same session):
Laser Cutter Build Night: It Works!!!!
After many unproductive and dissatisfying hours of trying to modify the code I downloaded off of here, I finally gave up, realized that the code was never going to work with my setup, and began to completely rewrite two of the files I downloaded. If you look at the code, you will see that there are three files: Bipolar_Stepper_Motor_Class, Motor_control, and Gcode_executer. I totally rewrote the first two. Bascially, my code uses threaded programming in Python to make both axes move at the same time. This is what makes diagonal lines instead of just a bunch of "staircase" lines imitating a diagonal line (these happen if you only drive one motor at once). I will be posting my code very shortly; however, it isn't done yet, so I will wait on that.
Rewriting the code and testing it to debug it wasn't as hard as I thought. I found that typing up a document in a text editor outlining what my code would do helped a lot. It kept me on track and gave me some room to think about what the code actually had to do before jumping in. I only had a few bugs to fix - division by zero (added an if statement to catch that case) and syntax errors.
When I tried the code, I was amazed to see that it actually worked! It successfully drew the circle I told it to draw using G-code and even cut it at a reasonable pace instead of super-slowly! Elated by my long-awaited success, I drew a sort of ninja star in a box using Inkscape and then converted it to G-code using the instructions provided here. Amazingly, it worked! Mostly, that is. For some odd reason, the center circle of the ninja star and one of its arms were about an inch away from the real center of the ninja star. I theorize that this could have been because of one axis getting stuck, because when the program went to the home position, it actually stopped about an inch away from the limit switches (still have to code those in). What this means is that the code thought that the stepper was moving when in reality it wasn't; thus, when it told the motor to move x steps to go home, it didn't reach home because it the motor was farther from home than the software thought it was.
There are a few minor bugs to work out (besides fixing the sticking problem, or whatever else caused the ninja star misplacement). I noticed that my circles I cut had flattish parts on them along one axis of movement. I think that this is caused by the minor backlash issue I have - when one axis has reached the "vertex" of the circle along its axis of movement, it should turn around and start moving the other way. Backlash causes it to go straight for a few hundred steps as the motor is rotating in its backlash. Adding some simple code to detect change in direction should fix this.
Timing is another issue. It was probably the biggest issue with the ready-made code, and it is possibly still a minor issue with mine. Sometimes one axis will finish its movement to a point before the other finishes its movement to a point. Additionally, when doing very small, detailed movements, the laser seems to move more slowly than when it is doing a "line drive" by moving a large distance in one move command. I believe that this these issues are caused by minor mishaps in timing and tiny bits of lost time here and there in the thousands of start and stop movements required for fine detail. I'll have to see if I can alleviate this issue; it may not be entirely correctable.
Rewriting the code and testing it to debug it wasn't as hard as I thought. I found that typing up a document in a text editor outlining what my code would do helped a lot. It kept me on track and gave me some room to think about what the code actually had to do before jumping in. I only had a few bugs to fix - division by zero (added an if statement to catch that case) and syntax errors.
When I tried the code, I was amazed to see that it actually worked! It successfully drew the circle I told it to draw using G-code and even cut it at a reasonable pace instead of super-slowly! Elated by my long-awaited success, I drew a sort of ninja star in a box using Inkscape and then converted it to G-code using the instructions provided here. Amazingly, it worked! Mostly, that is. For some odd reason, the center circle of the ninja star and one of its arms were about an inch away from the real center of the ninja star. I theorize that this could have been because of one axis getting stuck, because when the program went to the home position, it actually stopped about an inch away from the limit switches (still have to code those in). What this means is that the code thought that the stepper was moving when in reality it wasn't; thus, when it told the motor to move x steps to go home, it didn't reach home because it the motor was farther from home than the software thought it was.
There are a few minor bugs to work out (besides fixing the sticking problem, or whatever else caused the ninja star misplacement). I noticed that my circles I cut had flattish parts on them along one axis of movement. I think that this is caused by the minor backlash issue I have - when one axis has reached the "vertex" of the circle along its axis of movement, it should turn around and start moving the other way. Backlash causes it to go straight for a few hundred steps as the motor is rotating in its backlash. Adding some simple code to detect change in direction should fix this.
Timing is another issue. It was probably the biggest issue with the ready-made code, and it is possibly still a minor issue with mine. Sometimes one axis will finish its movement to a point before the other finishes its movement to a point. Additionally, when doing very small, detailed movements, the laser seems to move more slowly than when it is doing a "line drive" by moving a large distance in one move command. I believe that this these issues are caused by minor mishaps in timing and tiny bits of lost time here and there in the thousands of start and stop movements required for fine detail. I'll have to see if I can alleviate this issue; it may not be entirely correctable.
Experiment 28: DIY scientific ampoules!
In the near future, I plan to make elemental iodine for my element collection. To effectively store iodine long-term, a hermetic (airtight, perfect) seal is recommended. Scientific glass ampoules then, are perfect for storing iodine for years and years, like in a periodic table display.
In this experiment I made two glass ampoules myself from miniature test tubes. I held the test tube by its bottom end with gloves and then torched the tube about 1cm from its mouth. A propane blowtorch works well for this purpose. I rotated the tube a few times to evenly distribute the heat in a band around the tube and in about 30 seconds, the tube softened. I then used pliers to pull the mouth of the tube away from the rest of the tube by a few centimeters. Then, I slowly removed the test tube from the flame, letting it gradually get cooler. The end result was absolutely spectacular given the easiness of the experiment:
When the tubes are filled with crystal iodine (I will pour it down the thin neck of the ampoule), I will hit the narrow neck of the ampoule with the hottest part of the torch flame to rapidly melt it without heating up the iodine. Then, I will use pliers to pull the neck of the ampoule completely off, thus sealing the iodine inside. I am quite pleased to have such an easy way of making ampoules for chemistry stuff!
In this experiment I made two glass ampoules myself from miniature test tubes. I held the test tube by its bottom end with gloves and then torched the tube about 1cm from its mouth. A propane blowtorch works well for this purpose. I rotated the tube a few times to evenly distribute the heat in a band around the tube and in about 30 seconds, the tube softened. I then used pliers to pull the mouth of the tube away from the rest of the tube by a few centimeters. Then, I slowly removed the test tube from the flame, letting it gradually get cooler. The end result was absolutely spectacular given the easiness of the experiment:
When the tubes are filled with crystal iodine (I will pour it down the thin neck of the ampoule), I will hit the narrow neck of the ampoule with the hottest part of the torch flame to rapidly melt it without heating up the iodine. Then, I will use pliers to pull the neck of the ampoule completely off, thus sealing the iodine inside. I am quite pleased to have such an easy way of making ampoules for chemistry stuff!
Experiment 27: Key Duplicating by Casting
I have always wanted to give key copying a go like the secret agents do in spy movies, so I tried it using my house key. Before you freak out and say that key copying is illegal, note that I used my house key, which I own. Do not copy other people's keys. That is probably illegal and could be a felony.
Anyhow, I used some creative methods to quickly copy the key and cast it in zinc. After a bit of touching up, the casting actually worked! Check out the Instructable for pictures and more information! Also, if you don't believe me, watch this video of the test in my door:
Anyhow, I used some creative methods to quickly copy the key and cast it in zinc. After a bit of touching up, the casting actually worked! Check out the Instructable for pictures and more information! Also, if you don't believe me, watch this video of the test in my door:
Update to YouTube Account Suspension
Bleh. YouTube has not contacted me once about why my account was suspended, nor have they given the ScienceWithScreens channel back. I am thouroughly disappointed with how they have handled this issue. It should have been corrected months ago, since I never did anything wrong.
What I find strange is that using my normal email address (which I used for the ScienceWithScreens channel) I am still able to get into YouTube, just not into my old channel. Odd. Apparently, YouTube doesn't hate me enough to completely ban me. :)
This means that I will be uploading more science videos to the new channel YouTube gave me under the same email, located at this address:
I am super happy, and I hope you are, too! Look forward to some really cool projects I have up my sleeve. I will also fix all those "broken" videos that now exist on my blog.
Subscribe to:
Posts (Atom)