manual stepper motor control using cmos discretes

Thread Starter

alistairsam

Joined May 11, 2010
8
Hi,
I recently bought an a4983 stepper motor driver (from Allegro) and it works fine with a unipoler wired as a bipolar, and is microstepping correctly upto 1/16th.
my application is not robotics but simple motor control.
I basically want to use 1/8th stepping, so MS1-3 inputs will be set permanently, but with 4 different options using manual switches/digital latches for the following scenarios

Clockwise - Hi Speed
Clockwise - Lo Speed
CCW - Hi Speed
CCW - Lo Speed
Tracking - Intermediate
(Hi Speed for CW and CCW will use same clock freq, Lo Speed for both DIR will use same lower CLK freq)
I'm obtaining different clock frequencies using a Silicon oscillator - LTC6900, output to a 4060 freq divider.

To achieve one of the 4 states above, I thought of multiplexing one of the two different clock outputs from the 4060 (between 400 to 1200Hz) to the CLK input of the A4983, and using a ganged switch, set the DIR to CW or CCW.

I've thought of using either a multiplexer, or a non inverting buffer or a CD4066 bilateral CMOS switchfor a common CLK bus.
my problem is setting mux , buffer or cmos switch ctrl pin states using physical switches and pull down or pull up resistors, or digital latches (using a 4013).

A simple 2 input - 4 channel multiplexer should allow selection of any 3 frequency inputs from the divider with the following truth table
CTRLA CTRLB CHANNEL
L L 1
L H 2
H H 3

What would be the best way to set the above logic states using dpdt momentary switches
 

SgtWookie

Joined Jul 17, 2007
22,230
Use SPST switches to control the SET/RESET inputs of flip-flops, with pull-up or pull-down resistors to the SET/RESET inputs as appropriate. Otherwise, your switch contacts will bounce and cause you no end of trouble trying to debug the thing.

Since you haven't bothered to post your schematic or links to datasheets, there's not much more I feel like going into at this point.
 

Thread Starter

alistairsam

Joined May 11, 2010
8
Hi,
Thanks for the reply. I have'nt posted a schematic yet as i have'nt completed it and was stuck on what device to use to switch the clock signals.
But will post a block diagram shortly describing what I'm looking for along with datasheets.
 

SgtWookie

Joined Jul 17, 2007
22,230
Apologies if I sound a bit grumpy. It's just that virtually all new members fail to provide schematics of what they have so far and/or links to datasheets of what they're trying to control, or use to control something. Without having such information available, about all we can do is make wild guesses.

You don't want to deal with wild guesses, as they are very frequently incorrect, which makes threads go on for many pages while you are getting frustrated and burning up parts.
 

Thread Starter

alistairsam

Joined May 11, 2010
8
totally understand and agree. a diagram speaks for itself and without one, there can be many different interpretations and just not enough data to understand the problem.
i've already drawn it in visio, but realized the errors, so had planned on redrawing. but as mentioned, am drawing up a block diagram right now, and will provide links to datasheets shortly.
thanks
 

Thread Starter

alistairsam

Joined May 11, 2010
8
Hi,
have attached a block diagram showing what i've arrived at.
at this stage, I have tested the oscillator - LTC6900, freq divider - CD4060, and the A4983 stepper driver. It works well when manually coupled with a clock signal from one of the divided pins of the 4060.

I need to get a control panel similar to the one in the diagram working with flip-flops, gates or latches, uncertainties remain on how to control the Mux control pin states using switches, whether to use a Buffer or Bilateral switch or Mux, and whether the Direction input can be incorporated in the controls.
One possible way could be programming values in an EEPROM and choosing addresses to get the desired outputs, but I don't have access to programming kits.

Will post links to datasheets shortly.

Thanks
 

Attachments

Thread Starter

alistairsam

Joined May 11, 2010
8

Attachments

Thread Starter

alistairsam

Joined May 11, 2010
8
Hi,
I just tested the second method of using switches to select different resistors in parallel to generate the 3 different frequencies, but it did not work properly. the waveforms were distorted, and the frequency was drifting all over.
but i also tested the first method using the 4051 multiplexer and a simple slide switch to select one of two channels, each of which are connected to two pins of the 4060 frequency divider, and it works well.
i just need a method of digitally incorporating the three functions using momentary spst or dpst switches.

i had to use one of the schmitt triggers to change the mux control pin states, as otherwise it was'nt reliable. i guess the same can be done with a pull down or pull up resistor.
 

Thread Starter

alistairsam

Joined May 11, 2010
8
Hi,

I think i found an answer to what I'm looking for with a 20key encoder MM74C923N. (http://www.fairchildsemi.com/dwg/N2/N20A.pdf)

The outputs for my truth table are available by depressing the appropriate spst switch as below. It has built in debounce circuitry, and is tri state. only thing is i'm not sure what the mux output would be when its input is high Z (when keypad buttons are open), or the A4983 motor output when its EN pin is at high Z.

Rich (BB code):
Keypad  X  Y  EN  INH  DIR
12      0  0   1    1    0  - Need this o/p when switches are off to reduce motor draw 
1       1  0   0    0    0  - Hi Speed CW
18      0  1   0    0    1  - Lo Speed CW
17      1  0   0    0    1  - Hi Speed CCW
3       1  1   0    0    0  - Mid Speed CW
2       0  1   0    0    0  - Lo Speed CCW
(X,Y are inputs to the Mux, EN - Enable for the stepper driver, INH - Inhibit for the Mux, DIR - Direction for the Stepper driver)
 
Last edited by a moderator:
Top