Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

RoboticCarKit_MANUAL

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
ROBOTIC CAR KIT
ECET 365 EMBEDDED MICROPROCESSOR W/LAB
OCTOBER 13, 2016
By Elijah Barner, Timothy Moore, Bryan Quiroz
TABL...
Introductions Pg. 3
Block Diagram Pg. 4-5
Components Pg. 6
Getting Started Pg. 7-9
Robot Code Pg. 10-12
Troubleshooting Ti...
INTRODUCTION
Welcome to the ECET Robotic Car Kit. The following kit contain parts for TWR-
S12G128 microcontroller tower, ...
Anzeige
Anzeige
Anzeige
Nächste SlideShare
Meier_ECET365_Manual_LI
Meier_ECET365_Manual_LI
Wird geladen in …3
×

Hier ansehen

1 von 16 Anzeige

Weitere Verwandte Inhalte

Diashows für Sie (20)

Ähnlich wie RoboticCarKit_MANUAL (20)

Anzeige

RoboticCarKit_MANUAL

  1. 1. ROBOTIC CAR KIT ECET 365 EMBEDDED MICROPROCESSOR W/LAB OCTOBER 13, 2016 By Elijah Barner, Timothy Moore, Bryan Quiroz TABLE of CONTENT
  2. 2. Introductions Pg. 3 Block Diagram Pg. 4-5 Components Pg. 6 Getting Started Pg. 7-9 Robot Code Pg. 10-12 Troubleshooting Tips Pg. 13 Caution Pg. 14 Contact Information/Technical Support Pg. 15 References Pg. 16
  3. 3. INTRODUCTION Welcome to the ECET Robotic Car Kit. The following kit contain parts for TWR- S12G128 microcontroller tower, SRK + Line kit, and all the associated wires, and connectors to operate the automated robot. This specific model follows a black strip line race track based on the users design. This manual contain information for assembly, troubleshooting tips, schematic diagrams, coding information and software. It also contains contact information for customer service at the end of the manual.
  4. 4. Code Block Diagram
  5. 5. System Block Diagram
  6. 6. Power Supply Subsystems 18650 Lithium Ion Batteries ● Typical Capacity: 3000 mAh ● Min Capacity: 2900 mAh ● Nominal Voltage: 3.7V ● Charging Voltage: 4.35V 12 volt regulator - 7812 ● Max Amperage output:1 amp 5 volt regulator - 7805 ● Max Amperage output:1 amp 5V To 3.3V DC-DC Step-Down Power Supply Buck Module ● Operating Supply Voltage: 4.2 V to 10 V ● Output Current: 800mA ● Output Voltage: 3.3 V Motor Subsystems SN754410NE - H Bridge ● Operating Supply Voltage: 4.5 V to 36 V ● Output Current: 1100 mA Digilent 12v motor ● Max Operating Supply Voltage: 12 V ● Output Current: 240 mA ● Torque: 617 g-cm Sensor Subsystems OPB704 ● Max Collector Current:25 mA ● Vf - Forward Voltage: 1.7 V
  7. 7. GETTING STARTED Chassis assembly requires a fillister head screwdriver, needle nose pliers, wire strippers, and the associated mounts with-in the kit.
  8. 8. Attach the four sensor with the double sided Velcro strips in the front of the chassis. Attach the microcontroller TWR-12SG128 to the robots chassis via tie-raps or use the extra bracket with screws.
  9. 9. Power Supply assembly for +5V (7805CT) voltage regulator. This how the robot will look when it has finally been assembled. Robot Code //sensor 1 pp0 pin A40 black //sensor 2 pp1 pin A39 red //sensor 3 pp2 pin A38 white //sensor 1 pp0 pin A40 black //sensor 2 pp1 pin A39 red //sensor 3 pp2 pin A38 white //sensor 4 pp3 pin A37 yellow //sensor layouton thesensor board1,4,2,3(tied intight notmoving them) #include <hidef.h> /* common defines and macros */ #include "derivative.h" /* derivative-specificdefinitions */ int speed =150; int delayspeed=5; int decrease=25; //function protypes void delay(unsigned int);//delay void test(void); //test void init_PWM01(void); //motor void init_isr(void); //sensor void forward(void); //move forward
  10. 10. //void reverse(void); void left(void); void right(void); void stop(void); char sensor; char duty; void main(void) { test(); //initializetest init_PWM01(); //initializemotor init_isr(); //initialize sensors for(;;) { delay(speed); } //end for(;;) } //endmain void test(void) { DDRT=0XFF; DDRP|=0xF0; } void delay(unsigned del) { unsignedinti,j; for (i=0; i<del;i++) { for (j=0; j<2000; j++) { asm("nop")}}; } void init_PWM01(){ PWMCLK &=~0X30; //Chooseclock a for pwm4andpwm5 PWMCLKAB &=~0X30; //Chooseclocka for pwm4 andpwm5 PWMPRCLK =0x04; // clock dividedby 2^4 //PWMSCLA=3; PWMPOL|=0X30; PWMPER4=195; PWMPER5=195; PWME|=0X30; //Enable pwmchannels 4 and 5 onthetower PWMDTY4=0; //Right PWMDTY5=0; //Left } void forward(){ PWMDTY4=speed; PWMDTY5=speed; PTT=0x90; } void stop(){ PWMDTY4=0; PWMDTY5=0; PTT=0x90; } void left(){ PWMDTY4=(speed-decrease); PWMDTY5=(speed/5); //slow down PTT=0x40; } void right(){
  11. 11. PWMDTY4=(speed/5); //slow down PWMDTY5=(speed-decrease); PTT=0x80; } void init_isr()//usePP7:PP4 { DDRP &=~0x0F; //use pp0,pp1,pp2,pp3interrupt pins. PPSP &=~0x0F;//choosepulldown PERP |=0x0F;//enablepull PIEP |=0x0F;//enablelocal leveenable asm(cli); // enableglobal levelenable PIFP |=0x0F;// clear allflags on pp0,pp1,pp2,pp3 } //define ISR #pragma CODE_SEG NON_BANKED interrupt((0x10000-0xFF8E)/2-1) void PortP_isr(void) { if ((PIFP&0x02)==0x02) // sensor 2 has gonefrom0 to 1 { left(); delay(delayspeed); PIFP|=0x02; // clearflag } if ((PIFP&0x01)==0x01) // sensor 1 has gonefrom0 to 1 { right(); delay(delayspeed); PIFP|=0x01; // clearflag }// if ((PIFP&0x04)==0x04) // sensor 3 has gonefrom0 to 1 { forward(); //good delay(delayspeed*2); PIFP|=0x04; // clearflag } if ((PIFP&0x08)==0x08) // sensor 4 has gonefrom0 to 1 { forward(); delay(delayspeed*2); PIFP|=0x08; // clearflag } } #pragma CODE_SEG DEFAULT
  12. 12. TROUBLESHOOTING TIPS Tip#1: Check to see if both the +5V and 12V regulator output voltages are correct. They supply both voltage to the microcontroller, H-bridge, motors, and sensors. Depending on the model you have some of our robots contain P-mod H-bridge circuits that require an addition two wires. The supply voltages are 5V for the microcontroller and motors. Then 3.3 to 5V for each sensor. Tip#2: Sometimes there will be a message stating that the microcontroller has not been detected by PC. First check to see if you download the latest version of CodeWarrior 5.1 are above with the latest devices driver.
  13. 13. Tip#3: The code associate with the robot is preload on the robot. If there is any issues with the code a copy of the program can be found for troubleshooting purpose. It is located at the end of the user manual. (Warning! CodeWarrior IDE interface is case sensitive if any of the code has not been properly type it will result in an error. The code will not compile neither will it upload to the microcontroller.) Tip#4: If and of the hardware is defective please contact us immediately so we can send you any replacement parts. The replacement parts included that are PSU battery compartment, motors, H- bridge, and robot chassis. (If you notice any of the chassis, or electronic hardware missing you should contact us with a brief description of the part and the serial number/ID number located on the part.)
  14. 14. Make sure that all of the robot wiring and associated components are properly placed and configure. Because if anything is not properly placed it could lead to possible shortage or possible damage to electronic components. Also check to make sure that the power supply system wiring is placed correctly due to possible fire hazard.
  15. 15. CONTACT INFORMATION/TECH SUPPORT If you have any issues regarding the software and hardware please contact us at ebarner777@gmail.com for customer support. If you need to contact our other branches please email us at tim_thegreenbeast@yahoo.comor b_quiroz@live.com.
  16. 16. References http://www.mouser.com/ProductDetail/Optek-TT- Electronics/OPB704/?qs=4w61lb%2FlP8DOAlCIZ3m0tQ%3D%3D https://www.sparkfun.com/datasheets/Components/LM7805.pdf http://pdf.datasheetcatalog.com/datasheet/analogdevices/AD7812YN.pdf https://www.powerstream.com/p/LG-ICR18650HE2-REV0.pdf https://reference.digilentinc.com/chipkit_pro_mx4/mrk_line http://www.ti.com/lit/ds/symlink/sn754410.pdf

×