* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Flexibot-Using Transwheel
Survey
Document related concepts
Operational amplifier wikipedia , lookup
Schmitt trigger wikipedia , lookup
Power electronics wikipedia , lookup
Surge protector wikipedia , lookup
Current mirror wikipedia , lookup
Valve RF amplifier wikipedia , lookup
Index of electronics articles wikipedia , lookup
Electrical connector wikipedia , lookup
Printed circuit board wikipedia , lookup
Power MOSFET wikipedia , lookup
LCD television wikipedia , lookup
Charlieplexing wikipedia , lookup
Opto-isolator wikipedia , lookup
British telephone socket wikipedia , lookup
Switched-mode power supply wikipedia , lookup
Transcript
Flexibot-Using Transwheel PR19 Version 1.0 August 2008 Cytron Technologies Sdn. Bhd. Information contained in this publication regarding device applications and the like is intended through suggestion only and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. No representation or warranty is given and no liability is assumed by Cytron Technologies Incorporated with respect to the accuracy or use of such information or infringement of patents or other intellectual property rights arising from such use or otherwise. Use of Cytron Technologies’s products as critical components in life support systems is not authorized except with express written approval by Cytron Technologies. No licenses are conveyed, implicitly or otherwise, under any intellectual property rights. OVERVIEW FEATURES This document describes the development of Cytron Technologies DIY (Do It Yourself) Project No. 19 (PR19), product FD04A and Omni platform. This project will be using PIC16F777, LCD, FD04A driver and Omni platform’s hardware. The function of the circuit is to processing the input data (push button) and give signal to FD04A driver to run the Flexibot. There will have display on the LCD to show current mode and situation. Circuit schematic and PIC source code will be provided. PR19 - PIC16F777 microcontroller(3 PWM signal) - LCD screen display FD04A - Operate at 12V supply - Able to run 4 DC motor at 3A OMNI PLATFORM - 3 Omni wheels - 3 Omni wheel’s couplings - 3 SPG30-22K DC motor - 1 3mm Perspex Flexibot base STARTER KIT (*OPTIONAL) - SKXBEE - SKKCA - SKPS Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved 1 ROBOT . HEAD to TOE PR19 – Flexibot-Using Transwheel SYSTEM OVERVIEW PR19 Push Button PIC16F777 Flexibot driver FD04A Flexibot LCD Display GENERAL DESCRIPTION Application - Transwheel wireless control soccer robot autonomous line following robot autonomous obstacle avoidance robot PIC16F777 This powerful (200 nanosecond instruction execution) yet easy-to-program (only 35 single word instructions) CMOS FLASH-based 8-bit microcontroller packs Microchip's powerful PIC® architecture into an 40-pin package and is upwards compatible with the PIC16C5X, PIC12CXXX and PIC16C7X devices. Feature of the device: Figure1 Cytron Flexibot is a three transwheels mobile robot that inculcates the brilliant design of transwheel which allows Flexibot to move in any direction without having to turn relative to the robot base. For example to move sideways, a differential drive robot can turn 90 degrees, move forward, and then turn back to its original direction. Flexibot can execute a single sideways motion, and further can easily track a moving object while maintaining a required orientation with respect to it. For future application, Flexibot can demonstrate it’s kinematic advantage of allowing continuous translation and rotation in any direction in competitive high-speed environments, such as the RoboCup competitions to follow a ball, while maintaining the alignment of a kicking mechanism. Features: - rich maneuverability and simple control - low power consumption - long lifespan and low cost - use simple electrical circuit - small size • • • • • • • • 256 bytes of EEPROM data memory self programming ICD (in circuit debugging function) 2 Comparators 14 channels of 10-bit Analog-to-Digital (A/D) converter 3 capture/compare/PWM functions the synchronous serial port can be configured as either 3-wire Serial Peripheral Interface (SPI™) or the 2-wire Inter-Integrated Circuit (I²C™) bus Universal Asynchronous Receiver Transmitter (USART) All of these features make it ideal for more advanced level A/D applications in automotive, industrial, appliances and consumer applications. For more information about the PIC microcontroller, please refer to the datasheet. The datasheet can be found at this link: http://ww1.microchip.com/downloads/en/DeviceDoc/3 0498c.pdf Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved 2 ROBOT . HEAD to TOE PR19 – Flexibot-Using Transwheel HARDWARE This project will require following hardware: a. 1 x PIC16F777 b. 1 x 2X16 LCD c. 1 x FD04A d. 1 x Omni Directional Mobile Robot Base e. Related hardware components f. Related electronic components Interface PIC16F777 with LCD (2X16 character To use the LCD display, user have to solder 16 pin header pin to the LCD display. LCD used in this project is JHD162A, for other type of LCD, please refer to its data sheet. LCD-JHD162A is a 2X16 character LCD. LCD connection pin and function of each pin is shown: Pin 1 2 Name VSS VCC 3 VEE 4 RS 5 R/W 6 E 7 8 9 10 11 12 13 14 15 DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 LED+ 16 LED- Pin function Ground Positive supply for LCD Brightness adjust Select register, select instruction or data register Select read or write Start data read or write Data bus pin Data bus pin Data bus pin Data bus pin Data bus pin Data bus pin Data bus pin Data bus pin Backlight positive input Backlight negative input Figure 2 Connection GND 5V Connected to a preset to adjust brightness RB7 GND RB6 RD0 RD1 RD2 RD3 RD4 RD5 RD6 RD7 5V RA2 control Transistor Power supply for the circuit Figure 3 Figure 1 User can choose either AC to DC adaptor (not included in the DIY project set) or 9V-12V battery (not included in the DIY project set) to power up the circuit. Higher input voltage will produce more heat at LM7805 voltage regulator. Typical voltage is 12V. Anyhow, LM7805 will still generate some heat at 12V. There are two type of power connector for the circuit, DC plug (J1) and 2510-02H (POWER). Normally AC to DC adaptor can be plugged to J1 type connector. Refer to figure3, the D1 is use to protect the circuit from wrong polarity supply. C1 and C3 is use to stabilize the voltage at the input side of the 7805 voltage regulator, while the C2 and C4 is use to Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved 3 ROBOT . HEAD to TOE PR19 – Flexibot-Using Transwheel stabilize the voltage at the output side of the 7805 voltage supply. PWR is green LED to indicate the power status of the circuit. R1 is resistor to protect PWR from over current which might burn PWR. Push Button microcontroller as input of PR19 PCB circuit board 3 PIC 1 2 4 5 11 8 7 6 9 Figure4 One I/O pin is designated for a push button as input to PIC microcontroller. The connection of the push button to the I/O pin is shown in figure4. The I/O pin should be pull up to 5V using a resistor (with value range 1K10K) and this configuration will result an active-low input. When the button is being pressed, reading of I/O pin will be in logic 0, while when the button is not pressed, reading of that I/O pin will be logic 1. 12 10 14 13 15 16 17 18 19 20 21 Figure 6 Component: 14. 15. 16. 17. 18. Preset (to adjust the brightness of the LCD display) Transistor to amplify LCD background light(Make sure connection follow PCB overlay) 7X2 IDE horizontal female socket (to connect PR19 and FD04A driver) LCD display AC-DC adaptor socket (to use power supply from AC-DC adaptor) 2510-02 socket, (to use either 9V battery or 12V battery to power up the circuit) Transistor to amplify buzzer(Make sure connection follow PCB overlay) Diode (to protect the circuit from wrong polarity power input) 7805 (voltage regulator, supply 5V for PIC) Capacitor (to stabilize the input and output voltage of the 7805 voltage regulator) Power indicator LED (to indicate the power status of the circuit 5X2 ICSP socket (to connect to PIC programmer to program the microcontroller) Buzzer (Make sure the polarity connection correct) PIC16F777 (the main brain of the system) Header pin for Starter Kit Slide switch (to ON or OFF the circuit) Reset button (to reset the microcontroller) Select Mode Push button Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved 4 ICSP for microcontroller programming PIC 1. 2. 3. 4. 5. 6. Figure5 MCLR, RB6 and RB7 need to be connected to the USB In Circuit Programmer (UIC00A) to program the PIC microcontroller. At the same time, RB3 need to be pull down to 0V to disable low voltage programming, because the programmer is using high voltage programming. The programmer (UIC00A) is not included in DIY project set since it can be used several time for different project set. User can also choose other type of PIC programmer to load the program. 7. 8. 9. 10. 11. 12. 13. For the instruction of using PIC programmer, please refer to the particular PIC programmer user’s manual at: http://www.cytron.com.my/listProductCategory.asp?ci d=81 ROBOT . HEAD to TOE PR19 – Flexibot-Using Transwheel 19. Execute Mode Push button 20. Crystal (20Mhz) 21. UART pin(Make sure the polarity is correct) Please refer to Appendix A for the PCB layout of PR19. The PCB layout is provided free and therefore Cytron Technologies will not be responsible for any further modification or improvement. SOFTWARE Flow Chart: Start The source code is provided free and Cytron Technologies will not be responsible for any further modification or improvement. GETTING START User can obtain the hardware set for this project (PR19) either by online purchasing (www.cytron.com.my) or purchase it in Cytron Technologies Shop. 1. Once user has the hardware set, soldering process can be started now. Please solder the electronic components one by one according the symbols or overlays on the Printed Circuit Board (PCB). Make sure the component value and polarity is correctly soldered. Please refer to PCB Layout in Appendix A. Initialize PIC Caution: Make sure all the connectors (2510) are soldered in proper side. Those electronic components have polarity such as capacitor, diode, PIC, LM7805, LM78L05, transistor and LED should be soldered in right polarity or it may cause the circuit board fail to work. Select Mode button pressed? NO Mode=0 YES Mode=Mode + 1 If Mode equal 3, Mode = 0 Warning:Before the battery (Power) is plugged in, make sure the polarity is correct to prevent the explosion. Wrong polarity of capacitor also may cause explosion. Mode =? Mode=0 Display Welcome note 2. Mode=2 Mode=1 Display Alpha Mode Create the connection cable for the power cable of PR19. Display Beta Mode NO Execute button pressed? YES Send signal to driver FD04A Mode=1 Flexibot Run Alpha Mode Mode=2 Flexibot Run Beta Mode For more information about the software for this system, please refer to the source code provided. The explanation of each instruction is provided in the source code as the comment of each line Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved 5 ROBOT . HEAD to TOE PR19 – Flexibot-Using Transwheel Step for soldering 2510 connector: 3. Please download the necessary files and document from Cytron Technologies website, www.cytron.com.my. These included documentation, sample source code, schematic, component list and software. 4. The next step is to install MPLAB IDE and HI-TECC C PRO into a computer. The MPLAB IDE and HI-TECC C PRO can be downloaded from www.cytron.com.my . Please refer MPLAB IDE installation step document to install the software. The documents can be used to any version of MPLAB IDE software. 5. After the installation complete, open the project file provided using MPLAB IDE. Please refer MPLAB Open Project document to open the sample program. 6. Please plug in the power supply and connect the programmer connector to the circuit board to reprogram the PIC. Do not forget to on the slide switch! User can get the sample program for this project from Cytron website (same directory as this DIY project) and this program can be modified. 7. After modification, build the project and load the hex file into the PIC microcontroller using Cytron USB In Circuit Programmer (UIC00A). When users build the project, MPLAB IDE will generate hex file. The hex file generated from MPLAB IDE will be named according to project name, not C file name. Cytron Technologies also provide hex file for user. The programmer is not included in the hardware set but it can be found at Cytron website. (User manual is provided at website). 8. User can choose either adaptor or battery to provide the power for the circuit board but make sure the given voltage is between 7V and 15V. Create the connector cable according to the order shown in the picture below: 1 2 3 4 5 6 7 8 Figure 7 Create the power supply to terminal block according to the order shown in figure 8 below: 1 2 7 3 4 Setting up Flexibot: 1. 5 6 Figure 8 Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved PR19 only serves as the controller board of Flexibot. The user needs to have FD04A driver and Omni Directional Mobile Robot Base in order to experience the dynamic motion of Flexibot. The Figure 9 shown the outlook of Flexibot when FD04A and Flexibot base attached together.(Refer to FD04A and Omni Directional Mobile Base user manual for further technical information) 6 ROBOT . HEAD to TOE PR19 – Flexibot-Using Transwheel Figure 9 Figure 11 Caution: If Flexibot motion is different with the motion display on LCD, please check the Figure 10 to compare the connection of motor cable with FD04A driver. The wrong connection of motor with FD04A driver will result in different direction of motor motion. Caution: Make sure all the PCB stands assemble in the correct screw hole. User can use the PCB as reference while mate the PCB stands. 3. Cable Motor 1 Cable Motor 2 Connect the IDC connector with the FD04A driver as shown in Figure 12. Cable Motor 3 Motor 1 Motor 2 Motor 3 Figure 12 4. Figure 10 • • • • • • 2. Then connect the other end of IDC connector to PR19 PCB and screw the PR19 PCB with the four 45mm PCB stands as shown in Figure 13. Positive motor 1 red cable connect to M1CW Negative motor 1 black cable connect to M1CCW Positive motor 2 red cable connect to M2CW Negative motor 2 black cable connect to M2CCW Positive motor 3 red cable connect to M3CW Negative motor 3 black cable connect to M3CCW Mate the four 45mm PCB stand for PR19 PCB on the Flexibot Perspex base in the screw holes as shown in Figure 11. Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved Figure 13 7 ROBOT . HEAD to TOE PR19 – Flexibot-Using Transwheel 5. For the tidiness of Flexibot, user can place Flexibot’s battery under the PR19 PCB. One 12V Li-Po battery is enough to supply voltage to both of the PR19 circuit and FD04A.(Battery is not included in project set) Positive Ground Figure 16 8. After confirm all the connections are correct, on the circuit and test the performance of Flexibot. There are two sets of mode program in the PIC to demonstrate the possible motion of Cytron Flexibot. Figure 14 6. Then place the power source socket wire to the terminal block socket which located at the top right of FD04A. User MUST follow the overlay on FD04A PCB to make sure the correct polarity of battery like what demonstrated in Figure 15. AC to DC adaptor: Warning:Before the battery (Power) is plugged in, make sure the polarity is correct to prevent the explosion. Ground 12V Polarity Figure 17 (not included in DIY project set) 9V battery connector: Positive Figure 15 Warning:Make sure the power source wires of motor don’t contact each other while the process of connecting power source wire with green terminal. The contact of wire will caused fire spark if the power supply is connected and these will cause damage to power supply. 7. Plug in the 2510 power supply socket to PR19 power connector. Please make sure the polarity correct for the PR19 power socket as well like figure 16 shown. Figure 18 (not included in DIY project set) Connection to the PCB board: Figure 19 Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved 8 ROBOT . HEAD to TOE PR19 – Flexibot-Using Transwheel WARRANTY No warranty will be provided as this is DIY project. Please check the polarity of each electronic component before soldering it to board. Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved 9 ROBOT . HEAD to TOE PR19 – Flexibot-Using Transwheel Appendix A PCB Layout: 5K preset 7X2 IDE Male Socket Transistor 2N2222 10K LCD Header Adaptor socket Transistor 2N2222 2510-02 Connector 7805 Voltage Regulator 1N4007 Diode C cap 104 10K Resistor C cap 104 330 10uF Resistor E cap Green LED 1K Resistor 27 Resistor ICSP socket Buzzer PIC16F777 C cap 104 Starter Kit 1N4148 Diode Slide switch 10K Resistor 20Mhz Crystal Reset Button Mode Button Execute Button Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved 2510-04 connector 10 ROBOT . HEAD to TOE PR19 – Flexibot-Using Transwheel Prepared by Cytron Technologies Sdn. Bhd. 19, Jalan Kebudayaan 1A, Taman Universiti, 81300 Skudai, Johor, Malaysia. Tel: Fax: +607-521 3178 +607-521 1861 URL: www.cytron.com.my Email: [email protected] [email protected] Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved 11