After two or three days of effort, I’ve finally got the guts of the design figured out. DTMF turned out to be too difficult to decode for me, so I dreamed up an alternative solution that’s a whole lot easier to work with. That’s because it only has one signal transmitted at a time rather than the two sinusoids of DTMF. Anyway, I’m doing channel (stepper or heater) selection with frequency modulation and the command of what the setting is with pulse width modulation.
So for example to select the X axis motor I send out a 100 Hz tone. The firmware on the ATtiny85 chip for that channel measures the positive and negative pulse widths and adds them together to get the period of the signal. If that period is in a range of 10 ms +/- 0.5 ms then the chip sets a new position command value that is equal to the positive pulse width minus the negative pulse width. By setting each step of the stepper motor to 10 us we get enough resolution and range to move the extruder head a range of +/- 500 steps, which oaths printer is the full bed width.
So in other words we send a little beep specially designed to tell the chip where to put the stepper motor and the chip dutifully generates the control signals to accomplish that result. Once the correct position is reached the chip just stops the motor and waits for another command. See the following video for a filmed explanation of what you’ve just read: https://www.youtube.com/watch?v=GdU_ZfYeDFo.
This image shows the breadboarded stepper driver complete with USB power input, power indicator LED (in white), and audio input circuitry. The tip channel of the audio is monitored only. The source code for the controller chip is located at this PasteBin link: http://pastebin.com/aPqn0zhY. Also here is the PasteBin link for the ChucK source code that is generating the commands to move the extruder left and right along the X-Axis: http://pastebin.com/wgVkxxN9.
The more I work on this project the more do-able it seems to be. After all, this printer has five steppers, four limit switches, and two heaters (each with a companion thermistor) – and that’s it! There’s really very little to the system’s parts. I’ve got a control system that runs the steppers off of USB power and audio input, the heaters will require a separate power supply, and the limit switches can just reset the control chips via pulses sent to the reset pins (a la one-shot).
One friend asked how long I thought it would take to accomplish the results and I thought about it a moment then replied: one week to get a crude formless extrusion out and another week to generate at least one useful print. Then of course once the printer is all put together and working there will be a teardown to chop, build, Bondo, and paint those beautiful white racing stripes on that candy apple red paint! Ah, what a clean machine she will be!