2 Attachment(s)
Re: Controlling a 2.2Kw BLDC motor with Kflop
I am including everything in this thread to help other noobs that might come after me..
Also i have found out through intensive googling that the white connector is called a JST Connector and you can get them ready made in different pin counts.
the answer from the factory:
Quote:
when input 0 V the motor is stop. 5V or 10V motor is running at max speed.
Please you see the attached document which is 0-5v/10v anlog to adjust motor speed. The picture attached shows you how to change running direction.
Attachment 245342
(AND A ATTACHED MANUAL.)
It looks like you almost was right Tom, he don't say anything about applying voltage to the inputs, he just say to short them out. (i think)
so giving a input voltage on CN5 to reference speed and shorting out GND and S/P to enable run.. and then you can set Forward or Reverse separately on pin F/R.
- As an example,
- by shorting GND and F/R making it high it will set forward
- when you short out GND and S/P it will start rotating in forward
- [/INDENT]and referencing on CN5 with a voltage signal will change the speed accordingly.
Re: Controlling a 2.2Kw BLDC motor with Kflop
Hi jossa,
Seems like you have success.
The next Step would be to test if you can get KSTEP to output an analog voltage. There is an example KStepPWMCorrected.c
Code:
#include "KMotionDef.h"
#include "CorrectAnalogFunction.c"
#define RefVoltage 11.09f
main()
{
float V=5.0;
FPGA(KAN_TRIG_REG)=4; // Mux PWM0 to JP7 Pin5 IO 44 for KSTEP
SetBitDirection(44,1); // define bit as an output
FPGA(IO_PWMS_PRESCALE) = 46; // divide clock by 46 (1.4 KHz)
FPGA(IO_PWMS+1) = 1; // Enable
FPGA(IO_PWMS) = CorrectAnalog(V/RefVoltage); // Set PWM
}
Change the RefVoltage value to whatever voltage that you have applied to the KSTEP analog circuit (JP33 Pins 5 and 7). Change the V value to some voltage like 5. Run the program and check with a multimeter if the voltage on JP33 Pin6 relative to Pin7 is 5V.
Re: Controlling a 2.2Kw BLDC motor with Kflop
do i add that code to "initKstep3axis.c" in the c programer in kmotion? (added it to the bottom of the code)
Re: Controlling a 2.2Kw BLDC motor with Kflop
Hi jossa,
Well no. That is just a simple test to check if you can set one voltage. Just run it in a separate Thread from KMotion.exe C Programs screen. Change the value of V and save/compile/download/run it again to see if the Voltage changes corresponding to the value.
Regards
Re: Controlling a 2.2Kw BLDC motor with Kflop
i just get an "Compile error" message when i try to compile the code you gave me..
should it be included in the 3 axis example file? or just written by it self.. (i have only written it in a new and empty file)
Re: Controlling a 2.2Kw BLDC motor with Kflop
Hi jossa,
What compile error message do you get?
The code includes the file CorrectAnalogFunction.c so the program file must be in the same location. That file should be located in the <install>\C Programs\KStep directory.
HTH
Regards
Re: Controlling a 2.2Kw BLDC motor with Kflop
aha! one down.. the files it calls for need to be in the same dir. now i can compile...
but now i get a new error when trying to download, "error loading file" ... could it be something wrong with my computer? (disk)
update: i have enough free space and i am connected. so i am not sure why i get that error..
Re: Controlling a 2.2Kw BLDC motor with Kflop
Hi jossa,
Well are you able to compile other files like print.c?
What exactly are you doing?
Regards
Re: Controlling a 2.2Kw BLDC motor with Kflop
ok.. using the save/compile/download/run button it worked..
i am not measuring any voltage on JP33 6-7.. i have not done anything else then downloading it and running it.
Re: Controlling a 2.2Kw BLDC motor with Kflop
Hi jossa,
Did you apply a 10V or 12V supply to JP33 pins 5 and 7 ?
Regards
Re: Controlling a 2.2Kw BLDC motor with Kflop
:idea:
no.. i have not..
could i use a 24V supply? i only have a 5V, 24V and a 48V supply
Quote:
KStep adds 2 opto isolated relay drivers (100ma @ 36V), one Analog Output, and 16 opto isolated 12-24V inputs. All these IO are optically isolated regardless of the Isolation Jumpers set for the Isolation on the Step/Dir and enable signals. Opto Inputs have a common Anode normally connected to either +12V or +24V. Shorting any of the OPTO- pins to GND will activate the input. The Opto Inputs have a 10K ohm series resistance.
Re: Controlling a 2.2Kw BLDC motor with Kflop
Hi jossa,
24V or 48V is too high.
You might try the +5V. Or I thought there was +15V coming out of the Motor Driver.
Regards
Re: Controlling a 2.2Kw BLDC motor with Kflop
good thinking.. but the manual says 15V the PCB says 12V and the actual voltage is 0 :P so that is a no go..
i will try the 5V.. it wont hurt anything?
Re: Controlling a 2.2Kw BLDC motor with Kflop
Hi jossa,
5V won't hurt anything.
Regards