A lot of the code is just taking example code from the AF_Motor library as well as the Firefly Firmata and making slight changes to them. The calibration uses both Processing and Arduino but the tattoo drawing just uses Arduino thanks to the Firefly plugin to Grasshopper. Below the code is also two low res images of the grasshopper files.
This 8x speed video for these two tattoos will be one of the last for this project. The octopus was a huge success as it came out almost perfectly and it shows how far the tattoo machine can be pushed to get good results. The Mickey Mouse tattoo on the other hand didn’t come out very well and the motors were starting to slow because of battery drain, so much so that I stopped it halfway though.
I could continue to tweak the grasshopper file to make sure that filling in the tattoo shapes come out perfectly but I am not going to at this point. I may come back and revisit this project at a later date but right now I am ready to move on to my next idea. Click the picture below for a moving gif of the octopus.
This video is sped up 16x, but it shows how multiple lines are drawn. On the computer screen you can sort of see how the lines are drawn but unfortunately it is out of focus. When the pen gets to the end of a line it lifts up and moves while hovering above the arm until it gets to the next point where it then comes back down to the arm to start drawing again.
This was the first time that I tried a multiple line tattoo and I learned a few things from it. I currently have the pen move at the same speed when it is going above the arm as it is when it is drawing on the arm. This causes the pen to move unnecessarily slowly, but at this point I am not quite sure how I would change the grasshopper file to allow the pen to move faster.
I had good luck with multiple figures, but when filling in the dog I had the spacing about twice as wide as it needed to be. The whole running dog tattoo was supposed to take 20 min with the lines being 0.6 cm apart, which means it would probably take about 35 minutes to fill it in correctly. I stopped this tattoo after only about 7 of the 20 minutes because I knew what the end result would be.
This is the video that corresponds with my previous post titled “Expectation becomes Reality” (referencing my earlier post Expectation vs Reality). Everything looks and works pretty much the way I want it and there are just a few minor problems left.
I had to move my arm small amounts (less than a cm at a time) about four or five times over the course of the video to get my arm to be positioned better with the pen. Sometimes I had to move my arm down because the pen was pressing too hard, while other times I had to shift my arm over to get better contact with the pen. Overall I think that this is really just a calibration problem and that if I re-calibrate more carefully these problems will go away.
The new stepper motor is the loud and that is the noise you hear on the video. I think the noise is actually coming from the teeth of the timing pulley going against the grains of the 3d print, and while it isn’t too annoying I would like to find a fix for it.
For the first time this project I am content with final outcome of the tattoo. It is by no means perfect or something you would want replicated by a professional tattoo artist, but for what I am trying to do it is close enough.
To complete this project the only things left to do are draw a tattoo that is filled in and draw a tattoo that is made up of more than one part. All of the tattoos this far have been one continuous line to make the process easier. This is not very practical for a real tattoo that would normally be made up of many lines that together form a whole. In an earlier post I showed an example of how I would break up an image into contoured lines but I still haven’t actually implemented it in a tattoo.
Now that the physical machine is working perfectly I can see that there are problems with the other parts of the project. After checking the Processing and Arudino code I have come to the conclusion that the problems are coming from rhino and/or grasshopper.
The the first of the two main problems that I am facing is that the pen presses down too hard in some places and not hard enough in others even though it has been calibrated with 140 points. This means that somewhere between the calibration model and applying the design something doesn’t get translated correctly. The second problem is that there is a lot lower resolution design being drawn by the pen compared to what is drawn in the rhino model.
Since making this video I have done four more tests and found that cutting the speed in half increases the tattoo resolution greatly. I tried slowing it down even further but then the stepper motors don’t have enough force to go from one point to the next. I have also been trying to figure out what goes wrong in translating from calibration to design application but so far I have had no luck.
For the first time this project I have the tattoo machine moving 100% on its own. In the video the new stepper motor lags a little bit but I have fixed that so it is now ready for testing.
I managed to get the timing pulley to stay on the stepper motor which allowed the timing belt to move. The last thing I need to do before I can get this to work with the machine is to attach the pvc and threaded rod to the new timing belt so it moves with it. I think I am going to write the code and test it without the pieces connected first just to make sure I don’t break anything.