I am working to interface with an existing PCB with on-board Full Bridge PWM motor driver chips, which drive a stepper motor. The interface lacks any kind of standard step (clock) or direction signals and I can only use the input signals that are there. There are two chips to drive each stepper motor, they are Allegro A3959. I want to keep everything as is, so I can only work with what is broken out, but I can add an interface chip using the available inputs.
I would like to add a new controller to drive the chips, which can only provide the standard 'step (clock) and direction' outputs. How can I accomplish this? I have thought about using a L297 Stepper Motor Controller chip as an intermediary, but with only limited inputs (and no access to sense resistors) I don't believe I can use it. Even if I had access to the sense resistors, I don't know how I would interface it.
For simplicity's sake. I have created a very generalized diagram of what I do have available to me (the pin outs are generalized):
As you can see, I only have the following pins available:
- Phase A (direction)
- VREF A (current regulation)
- Phase B (direction)
- VREF B (current regulation)
- Sleep (this controls many chips on the board and can't be considered for pulsing)
It is my understanding that I can easily control the direction through the Phase A/B pins. Digital signal 0 for one direction, digital signal 1 for the opposite direction. How do I control the VREF with a clock input signal though?
The datasheet for the A3959 states the following:
"Current Regulation. Load current is regulated by an internal fixed off-time PWM control circuit. When the outputs of the DMOS H bridge are turned on, the current increases in the motor winding until it reaches a trip value determined by the external sense resistor (RS) and the applied analog reference voltage (VREF):
ITRIP = VREF / (10 * RS)
At the trip point, the sense comparator resets the source enable latch, turning off the source driver. The load inductance then causes the current to recirculate for the fixed off-time period. The current path during recirculation is determined by the configuration of slow/mixed/fast current-decay mode."
Is this similar to a clock signal? (Note: ITRIP is already calculated perfectly for the motor current when VREF is a full 5 volts.)
If I were to supply 100% VREF, would it build up to 100%, produce one single step, trip and then wait the fixed time off before going again?
Would a constant VREF keep the motor going, pulsing automatically?
Full settings for the chips in current configuration is as follows:
- Enable pin is held constantly high.
"If enable is kept high, the current will rise until it reaches the level set by the internal current-control circuit."
- EXT Mode is held constantly low. Decay = Fast.
"With EXT MODE low, fast decay mode, the opposite pair of selected outputs will be enabled during the off cycle."
- Internal current-control Mode pins are held constantly high. Decay = Fast, %tOFF = 100%.
- PWM blank timer is held constantly low. TBLANK = 6 / FOSCILATOR.
- FOSCILATOR is to have a typical value of 4 MHz.
- Fixed off time is typically 24 μs with a 4 MHz oscillator.
- Sleep logic is used to minimize power consumption. It is not to be used as a substitute to enable.
I normally have a really great understanding of stepper motor drivers. However, all stepper motor drivers I interface with pretty much always have step (clock) / direction as a standard input. Since this is an phase / enable chopper circuit, it will require more expertise (or a specialized controller chip) to figure out.
What is the best approach?