I’m not sure that’s correct, at least in my application. Suppose the true slack in the Etch-A-Sketch is 15.5 steps, and my program thinks it’s 16. If the x motor is turning right, and changes to left, the program will insert 16 extra steps. The stylus will move half a step too far to the left. At the next direction change (which has to be to the right), the stylus will again move half a step too far, and be back in a true alignment with where it started.
With repeated left-right-left-right direction changes, the error will cancel out and not accumulate.
Accurate sensors are expensive, and feedback systems in general are expensive. For Etch-a-Sketch steppers should be sufficient. It’s one continuous line being drawn, as long as the image fill it when started where ever the stylus is there shouldn’t be a problem. It’s not like an XY plotter that can lift the pen and has to relocate to new coordinates to start drawing again. As Strangelove points out lots of CNC machines use stepper motors without a problem. An Etch-a-Sketch doesn’t need accuracy to ±.0004 inches.
ETA: I never realized this was the Pit. Fuck you Arduino IDE.
Ok, I was wrong. I had a similar application for measuring time, and the errors don’t cancel out.
There is one way you could accumulate a bunch of error - if you hit the side of the etch a sketch and then miss a bunch of steps because the stepper motor doesn’t know you are touching the side and is missing steps.
You need some kind of feedback - some steppers have a way to detect if you made a step successfully. You need something like that, or a shaft rotation sensor.
It’s definitely easy to get this wrong. Any kind of summation of small fractional steps without an absolute reference is prone to accumulated error.
In fact, the first Patriot missile system had exactly this issue. They had a timestep of something like 1/100 of a second, which couldn’t be represented exactly as a fixed-point binary number. They computed the current time by just repeatedly adding in the timestep value, and over many days the accumulated error reached several seconds. That was enough to render the system useless.
And yeah, hitting the side would cause problems, which is why all such plotter-like devices have limit switches (for safety if for no other reason). Maybe not necessary for a little hobby project like this, but you would certainly want them for any kind of production unit.
Yeah, that’s pretty much what I was thinking. If the stylus did get all the way to the side, I think the motor would keep turning and some part of the drivetrain would start slipping; either the gear on the Etch-A-Sketch shaft, or (more likely) a pulley within the E-A-S. I just plan to watch it while it’s drawing and interrupt it if there’s a problem.
You don’t need to get too close to the edges. You can reset the stylus to one corner, if they’re still made like the old days the belt will slip. Once you do that just move out a little bit and assume your frame size is a tad smaller than the whole screen. A feedback system will be expensive, and if the cords can slip it won’t do any good sensing the knob movement, you’d have to read the arms moving the stylus. You may as well replace the motion system with screws if you get to that point.
Yeah. Etch-A-Sketches are made for kids, so obviously they have to deal with that kind of abuse. I’m not sure if the cables slip on the pulleys or if they have an explicit clutch, but either way I remember them slipping (with moderate resistance). Not a big deal if you don’t do it too frequently.
Robot Arm: are you planning on supporting G-CODE or your own homebrew system? I’d recommend G-CODE since it’s semi-standard, and opens you up to lots of other software that can generate G-CODE.
Not at first. Hadn’t even heard of it until now. It looks a little more elaborate than I really need, but implementing some subset of it might be interesting. Let me get the thing up and running first.
I already have a couple of possible enhancements in mind. I thought about putting a display on it that will show the x and y coordinates, possibly with nixie tubes. There are also other shields that could go on top of the controllers, either a gyroscope (move the stylus by tilting back and forth) or a GPS (stylus will follow your path as you walk around a field).
No one implements all of G-CODE (hence why I said “semi-standard”). Implementing just the G01 code might be adequate for you (you could support G00 as well, since the standard doesn’t require it to behave differently). Most G-CODE generators will allow you to specify the subset that your device supports.
Nixie tubes are fun. I have a few of them, but haven’t put them together into a project yet.
Yeah, I just need to remember to put the stylus where I want it (and dial out the slack in the right direction) before starting a program. If I forget, pull the plug, shake, start again. I’m mounting the Etch-A-Sketch in such a way that I can disconnect it and reconnect it from the motors pretty easily.
I guess nobody got back to this. What are you trying to do (I looked back in the thread but I don’t see that you have anything in mind yet)?
I mostly use cheap Arduino Nano knockoffs, like these. They are totally sufficient if you don’t need too many IOs. Always get the ones with a USB connection, if you can–you can save a few cents without them but only with additional pain.
I have limited experience with the Raspberry Pi. They’re much more powerful than Arduinos, but at the cost of more expense, more power, physically larger, and slower in certain ways (they run Linux, so from power-on to doing something is way slower). But if you need the extra memory, overall performance, USB host, etc., they aren’t a bad option.
I order a kit from Amazon that comes with few extra items. I don’t have anything in particular in mind but I might start by making a logic probe or scope since I don’t have many tools anymore. I’m interested in controlling steppers in general, I haven’t done any motion control stuff for a while, my old stepper controller is the size of a microwave oven, this looks like it has more interesting possibilities. So a starter kit will let me play around a little and see if I want to get back into it.
Cool. Keep us posted if you have any problems. In The Pit, if necessary :).
My grandfather sold industrial stepper drivers. The smaller demo models were still the size of a toaster oven. I imagine they’re about a tenth the size these days.