Always amazed at how fast the turret and barrel moved.
Vince
They didn’t (move that fast).
Re: Chieftain kit arrival
Posted: Tue Jun 09, 2020 4:52 pm
by Vince Cutajar
I guess so. Still it is fun to see it moving at that rate.
Vince
Re: Chieftain kit arrival
Posted: Tue Jun 09, 2020 6:26 pm
by Brian Ostlind
You are lucky to be able to drive around town. If I took to the streets with my tank I would probably get killed by police.
Re: Chieftain kit arrival
Posted: Wed Jun 10, 2020 12:19 am
by John Clarke
Vince, you have to picture what the tank turret crew would be going though.
11.JPG (33.66 KiB) Viewed 4790 times
Re: Chieftain kit arrival
Posted: Wed Jun 10, 2020 1:56 pm
by Youngjae Bae
In the middle of the night when the rainy season began, my Chieftain returned to Korea after fulfilling his duty to protect the safety of the tribe.
Youngjae
Re: Chieftain kit arrival
Posted: Wed Jun 10, 2020 2:09 pm
by Vince Cutajar
fulfilling his duty to protect the safety of the tribe
Vince
Re: Chieftain kit arrival
Posted: Thu Jun 11, 2020 9:18 am
by Youngjae Bae
I have to thank Vince again today.
I work at a research institute that makes model ships and conducts experiments.
So I did not have it in my house, but there is a 3D printer here, so I asked the company for understanding and printed the file that Vince sent me.
And what's even more pleasant is that I succeeded in the withdrawal of the figures by compiling the Arduino sketch that Vince sent me the other day perfectly on the Arduino Mega and MPU9250.
(For your information, many of the mpu9250 head-up files on the market have caused errors )
I can use this value to control the DC motor for stabilization of the pitch and turret of the main gun to sabertooth, the motion controller B.
It's very fun to make one by one. And Vince, thank you.
Youngjae
Re: Chieftain kit arrival
Posted: Thu Jun 11, 2020 10:03 am
by Vince Cutajar
You are welcome Youngjae. Happy to help out.
Vince
Re: Chieftain kit arrival
Posted: Fri Jun 12, 2020 3:35 am
by Youngjae Bae
This morning I finally completed a program to control the main gun and turret stabilizers.
So I successfully finished coding and uploading Arduino Mega.
Of course, I have to test it over the weekend, but l'm happy with this moment when l've spent a lot of time trying to get results.
Let's wait and see what happens.
Youngjae
Re: Chieftain kit arrival
Posted: Tue Jun 16, 2020 12:18 am
by Youngjae Bae
During the weekend, I did some tests.
The configuration of RC + ARDUINO + SABERTOOTH + MPU9250 is the final configuration of the hardware.
1. RC + ARDUINO + SABERTOOTH = Program upload and run very well.
2. ARDUINO + MPU9250 = Program upload and run very well.
3. RC + ARDUINO + SABERTOOTH + MPU9250 = Program uploads are good. However, the desired stabilization has not yet been achieved.
3-1. First of all, if I do not construct a Stabilization command in the void loop statement, it will function normally when the sensor is measured and the RC signal is processed.
3-2. When the Stabilization command phrase is created to fit SABERTOOTH in the above 3-1 state, no operation is performed and the motor will float at 0.5 second intervals when the MPU9250 returns a measurement.
To solve these 3-2 problems
3-2-1.I used MPU9250's measurement and stabilization as the main tasks of void loop syntax, and when I sent two RC signals to Arduino that changed the position of turret or Gun, I coded on interrupt condition.
Although coding and uploading were well done, MPU9250 did not operate due to continuous floating of RC signals that occurred without the operation of the transmitter, so I gave up this process.
3-2-2. SABERTOOTH's method uses a single pin to handle the direction and intensity of the motor rotation.
As the floatig of the motor that sprays when the stabilization command is added is due to the direction of the continuous pulse change and the PWM change, I ordered a three-pin motor controller that Vince uses.
In other words, I decided to accept the manufacturer's explanation that the direction of the output operation of the two digital pins and the way the output of the motor is controlled by one PWM is not affected by unnecessary noise.
3-2-3. Debugging to find out why the instructions I processed to execute on the source file I received from Vince before the motor controller arrived. One discovery I made yesterday was that if I insert a stabilization phrase at the bottom of the void loop sentence, it will not work in the process.
So today I'm going to continue to look at the scope and the reasons why it's being executed and ignored from where it's being ignored.
I am not a C language or program expert.
It's been a little over two months since I started studying Arduino.
But I'm praising myself for not coming to this situation from turning the LED on and off.
The configuration of the hardware for stabilization of the main gun and turret is complete.
Later, by reducing the end-poins of the channel that controls the transmitter's turret and Gun, the manoeuvring speed can be slow.
However, I believe that Arduino's control of the speed and force for stabilization will be fast and sufficient.
I won't give up even if the final result for stabilization can be a little slow.
I did various tests last night with the same motor drive that Vince has.
I found that there was a problem when I wrote a phrase that used both the transmitter command (manual adjustment of GUN & TURRET) and stabilization in the void loop syntax.
In other words, I found out that the motor floats when I included a condition statement for stabilization after the motor operation statement that I normally use.
So whether the motor drier is L298N or SABRTOOTH, it's not a hardware issue, it's a program sketch.
Because the pattern of floating sent by the motor is constant every 0.5 seconds, I think it can be solved.
In addition, in the program sketch that Vince provided me, when the first condition of the "if(!AHRS)" condition statement, "if(myIMU.delt_t > 500)" was true, the Euler formula and the stevilizer conditions were required to know the desired action.
Stabilization is now well done by annotating the syntax for manually operating the motor by receiving the transmitter signal.
From now on, when I send a signal from the transmitter, I'm going to carry out my command first, and I'm thinking about sketching a program in which the Stevilizer works when my transmitter command is idling.
Thank you again Vince for supporting various information.
Youngjae
Re: Chieftain kit arrival
Posted: Wed Jun 17, 2020 11:47 pm
by Youngjae Bae
The YouTube link below is a video showing small progress up to yesterday.
The output of the actuator is being tested at 47%, and calibration of the response speed will continue.
For easy adjustment, the sentences in this part are treated as variables.
Today, I will use two types of condition statements and timer interrupts to separate radio control and stabilization.
When the results are obtained later, the program source code will also be prepared to operate by replacing the motor controller with SABRTOOTH (motion controller B).
Finally, I am going to create an integrated control package that includes driving and sound by reading all six or more of my receiver panels from Arduino.
Youngjae
Re: Chieftain kit arrival
Posted: Fri Jun 19, 2020 12:50 am
by Youngjae Bae
Good news!
I finally got the perfect move I wanted.
From now on, the response to the controller's stick is handled perfectly without delay, with variables that can promote the sensitivity of stabilization.
Youngjae
Re: Chieftain kit arrival
Posted: Fri Jun 19, 2020 8:31 am
by Youngjae Bae
/* 2020-06-19
* This source code was written by Bae Young-jae 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.
*
* 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.
*/
// Main Control Parameters
#define PitchPower 120
#define YawPower 127
#define PitchAngle 1 //A dead band of 1 degree is created so that
#define YawAngle 1 //the dc motor will not hunt when reaching desired pitch
#define CheckTime 10 //milliseconds
#define deadzone 50 // Anything between -50 and 50 is stop
// Convert to PWM value (-255 to 255)
THRO = pulseToPWM(THRO);
RUDD = pulseToPWM(RUDD);
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( THRO != 0 || RUDD != 0 ) {
// THRO and RUDD Drive motor move
drive(THRO, RUDD);
// Anything in deadzone should stop the motor
if ( abs(pulse - 0) <= deadzone ) {
pulse = 0;
}
return pulse;
}
=========================================================================================================
The above code is a result of considerable effort.
I'm going to share it up to here first, so I hope everyone who thinks of stabilizing the main gun and turret can use it comfortably and improve it even more.
And I'm going to introduce a crash prevention system for main gun for this next phase of program development.
I am going to test the turret and main gun in a wooden model and attach it to my chieftin.