I don't know exactly where I should have posted this, but I just wanted whomever to know that allaboutcircuits is da bomb!
I was recently inspired by the Rep Rap Project (aka Makerbot), to make a 3D rapid prototyper, and I have since been grappling with a circuit for driving stepper motors with fewer control pins. Using four pins to the wires of a bipolar stepper motor seems such a waste. *wavy dream sequence: If only there were a way to use logic gates to simplify the interface. *
Well, I planned on using a couple of D-flipflops, a pair of XORs, and a 2 to 4 demux to allow a "direction" and "step" pin to control the position (of course, there is the matter of an "enable pin," but that's for later).
Anyway, it counts fine up, and down. Problem was, when I went to switch direction, depending on which number it was on, it would skip one or two counts up or down unpredictably (according to the controller, of course. It's not monitoring actual position with sensors). Before you can say "smoothing capacitors," the problem turned out to be the binary tree; ie, when you invert two bits to count up/down in binary, you end up switching where you are just by changing direction.
Yes, yes, I tried synchronizing the direction change signal to the clock ("step") using a D-flipflop, but that only organized the chaos.
Now, I decided to Google up/down counters to see how the professionals do it (Symptom of genuis inventor born in wrong time: everything he invents, someone else already made millions on it decades earlier), and I found this place.
Specifically:
allaboutcircuits.com/vol_4/chpt_11/3.html
And it was exactly what I needed! Smulations indicate no jumping on direction change, and the up/down cunter is scalable (in my case, down to 2-bits wide). With a little doide-resistor logic to eliminate the trivial non-JK logic, this is well on its way to my breadboard.
Note: falstad.com simulations available as visual aid.
Note 2: the goal was to A: not use a microcontroller for CPU to stepper motor interface (c'mon, anyone can slap a PIC on it. It takes an artist to do it with less than a million programmable transistors),
and B: use only elemantary logic blocks while still use as few physical chips as possible.
Anyway, next step is to simplify the working circuit to maybe something like a forward/backward counting johnson counter to perhaps go straight from signal to output instead of using a demux as the binary middle-man. Maybe that circuit is here somewhere....
So, all this to say way to go whomever is contributing! You made my life that much less stressful. Oh, and I hear there is an ebook. Is there a print version for sale when all chapters have been completed and stabilized? I would really like to have this knowledge available when the world melts apart (riots in the street are less annoying when you can blink LEDs in the correct sequence )....
Oh, and I propose a BEAM chapter. See:
solarbotics.net
solarbotics.com
Is there a radio circuits chapter somewhere? Everytime I try to do a simple radio experiment, my lack of MHz oscilloscope hurtz. And then the experiment fails because I have no idea how to get my reciever and transmitter working.
Man, do I type a lot....!
I was recently inspired by the Rep Rap Project (aka Makerbot), to make a 3D rapid prototyper, and I have since been grappling with a circuit for driving stepper motors with fewer control pins. Using four pins to the wires of a bipolar stepper motor seems such a waste. *wavy dream sequence: If only there were a way to use logic gates to simplify the interface. *
Well, I planned on using a couple of D-flipflops, a pair of XORs, and a 2 to 4 demux to allow a "direction" and "step" pin to control the position (of course, there is the matter of an "enable pin," but that's for later).
Anyway, it counts fine up, and down. Problem was, when I went to switch direction, depending on which number it was on, it would skip one or two counts up or down unpredictably (according to the controller, of course. It's not monitoring actual position with sensors). Before you can say "smoothing capacitors," the problem turned out to be the binary tree; ie, when you invert two bits to count up/down in binary, you end up switching where you are just by changing direction.
Yes, yes, I tried synchronizing the direction change signal to the clock ("step") using a D-flipflop, but that only organized the chaos.
Now, I decided to Google up/down counters to see how the professionals do it (Symptom of genuis inventor born in wrong time: everything he invents, someone else already made millions on it decades earlier), and I found this place.
Specifically:
allaboutcircuits.com/vol_4/chpt_11/3.html
And it was exactly what I needed! Smulations indicate no jumping on direction change, and the up/down cunter is scalable (in my case, down to 2-bits wide). With a little doide-resistor logic to eliminate the trivial non-JK logic, this is well on its way to my breadboard.
Note: falstad.com simulations available as visual aid.
Note 2: the goal was to A: not use a microcontroller for CPU to stepper motor interface (c'mon, anyone can slap a PIC on it. It takes an artist to do it with less than a million programmable transistors),
and B: use only elemantary logic blocks while still use as few physical chips as possible.
Anyway, next step is to simplify the working circuit to maybe something like a forward/backward counting johnson counter to perhaps go straight from signal to output instead of using a demux as the binary middle-man. Maybe that circuit is here somewhere....
So, all this to say way to go whomever is contributing! You made my life that much less stressful. Oh, and I hear there is an ebook. Is there a print version for sale when all chapters have been completed and stabilized? I would really like to have this knowledge available when the world melts apart (riots in the street are less annoying when you can blink LEDs in the correct sequence )....
Oh, and I propose a BEAM chapter. See:
solarbotics.net
solarbotics.com
Is there a radio circuits chapter somewhere? Everytime I try to do a simple radio experiment, my lack of MHz oscilloscope hurtz. And then the experiment fails because I have no idea how to get my reciever and transmitter working.
Man, do I type a lot....!