University Programs Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

University Programs Knowledge Base

Discussions

Sort by:
This tutorial covers the details of Driving a motor on the on the Kinetis K40 using the TWR-K40x256-KIT evaluation board. Overview In this exercise students will utilize the sample project to turn a motor on and off using the TWR-K40x256-KIT evaluation board. Students will: Put together the car chassis Create a Sample Project Build the code Download and run the code on a Kinetis TWR-K40x256 board. Learn how the code works   To successfully complete this exercise students will need the following board and development environment. Kinetis TWR-K40x256 board Motor Driver Board Freescale Cup Chassis with the Motors connected 7.2v Nicad Battery CodeWarrior for Microcontrollers Recommend completing the the Blink LED Tutorial before undertaking this Tutorial Put together the Car Chassis:   There are several steps in this process: Build the Freescale Cup Car Chassis Hardware Design Step Review the Driving A DC Motor Article If needed, obtain background information on motors, timer modules, PWM signals and counters by navigating to the driving a DC motor article. Design and Implement The Hardware 1. You will need to connect the Tower K40 to the Motor Board via the TWR-PROTO or some other mechanism. 2. You will need to connect the Motor Board to the DC motors and Battery This link shows a video of the motors spinning. They start from Off and slowly pick up speed http://www.youtube.com/watch?v=kY2bRiICzwc&feature=relmfu Motor Controller Board This board takes the low-voltage, low-power "control" signals from the MCU and through an H-Bridge takes ahigh-voltage, high-power power supply (the battery) to drive the motors. Motor Board page. 1. Be careful with the wires connected to the motor. Constant flexing of the solder connection can result in joint failure. If this happens, just re-solder it. 2. The wires which protrude from the motors of The Freescale Cup Chassis are in the format of Insulated Crimp On Bullet Connectors. These can be found at Radio Shack if they are missing from the kit. Build the Code If you have more than one project in your project view, make sure the proper project is the focus. The most reliable way to do this is to right click the project and choose Build Project as shown below. You can also go to the Project menu and choose the same command. Learning Step: Motor Code Description Functions Variables The edge-aligned mode is selected when (QUADEN = 0), (DECAPEN = 0), (COMBINE 0), (CPWMS = 0), and (MSnB = 1). The EPWM period is determined by (MOD − CNTIN + 0x0001) and the pulse width (duty cycle) is determined by (CnV − CNTIN). The CHnF bit is set and the channel (n) interrupt is generated (if CHnIE = 1) at the channel (n) match (FTM counter = CnV), that is, at the end of the pulse width. This type of PWM signal is called edge-aligned because the leading edges of all PWM signals are aligned with the beginning of the period, which is the same for all channels within an FTM. Initialize the Motor void InitMotorPWM()  {     //Enable the Clock to the FTM1 Module     SIM_SCGC6 |= SIM_SCGC6_FTM1_MASK;     // PORTC_PCR4 = PORT_PCR_MUX(1) | PORT_PCR_DSE_MASK;   //Enable GPIO on on the pin -     //route the output of that channel 0 to the pin... (pick a different multiplexer value for routing the timer)     //ch 11.4.1 of the k40 reference manual is the pin control register     //For port c pin 1..   bits 10-8  Pin Mux Control...     PORTA_PCR8  = PORT_PCR_MUX(3)  | PORT_PCR_DSE_MASK;     PORTA_PCR9  = PORT_PCR_MUX(3)  | PORT_PCR_DSE_MASK;     // Choose EDGE-Aligned PWM:  selected when QUADEN=0, DECAPEN=0, COMBINE=0, CPWMS=0, and MSnB=1  (page 964)     // Properly set up Flex Timer Module     //FTM0_MODE[WPDIS] = 1; //Disable Write Protection - enables changes to QUADEN, DECAPEN, etc.      FTM1_MODE |= FTM_MODE_WPDIS_MASK;     //FTMEN is bit 0, need to set to zero so DECAPEN can be set to 0     FTM1_MODE &= ~1;      //Set Edge Aligned PWM     FTM1_QDCTRL &=~FTM_QDCTRL_QUADEN_MASK;      //QUADEN is Bit 1, Set Quadrature Decoder Mode (QUADEN) Enable to 0,   (disabled)     //FTM0_SC = 0x16; //Center Aligned PWM Select = 0, sets FTM Counter to operate in up counting mode,     //it is field 5 of FTMx_SC (status control) - also setting the pre-scale bits here   //   Also need to setup the FTM0C0SC channel control register  - Page 897   section 37.3.6   FTM1_CNT = 0x0; //FTM Counter Value - (initialize the CNT before writing to MOD)  (16 bit available - bits 0-15 are count)   FTM1_MOD = FTM1_MOD_VALUE; //Set the Modulo resister (16 bit available - bits 0-15), Mod is set to 24000   FTM1_CNTIN = 0; //Set the Counter Initial Value to 0   (pg 915)   //change MSnB = 1   FTM1_C0SC |= FTM_CnSC_ELSB_MASK;   FTM1_C0SC &= ~FTM_CnSC_ELSA_MASK;   FTM1_C0SC |= FTM_CnSC_MSB_MASK;   FTM1_C0V = FTM1_MOD_VALUE/2; //Set the Channel n Value to  (16 bit available - bits 0-15)   //Set the complimentary pinout   FTM1_C1SC |= FTM_CnSC_ELSB_MASK;   FTM1_C1SC &= ~FTM_CnSC_ELSA_MASK;   FTM1_C1SC |= FTM_CnSC_MSB_MASK;   FTM1_C1V = FTM1_MOD_VALUE/2;   FTM1_SC = FTM_SC_PS(0) | FTM_SC_CLKS(1);    // Interrupts   FTM1_SC |= FTM_SC_TOIE_MASK; //enable the interrupt mask   enable_irq(63);  // (79-16) Set NVIC location, but you still have to change/check NVIC file sysinit.c under Project Settings Folder } Set the PWM of the Motor void SetMotorPWM(float DutyCycle) {    //float compDuty = (float)100.0-DutyCycle;    FTM1_C0V =(int)((DutyCycle*.01)* (float)FTM1_MOD_VALUE);    FTM1_C1V =(int)((1.0-DutyCycle*.01)* (float)FTM1_MOD_VALUE); } Create Interrupt when motor functions are complete void MotorTick() { if (MotorTickVar < 0xff)//if motor tick less than 255 count up...    MotorTickVar++; //Clear the overflow mask if set    if(FTM1_SC & FTM_SC_TOF_MASK)    FTM1_SC &= ~FTM_SC_TOF_MASK;    //LED_E2_TOGGLE; // ends up being ___ Hz (correct) } Calling the Motor function The function SetMotorPWM(MotorPwm) turns the motor at the "MotorPwm" rate from 0-49 (backwards), 50 (stall) and 100 (forwards).
View full article
Connection Diagram for TRK-MPC5604B to Rev. 1 Motor Control "Shield" Board Connection Diagram for TRK-MPC5604B to Rev. 0 Motor Control Board For the TRK-MPC5604, connect the flat ribbon cable to PortB as seen in the picture below. Make the cable connections as shown below for dual motor with independent drive connection Make the cable connections as shown below for dual motor with series drive connection Make the cable connections as shown below for Single motor connection Protect your electronics 1. Try not to stop the wheels while in motion.  This can cause current spikes. 2. Don’t disconnect or connect any cable when board is powered [ON]. 3. Don’t discharge the battery below 5.5V 4. Don’t hit stationary objects
View full article
This tutorial covers the details of Driving a motor on the Qorivva TRK-MPC5604B: MPC5604B StarterTRAK evaluation board. Overview 1. Put together the Car Chassis: Motor Controller Board Version A. 2. Import the Sample Project 3. Build the Code 4. Download/Debug/Run 5. Learning Step: DC Motor Code Description Functions Motor_Right () & Motor_Left() Motor_Right_Current () & Motor_Left_Current() Sample Code Download Link Alternative Examples: Other Qorivva Tutorials: Useful Technical Links Overview In this exercise students will utilize the sample project to turn a DC motor on an off using the Qorivva TRK-MPC5604B board. Students will: Put together the car chassis Open the Sample Project Make changes to main.c to call the motor functions Build the Motor function code Download and run the code on a Qorivva TRK-MPC5604B board. Learn how the code works To successfully complete this exercise students will need the following board and development environment. Qorivva TRK-MPC5604B board. Freescale Cup Chassis (connector for the motor/board) Motor Drive Version A board Kit Cables and interconnects 7.2v Nicad Battery CodeWarrior for Microcontrollers V2.8 Recommend completing the the Blink LED Tutorial Motor Example code 1. Put together the Car Chassis:   There are several steps in this process: Build the Freescale Cup Car Chassis Add the Qorivva-Mpc560xb version components to the chassis The first step of this tutorial is to gain background information on background information on motors, timer modules, PWM signals and counters. To learn more about these general topics read the Drive A DC Motor overview article. You will need to connect your motor to the microcontroller via the Motor Drive board. This board is connected to the battery, and serves to power the motors. separate power source. This is an easy process using the provided Motor Controller Board. Motor Controller Board Version A. The Freescale Cup Motor Drive VA board uses the following connector type: white 3 pin connectors (for motor) (Molex 3-pin .100") white 2 pin connector (for battery) (Molex 2-pin .100") Schematics Wiring Connections for the TRK-MPC5604B 2. Import the Sample Project The next step is to import an existing project into your Workspace. in this case, the TRK-MPC5604B Sample project. Follow the instructions on the codewarrior project import page if you can't remember how to to import the project into CodeWarrior. 3. Build the Code If you have more than one project in your project view, make sure the proper project is the focus. The most reliable way to do this is to right click the project and choose Build Project as shown below. You can also go to the Project menu and choose the same command. If you encounter errors, look in the Problems view and resolve them. You can ignore any warnings. 4. Download/Debug/Run 5. Learning Step: DC Motor Code Description What will happen: This demo is setup for two motors (one left and one right). You will then independently turn on and off each motor Functions This file sets up the Pulse Width Modulation Timer Module for use by a DC Motor. It is set to utilize Edge-Aligned PWM, and this file properly configures the period, and pulse width for use by the other modules Motor_Right () & Motor_Left() void MOTOR_LEFT(void) {   TransmitData("****Left Drive Motor Test****\n\r");   SIU.PCR[16].R = 0x0200; /* Program the drive enable pin of Left Motor as output*/   SIU.PGPDO[0].R = 0x00008000; /* Enable Left the motors */   Delaywait();   SIU.PGPDO[0].R = 0x00000000; /* Disable Left the motors */ } void MOTOR_RIGHT(void) {   TransmitData("****Right Drive Motor Test****\n\r");   SIU.PCR[17].R = 0x0200; /* Program the drive enable pin of Right Motor as output*/   SIU.PGPDO[0].R = 0x00004000; /* Enable Right the motors */   Delaywait();   SIU.PGPDO[0].R = 0x00000000; /* Disable Right the motors */ } Motor_Right_Current () & Motor_Left_Current() void RIGHT_MOTOR_CURRENT(void) {   TransmitData("****Right Motor Current****\n\r");   SIU.PGPDO[0].R = 0x00004000; /* Enable Right the motors */   Delaywait();   for (i=0;i <10;i++)   {   ADC.MCR.B.NSTART=1; /* Trigger normal conversions for ADC0 */   while (ADC.MSR.B.NSTART == 1) {};   curdata = ADC.CDR[2].B.CDATA;   printserialsingned(curdata);    }   SIU.PGPDO[0].R = 0x00000000; /* Disable Right the motors */ } void LEFT_MOTOR_CURRENT(void) {   TransmitData("****Left Motor Current****\n\r");   SIU.PGPDO[0].R = 0x00008000; /* Enable Right the motors */   Delaywait();   for (i=0;i <10;i++)   {   ADC.MCR.B.NSTART=1; /* Trigger normal conversions for ADC0 */   while (ADC.MSR.B.NSTART == 1) {};   curdata = ADC.CDR[1].B.CDATA;   printserialsingned(curdata);    }   SIU.PGPDO[0].R = 0x00000000; /* Disable Right the motors */ } Sample Code Download Link Qorivva Sample Code Download Link Alternative Examples: Application Note 4251 and Software. Other Qorivva Tutorials: Qorivva: Blink a Led Tutorial Qorivva: Turning a Servo Tutorial Qorivva: Line Scan Camera Tutorial Useful Technical Links TRK-MPC5064B Freescale Webpage TRK-MPC5064B Freescale Reference Manual TRK-MPC5064B Freescale Schematic
View full article
Sifting through technical documentation is part of an engineers job.  Sometimes these documents can be hundreds or thousands of pages long, so knowing where to makes life much easier.  This article is going to try to help you navigate smarter... Freescale has the following structure for technical documents: Reference Manuals (Usually end with "RM") - These are typically the thick manuals.  You will find sections detailing operation, registers, and electrical characteristics. Data Sheet (Usually ends with "DS") - These are quick summaries of the specifications of the device.  Includes electrical characteristics such as operating voltages, input and output minimum and maximum ranges.  In addition to environmental characteristics such as temperature ranges and graphs of performance vs. certain conditions. Schematic (_SCH) - This is typically referred in terms of board designs.  A schematic is useful in finding out how and where an external thing (LED, button, Display) is connected to the microcontroller.  Fact Sheet (_FS) - This is generally overview type information.  Useful when you are trying to determine which microcontroller you want to use.  Errata - Sometimes there are bugs in the chip.  When these are discovered the company issues an errata.  Sometimes the item get's fixed in the next revision of the chip, sometimes you just work around the problem.  If you think it should be working and it's not check the erratas! Tips and Tricks Use the search or find function all the time. Shortcut key '''(Ctrl-F).''' Use two monitors. Have the document open in one, search or browse to what you need to find and simply copy and paste the configuration information into your IDE. Search tips:  Use the pin name.  (I.e. PTC, PORTA, or FTM) Save trees only print out what you need. Commonly Used Acronyms: PDB - Programmable Delay Block FTM - Flex Timer Module ADC - Analog to Digital Converter DAC - Digital to Analog Converter MCG - Multipurpose Clock Generator SPI - Serial Programming Interface CnV - Channel n Value CNTIN - Counter Initial Value SIM - System Integration Module SIM_SCGCn - System Integration Module, System Clock Gating Control Register CMP - Comparator Module SIM - Provides system control and chip configuration registers. You will use this to turn on the clocks to particular peripherals. The SIM_SCGC
View full article
One option for mounting the FRDM-KL25Z Freescale Freedom board to the car chassis. [no audio] Important Note:  Secure the wires coming from your motors!!  (I used a zip tie in the video)  If they are allowed to flex at the joint where the wire connects to the motor, it will eventually fail.
View full article
MCU 101 - Beginners Concepts https://community.nxp.com/docs/DOC-1241 Blink LED Drive a DC Motor Turn a Servo Line Scan Camera Glossary of Terms Software Tools CodeWarrior Software Development Tools & IDE (recommend you download the Special Edition) CodeWarrior Beginners Tutorial (videos)   TWR K40X256 Hardware setup   Creating a new bareboard project   Debugging a bareboard project   Importing projects and merging code   Discussion of the header files (part 1)   Discussion of the header files (part 2) (Code) Beginners Hands-on Tutorials Introduction to Microcontroller Programming Blink LED Drive DC Motor Turn A Servo LIne Scan Camera Sample Codes LED BLINK 96MHZ Hardware DIY Tower System Mounting DIY Camera Mounting Batteries Advanced Tutorial Series Push-Buttons https://community.nxp.com/docs/DOC-1034 Miscellaneous Topics Reading a Reference Manual PCB design tips
View full article
Harvard Extension School CSCI E-251, Fall 2012: Principles of Operating Systems Final Project Presentations Presentation by Timothy O'Keefe
View full article
Review the design and operation of the Freescale linescan camera included with the TFC-KIT. A high level overview of the sensor IC interface will be shown to the audience. View Video Link : 1471 and Video Link : 1472
View full article
This tutorial will introduce you to I 2 C and provide a framework that you can use to start communicating with various devices that use I 2 C. This tutorial is meant for the Kinetis K40 and will probably not work on any other Kinetis chip. DISCLAIMER: This has not been fully tested and may not work for you and for all devices. The header file provided does not handle errors and should not be used for critical projects. 2C signaling I2C header file Example of I2C communication using Freescale MMA8452Q 3-axis accelerometer Introduction to I 2 C signaling I 2 C is a simple two wire communication system used to connect various devices together, such as Sensory devices and microprocessors using 8 bit packets. I 2 C requires two wires: the first is called SDA and is used for transferring data, the second is called SCL and it is the clock used to drive the data to and from devices. I 2 C uses an open drain design which requires a pull up resistor to logic voltage (1.8,3.3,5) on both SDA and SCL for proper operation. I 2 C is a master-slave system where the master drives the clock and initiates communication. The I 2 C protocol has 5 parts. The Start signal which is defined as pulling the SDA line low followed by pulling SCL low. The slave device address including the Read/Write bit The register address that you will be writing to/ reading from the data The acknowledgement signal which is sent from the receiving device after 8 bits of data has been transferred successfully. the Stop signal, which is defined by SDA going high before SCL goes high. 1. The start signal is sent from the Master to intiate communication on the bus. The start and stop signals are the only time that SDA can change out of sync with SCL. Once the start signal is sent no other device can talk on the bus until the stop signal is sent. If for whatever reason another device tries to talk on the bus then there will be an error and the K40 can detect this. 2. The slave device is a 7 bit (sometimes 10bit but this will not be covered in this tutorial) address provided by the device and is specific to the device. The type of data operation (read/write) is determined by the 8 th bit. A 1 will represent a write and a 0 a read operation. 3. The register addresses are provided by the device's specifications. 4. The data you will send to a device if you are writing or the data that you receive from the device when reading. This will always be 8 bits. 5. After 8 bits of data has been transferred successfully the receiving device will pull the SDA line low to signify that it received the data. If the transmitting device does not detect an acknowledgement then there will be an error. The K40 will be able to detect this. 6. The stop signal is sent from the Master to terminate communication on the bus. Some devices require this signal to operate properly but it is required if there will be more than one master on the bus (which will not be covered in this tutorial) I2C header file This header file only has functions for reading and writing one byte at a time. Most devices support reading and writing more than one byte at a time without sending the Stop signal. Typically the device will keep incrementing the register's address to the next one during read/writes when there is no stop signal present. See your device's user manual for more information. /* * i2c.h * * Created on: Apr 5, 2012 * Author: Ian Kellogg  * Credits: Freescale for K40-I2C example */  #ifndef I2C_H_  #define I2C_H_  #include "derivative.h"  #define i2c_EnableAck() I2C1_C1 &= ~I2C_C1_TXAK_MASK #define i2c_DisableAck() I2C1_C1 |= I2C_C1_TXAK_MASK  #define i2c_RepeatedStart() I2C1_C1 |= I2C_C1_RSTA_MASK  #define i2c_Start() I2C1_C1 |= I2C_C1_TX_MASK;\    I2C1_C1 |= I2C_C1_MST_MASK  #define i2c_Stop() I2C1_C1 &= ~I2C_C1_MST_MASK;\    I2C1_C1 &= ~I2C_C1_TX_MASK  #define i2c_EnterRxMode() I2C1_C1 &= ~I2C_C1_TX_MASK;\    I2C1_C1 |= I2C_C1_TXAK_MASK  #define i2c_write_byte(data) I2C1_D = data  #define i2c_read_byte() I2C1_D  #define MWSR 0x00 /* Master write */  #define MRSW 0x01 /* Master read */  /* * Name: init_I2C * Requires: nothing * Returns: nothing * Description: Initalizes I2C and Port E for I2C1 as well as sets the I2C bus clock */  void init_I2C()  {    SIM_SCGC4 |= SIM_SCGC4_I2C1_MASK; //Turn on clock to I2C1 module    SIM_SCGC5 |= SIM_SCGC5_PORTE_MASK; // turn on Port E which is used for I2C1    /* Configure GPIO for I2C1 function */    PORTE_PCR1 = PORT_PCR_MUX(6) | PORT_PCR_DSE_MASK;    PORTE_PCR0 = PORT_PCR_MUX(6) | PORT_PCR_DSE_MASK;    I2C1_F = 0xEF; /* set MULT and ICR This is roughly 10khz See manual for different settings*/    I2C1_C1 |= I2C_C1_IICEN_MASK; /* enable interrupt for timing signals*/  }  /* * Name: i2c_Wait * Requires: nothing * Returns: boolean, 1 if acknowledgement was received and 0 elsewise  * Description: waits until 8 bits of data has been transmitted or recieved */  short i2c_Wait() {    while((I2C1_S & I2C_S_IICIF_MASK)==0) {    }     // Clear the interrupt flag    I2C1_S |= I2C_S_IICIF_MASK;  }  /* * Name: I2C_WriteRegister * Requires: Device Address, Device Register address, Data for register * Returns: nothing * Description: Writes the data to the device's register */  void I2C_WriteRegister (unsigned char u8Address, unsigned char u8Register, unsigned char u8Data) {    /* shift ID in right position */    u8Address = (u8Address << 1)| MWSR;    /* send start signal */    i2c_Start();    /* send ID with W/R bit */    i2c_write_byte(u8Address);    i2c_Wait();    // write the register address    i2c_write_byte(u8Register);    i2c_Wait();    // write the data to the register    i2c_write_byte(u8Data);    i2c_Wait();    i2c_Stop();  }  /* * Name: I2C_ReadRegister_uc * Requires: Device Address, Device Register address * Returns: unsigned char 8 bit data received from device * Description: Reads 8 bits of data from device register and returns it */  unsigned char I2C_ReadRegister_uc (unsigned char u8Address, unsigned char u8Register ){    unsigned char u8Data;    unsigned char u8AddressW, u8AddressR;    /* shift ID in right possition */    u8AddressW = (u8Address << 1) | MWSR; // Write Address    u8AddressR = (u8Address << 1) | MRSW; // Read Address    /* send start signal */    i2c_Start();    /* send ID with Write bit */    i2c_write_byte(u8AddressW);    i2c_Wait();    // send Register address    i2c_write_byte(u8Register);    i2c_Wait();    // send repeated start to switch to read mode    i2c_RepeatedStart();    // re send device address with read bit    i2c_write_byte(u8AddressR);    i2c_Wait();    // set K40 in read mode    i2c_EnterRxMode();    u8Data = i2c_read_byte();    // send stop signal so we only read 8 bits    i2c_Stop();    return u8Data;  }  /* * Name: I2C_ReadRegister * Requires: Device Address, Device Register address, Pointer for returned data * Returns: nothing * Description: Reads device register and puts it in pointer's variable */  void I2C_ReadRegister (unsigned char u8Address, unsigned char u8Register, unsigned char *u8Data ){    /* shift ID in right possition */    u8Address = (u8Address << 1) | MWSR; // write address    u8Address = (u8Address << 1) | MRSW; // read address    /* send start signal */    i2c_Start();    /* send ID with W bit */    i2c_write_byte(u8Address);    i2c_Wait();    // send device register    i2c_write_byte(u8Register);    i2c_Wait();    // repeated start for read mode    i2c_RepeatedStart();    // resend device address for reading    i2c_write_byte(u8Address);    i2c_Wait();    // put K40 in read mode    i2c_EnterRxMode();    // clear data register for reading    *u8Data = i2c_read_byte();    i2c_Wait();    // send stop signal so we only read 8 bits    i2c_Stop();    }  #endif  Example of I2C communication using Freescale MMA8452Q 3-axis accelerometer This example is very simplistic and will do nothing more than read the WHO AM I register to make sure that I 2 C is working correctly. To see more check out the Freescale MMA8452Q Example /* Main. C */ #include <stdio.h> #include "derivative.h" /* include peripheral declarations */ #include "i2c.h" int main(void) {      // checking the WHO AM I register is a great way to test if communication is working      // The MMA8452Q has a selectable address which is either 0X1D or 0X1C depending on the SA0 pin      // For the MMA8452Q The WHO AM I register should always return 0X2A      if (I2C_ReadRegister_uc (0x1D,0x0D) != 0x2A {           printf ("Device was not found\n");      } else {           printf ("Device was found! \n");      } }
View full article
Examine some basic microcontroller concepts, how they are used and some generic I/O paths. The intent is to give the audience a broad picture of microcontrollers and how they are used.
View full article
On this page you will find additional notes to chassis assembly you may find useful. Examples of components used are obtained from the http://www.soselectronic.com/ distributor. Cables To connect battery you will need cable shown at the image top right. You can use the cable provided with the car and add an appropriate connector to its end. This usually requires special crimping tool, so it may be more appropriate to buy the "Tamyia charging cable" (shown on the bottom left side of the image above), cut the banana ends and attach the connector to the board. If you search for the appropriate type of the connector, it is called usually Tamiya charging connector, Tamiya jack 6,3 mm (SOS code 70479) or similar. Another cable you have to assemble is a power supply cable for the microprocessor board. You will need approx. 10-15 cm long cable with the barrel jack (SOS code 3834) or similar on one end and 2-pin 2.54mm connector (e.g. SOS code 4934 + 4937) on the other end. NOTE: Never power the microprocessor board and interface boards from different power supplies! In such case the grounds on both boards are not connected and you can damage the board. The grey flat ribbon cable that interconnects the boards is for signals only, there is no common GND connection! Battery You may find (as we did) the provided cable strips too weak to hold the battery on the place. Replace them with the classic electricians cable strips (e.g. SOS code 67504). Also do not forget that the batteries need to be charged fully the first time you charge them or they will not be able to fully charge in the future. If you jump the gun because you want to test your code as soon as you can you will hurt yourself later as we found our battery was absolutely shot in later stages of our build. Motor wires To attach the motor to the interface board you may find (as we did) the cables too short. Then remove 6 screws on the bottom (see image on the left), open the motor box and desolder the short wires. Replace with approx. 15 cm long silicon cables at least 1mm2. End of the cables should be connected to the 3-pin connectors with the 3,9mm pitch (e.g. SOS order code 5914 ) - see image on the right. Again, the contacts should be attached using a special crimp tool. Camera To attach the camera we found useful to prepare two metal L-shaped pieces made from aluminium. With the help of black plastic distance posts (already available in the kit) and these metal stands, you may freely change the position of the camera over the surface. You may use following files to cut the required shapes (drawing was made using the QCad program): Preview (.pdf) CAD file (.dxf)   Base board There was no motherboard in the kit, so you will need to provide your own. To make life easier, we offer you our CAD files created with QCad program. You may use it to produce your board. We use plexiglass for ours, but any other plastic material is appropriate. The large hole in the middle is for cables from the servo. We attach the board to the car using the plastic standoffs (you will need them 55 mm long, so in our case, we used the combination of 40 + 15 mm) - see an example (SOS code 10260). To attach both the processor and interface boards the simillar 5mm plastic standoffs were used. Preview (.pdf) CAD file (.dxf) Getting all together Please, notice the orientation of cables, especially the power supplies. You may find useful following connection diagram. Enlarged Schematic (.png) NOTE: Never power the microprocessor board and interface boards from different power supplies! In such case the grounds on both boards are not connected and you can damage the board. The grey flat ribbon cable that interconnects the boards is for signals only, there is no common GND connection! Servo Motor connectors The parts provided are extremely flimsy and if you snap them in and the wheels are not perfectly straight the wheels will align wrong when the servo first turns on. First off just concentrate on one wheel at a time and we found it useful to have one person hold the wheel straight while the arm was in the proper position and then we used needle nose pliers to quickly and precisely snap the pieces into the wheel. Don't be afraid to use some muscle we hesitated a few times at first because it didn't look good but it was fine.
View full article
Official rules of the Global Freescale Cup! New in 2014 - Roll-out of leagues: Depending on region there will now be three leagues.  The Global race will only be stock league vehicles. Stock League - Racing using approved components, less customization allowed Custom League - Racing with less restrictions and custom hardware Innovation League - More than just racing.  Complete an objective or task to score points and win. Notes You can view this document in PDF format using the Action Menu bar. This rule set is for the Worldwide challenge.  Find your regional rules here The Worldwide challenge is only open to the stock (unmodified) challengers at this time. If you have ANY questions about these rules, post them in the comments section below.  If you have questions about regional rules, ask in your regional group. Section 1: Team Requirements A regional championship team must run a “stock” (unmodified) league to qualify. Four person maximum team size. A team may have only one graduate student. Cars will be designed and constructed by students ONLY.  Participants, advisers, and audience are expected to exhibit good sportsmanship. Any inappropriate behavior or cheating may result in disqualification. Section 2: Event Registration Entrants into the worldwide challenge are by invitation only. One invitation is extended to each regional champion team. One person from the regional champion team must register the entire team for the worldwide challenge within two weeks after the conclusion of the regional final.  Section 3: Equipment Requirements Each team shall use the same basic kit of parts as described below.  The following requirements are in place to keep the playing field level.  You must use one of the approved controller and motor driver boards.  If any standard component of the car model is damaged, then the same replacement component should be used. Mechanical The original and unaltered equipment must be used in the entry.  Outer tire treads and rim Drive - DC motors Transmission Ratio of Drive Motor Servo Motor Allowed modifications and restrictions: You may not change the wheel base (distance between wheels) No part of the car shall exceed dimensions of 250mm/9.85in (W) x 400mm/15.75in (L)x 305mm/12in.(H) You may drill holes and mount auxiliary pieces on the chassis assuming it is contained within the above dimensions. You may change the orientation of the servo motor and related linkages. You may add a "skin" to the car but it must be removable during inspection. You may adjust or remove springs, linkages, and other non-essential pieces. You may adhere the tread to the rim.   Electrical Battery (purchase separately) 7.2V, <=3000mAh, rechargeable NiCd or NiMH  Only one (1) battery at a time may be used to power the vehicle and any attached hardware You must use one of the approved boards below to control your car. Control System FRDM- series of boards The FRDM-KL25Z is included but not mandatory to use. TRK- series Kinetis based TWR- series High Voltage Motor Control and Interface TFC-SHIELD The TFC-SHIELD is included but not mandatory to use. The Dual Motor Control Board from Landzo technologies. Allowed modifications and restrictions: One processor - No auxiliary processor or other programmable device is allowed.  The car must use a optical sensor to navigate DC-DC boost circuit may not exceed battery voltage. Total capacity of all capacitors should not exceed 2000 uF. Sensor Limits You may use additional cameras.  Maximum of sixteen (16) sensors Examples of sensor count:  IR Transmitter/Receiver pair is 1 sensor A CCD sensor is 1 sensor The provided Line Scan Camera is 1 sensor A hall effect sensor on two rear wheels is 2 sensors An encoder mounted on one wheel is 1 sensor A display (is allowed) does not count as a sensor Section 4: Vehicle Inspection Before the race, the judges will perform a technical inspection of all entries. This includes vehicle specifications, dimensions, and equipment requirements listed in Section 3. All cars must be placed in the Inspection area on or before the designated time. Once in the Inspection Area, you may not touch car until you are called to race! In the event of any violations, the organizing committee may disqualify the corresponding team. Section 5: Timed Race Procedure Race order will be determined by a random drawing. When your team is called you may remove your car  from inspection area.  You will have two (2) minutes to prepare the car. Approved Adjustments - You may: Configure parameters via on-board interfaces. (Switches, Knobs, etc.) Alter the angle of your camera Change batteries  Disallowed Adjustments -You may not: Reprogram your processor Configure parameters via wired or wireless communications. There shall be only one team member on the track at any given time. (excludes testing times) Before the 2 minute expires you must signal “Ready” to the referee before starting car. After the referee confirms “Ready”, the vehicle should leave the starting area within 30 seconds. Teams have THREE attempts to complete ONE lap.  The FIRST (not the best) completed time will be recorded. Example: Attempt 1 – Vehicle goes to fast around a curve and goes off track.  Time is not recorded. Attempt 2 – Vehicle makes it around track successfully.  Time is recorded. Attempt 3 – Is forfeit because FIRST time (Attempt 2) has been recorded. After each attempt you have two minutes to make approved (see above) adjustments to vehicle. After the attempts, the team shall return the vehicle to inspection area. Event displays will post the times after each team races. Section 6: Race Day Schedule Practice Time - Prior to final race, a test track will be available. Final calibration may be made at this time.  This will be organized with team slots and/or “free-time”.   2. Reconfigure practice track to final track. Vehicle Inspection (see section 4) Timed Race Awards Ceremony Section 7: Event Personnel Organizing committee – A committee of senior judges and Freescale event organizers.  Will coordinate event day activities and mediate and resolve any disputes. Referees -  Responsible for on-track activities. This includes race track management such as starting and stopping vehicles, as well as timing and scorekeeping. Comprise up of of faculty, student, and/or Freescale and industry employees. Judges  - Interpret and enforce rule compliance.  This will be comprised of Freescale employees and members of contributing industry sponsors. Event Personnel shall not aid any one specific team. Communication shall be open to all teams and shall not disclose any information that might compromise the fairness of the competition. Section 8: Fouls, Failure and Disqualifications The rules will be interpreted by Freescale and the organizing committee of the event.             Foul, is a minor infraction, which results in time penalties. Failure, results in the current attempt time not being recorded. Subsequent attempts are allowed. Disqualification is a major infraction which results all times not being recorded. Referee will determine whether the racing car ran out of the race track and assign time penalties. Any of the following conditions will be considered a foul and will result in time penalty added: The race car fails to leave the starting area within 30 seconds after beginning of the race [+1 second]. The race car fails to stop 2 meters/6 feet or leaves the track after crossing the finish line [+1 second]. Any of the following conditions will be considered a failure and no time will be given: Three or more wheels leave the race surface. The racing team fails to get prepared for the attempt within the two (2) minutes allotment. The player touches the race car after the technical inspection without consent of the referee. The race car fails to finish within 120 seconds after leaving the starting area. Touching the car at any time between start and finish. "Start" - Once the vehicle crosses the starting line. "Finish" - Once the vehicle crosses the finish line. Any of the following conditions will be considered a disqualification:   Any off track equipment or behavior that may influence or impede cars.   Doing a Disallowed Modification anytime after Inspection. More than one team member in the playing field. Any cheating during the competition. Failure to pass the technical inspection. Equality and fairness will be ensured as much as possible on the condition of actual feasibility.  Disputes will be resolved by a vote of Freescale, members of the organizing committee, and judges. Section 9: Timing/Scoring Time will be captured using an electronic gate and/or handheld timer. Time starts and ends when the first part of the racing car breaks the start/finish line. Fouls will result in the time addition to the car’s lap time. Disqualifications and Failures will result in no score. Section 10: Parameters of the Racing Track A test track made from the same material as the final track will be made available on the day prior to the final race for calibration and design modifications. The actual layout of the final racing track will be unknown to competitors until competition day. Width of the racing track shall not be less than 600mm/23.65in. Material and dimensional specifications can be found on the community. Surface of the racing track is matte white, with a continuous black line (25mm/1in wide) on each edge of the track. The racing track can intersect with a crossing angle of 90°. The racing track can have inclines, declines,  and tunnels. The rules and conditions are subject to change by Freescale if necessary. Freescale reserves the right in their sole discretion to cancel, suspend and/or modify The Freescale Cup race at any time. These official rules are drawn up in the English language. If these official rules are provided in any other language and there is a conflict in the text, the English language text shall prevail. Freescale and the Freescale logo are trademarks or registered trademarks of Freescale Semiconductor, Inc. in the U.S. and other countries. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2014
View full article
This tutorial is meant to introduce you to the use of a push button. It will give an explanation and example code of how you could implement a push button. Push buttons can be a great way to set a number of different states. Push buttons are advantageous because you can change your code physically versus pulling up the debugger every time you want to make a little change. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Usage A button can have many different functions on your autonomous vehicle. Most notably the button has been used for testing to start, stop, or put your car in a configuration mode. Configuration mode would let you test to see if all the peripherals except the motors are working. This would help you test your camera data and servo angles without always having to run after your car. During your race you can even set your button to different speed states. Since you have two chance to traverse the track you may have a slower safer speed on one state and a faster speed the pushes the limit on another state. In the end, what you do with the button is up to you and the choices are unlimited. Description of Example Code Below there will be an example of how to implement a push button. This push button will be connected to PTA16. When reading this pin a high, "1" or 5V, is considered "OFF" and a low, "0" or 0V, is considered "ON." To reduce the effects of bounce and/or the chance of a false press, additional code has been added to filter the signal. This is done by checking the button every 10ms for 50ms. If the button has been pressed for 3 or more of the 5 times we will change the state, otherwise it will not be considered a "press." Button Initialization Here is the initialization code that can be put in a header such as "Button.h." #define BUTTONLENGTH 5   // Button's Defined State   // 0 means button not pressed   // 1 means button pressed short fButton = 0; short iButtonCount=0; short iButtonTimer=0;   // Button Triggered Start time short iButtonTime; void initButton() {   //turn on clock to Port A   SIM_SCGC5 |= SIM_SCGC5_PORTA_MASK;   // configure pin to be GPIO   PORTA_PCR16 = PORT_PCR_MUX(1) | PORT_PCR_DSE_MASK;   // configure PTA16 to be input   GPIOA_PDDR &= (0<<16);  } See GPIO for explanation of how these specific commands work. Button Implementation Below is an example of a function that implements the button function. This function can be stored in a header file "Button.h" along with the initialization code. To call this function you would just place "readButton();" in your 10ms Flextimer source code. Read comments for description of each line Void readButton () {                  short fButtonState  = 0;   // initializes the button state to "OFF"           iButtonCount++;            // increments button count      if (GPIOA_PDIR & (1<<16)) {                    // if button read as high then its off otherwise its on           fButtonState = 0;      } else {           fButtonState = 1;      }      if (fButtonState && ! fButton) {                          // if the button is pushed and it previously wasn't then start a count           iButtonTimer++;           if (iButtonTimer <= 1) {                                                             iButtonCount = 0;                                 // Reset the Button Count if the timer is less or equal to 1           }      } else if (! fButtonState && fButton) {           iButtonTimer++;           if ( iButtonTimer <= 1) {                iButtonCount = 0;                               // Reset the Button count if the timer is less or equal to 1           }      }      if ( iButtonCount > BUTTONLENGTH && iButtonTimer >0) {     // if button has been read for 50ms check to see if we passed the test!           if ( iButtonTimer > (3*BUTTONLENGTH/4) && fButton) {                // fButton = 0;           } else if (iButtonTimer > (3*BUTTONLENGTH/4) && ! fButton) {                fButton = 1;           }           iButtonCount = 0;           iButtonTimer = 0;     } }
View full article
Here is a simple example developed at Politecnico di Torino, to show how the NXP CUP car can be managed using Simulink-generated code. The Simulink model is intended to move the car forward and backward for 20 seconds, or until an obstacle is found. Any comment is welcome.
View full article
This tutorial covers the details of Turning A Servo on the Kinetis K40 using TWR-K40x256-KIT evaluation board. Overview In this exercise you will build a “bare metal” (no RTOS) application which turns a servo, targeting a Freescale K40 board. You will: Create the Servo code in CodeWarrior Build the Servo project Download and run the code on a Kinetis K40 Tower System board Learn how to utilize the FlexTimer module to control a Servo   To successfully complete this exercise you need the following board and development environment. The K40 Tower card, TWR-K40x256 Tower Elevator Panels Servo Prototyping Board Power to your servo - either utilize the 7.2v Nicad Battery or a DC power supply CodeWarrior for Microcontrollers 1. Hardware 2. Create a New CodeWarrior Project 3. Build the Code 4. Download/Debug/Run 5. Learning Step: Servo Code Description Example Code Variables Init_PWM_Servo PWM_Servo PWM_Servo_Angle Set Up a Look-Up Table for Servo Angles Other K40 Tutorials: Links 1. Hardware   The first step of this tutorial requires you read the Turn A Servo article for background information on servo's, timer modules, PWM signals and counters. You will need to connect your servo to the microcontroller and also to a separate power source. 2. Create a New CodeWarrior Project The next step is to create a new project (or add this code to an existing project). 3. Build the Code If you have more than one project in your project view, make sure the proper project is the focus. The most reliable way to do this is to right click the project and choose Build Project as shown below. You can also go to the Project menu and choose the same command. If you encounter errors, look in the Problems view and resolve them. You can ignore any warnings. 4. Download/Debug/Run This link shows a video of the servo turning the wheels from left to right in small increments http://www.youtube.com/watch?v=QgwASk9DHvU&feature=relmfu 5. Learning Step: Servo Code Description Your code will sweep your servo from max to minimum angular position, and then back again continuously. Example Code This code sets up the Pulse Width Modulation Timer Module for use by a servo. It is set to utilize Edge-Aligned PWM, and this file properly configures the period, and pulse width for use by the other modules Several important functions are contained in this file: 1. Init_PWM_Servo () - initializes the timer module 2. PWM_Servo (double duty_Cycle) - enter the desired duty cycle setting for the servo 3. PWM_Servo_Angle (int Angle) - enter the desired angle for the servo Straight forward - PWM_Servo_Angle (45) Full left - PWM_Servo_Angle (90)Full right - PWM_Servo_Angle (0)   4. Servo_Tick - interrupt routine which executes once/servo period PWM_Servo (double duty_Cycle) Init_PWM_Servo () PWM_Servo_Angle (float Angle) void ServoTick() Variables FTM0_CLK_PRESCALE TM0_OVERFLOW_FREQUENCY Pulse_Width_Low Pulse_Width_High Total_Count Low_Count Scale_Factor Angle Init_PWM_Servo Void Init_PWM_Servo () { //Enable the Clock to the FTM0 Module SIM_SCGC6 |= SIM_SCGC6_FTM0_MASK;  //Pin control Register (MUX allowing user to route the desired signal to the pin.  PORTC_PCR4  = PORT_PCR_MUX(4)  | PORT_PCR_DSE_MASK; //FTM0_MODE[WPDIS] = 1; //Disable Write Protection - enables changes to QUADEN, DECAPEN, etc.  FTM0_MODE |= FTM_MODE_WPDIS_MASK; //FTMEN is bit 0, need to set to zero so DECAPEN can be set to 0 FTM0_MODE &= ~1; //Set Edge Aligned PWM FTM0_QDCTRL &=~FTM_QDCTRL_QUADEN_MASK;  //QUADEN is Bit 1, Set Quadrature Decoder Mode (QUADEN) Enable to 0,   (disabled) // Also need to setup the FTM0C0SC channel control register FTM0_CNT = 0x0; //FTM Counter Value - reset counter to zero FTM0_MOD = (PERIPHERAL_BUS_CLOCK/(1<<FTM0_CLK_PRESCALE))/FTM0_OVERFLOW_FREQUENCY ;  // Count value of full duty cycle FTM0_CNTIN = 0; //Set the Counter Initial Value to 0 // FTMx_CnSC - contains the channel-interrupt status flag control bits FTM0_C3SC |= FTM_CnSC_ELSB_MASK; //Edge or level select FTM0_C3SC &= ~FTM_CnSC_ELSA_MASK; //Edge or level Select FTM0_C3SC |= FTM_CnSC_MSB_MASK; //Channel Mode select //Edit registers when no clock is fed to timer so the MOD value, gets pushed in immediately FTM0_SC = 0; //Make sure its Off! //FTMx_CnV contains the captured FTM counter value, this value determines the pulse width FTM0_C3V = FTM0_MOD; //Status and Control bits FTM0_SC =  FTM_SC_CLKS(1); // Selects Clock source to be "system clock" or (01) //sets pre-scale value see details below FTM0_SC |= FTM_SC_PS(FTM0_CLK_PRESCALE); /******begin FTM_SC_PS details **************************** * Sets the Prescale value for the Flex Timer Module which divides the * Peripheral bus clock -> 48Mhz by the set amount * Peripheral bus clock set up in clock.h *  * The value of the prescaler is selected by the PS[2:0] bits.  * (FTMx_SC field bits 0-2 are Prescale bits -  set above in FTM_SC Setting) *  *  000 - 0 - No divide *  001 - 1 - Divide by 2 *  010 - 2 - Divide by 4 *  011 - 3 - Divide by 8 *  100 - 4 - Divide by 16 *  101 - 5 - Divide by 32 *  110 - 6 - Divide by 64 - *  111 - 7 - Divide by 128 *  ******end FTM_SC_PS details*****************************/ // Interrupts FTM0_SC |= FTM_SC_TOIE_MASK; //Enable the interrupt mask.  timer overflow interrupt.. enables interrupt signal to come out of the module itself...  (have to enable 2x, one in the peripheral and once in the NVIC enable_irq(62);  // Set NVIC location, but you still have to change/check NVIC file sysinit.c under Project Settings Folder } PWM_Servo Void PWM_Servo (double duty_Cycle) {          FTM0_C3V =  FTM0_MOD*(duty_Cycle*.01); } PWM_Servo_Angle //PWM_Servo_Angle is an integer value between 0 and 90 //where 0 sets servo to full right, 45 sets servo to middle, 90 sets servo to full left void PWM_Servo_Angle (float Angle) {    High_Count = FTM0_MOD*(Pulse_Width_High)*FTM0_OVERFLOW_FREQUENCY;    Low_Count = FTM0_MOD*(Pulse_Width_Low)*FTM0_OVERFLOW_FREQUENCY;    Total_Count = High_Count - Low_Count;    Scale_Factor = High_Count -Total_Count*(Angle/90);     FTM0_C3V = Scale_Factor; //sets count to scaled value based on above calculations } Set Up a Look-Up Table for Servo Angles int main(void) {   //Servo angles can be stored in a look-up table for steering the car.   float table[n] = { steering_angle_0;    steering_angle_1;    steering_angle_2;   ……    steering_angle_n-1    };   Steering_Angle = table[x];   PWM_Servo_Angle (Steering_Angle); // Call PWM_Servo_Angle function. } Other K40 Tutorials: K40 Blink LED Tutorial K40 DC Motor Tutorial Kinetis K40: Turning A Servo K40 Line Scan Camera Tutorial Links Kinetis K40 TWR-K40X256-KIT
View full article
MathWorks is a proud global sponsor of The NXP Cup If you are a member of a NXP Cup team, you have access to a complimentary Software License for MATLAB / Simulink. Visit the NXP Cup - MathWorks Deutschland website to learn more about the Software offering.  Examples for using Simulink in the NXP Cup are packaged with the Simulink Coder Support Package for  FRDM-KL25Z available from the Hardware Support Page.  Additional examples for reading and analyzing live data from the Line Scan Camera are available in the NXP Cup Companion App available on the MATLAB File Exchange.  Additionally, there is an example which uses the Simulink Coder product from MathWorks to target the FRDM-KL25Z. Feel free to use the forum on MATLAB Answers or here below to ask your questions about MATLAB use with The NXP Cup.  You can also email roboticsarena@mathworks.com with any questions.
View full article
The components of this kit will provide students with the basic materials. The challenge for teams is to collaborate with peers to design the interconnecting hardware and to create the algorithms that will give a vehicle the competitive edge. The sensor interfacing, vehicle navigation, signal processing and control systems techniques students will learn can be applied to most embedded systems. Included in the Freescale Cup Kit Part Number: TFC-KIT Model Car chassis Line Scan Camera Interface and Motor Controller Board   Part Number: TFC-5604B-KIT  All pieces inside TFC-KIT Freescale Microcontroller Board (Qorivva MPC5604B) Getting Started: 1. Purchase the kit 2. Explore the tutorials and reference materials Take the Freescale Cup Training Tutorials Browse through the sample code within the tutorials Download the reference manuals for your microcontroller, many which are linked to from this wkik Navigate to the training modules and videos of the Designing and programming your Cup Car: Hardware 1.Tools needed: In addition to what is provided in the kit, you will need several other tools you will need to design and build a working intelligent car. Must have Soldering iron Solder Solder wick Wire (gauges) Oscilloscope Useful Power Supply Solder remover bulb Oscilloscope DMM Optional Access to a Rapid Prototyping Machine Software such as Eagle or PCBArtist 2.Electronics Components you will want to obtain soon Software What we’ve provided The software provided in this wikiwill get you started in your task of creating an intelligent car. We have included files which you can load onto your microcontroller which blink a led, activate the motor and servo, as well as a small simple driver for the camera which sends it the proper signals and reads data into your microcontroller. What you need to design Your job will be to connect the various components together, refine and add to the code we have provided and create a working intelligent car. Start thinking about how you will determine where the line is on the track, what algorithm you will use for steering and deciding how much power you want to send to your motor. You may want to read up on PID controllers, or other types of control systems. Are there any special features that you might want to add to your car – such as real time debugging? Those features will require extra work and up front planning. Planning and Teamwork You might not have the time to document all your designs and concepts properly before sitting down to code or to create a piece of hardware, but you might want to create an ordered list of all the different tasks which will be necessary to finish the car, who will do those items, and when you want each task to be finished. A schedule will help you determine if you are on track with your goals …
View full article
This year we are launching the inaugural Global Freescale Cup challenge.  Teams from 9 regions of the world will be competing to see who the best-of-the-best is. Regional student champions will be working hard to create the most intelligent race car to win Global challenge on August 22-24, 2013, held at the Harbin Institute of Technology in China. The challenge will feature Freescale’s 32-bit microprocessors either ARM-based or Power Architecture-based. Important Information 2013 Global Rules Team Registration (closed) Click "Receive email updates" from right navigation to stay informed of changes. Add your own questions below in the comments section. View this page as a PDF - To print Meet the Teams Brazil - Escola Politecnica da Universidade de Sao Paulo China - (Semi-finalist*) University of Science and Technology China - (Semi-finalist*) South-Center University for Nationalities Slovakia - Slovak University of Technology India - Bannari Amman Institute of Technology Japan - The University of Tokyo Malaysia - Swinburne University of Technology Mexico - Instituto Politecnico Nacional Taiwan - National Taiwan University of Science and Technology United States - University of California Berkeley - Team Jolt *Semifinalist teams to compete prior to the global challenge to determine which team will represent the region. Event Agenda (Subject to Change.  All listed times are local time) August 21st Team Arrivals. Transportation arranged for all teams from Airport to Hotel. Look for The Freescale Cup sign. Arrival times provided. August 22nd 07:30 - 12:00 Team Tour - Sun Island 12:00 -13:00 Team Lunch Practice Track A Track B 12:55 - 13:15 University of Science and Technology Beijing South Center University for Nationalities 13:15 - 13:45 Mandatory Team Meeting & Rule Review 13:45 - 14:05 The University of Tokyo National Taiwan University of Science and Technology 14:10 - 14:30 UC Berkeley Swinburne University of Technology 14:35 - 14:55 Bannari Anman Institute of Technology Escola Politecnica da Universidade de Sao Paulo 15:00-15:20 South Center University for Nationalities University of Science and Technology Beijing 15:25 - 15:45 Instituto Politecnico Nacional Slovak University of Technology 15:55 - 16:10 National Taiwan University of Science and Technology The University of Tokyo 16:15 - 16:35 Swinburne University of Technology UC Berkeley 16:40 - 17:00 Escola Politecnica da Universidade de Sao Paulo Bannari Anman Institute of Technology 17:05 - 17:25 Slovak University of Technology Instituto Politecnico Nacional 18:00 - 19:00 Team Dinner August 23rd 8:00 - 8:30 Opening Ceremony 8:30 - 9:00 Final Race China Semi-finalists 9:10 - 9:30 Practice Track C - Slovak University of Technology 9:35 - 9:55 Practice Track C - The University of Tokyo 10:00 - 10:20 Practice Track C - UC Berkeley 10:00 - 10:45 Practice Track C - Bannari Anman Institute of Technology 10:50 - 11:10 Practice Track C - Instituto Politecnico Nacional 12:00 - 13:00 Team Lunch 13:20 - 13:40 Practice Track C - National Taiwan University of Science and Technology 13:45 - 14:05 Practice Track C - Swinburne University of Technology 14:10 - 14:30 Practice Track C - Escola Politecnica da Universidade de Sao Paulo 14:35 - 14:55 Practice Track C - Winner of China Semi-finals 4:00p - 4:30p Track Change 4:30p - 5:30p Final Race 5:30p - 6:00p Awards Ceremony 6:00p - 7:00p Team Dinner August 24th Teams to observe the finals of the China regional. 8:00  - 11:00 China Regional - Final Speed Race 11:00 - 12:00 China Regional - Final Innovation Competition 12:00 - 12:30 China Regional - Awards Ceremony 12:30 - 17:00 Free Time 17:00 - 18:00 Team Dinner Event Hotel Harbin Sinoway Hotel Address: No.2 Yiyuan Street. Harbin China. Contact: Xiaodan Liu Mobile Phone: 15904611007 Current Weather Conditions Link will re-direct to weather.com Race Location Harbin Institute of Technology August 22-24, 2013 Contributing Sponsors    
View full article
Depending on which MCU Devlopment board you have chosen, you will need to figure out a way to mount this to the chassis. I have seen everything from cardboard, to aluminum, to wood. Below is a template complete with CAD drawings to mount the Qorivva TRK-MPC5604B board and the Motor Board onto the chassis. We use plexiglass for ours, but any other millable material is appropriate. The large hole in the middle is for cables from the servo. We attach the board to the car using the plastic standoffs (you will need them 55 mm long, so in our case, we used the combination of 40 + 15 mm) - see an example (SOS code 10260). To attach both the processor and interface boards the simillar 5mm plastic standoffs were used. Preview (.pdf) CAD file (.dxf)
View full article
Which Platform to use?  Qorivva or Kinetis? Both are 32-bit devices. The Qorivva products, a Power architecture, are used widely in the automotive industry.  It has specialized peripherals such as CAN and LIN.  Automotive products are built tough, to high industry standards. The Kinetis products, ARM M4 architecture, are widely used.  You will find it in lots of everyday devices and industrial automation (such as robotics). It can support a lot of consumer peripherals such as USB, WiFi, and Graphical Displays. Which platform is more powerful or easy to use? Both supported processors are powerful 32 bit microcontrollers with similar software peripherals. Take an hour or two to research the evaluation boards on the Freescale sites and their underlying technologies. Think through the design and implementation process of connecting various components like the motor, battery and servo, to the evaluation board. The Tower System provides a modular prototyping platform, and the TRK evaluation board has many features. What level of support does a technology have? For the Cup Challenge, you may use any Freescale microcontroller. There are reference designs here on the wiki and TONS of code and examples on the Freescale site. Students should speak with their professor, and check out their respective documentation and software examples to make a choice. Having on campus support is invaluable in this case. There are online communities for the respective technologies as well. Research which technologies are have more active user communities which best complement the teams design approach? Obviously the Freescale Cup Wiki itself is a resource, and provides details on how to use two different microcontrollers - so it might be best to limit choices to one of these two supported platforms.
View full article