Assem Manual
Assem Manual
Assem Manual
1. Introduction ..3-8
2. Assemble Car Chassis ..9-30
3. Download Codes
4. Test Your Car
5. Be the Best
1. Introduction
This manual step-by-step guides you how to build an autonomous intelligent car using the Freescale Car kit and the Kinetis K40 MCU.
This manual consists of five chapters. The Introduction chapter provides you some brief information about the Freescale Cup intelligent car
race as well as what you can expect from the Freescale Car Kit. The majority of this guide focuses on assembling the car chassis and installing
the source code into the K40 MCU chip.
The last chapter, the Be The Best chapter is for advanced users. You
will find high level of information about how to modify the source code
thus to maximize the speed. In addition, advanced concepts of Electrical
Engineering, Mechanical Control System and C programming can be found
in this chapter. You dont necessarily need the last chapter to run the
car normally. But if you want your car be the fastest, that chapter will
give you the information you need.
Camera assembly
1. Set Up
Before your start, have the following components ready:
A. Model Car, Dual Motor X1
******Tools Recommended********
G. Light Sensor X1
Pliers
Wire Stripper
Modeling Knife
Scissors
2. 1 Servo Motor
Servos are specialized DC motors that controls the steering of your model car. The
servo motor is placed at the front of the Freescale Cup car, connecting the front
two wheels with control arms.
The servo motor we use in the Freescale Cup is Futaba S3010, as shown in the picture. You can use a similar servo instead, as long as you can appropriately install the
servo onto the car. Most modern servos have a three wire interface, as you can see
coming out from your servo, labeled in colors of black (ground), red (V+), and white
(control) separately.
The black wire is for connecting to the ground. In electrical engineering, ground
doesnt necessarily mean it is directly connected to the earth ground. It is a reference point (for example, 0 Voltage) where other voltages can be measured from. So
for example, in the most cases, the ground voltage is set to be 0V. If the voltage at
A is 7.2V, then the voltage difference will be:
7.2V0V = 7.2V
The red wire is for connecting to the V+, or a power supply source ranging from
4.8V ~ 6.0V depending on the speed of rotation you want. Here you dont need to
worry about picking the voltage values. It will automatically set to 5.0V when you
connect the servo to the board.
The white wire is for connecting the control signal, or pulse width modulation (PWM)
signal. A PWM is a square wave with a set period. By changing the width of on versus the entire period, a digital ratio from 0 ~ 100% can be obtained. This ratio is
called the duty circle, which is used to control the rotation of the servo. For example, 0 is full left, and 100% is full right.
See the next page to see how to assemble and install the servo.
In step 1, DO NOT force servos steering position (the turning plate) using hands.
There are two sizes of metal balls in the package. Pick the large ones.
The control arms in step 3 are quite tough to assemble. Use a pair of pliers to help to
screw in the arm ends
Make sure the servo is in the 0 degree position before securing the control arms in Step
3. Please refer to the next page (P13) to know more about how to electronically control
the servo motor.
After you set the servo motor to the 0 degree, you can first attach one arm, then hold
the front wheel straight, then put on the other control arm. You will find this will help
align the front two wheels, which is critical in the cars performance.
http://www.gpdealera.com/cgi-bin/wgainf100p.pgm?I=FUTM0043
This is the Futaba Standard Size Ball Bearing High Torque Servo.
This servo can produce high-current draw from your batteries.
If using NiMH or LiPo batteries, make sure they are capable
of delivering approximately 2A for each servo.
FEATURES: Ideal for high-torque applications requiring a standard size servo
Universal connector fits Futaba, Hitec, JR, KO Propo, Airtronics Z,
and Tower Hobbies. Does not fit old Airtronics A plug w/out adapter
Nylon gears
One bearing pre-mounted on output shaft.
One year warranty
INCLUDES: One Futaba standard size high torque servo with;
One 1.4" (35mm) diameter round servo wheel
One 1.5" (39mm) diameter 4 point servo wheel
One 1.25" (32mm) diameter 6 point servo wheel
Four 2mm x 11mm phillips screws
Four rubber grommets & Four metal eyelets
REQUIRES: Small phillips screwdriver to mount to surface
SPECS: Speed: 0.20 sec/60 @ 4.8V
0.16 sec/60 @ 6.0V
Torque: 72 oz-in (5.2 kg-cm) @ 4.8V and
90 oz-in (6.5 kg-cm) @ 6V
Dimensions: 1.6 x 0.8 x 1.5" (1-9/16 x 13/16 x 1-1/2")
(40 x 20 x 38mm)
Weight: 1.5oz (1-7/16oz) (41g)
Pins layout:
If you take out the sensor cable (refer to the next page), you will see five wires, labeled in color of black (ground), brown (Vdd), red (clock), orange (serial input) and
yellow (analog out).
Ground: It connects to the GND pin. We have already talked about this in the previous chapter.
Vdd: It is the same as V+. It connects to a DC power source, which is 5V for this
CMOS sensor.
Clock: All digital sensor needs a clock pulse signal to coordinate its actions. Basically, the clock signal oscillates between high and low in the form of 50% of duty cycle with a constant time period. The clock signal is vital for a digital sensor to function.
SI: A SI signal, or a serial input is a pulse signal that plays as shutter in a camera.
This signal tells the camera to scan and expose the image for every couple milliseconds.
AOUT: Analog out is an analog signal (continuous signal) that is outputted and processed by the K40 microcontroller. The signal is continuous varying from 0V to Vdd,
which is +5V in this case. An Analog to Digital Converter (ADC) in the microcontroller will convert this continuous signal into a series of discrete number (digitalization)
so that the MCU can understand.
For example, an 8 bit ADC has 256 discrete levels (2^8 = 256). So 0V will correspond to a digital number of 0. And 5V will correspond to 255 ( digital number starts
from 0 not 1). The amount of increment of each discrete step will be:
5V / 256 = 0.01953125 V/bit
So bit 128 will be 2.5 V. (0.01953125 V/bit * 128 bit = 2.5V)
S2: Assemble the camera. The orientation doesnt matter. Watch out your screw driver not to damage small components on the sensors back.
S3: Connect the module to the sensor cable. Refer to the labels at the back of the sensor, the
black wire should be connected to GND and yellow
to AOUT.
S2: Sharpen the wires ends so that they can fit into the motor
board( you dont necessarily need to plug them in now)
Kinetis TWR-K40X256 controller module: The K40 MCU board can function as a
stand-alone platform as well as being included as the part of the K40 tower system.
K40 board is the core of the whole tower system. Engineers read its reference manual and schematic to know which port and peripheral they can use for their applications. Then programs can be written and flashed into the chip. The process of programming a MCU can be very long and difficult. Fortunately, we have already composed the majority of the code for you. You will just need to find the code and
download it into the chip, and maybe do a slight modification.
As you can tell, the MCU board you use looks different from the one showed in the
picture. This MCU board, developed by Professor Eli Hughes from Penn State University, integrates with the motor drive board. This integration makes wiring much
easier.
S2: Connect the MCU to the Primary elevator, labeled by its white edge.
S3: Plug in the Proto Module with its white card edge.
Now you have built your K40 Tower. You will have to find a way to mount the tower
on your car chassis. The Freescale Cup Car Kit doesnt provide board mounting gears
to mount the tower. So you will need to DIY your own mounting.
One way of doing this is attaching the TWR-PROTO board on the car chassis. By doing this, you will need to drill 4 holes on corners of the PROTO board. There are a
lot of bus on the PROTO board. So you dont need to worry about damaging the
whole board. There is no standard for the mounting design. Just let your imagination
fly! You probably will make something that are both useful and nice-looking if you are
willing to brain storm.
Here is an example for mounting you K40 TWR board onto the
car chassis.
S3: Build your tower. Notice that the primary elevator module
should be attached to the primary connectors, which are indicated by the white edges on the PROTO board and the Kinetis
K40.
S2: Connect the servo motor to the board. Use J12. Be careful with the orientation,
look for the GND pin.
S4: Connect the battery to the board. Again, be careful with the orientation, the
ground line MUST go to GND port.
1. The motor cables are not soldered very tightly. You can easily pull them off, so
be careful when you are connecting the motor cables.
2. Servo motor assembly: It will be much easier if you attach one control arm first,
then have one person hold the wheel straight and attach the other one.
3. Use electrical tape to wrap any exposed wire. Exposed wires can potentially cause
the board short-circuited and burn the chip!
4. Never power the microcontroller from different power sources! Switch off the
MCU board before you connect your it to your PC.
5. Be careful with the orientation when you plug in wires. It is a good idea if you
can verify the right pin with a digital multimeter (DMM).