Miscellaneous thoughts

Thread Starter

Unit042

Joined Feb 8, 2011
3
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. :mad:


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. :D

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....! :rolleyes:
 

Thread Starter

Unit042

Joined Feb 8, 2011
3
I really don't want to attract extra ire because of negligence on my part, so, should I copy and paste the message to that forum, and contact the admin to delete the incorrectly placed post (and possibly this one)? Or is the damage done with no hope of recovery?
 

SgtWookie

Joined Jul 17, 2007
22,230
I don't know exactly where I should have posted this, but I just wanted whomever to know that allaboutcircuits is da bomb!
Our Moderators are quite proficient at moving threads where they belong; if you are in doubt, then keep their workload light and start a topic in the General Electronics Discussion forum and they'll move it where it's most appropriate.

<snip>
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....
You might consider a universal shift register, such as a 74HC194.
Connect Q3 to left shift in, Q0 to right shift in, etc. Preload it with 1000 or similar, and clock/select direction as required. Just don't cause it to clear, or you'll get nothing out.

You might also consider something like a 74HC299 for an 8-bit universal shift register, but that's lots more pins to deal with.

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 :))....
Links to various chapters of the E-book are at the top of every page. It's not available in print, and it continues to evolve over time.

Oh, and I propose a BEAM chapter. See:
solarbotics.net
solarbotics.com
Well, they are what they are - the BEAM circuits shown on several of those pages tend to use commercial components at far above their ratings, so your mileage may vary (significantly) - we try to keep all components within their specified limits so that things won't burn up.

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.
Not really. Receivers are generally OK, but transmitters can get you in very hot water very quickly with the FCC here in the States. First offense can get your equipment confiscated, a $10,000 fine, and a stay in the hoosegow. :eek:

Man, do I type a lot....! :rolleyes:
That's a difficulty with long, rather rambling posts; people tend to read partway through and give up; not certain if you're just commenting or are actually asking for input.

"Miscellaneous thoughts" for a topics' subject makes it seem like purely commentary; it helps a great deal to state what your question is in your topic title; perhaps "Alternative stepper motor controller, logic ICs?"
 

shortbus

Joined Sep 30, 2009
10,045
Why not just use one of the many stepper driver IC's that are available? Most only need a couple of resistors and caps to tune them to the motor and do every thing in one IC.
 

Thread Starter

Unit042

Joined Feb 8, 2011
3
Ummm... so I go and start a new topic and copy the original message there? :confused:

To SgtWookie: Thank you muchly for answering my half-formed questions! The 74HC194 looks to be quite handy, just what I was looking for. As for radio troubles, I knew there were some bad consequences, but wow, that's some bad stuff. No worries, I have trouble transmitting 2 centimeters away! :D

To Shortbus: Well, I could certainly do that, and it would be cheaper and less stressful, it would, unfortunately, miss the point. The goal is to work down to the logic-block level so that there are no black-boxes. More like an exercise in digital logic. Once I have learned how these work using JK or D flip flops, I would then mentally break those down to logic gates. Then, if I wanted, I could conceptually convert the logic gates to discreet transistors. Of course, I wouldn't build it on that level, but understanding anything at the logic-gate level is quite educational. :)

I am going to study figures 5 and 6 on page 5 for a while....
http://www.datasheetcatalog.org/datasheet/philips/74HC_HCT194_CNV_2.pdf
 
Top