The chip only drives p channel upper fets (no bootstrap). It has all kinds of configuration options and drive modes to make the tinkerer happy.
Chip is about $3 dollars and adapter is about $1.50, supply your own FETs and caps.Total cost including fets caps and board was $6.
Circuit is simple to make, although you may need to spend a bit of time fiddling with start speeds and fine tuning the controls for your motor. I had a 3900kv 6 pole motor and spent a couple of evenings just getting the thing to start and turn reliably.
I used a irf9540 top fet and irf540 bottom fet. The schematic i used is the same as the functional block diagram from the data sheet except i added a couple 104 caps and a 470uf cap on the power input. I am not using a current sense resistor for now as i didn't have anything suitable so i just tied both together and then to ground (i'm sure this come back to haunt me). Certain control modes only work with the current sense resistor.
Anyway, just though i would pass on my experience, I am testing the a4960 (all n channel fets), when the proto-adapter for it arrives and will report how it goes.
Cheers!
Hi Alka
i am a arduino-beginner. Could you post your code? I'd like to implement a closed-loop speedcontroll with the a4963. It would help a lot to see some runnig code.
You are probably right mark, I tried this on a very small motor, I would want to use the a4960 if the budget allows.
To control it is quite simple, It reads a low frequency pwm input (under 1000hz) and uses that to control the speed (or current) of the selected control mode.
Writing registers to select the control mode is quite simple using the SPI library, the chip needs 16 bits and the outputs the diagnostic registers 16 bits. I broke it into two 8 bit segments.
Sorry you will have to work on your own code for other registers, i didn't play around with it for long enough, but this is how you can set it up to select closed loop speed control and will output the diagnostic register. The code i'm sure is written poorly, but it should work (provided everything else in the circuit does too).
// include the SPI library:
#include <SPI.h>
#include <Serial.h>
int diagFirst;
int diagLast;
const int slaveSelectPin = 10; // set pin 10 as cs
const int analogInPin = A5; // Analog input pin that the potentiometer is attached to
const int pwmPin = 6; // pwm pin out
int motorSpeed;
void setRunRegister(){ //selects closed loop speed control all other setting default
digitalWrite(slaveSelectPin,LOW); // cs low selects chip
diagFirst = SPI.transfer(0b11111100); //first 8 bits out - bits 5 and 6 select control mode
diagLast = SPI.transfer(0b00001001); //second 8 bits out
digitalWrite(slaveSelectPin,HIGH); // cs pin high to de-select the chip
Serial.println(diagFirst,BIN); //prints diagnostic register first 8 bits
Serial.println(diagLast,BIN); //last 8 bits
}
void setup() {
pinMode(pwmPin,OUTPUT);
pinMode (slaveSelectPin, OUTPUT);
digitalWrite(slaveSelectPin,HIGH);
SPI.begin();
SPI.setBitOrder(MSBFIRST);
Serial.begin(9600);
}
void loop() {
setRunRegister();
delay(50);
motorSpeed = constrain(map(analogRead(analogInPin), 0, 1024, 0, 255), 0, 255);
analogWrite(pwmPin,motorSpeed);
}
This is just a very basic way of controlling the chip, there are loads of options and things to tweak on other config registers , some you may want to put in setup instead of the main loop. This is just to illustrate how to change a register.
hi dear friends!
I have build test board on a4963 and trying to start motor.
When i start PWM (400Hz and duty cycle from 0 to 100% 3V3 logic) motor start pulsed but not rotate, When I increase duty, pulsing also go high and steel no rotation.
I try to send some via SPI but seems nothing happened (16bit per transaction, 0b1111010000001001)
Hey that's great, I am glad it is working for you!
The a4963 has its limitations with mosfet choices but the control options are great.. the a4960 is a big step up.
If you like tinkering with motor control chips and arm chips check out the "stspin32f0" or "stspin32f0a".They are all in one mcu and gate driver chip with build in voltage regulation too! The "A" version has a larger voltage range, and can be programmed with rx/tx as boot0 pin is available. The normal version must be programmed with St-link.
I made a simple example board on my blog at rcgroups