Arduino Forum

Topics => Robotics => Topic started by: bgthor on Feb 05, 2014, 02:13 pm

Title: Leonardo, the robotic artist.
Post by: bgthor on Feb 05, 2014, 02:13 pm
hello you wonderful and deeply creative people.

I have come to this forum for your aid and input on my current project for my university.
the aim is simple. to produce a robotic artist able to interpret an image and draw it.

now while for the project I could have produced a simple cartesian plotter I made decision to produce a polar plotter. showing a novel solution to the task.
deeply similar to this project but the aim is to produce a much more comprehensive form of image and hopefully with a much more accurate drawing capability and higher resolution.

within the project description it also outlined that the plotter should have the capability to vary the pressure of the drawing implement allowing for possibilities of shading.

this is where you fine ladies and gentlemen come in. I have produced a working mechanical prototype that I have been able to get to move and draw deeply simple shapes simply by giving the arduino step instructions. what I need to work on now is a system of taking an image and producing the suitable instructions to drive the stepper motors and arduino.

the plotter has a variable pressure element along with the arduino control. this variable pressure is produced through a servo. I was planning to use SVG files as my image files and give the arduino the ability to read and follow the directions of these SVG files however this does not really allow for the variable pressure/intensity that I require. my goal is to demo the system writing a sentence using human like behaviors or simple shapes but either of these examples need to have variable pressure in a similar manner as to a human hand would apply.

thank you very much in advance. all advice and comments regarding the system will be heavily referenced within my summary paper if you so wish :)

pictures for those who wish,6N0kyTx,7qD8355,NuMYlmF,PgvciKp#4
Title: Re: Leonardo, the robotic artist.
Post by: AiRgeek on Feb 05, 2014, 11:15 pm
Just an idea, I think to you could try to implement certain type of characteristic which is direction dependent e.g.
* Strokes directed left - increase in size/pressure
* Strokes directed right - decrease in size/pressure

But some how I think that by introducing some sort of randomness in pressure would give you the most realistic effect.

Title: Re: Leonardo, the robotic artist.
Post by: bgthor on Feb 06, 2014, 01:50 am
this I have thought of, I would need to include a manner in which I could determine the length of the arc from either left to right (theta in my mathematics concept) . however the bit I am stuck on is how I can translate that using SVG file formats and determine what that length is. I have looked at the subject but I cannot think of a sure fire way of implementing it. I could just have it separate from the line creation algorithm altogether and just have it read the distance of travel of the motor itself but I yet again have no idea how to do that either.
Title: Re: Leonardo, the robotic artist.
Post by: AiRgeek on Feb 06, 2014, 06:10 am
Sorry, but I am not quite sure I understand what you mean.

Are you trying to use the Arduino to read the SVG file of a piece of hand writing and then reproduce that?
Title: Re: Leonardo, the robotic artist.
Post by: bgthor on Feb 06, 2014, 01:50 pm
in essence yes, I am currently just using the arduino as a motor controller for the servos but now I am interested if I can use it to process the SVG, if not I am also looking into using processing as a way of reading the SVG and communicating the instructions through serial communication to the arduino.

I have just never built a plotter and I am finding it difficult how a pen plotter like this would read an SVG.
Title: Re: Leonardo, the robotic artist.
Post by: mirith on Feb 06, 2014, 11:17 pm
I may be repeating myself, and I may be wrong now, but the basic Arduinos are bad at image processing.  They do not have the throughput or RAM to really handle images.  I would investigate using a raspberry pi (Which I'm pretty sure there is image-processing for), with the arduino, and having it feed the instructions to the Arduino.  That being said, you might be able to load an SVG into a memory card and break it up into small pieces, but I know nothing of the SVG format.

PS: I think its a neat project.
Title: Re: Leonardo, the robotic artist.
Post by: AiRgeek on Feb 07, 2014, 03:28 pm
You may want to consider breaking the project into 2 parts, to make the project more manageable. First is to verify that your plotter works as it should, by drawing something simple. For example, circle, square and triangle....... This way, if you encounter problems down the track you can be certain that the problem is not your plotter.

I get the impression that you would need a strings of 2 values, one to control r and the other for theta. If you have already past that, then I guess its time to revisit the SVG file format again.  

If you haven't already come across this info, (
I think the <path> element is something you would require to translate using the Arduino i.e. The following commands:

   M = moveto
   L = lineto
   H = horizontal lineto
   V = vertical lineto
   C = curveto
   S = smooth curveto
   Q = quadratic Bézier curve
   T = smooth quadratic Bézier curveto
   A = elliptical Arc
   Z = closepath

to make use of all the variables within the quotation marks i.e. <path d="......................................." /> to control your servo.

BTW, I think you could make use of the value within the stroke-width parameter to control you Z(pressure/intensity) direction.