Chieftain kit arrival

Forum for discussion relating to the Chietain MBT
Phil Woollard
Posts: 4261
Joined: Mon Mar 01, 2010 4:48 pm
Location: Cornwall
Has liked: 2253 times
Been liked: 7126 times

Re: Chieftain kit arrival

Post by Phil Woollard »

Stunning work and completely out of my league! 8)
Mechanical engineer.
2 Youtube channels, Phil Woollard and Magpiespyro. Facebook/ Phil Woollard.
Commission builds considered. Pm for my email.

Vince Cutajar
Posts: 2172
Joined: Wed Nov 15, 2017 1:43 pm
Location: Malta
Has liked: 758 times
Been liked: 1732 times

Re: Chieftain kit arrival

Post by Vince Cutajar »

Great work Youngjae. I will have to try that code someday. If I can suggest something that I learnt from bitter experience.

I can guarantee that lines of code that make sense today, will next week make no sense at all. Been there and experienced it myself. So, the more comments you put in your code the better to understand what you did in 2 weeks time. Comments are not compiled with the code so they do not take up any space.

Vince

User avatar
andymusgrove
Posts: 150
Joined: Mon May 23, 2016 2:10 pm
Location: Pease Pottage
Has liked: 189 times
Been liked: 86 times

Re: Chieftain kit arrival

Post by andymusgrove »

Wow that is awesome and if i knew how to use it fully i would appreciate it more im sure, would love to be able to use it and may well do - does anyone out there fully understand this and be able to offer a kit of parts or similar??

User avatar
Richard Goodwin
Posts: 421
Joined: Fri Mar 15, 2019 6:46 pm
Has liked: 291 times
Been liked: 284 times

Re: Chieftain kit arrival

Post by Richard Goodwin »

Great effort YoungJae, well done.

I would agree with the comment made by Vince about having more comments though; nothing worse when going through code and trying to fathom out why you did it that way! I found that comments almost at every step, would allow me to go to the correct area every time and was extremely useful later on if I had to revisit.

User avatar
Youngjae Bae
Posts: 274
Joined: Sun Jan 27, 2019 12:01 am
Location: South Korea
Has liked: 747 times
Been liked: 593 times

Re: Chieftain kit arrival

Post by Youngjae Bae »

Richard Goodwin wrote:
Fri Jun 19, 2020 7:09 pm
Great effort YoungJae, well done.

I would agree with the comment made by Vince about having more comments though; nothing worse when going through code and trying to fathom out why you did it that way! I found that comments almost at every step, would allow me to go to the correct area every time and was extremely useful later on if I had to revisit.

I agree with Vince and Richard.
I will use our motion controller to raise the source code to version 2, and attach the notes and the experimental value to all the phrases in version 1 that I posted yesterday.

I will try to finish this series as soon as possible.
However, if the hardware changes, I have to modify the source code and experiment, especially since I have to call a new head-up file.

Youngjae

Vince Cutajar
Posts: 2172
Joined: Wed Nov 15, 2017 1:43 pm
Location: Malta
Has liked: 758 times
Been liked: 1732 times

Re: Chieftain kit arrival

Post by Vince Cutajar »

Youngjae, is this how you connected the modules?
MPU9250 with MEGA_bb.jpg
Vince

User avatar
Youngjae Bae
Posts: 274
Joined: Sun Jan 27, 2019 12:01 am
Location: South Korea
Has liked: 747 times
Been liked: 593 times

Re: Chieftain kit arrival

Post by Youngjae Bae »

Vince Cutajar wrote:
Sat Jun 20, 2020 3:08 pm
Youngjae, is this how you connected the modules?

MPU9250 with MEGA_bb.jpg

Vince
Vince, your detail and concentration are so touching.
I corrected some typos and annotated them.
I added the function to fix the turret and main gun by adding the switch channel number 52.
By adding this function, the main gun and turret can be safely secured even when the transmitter is turned off by mistake.

Youngjae

User avatar
Youngjae Bae
Posts: 274
Joined: Sun Jan 27, 2019 12:01 am
Location: South Korea
Has liked: 747 times
Been liked: 593 times

Re: Chieftain kit arrival

Post by Youngjae Bae »

/* 2020-06-19
* This source code was written by Youngjae Bae to reduce unnecessary elements and stabilize
* the main gun and turret of the big-scale model tank by referring to the code of
* Kris Winer and the condition statement of Vince Cutajar.
*
* Based on the Arduino Mega, the power of the transmitter must be turned on by dust and
* supplied by the receiver and Arduino, and when switched off,
* the power of the transmitter must be shut off at the end.
*
* The transmitters and receivers for RC use spectrum DX6 and AR610.
* The motor driver used the SZDLT or L298N two-channel driver.
*/


///////////////////////////////////////////////////////////////////////////////////////

// Main Control Parameters - The sensitivity or intensity of the test is adjusted here.
#define PitchPower 254 // (PWM) Defines the power of the motor for pitch and yaw control.
#define YawPower 254 // (PWM) The maximum value is 255 or mid-range and is determined according to your taste.
#define PitchAngle 3 // (degree) A dead band of 1 degree is created so that
#define YawAngle 3 // (degree) the dc motor will not hunt when reaching desired pitch
#define CheckTime 120 // (milliseconds) The shorter the time to check the displacement, the more vibration it can reflect.
#define deadzone 50 //(PWM) Anything between -50 and 50 is stop
#define ConstrainLimit 254 //(PWM) Constrain limits, Maximum of the strength of the motor rotation, usually 255
///////////////////////////////////////////////////////////////////////////////////////


// File call to use MPU9250 and quadrant formula
#include "MPU9250.h" // Make sure to upload the first head-up file of Kris Winer..
#include "quaternionFilters.h" // There are many head-up files of the same name, and if this is misselected, it is impossible to compile.

// MPU9250 setup
#define SCL 700000 // Pre-defined serial clock rate
#define SDA Wire // Use the built-in Wire Library for I2C communication
#define MPU9250_ADDRESS 0x68 // Address for using MPU9250 as 5V

MPU9250 IMU(MPU9250_ADDRESS, SDA, SCL); // Using MPU9250 named internal classes as IMU functions

// Transmitter connections
#define THRO_PIN 22 // THRO PIN IN AR610 CONNECTED TO Aduino Mega No.22
#define RUDD_PIN 23 // Can be replaced with your preferred pins
#define AUX1_PIN 52 // A switch that holds the main gun and turret

// Motor driver pins
#define A1_PIN 3 // Connect to each pin of the Arduino and SZDLT or L298N two-channel driver.
#define A2_PIN 4 // Can be replaced with your preferred pins
#define PA_PIN 2
#define B1_PIN 5
#define B2_PIN 6
#define PB_PIN 7

// Declaration of Variables for Stabilization
float OldPitch, NewPitch, DiffPitch; // real-type variable associated with pitch
float OldYaw, NewYaw, DiffYaw; // real-type variable associated with yaw
int THRO, RUDD, AUX1 = 0; // Declares the rudder and throttle channels as integer variables and defines zero

// Set to true to get Serial output for debugging
#define SerialDebug true

void setup() {

// Define a Pin Using Arduino
pinMode(THRO_PIN, INPUT); //Determine the input or output of the pins used by Arduino
pinMode(RUDD_PIN, INPUT);
pinMode(AUX1_PIN, INPUT);
pinMode(A1_PIN, OUTPUT);
pinMode(A2_PIN, OUTPUT);
pinMode(PA_PIN, OUTPUT);
pinMode(B1_PIN, OUTPUT);
pinMode(B2_PIN, OUTPUT);
pinMode(PB_PIN, OUTPUT);

// Settings for MPU9250 sensor Usage
IMU.initAK8963(IMU.factoryMagCalibration); // Initialize compass
IMU.initMPU9250(); // Initialize acceleration, gyro, etc.
IMU.getAres(); // Define Acceleration Usage Functions
IMU.getGres(); // Definition of gyro function
IMU.getMres(); // Magnetism Usage Definitions

Serial.begin(115200); // Specify serial communication calls and baud rates

}

void loop() {

IMU.readAccelData(IMU.accelCount); // Read the x/y/z adc values
IMU.ax = (float)IMU.accelCount[0] * IMU.aRes; // - IMU.accelBias[0];
IMU.ay = (float)IMU.accelCount[1] * IMU.aRes; // - IMU.accelBias[1];
IMU.az = (float)IMU.accelCount[2] * IMU.aRes; // - IMU.accelBias[2];

IMU.readGyroData(IMU.gyroCount); // Read the x/y/z adc values
IMU.gx = (float)IMU.gyroCount[0] * IMU.gRes;
IMU.gy = (float)IMU.gyroCount[1] * IMU.gRes;
IMU.gz = (float)IMU.gyroCount[2] * IMU.gRes;

IMU.readMagData(IMU.magCount); // Read the x/y/z adc values
IMU.mx = (float)IMU.magCount[0] * IMU.mRes * IMU.factoryMagCalibration[0] - IMU.magBias[0];
IMU.my = (float)IMU.magCount[1] * IMU.mRes * IMU.factoryMagCalibration[1] - IMU.magBias[1];
IMU.mz = (float)IMU.magCount[2] * IMU.mRes * IMU.factoryMagCalibration[2] - IMU.magBias[2];

IMU.updateTime();// Must be called before updating quaternions!

// conversion to quaternions
MahonyQuaternionUpdate(IMU.ax, IMU.ay, IMU.az, IMU.gx * DEG_TO_RAD, IMU.gy * DEG_TO_RAD, IMU.gz * DEG_TO_RAD, IMU.my, IMU.mx, IMU.mz, IMU.deltat);

IMU.delt_t = millis() - IMU.count;

if (IMU.delt_t > CheckTime)
{

IMU.yaw = atan2(2.0f * (*(getQ()+1) * *(getQ()+2) + *getQ()* *(getQ()+3)), *getQ() * *getQ() + *(getQ()+1)* *(getQ()+1) - *(getQ()+2) * *(getQ()+2) - *(getQ()+3)* *(getQ()+3));
IMU.pitch = -asin(2.0f * (*(getQ()+1) * *(getQ()+3) - *getQ()* *(getQ()+2)));
IMU.pitch *= RAD_TO_DEG;
IMU.yaw *= RAD_TO_DEG;

// Read pulse width from receiver
THRO = pulseIn(THRO_PIN, HIGH);
RUDD = pulseIn(RUDD_PIN, HIGH);
AUX1 = pulseIn(AUX1_PIN, HIGH);

// Convert to PWM value (-ConstrainLimit to ConstrainLimit)
THRO = pulseToPWM(THRO);
RUDD = pulseToPWM(RUDD);
AUX1 = pulseToPWM(AUX1);

if(SerialDebug) {

Serial.print(THRO);
Serial.print(" ");
Serial.print(RUDD);
Serial.println("This value is a GUN position.");
Serial.println();
Serial.print(RUDD);
Serial.print(" ");
Serial.print(RUDD);
Serial.println("This value is a TURRET position.");
Serial.println();

}

if (AUX1 == 0) { // The ability to hold the main gun and turret forcibly
digitalWrite(A1_PIN, LOW); // if the transmitter signal is missing or required.
digitalWrite(A2_PIN, LOW);
digitalWrite(B1_PIN, LOW);
digitalWrite(B2_PIN, LOW);

} else {

if( THRO != 0 || RUDD != 0 ) {

// THRO and RUDD Drive motor move
drive(THRO, RUDD);

} else {

//pitch stabilization
NewPitch = IMU.pitch;
DiffPitch = NewPitch - OldPitch;

if (DiffPitch > PitchAngle) {

do {

digitalWrite(A1_PIN, LOW);
digitalWrite(A2_PIN, HIGH);
analogWrite(PA_PIN, PitchPower);
}

while (DiffPitch < PitchAngle);

} else if (DiffPitch < -PitchAngle) {

do {

digitalWrite(A1_PIN, HIGH);
digitalWrite(A2_PIN, LOW);
analogWrite(PA_PIN, PitchPower);

}

while (DiffPitch > -PitchAngle);

}else {

digitalWrite(A1_PIN, LOW);
digitalWrite(A2_PIN, LOW);

}

if(SerialDebug) {

Serial.print(DiffPitch);
Serial.print(" ");
Serial.print(DiffPitch);
Serial.println("This is Pitch difference..");
Serial.println();

}

OldPitch = NewPitch;

//Yaw stabilization
NewYaw = IMU.yaw;
DiffYaw = NewYaw - OldYaw;

if (DiffYaw > YawAngle) {

do {

digitalWrite(B1_PIN, HIGH);
digitalWrite(B2_PIN, LOW);
analogWrite(PB_PIN, YawPower);
}

while (DiffYaw < YawAngle);

} else if (DiffYaw < -YawAngle) {

do {

digitalWrite(B1_PIN, LOW);
digitalWrite(B2_PIN, HIGH);
analogWrite(PB_PIN, YawPower);

}

while (DiffYaw > -YawAngle);

}else {

digitalWrite(B1_PIN, LOW);
digitalWrite(B2_PIN, LOW);

}

if(SerialDebug) {

Serial.print(DiffYaw);
Serial.print(" ");
Serial.print(DiffYaw);
Serial.println("This is Yaw difference.");
Serial.println();

}

OldYaw = NewYaw;

}
}

IMU.count = millis();
IMU.sumCount = 0;
IMU.sum = 0;

}
}

// Positive for forward, negative for reverse
void drive(int THRO, int RUDD) {

// Limit speed between -ConstrainLimit and ConstrainLimit
THRO = constrain(THRO, -ConstrainLimit, ConstrainLimit);
RUDD = constrain(RUDD, -ConstrainLimit, ConstrainLimit);

// Set direction for motor A
if ( THRO == 0 ) {

digitalWrite(A1_PIN, LOW);
digitalWrite(A2_PIN, LOW);

}

else if ( THRO > 0 ) {

digitalWrite(A1_PIN, HIGH);
digitalWrite(A2_PIN, LOW);

} else {
digitalWrite(A1_PIN, LOW);
digitalWrite(A2_PIN, HIGH);
}

// Set direction for motor B
if ( RUDD == 0 ) {

digitalWrite(B1_PIN, LOW);
digitalWrite(B2_PIN, LOW);

} else if ( RUDD > 0 ) {

digitalWrite(B1_PIN, HIGH);
digitalWrite(B2_PIN, LOW);

} else {

digitalWrite(B1_PIN, LOW);
digitalWrite(B2_PIN, HIGH);

}

// Set speed
analogWrite(PA_PIN, abs(THRO));
analogWrite(PB_PIN, abs(RUDD));

}

// Convert RC pulse value to motor PWM value
int pulseToPWM(int pulse) {

// If we're receiving numbers, convert them to motor PWM
if ( pulse > 900 ) {

pulse = constrain(map(pulse, 1058, 1877, -2*ConstrainLimit, 2*ConstrainLimit), -ConstrainLimit, ConstrainLimit);

} else {

pulse = 0;

}

// Anything in deadzone should stop the motor
if ( abs(pulse - 0) <= deadzone ) {

pulse = 0;

}

return pulse;

}
Last edited by Youngjae Bae on Wed Jun 24, 2020 2:36 am, edited 3 times in total.

User avatar
Youngjae Bae
Posts: 274
Joined: Sun Jan 27, 2019 12:01 am
Location: South Korea
Has liked: 747 times
Been liked: 593 times

Re: Chieftain kit arrival

Post by Youngjae Bae »

/* 2020-06-21
* This source code was written by Youngjae Bae to reduce unnecessary elements and stabilize
* the main gun and turret of the big-scale model tank by referring to the code of
* Kris Winer and the condition statement of Vince Cutajar.
*
* Based on the Arduino Mega, the power of the transmitter must be turned on by dust and
* supplied by the receiver and Arduino, and when switched off,
* the power of the transmitter must be shut off at the end.
*
* The transmitters and receivers for RC use spectrum DX6 and AR610.
* The motor driver used the SABERTOOTH(MOTION CONTROLLER B) driver.
* Turn on 2, 3 and 5 deep switches and turn off 1, 4 and 6.
*/


///////////////////////////////////////////////////////////////////////////////////////

// Main Control Parameters - The sensitivity or intensity of the test is adjusted here.
#define ServoPower 200 // (PULSE)) Defines the power of the motor for pitch and yaw control.
#define PitchAngle 1 // (degree) A dead band of 1 degree is created so that
#define YawAngle 1 // (degree) the dc motor will not hunt when reaching desired pitch
#define CheckTime 1 // (milliseconds) The shorter the time to check the displacement, the more vibration it can reflect.
#define deadzone 150 //(PULSE) Anything between -150 and 150 is stop

///////////////////////////////////////////////////////////////////////////////////////

// File call to use MPU9250 and quadrant formula
#include "MPU9250.h" // Make sure to upload the first head-up file of Kris Winer.
#include "quaternionFilters.h" // There are many head-up files of the same name, and if this is misselected, it is impossible to compile.

// Servo Library for Using SABERTOOH
#include <Servo.h> // Use motion controller B using angle mode

// MPU9250 setup
#define SCL 700000 // Pre-defined serial clock rate
#define SDA Wire // Use the built-in Wire Library for I2C communication
#define MPU9250_ADDRESS 0x68 // Address for using MPU9250 as 5V

MPU9250 IMU(MPU9250_ADDRESS, SDA, SCL); // Using MPU9250 named internal classes as IMU functions

// Transmitter connections
#define THRO_PIN 22 // THRO PIN IN AR610 CONNECTED TO Aduino Mega No.22
#define RUDD_PIN 23 // Can be replaced with your preferred pins
#define AUX1_PIN 52 // A switch that holds the main gun and turret

// Motor driver pins
#define S1_PIN 3 // Connect to each pin of the Arduino and SZDLT or L298N two-channel driver.
#define S2_PIN 2 // Can be replaced with your preferred pins,

// Servo library channel declaration
Servo STS1; // I'll name the Sabertooth servo channel objects STS1 and STS2.
Servo STS2; // Connections to make: Dip switch on are 2, 3, 5 The rest are off.
// Arduino Pin 2 -> Sabertooth S1
// Arduino Pin 3 -> Sabertooth S2
// Arduino GND -> Sabertooth 0V
// Arduino VIN -> Sabertooth 5V(OPTION)

// Declaration of Variables for Stabilization
float OldPitch, NewPitch, DiffPitch; // real-type variable associated with pitch
float OldYaw, NewYaw, DiffYaw; // real-type variable associated with yaw
int THRO, RUDD, AUX1 = 0; // Declares the rudder and throttle channels as integer variables and defines zero

// Set to true to get Serial output for debugging
#define SerialDebug true

void setup() {

// Define a Pin Using Arduino
pinMode(THRO_PIN, INPUT); //Determine the input or output of the pins used by Arduino
pinMode(RUDD_PIN, INPUT);
pinMode(AUX1_PIN, INPUT);
pinMode(S1_PIN, OUTPUT);
pinMode(S2_PIN, OUTPUT);

// Attach pulse width value to servo channel
STS1.attach(S1_PIN, 1000, 2000); // Sabertooth accepts servo pulses from 1000us to 2000us.
STS2.attach(S2_PIN, 1000, 2000); //

// Settings for MPU9250 sensor Usage
IMU.initAK8963(IMU.factoryMagCalibration); // Initialize compass
IMU.initMPU9250(); // Initialize acceleration, gyro, etc.
IMU.getAres(); // Define Acceleration Usage Functions
IMU.getGres(); // Definition of gyro function
IMU.getMres(); // Magnetism Usage Definitions

Serial.begin(115200); // Specify serial communication calls and baud rates

}

void loop() {

IMU.readAccelData(IMU.accelCount); // Read the x/y/z adc values
IMU.ax = (float)IMU.accelCount[0] * IMU.aRes; // - IMU.accelBias[0];
IMU.ay = (float)IMU.accelCount[1] * IMU.aRes; // - IMU.accelBias[1];
IMU.az = (float)IMU.accelCount[2] * IMU.aRes; // - IMU.accelBias[2];

IMU.readGyroData(IMU.gyroCount); // Read the x/y/z adc values
IMU.gx = (float)IMU.gyroCount[0] * IMU.gRes;
IMU.gy = (float)IMU.gyroCount[1] * IMU.gRes;
IMU.gz = (float)IMU.gyroCount[2] * IMU.gRes;

IMU.readMagData(IMU.magCount); // Read the x/y/z adc values
IMU.mx = (float)IMU.magCount[0] * IMU.mRes * IMU.factoryMagCalibration[0] - IMU.magBias[0];
IMU.my = (float)IMU.magCount[1] * IMU.mRes * IMU.factoryMagCalibration[1] - IMU.magBias[1];
IMU.mz = (float)IMU.magCount[2] * IMU.mRes * IMU.factoryMagCalibration[2] - IMU.magBias[2];

IMU.updateTime();// Must be called before updating quaternions!

// conversion to quaternions
MahonyQuaternionUpdate(IMU.ax, IMU.ay, IMU.az, IMU.gx * DEG_TO_RAD, IMU.gy * DEG_TO_RAD, IMU.gz * DEG_TO_RAD, IMU.my, IMU.mx, IMU.mz, IMU.deltat);

IMU.delt_t = millis() - IMU.count;

if (IMU.delt_t > CheckTime)
{

IMU.yaw = atan2(2.0f * (*(getQ()+1) * *(getQ()+2) + *getQ()* *(getQ()+3)), *getQ() * *getQ() + *(getQ()+1)* *(getQ()+1) - *(getQ()+2) * *(getQ()+2) - *(getQ()+3)* *(getQ()+3));
IMU.pitch = -asin(2.0f * (*(getQ()+1) * *(getQ()+3) - *getQ()* *(getQ()+2)));
IMU.pitch *= RAD_TO_DEG;
IMU.yaw *= RAD_TO_DEG;

// Read pulse width from receiver
THRO = pulseIn(THRO_PIN, HIGH);
RUDD = pulseIn(RUDD_PIN, HIGH);
AUX1 = pulseIn(AUX1_PIN, HIGH);

//Convert pulse to pulse (1000 to 2000)
THRO = pulseTopulse(THRO);
RUDD = pulseTopulse(RUDD);
AUX1 = pulseTopulse(AUX1);

if(SerialDebug) {

Serial.print(THRO);
Serial.print(" ");
Serial.print(RUDD);
Serial.println("This value is a GUN position.");
Serial.println();
Serial.print(RUDD);
Serial.print(" ");
Serial.print(RUDD);
Serial.println("This value is a TURRET position.");
Serial.println();

}

if (AUX1 == 0) { // The ability to hold the main gun and turret forcibly
STS1.writeMicroseconds(1500);
STS2.writeMicroseconds(1500);

} else {

if( THRO != 1500 || RUDD != 1500 ) {

// THRO and RUDD Drive motor move
STS1.writeMicroseconds(THRO);
STS2.writeMicroseconds(RUDD);

} else {

//pitch stabilization
NewPitch = IMU.pitch;
DiffPitch = NewPitch - OldPitch;

if (DiffPitch > PitchAngle) {

do {

STS1.writeMicroseconds(1500 + ServoPower);

}

while (DiffPitch < PitchAngle);

} else if (DiffPitch < -PitchAngle) {

do {

STS1.writeMicroseconds(1500 - ServoPower);

}

while (DiffPitch > -PitchAngle);

}else {

STS1.writeMicroseconds(1500);

}

if(SerialDebug) {

Serial.print(DiffPitch);
Serial.print(" ");
Serial.print(DiffPitch);
Serial.println("This is Pitch difference..");
Serial.println();

}

OldPitch = NewPitch;

//Yaw stabilization
NewYaw = IMU.yaw;
DiffYaw = NewYaw - OldYaw;

if (DiffYaw > YawAngle) {

do {

STS2.writeMicroseconds(1500 + ServoPower);
}

while (DiffYaw < YawAngle);

} else if (DiffYaw < -YawAngle) {

do {

STS2.writeMicroseconds(1500 - ServoPower);

}

while (DiffYaw > -YawAngle);

}else {

STS2.writeMicroseconds(1500);

}

if(SerialDebug) {

Serial.print(DiffYaw);
Serial.print(" ");
Serial.print(DiffYaw);
Serial.println("This is Yaw difference.");
Serial.println();

}

OldYaw = NewYaw;

}
}

IMU.count = millis();
IMU.sumCount = 0;
IMU.sum = 0;

}
}

// Convert RC pulse value to servo pulse value
int pulseTopulse(int pulse) {

// If I'm receiving numbers, convert them to servo pulse
if ( pulse > 900 ) {

pulse = constrain(map(pulse, 1058, 1877, 1000, 2000), 1000, 2000);

} else {

pulse = 1500;

}

// Anything in deadzone should stop the motor
if (abs(pulse - 1500) <= deadzone ) {

pulse = 1500;

}

return pulse;

}


=====================================================================================================

I also share the code for SABERTOOTH as above.
However, SABRTTOOTH has its own signal processing function, and amplification occurs between MPU9250 signals.
I couldn't solve this problem.
However, the two-channel motor driver, which does not have its own computation function, has been directly confirmed that there is no such negative problem because Arduino controls the direction and size.
So I will use this passive motor controller.
I reinforced L298N's insufficient power with SZDLT 2 channel 500W motor controller, which costs about 25USD.

Youngjae
Attachments
KakaoTalk_20200621_093823852.jpg
Last edited by Youngjae Bae on Wed Jun 24, 2020 2:37 am, edited 2 times in total.

Vince Cutajar
Posts: 2172
Joined: Wed Nov 15, 2017 1:43 pm
Location: Malta
Has liked: 758 times
Been liked: 1732 times

Re: Chieftain kit arrival

Post by Vince Cutajar »

Even though I don't have a Chieftain I am still following your progress in turret and barrel stabilization with great interest. I think it is a good idea to replace the L298N with SZDLT 2 channel 500W motor controller.

Do you have an internet link with more information about this new motor controller?

Vince

User avatar
Youngjae Bae
Posts: 274
Joined: Sun Jan 27, 2019 12:01 am
Location: South Korea
Has liked: 747 times
Been liked: 593 times

Re: Chieftain kit arrival

Post by Youngjae Bae »

Vince Cutajar wrote:
Sun Jun 21, 2020 4:42 am
Even though I don't have a Chieftain I am still following your progress in turret and barrel stabilization with great interest. I think it is a good idea to replace the L298N with SZDLT 2 channel 500W motor controller.

Do you have an internet link with more information about this new motor controller?

Vince
https://a.aliexpress.com/_d6we6GK

As usual, I bought it from Alli Express.
Please refer to it.
Aluminium heat shield must be purchased separately.

Stabilization will be available for all tanks as well as for Chieftain.
I will apply it to my kingtiger, too.
I will make a turret with wood and make a main gun and test the motion next week and apply it to the my Chieftain when the direction of all the movements is perfect.

Youngjae

User avatar
Youngjae Bae
Posts: 274
Joined: Sun Jan 27, 2019 12:01 am
Location: South Korea
Has liked: 747 times
Been liked: 593 times

Re: Chieftain kit arrival

Post by Youngjae Bae »

Today, I made a wooden cannon to test the movement.
After work, I will test the range and speed of the transmitter by installing MPU9250 sensor and actuator on this cannon.
After everything has been verified, I am planning to install it directly in my Chieftain.

Youngjae
Attachments
KakaoTalk_20200622_100116643_02.jpg
KakaoTalk_20200622_100116643_01.jpg
KakaoTalk_20200622_100116643.jpg

User avatar
Youngjae Bae
Posts: 274
Joined: Sun Jan 27, 2019 12:01 am
Location: South Korea
Has liked: 747 times
Been liked: 593 times

Re: Chieftain kit arrival

Post by Youngjae Bae »



Today I started making a simple model cannon test bed to test the main gun stabilizer.
I installed the sensor and started to find the best conditions for all variables.
These tests will be repeated several times and the most meaningful values will be derived as constants.
I found it very difficult to understand the state of the sensor because it is more sensitive than I thought.
I will be patient and get the best results.

Youngjae
Attachments
5.jpg
4.jpg
3.jpg
2.jpg
1.jpg
Last edited by Youngjae Bae on Mon Jun 22, 2020 2:01 pm, edited 1 time in total.

User avatar
Adrian Harris
Posts: 5035
Joined: Thu Jul 12, 2007 10:46 pm
Location: Berkshire (UK)
Has liked: 1341 times
Been liked: 1538 times

Re: Chieftain kit arrival

Post by Adrian Harris »

I love the test rig :-)

It looks to me as though the actuator operates much faster when controlled by the receiver than by the Arduino. Do you think that is the case ?

I don't think Google understood what you said here: "I found that sensors are more sensitive than raw giggles" ;-)

Adrian.
Contact me at sales@armortekaddict.uk for details of my smoker fan control module

User avatar
John Clarke
Posts: 1615
Joined: Sun Oct 17, 2010 10:06 pm
Location: Staffordshire
Been liked: 1709 times

Re: Chieftain kit arrival

Post by John Clarke »

Hi Youngjae, I do find you post really entertaining, instructive and sometimes "whoosh" right over my head.

I know that you wish to crack the stabilization thing, but have you had a look at this , "GSU 2 Axis Gun Stabilize Unit - 35 RC Tank".

Or the recently seen "K12 - 35 RC Tank"- RC Conversion Kit for TAMIYA 1/35 Challenger 2, with MTC-2, ACU and GSU"

Could they be adapted? It has 2 axis control and deck sensing to raise gun all in one package.

I may look into them myself, I had thought I'll probably be using a simple "Sub leveler" on the single Y axis, it would give a crude form of stabilization, gun forward only though.
Last edited by John Clarke on Mon Jun 22, 2020 2:12 pm, edited 1 time in total.
Oh Man, I only ride em I don't know what makes them work,
Definatley an Anti-Social type

Post Reply