Welcome! Log In Create A New Profile

Advanced

My first Arduino powered drawing

Posted by Anonymous User 
Anonymous User
My first Arduino powered drawing
August 06, 2008 08:45AM
Hi just wanted to share a video and pic of my first Arduino powered x and y axis RepStrap drawing ( [picasaweb.google.com.au] ). Using very simple encoding "wwwwwdwwwwwwwwdwwwdwwwdwwwd" w being up 1 unit, d being right 1 unit etc. The vid is speed up heaps to show the end result which is an ellipse drawing ( [picasaweb.google.com.au] ). I have gone for a fairly different design as you will see in the video. I am also using normal DC motors for now just to see how accurate i can get it. So far not including electronics it has cost me about 30 bucks AU. There is grooves that allow the end points for each axis to stay straight and roller bearings to provide the least amount of friction. The piece of wood in the middle has grooves routed out of it which the U shaped aluminium rods slide through.

Dan

Edited 2 time(s). Last edit at 08/06/2008 08:49AM by dtmoi.
sid
Re: My first Arduino powered drawing
August 06, 2008 10:50AM
cool idea!
I like the dualslide-system alot (maybe that's because I used it for my y-z connection)
using it for the x-y would (if rods and bushbearings are used) mean, the toolhead is supported by four instead of just two rods. I like that!

'sid
Re: My first Arduino powered drawing
August 06, 2008 11:02AM
VERY nice! smileys with beer
Re: My first Arduino powered drawing
August 06, 2008 11:38AM
Good stuff. I think we'd all be interested in a report on how you got those servos working so well! Have you tried doing any 90-degree turns at speed yet?
Re: My first Arduino powered drawing
August 07, 2008 06:30AM
Kyle,

seemed a bit slow to me. I'm assuming it was in fast forward to get it to look that fast. Not impinging on the excellent work at all. The thing is beautiful looking.

The whole thing of slow movements just bugs me. My extruder can pump out plastic much faster than my axis can move. Sucks for me! ;-)

Demented
Anonymous User
Re: My first Arduino powered drawing
August 07, 2008 09:07PM
Hey Guys,

Thanks for your feedback, always more enjoyable sharing the design and build process.

[Forrest]
I think also by having the 4 guids instead of 2 it can hold a far greater load. I have not used scales to test this but i have had it moving 2-3kg.

[Kyle]
I have had no trouble with 90-deg turns as yet, what sort of issues would you be expecting?


I have posted a new vid [video.google.com] recorded in real time as Demented was correct in noting that the last one was sped up to make it more digestible. I have improved the performance since the last recording and this time I draw a fairly round circle.

Something else you may notice on the vid is mounted on the block of wood to the left is a potentiometer with 3 wires coming out of it. This rotates according to the Y axis's position. This cost $1 to hack up and so far I have it so that I can set the Y axis either north or south of a desired value and it will auto adjust back to the specified coordinate. I am not sure if anyone else has an active feedback positioning system but I would like to hear your feedback on the benefits or disadvantages to how I have gone about it. I looked at other options but this was by far the cheapest I could find. So far it is accurate within 2mm, I am just now building the analogRead to distance array to allow me to input a desired Y position in mm(currently i enter the analogRead value).

My hope is that by having the cords I can create a matrix with the x&y cords path to draw any picture. I should also be able to measure the speed etc and maybe even adjust extrusion real time?

Dan

Edited 1 time(s). Last edit at 08/08/2008 03:54AM by dtmoi.
Re: My first Arduino powered drawing
August 07, 2008 09:28PM
dtmoi Wrote:
-------------------------------------------------------
>
> I have posted a new vid
> [video.google.com.au]
> 9102338886372&hl=en-AU recorded in real time as
> Demented was correct in noting that the last one
> was sped up to make it more digestible. I have
> improved the performance since the last recording
> and this time I draw a fairly round circle.
>
Looking good. Looking real good! smiling bouncing smiley
Re: My first Arduino powered drawing
September 25, 2008 12:29PM
Dan-

I like it. I was wondering what that swinging arm was doing on top (your positioning system).

I thought that I would throw out there that you could improve your resolution on your positioning system with a set of gears and a multi-turn pot. If you have your lever spin a gear which would double or triple the amount of rotation before spinning your potentiometer you should be able to get greater accuracy. This would require a larger range pot. I am sure that there is some point of diminishing returns on this type of system, but I am no engineer.

Now that I am thinking through the system, I am pretty sure that your accuracy is not going to be linear across the axis. (I think) Near the center of your axis you are going to have a drop in accuracy where your lever is reversing direction.


Robert Carpenter
[www.robertcarpenter.net]
sid
Re: My first Arduino powered drawing
September 25, 2008 05:58PM
as dan mentioned above: an position encoder
Quote

Something else you may notice on the vid is mounted on the block of wood to the left is a potentiometer with 3 wires coming out of it. This rotates according to the Y axis's position. This cost $1 to hack up and so far I have it so that I can set the Y axis either north or south of a desired value and it will auto adjust back to the specified coordinate. I am not sure if anyone else has an active feedback positioning system but I would like to hear your feedback on the benefits or disadvantages to how I have gone about it. I looked at other options but this was by far the cheapest I could find. So far it is accurate within 2mm, I am just now building the analogRead to distance array to allow me to input a desired Y position in mm(currently i enter the analogRead value).

'sid
jbb
Re: My first Arduino powered drawing
September 27, 2008 10:08PM
Hey, this is looking good! It's nice to see some closed loop control action.

The swing arm on the pot is an interesting idea - it's nice and simple and doesn't need esoteric components. As Robert C. noted you won't get a linear output from the pot... but you could improve matters by making the beam longer to reduce the angle swung through, OR you could put a lookup table in your controller to compensate for the nonlinearity, which is cheap and easy.

Equations for position measurement:
x = axis location assuming zero is in the middle of the area.
theta = potentiometer angle
l = arm length

sin(theta) = x / l
theta = arcsin(x / l)

Therefore the linearising table must be in the form [sin(theta), theta].

If you want to go to a multi-turn solution I suggest putting the pot on the moving axis and then having a little rubber wheel pressed up against the base board - imagine a car odometer - this way you get linear readout. For better accuracy (but somewhat more expensive) you could move to an angle encoder.

What control law are you using for the motor control? Proportional, Proportional + Integral, full PID or something else? To get good position control it will be necessary to use more than just proportional control.

Additionally, are you supplying controlled voltage or controlled current to the motors? Both would use the same PWM unit, but a controlled current system would add a current sensor and then give you direct control over the motor torque, which makes for much easier control.

jbb
Anonymous User
Re: My first Arduino powered drawing
September 28, 2008 02:00AM
Hi guys,

What I have done is used some basic trig to work out the distance based on the angel of the pot. The pot gives me an arduino reading of 1 for each 0.245 degree rotated so I convert that reading into degrees, then use the length of the arm(which is constant) and since I have a right angle triangle I can then get the length of the opposite side.

I have provided my code below which contains the calculations for converting the arduino reading to distance. I have used a liner not log pot just for clarification.

The great thing about the system seems to be that although you get a different ratio of rotation depending on where the Y axis is, you still get an accurate reading due to the ability to map the arduino value to the angle. Once you have that angle it doesn
Re: My first Arduino powered drawing
September 28, 2008 02:50AM
The good news is that your math is correct. The bad news is that the sin() function is where the non-linearity exists. More good news: After watching your second video again, I find myself wondering if the non-linear nature of the design is a moot point due to the short arc that your arm swings. Without doing some experiments of my own, I couldn't even say.

The non-linearity that I was speaking of is the amount of rotation of the pot in relation to the distance of the arm. The problem is that you are swinging an arc of a circle and the closer you get to the maximum height of your circle (+/- 90 degrees) the less resolution you get on your data. It might also help to picture a graph of y=sin(x): as you move along the x axis, the rate at which your y value moves is changing.

To illustrate: Starting from center (or 0), move your arm such that it rotates your pot +5 degrees and measure the distance that your axis has traveled. Now, max out your pot in either direction and again move you arm 5 degrees. The distance that your axis has traveled this time should be shorter. The difference may be small but in a positioning system you'd want as much accuracy as possible.

The final good news? Even if you leave it be the way it is now you are at a benefit: the higher resolution part of the sin() function exists in the center of your build area. Fab your parts there and you should be experiencing minimal error.

Hopefully that makes sense...its hard to explain a visual concept in a textual way...if not, let me know and I'll whip up an animation.


Robert Carpenter
[www.robertcarpenter.net]
jbb
Re: My first Arduino powered drawing
September 29, 2008 07:22AM
Of course, the despicably cunning individual may find a way to take advantage of the nonlinearity when building certain classes of curved shapes.

Another thought struck me today: look out for backlash - when the axis changes direction, the end of your measurement arm will slop from one side of the slot to the other, adding a little bit of error. You can try to fix this in software or, possibly, attach a rubber band to the arm such that it always pulls (gently) in one direction and so always stays on one side of the slot.

Isn't it annoying how a really simple idea on paper turns out to be a real pain in terms of mechanics?
Anonymous User
Re: My first Arduino powered drawing
September 30, 2008 08:23AM
Thanks for your feedback guys,

So what I take form this thread is that my idea will work, has decreasing resolution(but not necessarily accuracy) the further away from centre it moves and requires precision on the swing arm when sliding up and down the slot to reduce the chance of backlash.

If we address all of these points then chances are we have a very very cheep but potentially(excuse the pun) good active positioning system?

If this is the case how could we look to incorporate it or similar into the main design?

Dan
Re: My first Arduino powered drawing
September 30, 2008 06:27PM
Looking very good! The speed up is admirable. That's a bit slower than I think the extruder pump for the OITRepStrap can keep up with. I'm really looking at servos more and more just cause the speed issue bugs me so much.

oh hum...must learn more stuff.

Demented
Hi Dan,
I am doing something similar using dc motors but with gear belt drive. I am in my 70's and just learning how to program and I am having a difficult time with the code. Do you have the sketch that you used and is it available for me to learn how you accomplished the xy control. It would be very appreciated. Thanks, Ken Quast
Re: My first Arduino powered drawing
November 27, 2010 11:17AM
awesome work! perhaps this could this excuse the mendel from hitting 0, 0 between every layer?
Re: My first Arduino powered drawing
December 03, 2010 03:07PM
Well done! Your project is inspiring.

I have a question. How would you go about converting a simple drawing in windows paint program, for instance, into a set of wwwdwdwdwdwwwdw commands to be interpreted by the microcontroller?

Thank you!
Sorry, only registered users may post in this forum.

Click here to login