Show HN: Robot that copies artist's exact strokes to replicate a painting in 3D
instapainting.com
instapainting.com
[0] http://www.geckodrive.com/gm215-step-motor-motion-controller...
The problem is I need it to also be fast enough to fee lag free for the artist.
The problem though is that the actual brush strokes are different from a brush stroke generated in Photoshop. Controlling the machine lets them see the final output in real time, so they can paint it more like a real physical painting, and then the robot can reproduce the physical painting.
I think in the next demo it'll be more evident the difference between lines on the computer and physically rendered brush strokes.
That being said, turning digital artwork into physical is still an interesting problem domain since artists can't be expected to all come wield my machine. I'd like an artist to be able to remotely work the machine in some manner.
It also might be that you're supplying too much or too little current to the motors - both will result in jerkiness and noise. If your current drivers are current limiting, I'd look into tuning that. If they aren't, the ones I linked are.
I have used this to good effect for smoothing head tracker data.
A better ramping scheme is to use constant-jerk acceleration. If you plot velocity over time, the acceleration and deceleration segments look like the letter 'S', which is why this is also referred to as S curve ramping.
The gist of it is that an axis has some maximum acceleration it can achieve, Amax. Accelerating faster than Amax in a stepper motor means that the motor cant execute all of the steps you send it. To achieve constant jerk acceleration, you increase the acceleration constantly until you've reached Amax. Then you accelerate at constant acceleration for some time. Finally, you decrease your acceleration constantly until it reaches 0. Obviously, you want this ceasing of acceleration to coincide with achieving the desired velocity. You first find the two constant-jerk sections times, and then deduce the constant-acceleration section's time. The amount of jerk used is determined by how much extra time you're willing to spend in comparison to constant-acceleration ramping.
The downside is increased computation. Constant-acceleration ramping only needs to solve for time in a 2nd order equation, which is just the quadratic formula. Constant-jerk ramping must solve for time in a 3rd order equation, a much more computationally intensive task. This explains why its normally a feature only found in high end CNC controllers.
The system has a resonant frequency that depends on the damping, mass of the motor, and brush friction. Those set a hard limit on the maximum possible speed.
PDI will get you close to that speed, but there's always going to be a trade-off between speed and accuracy.
From the test, you're still quite a way out from perfect repeatability. (I prefer the automated version, because the smoother strokes look slightly better.)
I suspect you'll find that PDI with a thicker medium like oils/acrylics will be harder because the brush friction will be less consistent. And in fact real paintings are often created with a range of brush sizes and perhaps a range of palette knives - so building a robot to handle all of that isn't going to be trivial.
http://shop.evilmadscientist.com/productsmenu/605
And if you've got an old serial plotter (or 3 or 7) that can emulate or do HPGL:
http://music.columbia.edu/cmc/chiplotle/
There's something absolutely magical about plotters...
If you got the individual pieces yourself or 3D printed it can be much cheaper.
The main electrical components are:
1 x Arduino Uno (I used the modified Uno called "Orion" that has RJ2 ports) 2 x Stepper motors 1 x Servo motor 4 x microswitches as limit switches 2 x stepper motor drivers (they handle the microstepping) 3 x RJ25 breakout boards (for connecting the limit switches to RJ25 ports)
This was a prototype to prove the concept. I'm going to experiment with 3D printed parts next in a new design.
If you're feeding in coordinates as Gcode I would recommend loading Grbl. Keep in mind Grbl has specific pin requirements that make it incompatible with the Orion's RJ25 ports, so you'd have to wire a normal Arduino. Makeblock supplies Gcode firmware that works with the Orion.
For the demo in the video, the firmware was custom to handle real-time input and recording of motion.
On the host computer side, it was just a python script that interfaced with the Wacom tablet. Specifically: https://bitbucket.org/AnomalousUnderdog/pythonmactabletlib
I also hacked support for the Myo armband and mouse support.
Also just a heads up on the Amanufactory website the font in the Plans section is really hard to read, you might want to check that out ( http://i.imgur.com/Klvmorc.png ).
Edit: Thanks, fixed the amanufactory.com bug.
Something along the lines of embedding a bump map into the 2d image to give subtle depth information. Let me know if anyone needs an artist to do the art side of this.
Example: https://youtu.be/ip5Bt_-Yxsc?t=7m
You could look at the firmware used to control the stepper motors/end stops that much of the reprap community is using at https://github.com/MarlinFirmware/Marlin. This uses GCODE as well, and deals with acceleration around turns.
You could probably even use the generated electric pulses from the steppers as your input.
https://www.youtube.com/watch?v=bbdQbyff_Sk http://research.gold.ac.uk/9255/
I actually truncated the recording to remove the test strokes at the beginning.