Advertisement

Panther-Tank-4.0
Instruction Manual
V.1.1
Get last update from
https://github.com/keywish/keywish-panther-tank
1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Panther-Tank-4.0 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Keywish Panther-Tank-4.0

  • Page 1 Panther-Tank-4.0 Instruction Manual V.1.1 Get last update from https://github.com/keywish/keywish-panther-tank...
  • Page 2 Revised Version Of History Date Version Description Author 2019/8/14 V.1.0 Create Carl.Du 2019/8/27 V1.1 Update the picture Abbott.Chen...
  • Page 3: Table Of Contents

    CONTENTS Chapter 1 PREFACE ............................5 Purpose ............................5 Product Introduction ........................5 Chapter 2 Preparation ............................6 2.1 On BLE UNO R3 Master Control Board and Extension Board ............6 2.1.1 BLE UNO R3 Master Control Board..................6 2.1.2 MotorDriverBoard Expansion board interface diagram ............7 2.2 Development environment Arduino IDE .....................
  • Page 4 4.4.2 Motor Test Procedure ......................44 4.5 Infrared Remote Control ........................46 4.5.1 Introduction ..........................46 4.5.2 Working Principle ........................47 4.5.3 Acquiring Infrared remote value ..................... 47 4.6 Ultrasonic obstacle avoidance......................49 4.6.1 Introduction to Ultrasound ...................... 49 4.6.2 Module parameter ........................49 4.6.3trasonic principle ........................
  • Page 5: Chapter 1 Preface

    Chapter 1 PREFACE 1.1 Purpose Our purpose is to offer a learning platform for DIY lovers, makers and beginners, help to get a better understanding of Arduino, and its expansion system design methods and principles, as well as the corresponding hardware debugging methods. Further deepen the understanding of the design and application of Arduino and its extended system.
  • Page 6: Chapter 2 Preparation

     Infrared remote control  Android App control Chapter 2 Preparation 2.1 On BLE UNO R3 Master Control Board and Extension Board 2.1.1 BLE UNO R3 Master Control Board In " Hummer-Bot ", we used the BLE-UNO R3 as the main control board, which has 14 digital input/output pins (6 of which can be used as PWM output), 6 analog inputs, and a 16 MHz ceramic resonator, 1 USB connection, 1 power socket, 1 ICSP head and 1 reset button.
  • Page 7: Motordriverboard Expansion Board Interface Diagram

     Output voltage: 5V DC output and 3.3V DC output and external power input  Microprocessor: ATmega328 (Chip data sheet is in the documentation)  Bootloader:Arduino Uno  Clock frequency: 16 MHz  Support USB interface protocol and power supply (without external power supply) ...
  • Page 8: Development Environment Arduino Ide

    2.2 Development environment Arduino IDE 2.2.1 Install the IDE AduinoIDE is an open source software and hardware tool written by open source software such as Java, Processing, and avr-gcc. It is an integrated development environment that runs on a computer. It can write and transfer programs to the board.
  • Page 9 anti-virus software during the installation process, otherwise it may affect the installation of the IDE. After the installation is complete, click "arduino.exe" again to enter the IDE programming interface. Figure 2-2-2 Arduino IDE Installation Package Figure 2-2-3 Extracted files When finish the installation of the IDE,connect to the Arduino motherboard,click“My Computer” “Properties”“Device Manager”...
  • Page 10: Install Driver

    that indicates the driver has been installed successfully,At this time we open the IDE, select the corresponding development board model and port in the toolbar to use normally. If you see Figure 2-2-5, it means that the computer does not recognize the development board and you need to install the driver yourself.
  • Page 11 1) Right-click on "My Computer" and open the Device Manager, find viewing the ports (COM and LPT). At this point you will see a "USB Serial Port", right-click "USB Serial Port" and select the "Update Driver Software" option. Figure 2-2-6 Updated Driver Interface 2)Next, select the "Browse my computer for driver software"...
  • Page 12 3)Driver path: " BLE-UNO _Driver \ ccxxxx_usb_cdc.inf" click "next", as shown in figure 2-2-8 Figure 2-2-8 Driver file selection interface 4)If you have already installed, the following figure will automatically inform you that the driver was successful.
  • Page 13 Figure 2-2-9 Driver Installation Successful Interface At this time, we return to the "Device Manager" interface, the computer has successfully identified Arduino, as shown in the below Figure 2-2-10 .then open the Arduino compilation environment, you can open the Arduino trip. Figure 2-2-10 Driver Success Recognition Interface...
  • Page 14: Ide Interface Introduction

    Notice In Win10 system, some Arduino are connected to the computer (non-genuine chips are difficult to identify), the system will automatically download the corresponding driver, so you can not install the driver yourself, but in the Win7 system, you have to do it yourself. In addition, we can see that the USB serial port is identified as COM15 in the above figure, but it may be different with different computer, you may be COM4, COM5, etc., but USB-SERIAL CH340, this must be the same.
  • Page 15 Figure 2-2-12 Arduino IDE Interface 2.There are 5 menus on the menu bar, but we mainly introduce File and Tools. Click File, the interface as shown in Figure 2-2-13 will be displayed, you can see the Examples and Preference options. The Examples are some of the Arduino's own programs, these are compiled without errors, the normal use of the program, a great help for beginners.
  • Page 16 Figure 2-2-14 Tools interface Figure 2-2-15 USB serial port selection So far, we have basically completed all the work. The next step is actual experiments. Open any program in Examples. First compile the program. If it is compiled correctly, it can be directly downloaded to the development board and the corresponding device of the connection number.
  • Page 17: Chapter 3 Installation

    Chapter 3 Installation 3.1 Tank Assembly Firstly, we open the box, take out all the components and put it on the table lightly. (Note: There are many devices, be careful when installing to prevent some devices from being lost) 3.1.1 Lower metal backplane copper column and battery installation Step 1: The installation of the copper plate under the metal bottom plate Figure 3-1-1 Schematic diagram of copper column installation on lower metal bottom plate Figure 3-1-2 Under metal floor copper column installation effect diagram...
  • Page 18 Step 2:Battery installation Note: Attach a piece of Velcro to the back of the battery and attach another to the top of the metal base plate. Figure 3-1-3 Battery box installation diagram Figure 3-1-4 Battery box installation effect diagram Step 3:Welding DC head Connect the power cable: Firstly, find the matching two power cables (the same as the wires used by the motor, one red and one black) and connect the two cables to the DC power head.
  • Page 19: Load-Bearing Wheels、Pedrail And Motor Installation

    Figure 3-1-6 Schematic diagram of wire welding 3.1.2 load-bearing wheels、pedrail and motor installation Step 1:Installation of load-bearing wheels Figure 3-1-7 load-bearing wheels installation checklist...
  • Page 20 Figure 3-1-8 Schematic diagram of load-bearing wheels installation Note: The load-bearing wheels must be reserved for 1mm from the inner nut. Figure 3-1-9 Effect diagram of load-bearing wheels installation Step 2: Install the motor Figure 3-1-10 Schematic diagram of motor installation...
  • Page 21 Figure 3-1-11 Effect diagram of motor installation Step 3: Install the coupling Figure 3-1-12 Schematic diagram of coupling installation Firstly, insert the motor into the circular hole of the coupling, make sure that the hole of the coupling just reaches the flat position of the motor shaft, and screw the black top wire into the hole of the coupling as shown in Figure 3-1-13 Note: Do not move the coupling when twisting the black set screw Figure 3-1-13...
  • Page 22 Figure 3-1-14 Effect diagram of coupling installation Step 4: Install the drive wheel Figure 3-1-15 Schematic diagram of drive wheel installation Figure 3-1-16 Effect diagram of drive wheel installation Step 5: Install the pedrail...
  • Page 23 Figure 3-1-17 Schematic diagram of the pedrail disassembly Note: Disassemble the proper size of the pedrai for installation Figure 3-1-18 Schematic diagram of the pedrail installation Figure 3-1-19 Effect diagram of the pedrail installation...
  • Page 24: Servo And Uno Board Installation

    3.1.3 Servo and UNO board installation Step1: Install UNO board Figure 3-1-20 Schematic diagram of UNO board installation Figure 3-1-21 Effect diagram of UNO board installation...
  • Page 25 Step 2:Install servo Figure 3-1-22 Schematic diagram of servo installation Figure 3-1-23 Effect diagram of servo installation...
  • Page 26 In order to reduce the angle adjustment of the rear steering gear, we need to download the following program ("Lesson\Module_Test\Servo_Test\Servo_Test.ino") to the control panel. The three wires of the servo are in turn the signal lines. (orange), power cord (red), ground (brown), then connect the servo signal cable (orange) to the I2C servo 1, and install the steering pad without first fixing the screws.
  • Page 27 #include<Arduino.h> #include<Wire.h> #include "Emakefun_MotorDriver.h" Emakefun_MotorDriver mMotorDriver = Emakefun_MotorDriver(); Emakefun_Servo *mServo1 = mMotorDriver.getServo(1); char inByte = 0; //Serial port to receive data angle = 0; //Angle value String temp "";//Temporary character variables, or use it for the cache void setup() Serial.begin(9600); mMotorDriver.begin(50);...
  • Page 28 Step 3: Install the ultrasonic bracket Figure 3-1-28 Schematic diagram of ultrasonic bracket installation Figure 3-1-29 First fix the rudder paddle and the ultrasonic bracket, as shown in Figure 3-1-30. Figure 3-1-30 Effect diagram of ultrasonic bracket installation Step 4: Ultrasonic module and uno expansion board installation...
  • Page 29: Upper Acrylic Floor Mounting

    Figure 3-1-31 Schematic diagram of ultrasonic module and uno expansion board installation Figure 3-1-32 Effect diagram of ultrasonic module and uno expansion board installation 3.1.4 Upper acrylic floor mounting Figure 3-1-33 Schematic diagram of upper acrylic baseboard installation...
  • Page 30 Figure 3-1-34 Effect diagram of upper acrylic baseboard installation Charging instructions: As shown in Figure 3-1-3, please turn the battery switch on after plugging in the charger. Figure 3-1-35 So far, the basic assembly of the tank has been completed. We believe you have some basic knowledge of your car’s structure, function and some modules through a short period of time, then you can achieve the corresponding functions only by downloading the program to the development board, each function has a corresponding program in CD, so please enjoy playing.
  • Page 31: Chapter 4 Experiment

    Wiring diagram: The front motor of the Tank is connected to M1, and the rear motor is connected to M2. IICServo 1. Chapter 4 Experiment 4.1 Servo 4.1.1 Servo Introduction The steering gear is also called servo motor. It was first used to realize its steering function on the ship. Because it can continuously control its rotation angle through the program, it is widely used to realize the steering and the various joint movements of the robot.
  • Page 32: Working Principle

    Figure 4-1-1 Schematic diagram of the steering gear 4.1.2 Working principle The control signal enters the signal modulation chip by the receiver channel, gets the DC bias voltage. The steering gear has a reference circuit which generates a reference signal with a period of 20ms and a width of 1.5ms.
  • Page 33: Steering Test Test

    Figure 4-1-5 Relationship between the Motor Output Angle and Input Pulse 4.1.3 steering test test The PS2X&Motor Driver Board driver board can drive the servo, the servo pin position on the driver board (red pin), with ground pin (GND), power pin (VCC) and signal pin (S), three The pins are respectively connected to the corresponding pins of the servo, and the servo can be controlled by I2C communication.
  • Page 34: Rgb Ws2812B Experiment

    Figure 4-1-6 Steering gear pin definition 4.2 RGB WS2812B Experiment 4.2.1 RGB WS2812B Description The WS2812B is 3 output channels special for LED driver circuit. Its internal includes intelligent digital port data latch and signal reshaping amplification drive circuit. Also includes a precision internal oscillator and a 12V voltage programmable constant current output drive.
  • Page 35: Ws281B Drive Principle

    received, the control signal of OUTR ,OUTG, OUTB port unchanged. IC sent PWM data that received justly to OUTR, OUTG, OUTB port, after receive a low voltage reset signal the time retain over 280μs. Pin function and Pin configuration as picture 4-2-1 Function description Symbol Power supply voltage...
  • Page 36: Rgb Ws281B Test Program

    Picture 4-2-2Waveform sequence diagram Composition of 24bit Data: Note: Data transmit in order of GRB, high bit data at first. 4.2.4 RGB WS281B Test Program Open the supporting information "Lesson\Module_Test\RGB_Test\RGB_Test.ino ", The first parameter sets the RGB sequence number, and the second parameter hexadecimal color code: rgbled.setColor(index, RGB_RED);...
  • Page 37: Buzzer Working Principle

    4.3.2 Buzzer working principle The passive buzzer generates music mainly through the I/O port of the single-chip microcomputer to output different pulse signals of different levels to control the buzzer pronunciation. For example,if Arduino use12MHzs crystal oscillator, to produce middle tune “Re” sound, it needs 587Hzs audio pulse frequency output .The audio signal pulse cycle is T=1/587=1703.5775us, half cycle time is 852us,the pulse timer needs always count at =852us/1us=852,when it count at 852,the I/O port will reverse the direction, then it get the “Re”...
  • Page 38 void setup() pinMode(9,OUTPUT); void loop() for(int = 200; <= 800; i++) // 200HZ ~ 800HZ tone(9,i); delay(1000); //Max Frequency hold 1s for(int i= 800; >= 200; i--) // 800HZ ~ 200HZ tone(9,i); delay(10); Firstly,we use a simple procedure to understand how to use the buzzer, and its sound principle. And to drive a buzzer like singing sound,we need make the buzzer issued frequency and duration of the different sound .
  • Page 39 Corresponding Musical notes Half cycle(us) frequency(Hz) 261.63 1911.13 277.18 1803.86 293.66 1702.62 311.13 1607.06 329.63 1516.86 349.23 1431.73 Bass 369.99 1351.37 392.00 1275.53 415.30 1203.94 440.00 1136.36 446.16 1120.66 493.88 1012.38 523.25 955.56 554.37 901.93 587.33 851.31 622.25 803.53 659.26 758.43 698.46 715.86...
  • Page 40 Picture 4-3-4 The score of Happy birthday song Here to understand a little knowledge of the score, look at the above score, the score below the score is a bit of bass, no point is normal, the number is a bit high, and the bass of 5 is 4.5, the treble is 5.5, other notes are also The corresponding reason.
  • Page 41 First, ordinary notes. Take 1 shot. Second, underlined notes indicate 0.5 beats; two underscores are quarter beats (0.25) Third, some notes are followed by a dot, which means that 0.5 more shots are added, that is, 1 + 0.5. Fourth, some notes are followed by a "-", which means that 1 more shot is added, that is, 1 + 1. So we can give each note a play like this, and the music becomes.
  • Page 42 #define La 440 #define Si 494 #define Do_h 523 #define Re_h 587 #define Mi_h 659 #define Fa_h 698 #define Sol_h 784 #define La_h 880 #define Si_h 988 #include "RGBLed.h" RGBLed rgbled_A3(RGB, 2); length; // happy birthday Music score scale[] = {Sol, Sol, La, Sol, Do_h, Si, Sol, Sol, La, Sol, Re_h, Do_h, Sol, Sol, Sol_h, Mi_h, Do_h, Si, La, Fa_h, Fa_h, Mi_h, Do_h, Re_h, Do_h...
  • Page 43: Motor Test Procedure

    4.4 Motor test procedure 4.4.1 Motor control principle The PS2X&Motor Driver Board uses the PCA9685 to output the PWM control motor driver chip TB6612FNG. We will now briefly introduce the two chips. The main parameters of PCA9685 are as follows: ...
  • Page 44: Motor Test Procedure

    control output terminals; STBY is normal working/standby state control pin; VM (4.5~15 V) and VCC ( 2.7 to 5.5 V) are the motor drive voltage input and the logic level input, respectively. In the Arduino, the analog voltage cannot be output, and only the digital voltage value of 0 or 5V can be output.
  • Page 45 In the supporting information, we provide a small motor test program (the file name is "Lesson\Module_Test\Motor_Test\Motor_Test.ino"), of course you can also write the program yourself, very simple, download the program After the Arduino, we can see the motor: one second forward -> one second back ->...
  • Page 46: Infrared Remote Control

    4.5 Infrared Remote Control 4.5.1 Introduction Infrared remote control is widely used in every field at present.Infrared wireless remote control consists of Mini ultra-thin infrared remote controller (physical map shown in the picture 4-5-1) and integrated 38KHz infrared receiver. Mini ultra-thin infrared remote controller has 17 function keys, and the launch distance is up to 8 meters.
  • Page 47: Working Principle

    Picture 4-5-2 Infrared receiver Head circuit diagram and physical map 4.5.2 Working Principle Remote control system is generally composed of remote control (transmitter), receiver, when you press any button on the remote control, the remote will produce the corresponding coded pulse, output a variety of infrared as the medium of control pulse signal, these pulses are computer instruction code, infrared monitoring diode monitoring to infrared signals, The signal is then sent to the amplifier and the limiter, which controls the pulse amplitude at a certain level, regardless of the distance between the IR transmitter...
  • Page 48 in Figure 4-5-1 is removed. Then open the "serial monitor" and use the remote control to align the receiving head and press any button to observe the value displayed in the "serial monitor" and record it for later development and use, as shown in Figure 4-5-4. #include "IRremote.h"...
  • Page 49: Ultrasonic Obstacle Avoidance

    Figure 4-5-5 Infrared remote control instructions 4.6 Ultrasonic obstacle avoidance 4.6.1 Introduction to Ultrasound In the "Panther-Tank" car, we use the HC-SR04 ultrasonic module to measure distance and obstacles. The module can provide 2cm-400cm non-contact distance sensing function, ranging accuracy up to 3mm; The temperature sensor corrects the ranging result and uses GPIO communication mode with a watchdog inside, which is stable and reliable.
  • Page 50: 3Trasonic Principle

     Fixed hole size 3*Φ3mm spacing: 10mm3.2.4.2 working principle 4.6.3trasonic principle The most commonly used method of ultrasonic distance measurement is echo detection method, the ultrasonic transmitter launches ultrasonic toward a direction and starting the time counter at the same time, the ultrasonic will reflect back immediately when encountering a blocking obstacle and stopping the counter immediately as soon as the reflected ultrasonic is received by the receiver.
  • Page 51 Figure 4-6-3 Principle of measuring the distance of ultrasonic waves The ultrasonic is mainly divided into two parts, one is the transmitting circuit and the other is the receiving circuit, as shown in Fig 4-6-4. The transmitting circuit is mainly composed of by the inverter 74LS04 and ultrasonic transducer T40, the first 40kHz square wave from the Arduino port is transmitted through the reverser to the one electrode on the ultrasonic transducer, the second wave is transmitted to another electrode on ultrasonic transducer, this will enhance the ultrasonic emission intensity.
  • Page 52: Experimental Procedure

    Figure 4-6-4 Schematic diagram of ultrasonic transmission and reception 4.6.4 Experimental procedure Figure 4-6-5 Ultrasonic wiring Test program: Program location:“Lesson\Module_Test\Ultrasonic_Test\Ultrasonic_Test.ino” 4.7 PS2 Wireless Control (optional) 4.7.1 Introduction to the kit The PS2 handle is the remote control handle of the Sony game console. Sony's series of game consoles are very popular all over the world.
  • Page 53 now very cost-effective. The buttons are rich and easy to expand to other applications, as shown in Figure 4-7-1 is the commonly used PS2 wireless controller. Figure 4-7-1 PS2 wireless controller PS2 handle is composed of two parts, the handle and receiver, the handle needs two section 7th 1.5V batteries, the receiver and arduino control board use the same power supply, the voltage is 3~5v, can not be reversed, can not exceed , overvoltage and reverse connection will cause the receiver to burn out.
  • Page 54: Experimental Steps

    Figure 4-7-2 Remote Receiver Module There are 9 interfaces on the the receiver, shown in the following table: DI/DAT DO/CMD CS/SEL Note: Different batches, the appearance of the receiver will be some different, but the pin definition is the same,so don’t worry about the use. Di/dat: Signal flow, from the handle to the host, this signal is a 8bit serial data, synchronous transmission in the clock down the edge.
  • Page 55: Software Design

    4-7-3 Installation of Receiving Head 2、open the "Lesson\Module_Test\PS2X_Test\PS2X_Test.ino" in the supporting courseware Finally, download the program to the development board of Arduino and open the PS2 remote control. If the receiving head is connected to the remote control (or the pairing is successful), the indicator light on the receiving head is long, and vice versa, the LED light flashes continuously.
  • Page 56 Figure 4-7-5 PS2 handle function button Logo UP: Advance Logo DOWN: Back Logo LEFT: Turn left Logo RIGHT: Turn right Logo A: Acceleration Logo B: Left spin Logo C: Deceleration Mark D: right spin Mark 3: Control the front of the robot arm to grab the servo and open. (manipulator arm is optional) Mark 4: Control the front of the robot arm to grab the servo and close.
  • Page 57: Cc2540 Bluetooth Module Test Experiment

    4.8 CC2540 Bluetooth Module Test Experiment 4.8.1 Introduction to Bluetooth Module Ble - UNO bluetooth 4.0 protocol is based on the perfect combination Arduino UNO by emakefun to create customer research and development of a revolutionary product, function and the pin is fully compatible with traditional Arduino UNO motherboard, scope of work frequency of 2.4 GHZ, modulation mode for the GFSK, maximum transmitted power of 0 db, the largest launch distance of 50 meters, USES the import original TI CC2540 chip design, support user through AT commands to modify view device...
  • Page 58: Bluetooth Module Test Experiment Steps

     Support master and slave switch  Support bluetooth automatic connection of slave in host mode  Supports sending over 20 byte  Support iBeacons  Interface: Mircor – Usb  Input voltage :Usb power supply,Vin6~12V,5V 4.8.3 Bluetooth module test experiment steps 1、Open the Arduino IDE, connect the serial port as shown in Figure 4-8-1, open the serial port monitor as shown in Figure 3-2-8-2 figure 4-8-1...
  • Page 59 figure 4-8-3 figure 4-8-4 3、Install BLE_TOOL.apk on the phone and open the test app. The interface is shown in Figure 4-8-5. Find the corresponding Bluetooth name (Ble-Nano) and click to connect. As shown in Figure 4-8-6, there will be 4 options for testing different functions, because here we only test whether Bluetooth can...
  • Page 60 Normally send and receive data, so we choose SK Service into Figure 4-8-6 in the selection of SK_KEYPRESSED as shown in Figure 4-8-7 Figure 4-8-5 Figure 4-8-6 Figure 4-8-7 Figure 4-8-8 4、We select "SK-KEYPRESSED", click on it as shown in Figure 4-8-9. We can see that there is a "write" button, click to enter the interface shown in Figure 4-8-10, in Figure 4-8-10, We click on the "red box"...
  • Page 61 Figure 4-8-9 Figure 4-8-10 5、After clicking Send, we can see that the content sent by the mobile phone is printed on the serial monitor, as shown in Figure 4-8-11, indicating that the Bluetooth module can send data normally. Of course, in order to test the accuracy, you can Test a few more times and try to test in different environments.
  • Page 62: Esp-M2 Wifi Module Test Experiment (Optional)

    Figure 4-8-13 4.9 ESP-M2 Wifi Module Test Experiment (Optional) 4.9.1 Introduction to Wifi Module Pather-Tank supports mobile phone APP Wifi remote control function uses the Wifi module is ESP-M2. ESP-8285 Wifi transparent transmission module is based on TCP/IP protocol standard, working frequency range is 2.4GHZ range, maximum transmission power is 20dBm, adopts imported original chip design, supports standard IEEE802.11 b/g/n protocol, complete TCP /IP protocol stack.
  • Page 63: Wifi Module Test Experiment Steps

    2) Built-in TCP/IP protocol stack 3) Built-in 10 bit high precision ADC 4) Built-in TR switch, balun, LNA, power amplifier and matching network 5) Built-in PLL, voltage regulator and power management components, +20dBm output power in 802.11b mode 6) A-MODU\A-MSDU aggregation and 0.4s guard interval 7) Wifi@2.4GHz, zhichi WPA/WPA2 security mode 8) Support Smart Config function (including Android and iOS devices) 9) HSPI, UART, I2C, I2S, IR Remote Control, PWM, GPIO...
  • Page 64 4) Turn on the power and test that the red indicator light on the Wifi module is on; 5) The Wifi name of the Wifi module connected to the phone is similar to "Doit_WIFI_C4D02B". 6) Open the test app, as shown in Figure 4-9-3. Click on the connection, click on the connection as shown in Figure 4-9-4, enter "192.168.4.1"...

This manual is also suitable for:

Atmega328p-puTb6612fgn

Table of Contents