Jon Clausen wrote: > I've not gone into controlling anything analog, but I *have* built a system > to open and close my blinds. I don't know if that's anywhere near what > you're thinking, but in any case the (pretty severely outdated) site is at; > > http://bund.dk/blinder
That's awesome. Really good stuff. Close to what I was posting about. You even have some sort of rudimentary input, the kill switches you added to the blinds.
Charles hasn't posted on this thread, but he may not have seen it. Too bad because he built a Battle Bot and has quite a bit of computer interfacing experience.
OK, OK...hint taken. :)
I got in A's in Analog Lab, Digital Lab, and in Computer Interfacing, but he's actually doing it in real life having to deal with Voltage converters, grounding planes, filters, the whole gamut. How much fun is that?
After my original post, I took a look around and found a few DACs for about $200 US or more, and a couple of less expensive solutions like the one you use. There's one for $35 bucks or so that looks cool, called the GP-3 PC I/O card, and it attaches to your serial port:
http://www.al-williams.com/gp3.htm
What's cool about the GP-3 is that it does the stepper motor control already, along with tons of other good stuff. I was sort of surprised it was only $35 US. I could run a farm with that little thing.
For cheap & easy DAC output from your PC, use the pre-existing ports. The audio output ports for dynamic signals (although you won't typically get DC output levels without shorting across the output caps and adding some level-shifting circuitry to deal with the typical 1.5-2.5 V offset).
...Or just tie an R2R ladder to the parallel port output pins (note you could easily create any 8-bit combination, like 1 8-bit output, 2 4-bit outputs, 1 4-bit and 2 2-bit outputs, etc) if you don't need full 8 bit resolution.
NOTE: If you really want to smoothly drive stepper moters with a PC, you either need smart hardware or you'll quickly find out why linux (and most other general purpose OS's) are not considered "real-time". The stepper motors will *NOT* be happy when the pulses don't come out at exactly the wrong time, and you *WILL* notice the "glitch" in smooth movement, by feel and/or by sound. A bit of timing uncertiancy is not that bad (especially if you can compensate for it with the software generating the drive waveforms...motors have a *MUCH* slower response time than modern CPUs), but you can't just call the system sleep routine for a time delay and expect nice, clean waveform timing on output.
This is really an instance where a $2 8-bit MCU with a couple of PWM or timer outputs can solve a problem better than a GHz+ CPU. :)
> I just picked up development a couple of days ago. Basically the bit that > drives the stepper motor is a script that pushes out bit-sequences of the > parallelport. But being a script (and not particularly well written, at > that) it makes for some jerky motion of the motor, which I think is in part > responsible for the two mechanical failures it has suffered in the year it's > been running. (Plastic fatique).
See NOTE:, above.
I sort of thought that you just tell those stepper motors to slew and use an infra-red transmitter/pickup system that counts the times the IR beam is interrupted as it shines through the slits in the stepper's axel mounted circular disk.
And I thought you pretty much used the stepping feature for "fine" positioning....
Stepper motors require proper sequencing of the drive waveforms. They are not real picky about signal timing if they're not actually moving very fast, but you *DO* need to provide for acceleration/deceleration ramping and if the motor is actually rotating with any speed, it will not react well to out of phase drive signals, potentially putting lots of strain on the drive electronics and/or mechanical drive system.
Also, I'm not sure what you mean by the "stepping feature" only being used for fine positioning. You *HAVE* to "step" stepper motors...that's how they work. You can't simply hook a stepper motor up to power and get it to turn (at least not more than one step). Getting a stepper motor to rotate *REQUIRES* a properly timed dynamic drive signal.
If you're referring to "micro-stepping", or driving the stepper coils with something other than full voltage, this technique is useful even if you don't need it for fine positioning. If you think about how a stepper motor works, the "steps" correspond to different arrangements of the drive coils being fully energized. At all the points in-between the natural steps of the motor, the different drive coils need to be partially energized (think sine-waves). While it's not required that you drive stepper motor coils with a sine-wave like signal, it will proivde smooter rotation, especially at lower speeds.
I love the real world, learn-by-destruction feedback you're getting. I'd like to model that in autocad :)
There's nothing like the real world to teach you how everything REALLY works (or just as importantly doesn't work). :)
-- Charles Steinkuehler [EMAIL PROTECTED]
------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 ------------------------------------------------------------------------ leaf-user mailing list: [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html
