2. Table of Contents
01) Cover Page 20) How an ADC works 39) Circuit I/O tables 58) Car Programming V3
02)Tables of Content 21) Practical Investigation 2 40) Laser Cutting 59) Dual Core System
03) Project Overview 22) Mathematical Analysis 41) Potential Designs 60) New Program Algorithm
04) Needs and Specification 23) Practical Investigation 3 42) Prototype Development of Controller 61) Explaining how improvements work
05) General Discussion 24) Questionnaire 43) Potential Designs 62) Single Core Vs. Dual Core
06) Spider Diagram 25) Questionnaire Results 44) Prototype Development of Car 63) Correcting Differential Torque
07) Possible Control Systems 26) How to make a PCB 45) 2D Design Files sent to Laser Cutter 64) Reprogramming the OLED
08) Planning my research 27) Controller Circuit Board Breakdown 46) Controller I/O test 65) Hardware Improvements
09) Existing Products 28) Controller PCB Breakdown 47) Car I/O test 66) Injection Moulding methodology
10) Background Research 29) Controller Breadboard 48) Program Algorithm 67) PCB Production in Industry
11) Hand sensor Research 30) Car Circuit Board Breakdown 49) Controller Programming – Problem 68) Design for Market
12) Control Processor Research 31) Car PCB Development Breakdown 50) Controller Programming V2 69) Future Communication Improvements
13) Wireless Communication Research 32) Car Breadboard 51) Car Programming V2 70) Cost
14) Screen Research 33) Explanation of Circuits 52) Photos showing the controller working 71) Time Gantt Chart
15) Quality Testing 34) Comparing Car Circuit to PCB 53) Final Design 72) Specification Evaluation
16) Types of Motors 35) Comparing Controller Circuit to PCB 54) Problems 73) Health and Safety and the Environment
17) Possible Motor Control Circuits 36) Comparing Controller PCB Design to Auto-router 55) Improvements 74) SWOT
18) Motor Power Delivery 37) Comparing Car PCB to Design to Auto-router 56) Two Way Handshake Routine 75) Gallery Page 1
19) Practical Investigation 38) Front and Back View of PCB 57) Controller Programming V3 76) Gallery Page 2 and Final Client Comments
Nathan Raj 2
3. Project Overview - for Examiner use
Practical
Investigation
Built arm
mounted
Controller
Built Robot
with
ultrasound
Handshaking
Corrected
differential
torque
Pages 17-21
Pages 26-28, 37-39,
40-41, 45, 47-49, 51-52
Pages 29-31, 37-38,
42-44, 46-47, 50, 52
Pages 55-57
Page 62
I conducted a practical
investigation into the
workings of the
accelerometer. I
learned how to
interface with the
device using a PIC
chip’s ADC.
I designed most
aspects of the
controller including the
PCB, case and the
programming.
I designed most
aspects of the car
including the PCB, case
and the programming.
I created a lock
mechanism which only
allow the car to be
controlled after the
correct code has been
submitted to it.
I corrected the slight
difference in power
output between the
motors. This reduced
the effect by a factor
of twenty..
Built a Dual
core System
Pages 58-61
I designed a new robot
which had a second
chip which
communicated via the
use of hardware
interrupts
Nathan Raj 3
4. Needs and Specification
Needs Specification
Problem and brief:
There is no problem to resolve. I am trying to create a game
for people to enjoy. The enjoyment will help release
endorphins into the blood which will relieve stress in the users.
It will also improve hand-eye coordination and stimulate an
interest into high-tech toys.
User Requirements:
Car should travel at a minimum of 0.1ms-1
Batteries must last one hour
Easy to replace batteries
The OLED must be visible to read from the screen at 50cm.
The R/F units must be capable of working at 15 meters
The car must be able to go forwards, backwards, and
rotating about a point so it turns within its own length
There should be no noticeable input lag from the
controller
The vehicle will have streamlined and appealing form
The LEDs must be visible at 2 meters.
It must be capable of crossing different surfaces
The accelerometer must intuitively allow control over the
car
Ultrasound can reliable detect walls at 30cm
Must be able to run over a variety of domestic materials.
The controller must contour to fit the forearm.
The car must be small enough to use in a domestic
environment
Target Market:
My Product is primarily for people who are interested in racing
or cars. However, as it is also entertaining as a toy in its self so
its target audience can be extended to a wider range of anyone
above the age of 5. My client is my 13 year old brother who is
studying towards his GCSEs
Scale of Production: This will be a one off prototype
Cost: I aim for the cost to be under £250. Costing of
prototypes is a complex area - please see discussion later.
I love all of these ideas but can you make it
look like a UFO?
Nathan Raj 4
5. What is the need or problem I can solve?
There is no problem to resolve. I am creating a for people to enjoy and relieve stress and perhaps stimulate an interest in technology.
Who are the potential users?
Everyone who enjoys RC vehicles, hopefully it will appeal across all ranges – ‘fun for the whole family’.
How can I solve the problem?
There is no problem to solve other than designing a novel RC vehicle which could possibly find a profitable niche in the market.
What benefit will it bring to the users?
A high quality R/C car that works anywhere, anytime
What might the intended product be?
A R/C Car which is controlled by an arm-mounted accelerometer
Where would the product be used?
Anywhere where there is space, I would imagine largely inside a ‘normal’ domestic space.
Does it conform to a specific size?
It has to be small enough to exist in a domestic environment.
Does it have to fit any regulation or safety quality?
There will be no small removable parts that can be swallowed by small children. It will be a low voltage/current system.
What about aesthetics?
It should look appealing to adults and children.
What kind of material and processes can I use?
I will use a laser-cut plastic sheet for the case and etched PCB for the circuit board.
How should the product perform?
It should be fast enough and manoeuvrable so that it is fun to use. It must also be tough enough to withstand crashing into objects
What is the potential price range?
£150-250
Is it something I can design and make?
I have completed a GCSE in Electronic Products and the AS systems exam. This has provided me with the necessary skills operate 2D design for
the Laser Cutter and the programming skills to uses PICAXE programming Editor using PICAXE BASIC and to use PCB wizard to design a compact
circuit board. Google sketchup will assist with 3D design.
General Discussion
Nathan Raj 5
7. Possible Control Systems
All of my options are based on the PIC process stage. PIC chips can handle lots of inputs and
outputs and drive several outputs like sounders, OLED. PIC chips are highly capable because of
their large memory and their ability to handle large complex programs. I decided that all of my
proposed ideas will use accelerometers are input devices as way of easily comparing the results
Possible inputs Processes Possible Outputs
Idea 1 Wired Controller PIC chip OLED,LEDs and Motors
Idea 2 IR LED on the controller and IR Detector on car PIC chip OLED,LEDs and Motors
Idea 3 XBee R/F Pro Chip on both car and controller PIC chip OLED,LEDs and Motors
Chosen Idea XBee R/F Pro Chip on both car and controller PIC chip OLED,LEDs and Motors
I did not choose Idea 1 as the wire would be a serious trip hazard if it was long enough to allow free movement.
There is always the danger that it could be ripped out of the controller / vehicle causing damage.
I chose against Idea 2 because while it offered wireless function, it could not function without direct line of sight
which would be useless on controller which requires user to rotate it (to activate the accelerometer steering)
potentially out of sight!
I chose Idea 3 as it offered both a wireless feature and does not require line of sight meaning it is the only
suitable communication technology beside more expensive implementations like Wi-Fi and Bluetooth. The only
potential problem might be interference from other 2.4GHz systems. I will use qualifiers to help prevent this –
see coding notes.
Nathan Raj 7
8. Planning my research
Primary Research
Practical Investigation Here I test the accelerometer to test its
suitability as a control input for the
controller. I will use various tests and
mathematics to measure and calculate the
response from the accelerometer.
Potential Components I compare several different components to
judge which will be suitable to use for as the
sensor, processor, wireless communication
and a screen for input feedback.
Questionnaire I will create a questionnaire for my target
audience so that I can get their opinions
about the product and see their reactions to
different potential features.
Clientele Discussion I will meet with my target audience/client
and have a general discussion about the
features that they would like to see in my
product. Client input is necessary to ensure
that they will be satisfied with the end
product.
Secondary Research
Target Audience My product is an electronic toy car with a
novel input so it is aimed at children., with
hopefully some appeal to the whole family.
Quality and Health and
Safety Standards
I will consider whether my product has to
meet any specialised standards for its
purpose and ensure that it is not
considered a health risk.
Existing Products I will research existing products. I expect
that these will be found mostly either in
market as toys or entertainment devices.
These will be mainly RC vehicles. I doubt if
a wide variety utilising my proposed inputs
will be available, but I can look at RC
vehicles in general to determine the types
of control system and inputs/outputs
available. I can get some idea of cost and
what is currently selling in the market.
Nathan Raj 8
9. Existing Products
HDD Fall Protection Sphero 2.0 Myo Ipad
HDD can come with
accelerometer built in
which detect when
vibration or free fall is
detected so that the
heads can be unloaded to
prevent a head crash
which would be
catastrophic for data on
the drive.
The toys uses an
accelerometer and a
gyroscope for stabilising
the ball as it drives
around. This allows for
very little effort on the
user when driving as they
only need to specify a
direction and the robots
will obey.
The Myo is armband
which straps around your
arm and allows you to
use sensors to control
UAVs and various devices.
It uses 3-axis
accelerometer, 3-axis
gyroscope, 3-axis
magnetometer and a
EMG sensor to track the
arm in 3 dimensions and
when they are tensing
the muscles to provide
multiple trigger points for
control devices.
The Ipad has a
accelerometer built in
which allows it to detect
its orientation which
allows the screen to
rotate when watching a
video. Also games can
take advantages of the
raw data as a alternative
control methods for
games so the user can tilt
the device to drive cars
and planes.
These products shows that accelerometers are becoming more
commonplace in toys and there is a market for the product. I am
particularly impressed with the speed of response needed by the first
product. I need my vehicle to be responsive to real time movement of the
arm, so hopefully this shows that this should not be a problem.
Nathan Raj 9
10. Background Research – Phone accelerometer
The accelerometer is a form of a modified capacitor. As you can see in diagram (b)you have the two plates of a capacitor with a seismic mass in
between the two plates acting as the dielectric. In electronics capacitance is proportional to the area of the plates, the distance between the plates
and the distance between the dielectric and the plates. Inside a phones accelerometer each capacitor has the same sized plates and the same
distance between the plates However, as the phones is moved around the seismic mass is shifted causing the dielectric to move around this causing
the capacitance to vary.
This change in capacitance is detected using a H-bridge arrangement of capacitance(c). The input signal is applied across all four capacitor and is a AC
signal with a specific phase angle. As one of the capacitors change the output signal which is taken across the bridge changes its phase angle relative
to the phase angle. It is then possible this phase change into a voltage change which can be feed into a ADC port of a PIC chip. There is three sets of
these capacitors mounted perpendicular to each other allowing for the three axis to be measured simultaneously.
(C)
They have only relatively recently become sufficiently small and low cost enough for
widespread use in hand held devices. They are sold with a specification quoting a sensitivity
of output voltage per g. They are also available in 2 or 3 axis configurations.
Nathan Raj 10
11. 9DOF Razor IMU MMA7361L Flex Sensor
This IMU costs £46.59 and contains
an accelerometer, a gyroscope and a
magnetometer. This means that it
will be overbuilt for my purposes.
Also the accelerometer provides an
output with a 13-bit resolution which
the PIC chip cannot handle. This
means I would have to look into
alternate control processers to use
this. The magnetometer and
gyroscope look like they are intended
for some kind of inertial guidance
capability.
This accelerometer cost £9.84
and consists of a 1.5g
accelerometer which measure
pitch, roll and yaw in 8 bit
resolution. The output from
the 3 axis can be fed into the
ADC pins on the PIC Chip and
at certain thresholds the car
will move in a certain direction.
This makes its and accurate
and effective control input for
the car. It operates of the same
voltage supple as the rest of
the circuit.
The flex sensor sells for £4.93 and is
very simple to program as it will feed
an analogue voltage into the ADC pins
on the PIC chip and the thresholds
can be set to perform different tasks.
However it will need to be
incorporated into a potential divider,
as flexing it alters its resistance and
the potential divider translates this
into a voltage change. It might also be
difficult to incorporate into
something to mount on your hand
presumably it could be sown into
some kind of gauntlet – but this all
adds time and complexity.
Hand Sensor Component Research
Nathan Raj 11
12. Arduino Mega 20X2 PIC Intel I7
This Arduino chip retails at
£26.90 and uses C a
programming languages that
I do not currently know.
However, any pin can set up
for analogue or digital I/O.
This means it can complete
advanced multi input
functions easily. It has a
higher clock speed than the
PIC and is more capable.
However my lack of
familiarity and the limited
time frame available means it
will probably be excluded.
This PIC Chips sells for £4.99.
It uses a specialised form of
BASIC which I have
experience with. It is low
current so it will not sap
battery power but lacks some
advanced features like ADC
on all pins. All things
considered it is an cheap and
simple method for
constructing a prototype. It
supports interrupts for
scanning and responding to
inputs quickly.
This is a high speed multicore
processer will sells for £219.99.
This allow for far faster and more
complex coding in a variety of
programming languages Like
Python which I am currently
learning. However, it is
extremely expensive as it also
includes FPUs which I will not be
using. This results in a product
which is not cost effective. It is
meant for controlling ‘computer’
with their complex interfaces
and running an operating
system.
Control Processer Component Research
Nathan Raj 12
13. XBee Wi-Fi XBee® DigiMesh® 2.4 Infra-Red Emitter and
Receiver
This is a high-end transmitter
and receiver which operates
with Wi-Fi protocol . It can be
used with the same
commands and it uses SSIDs
as headers to reduce
interference as the DigiMesh
model will pick up all radio
waves on the 2.4GHz band.
However, it is primarily used
for mass data transfer on a
mesh network so is overbuilt
for the specification.
This is high–end radio frequency
transmitter and receiver. It
easily be repurposed on the fly
depending on the program
needs. It requires a simple
serout command in BASIC. Also
the signal can travel through
walls and upside down so it can
be easily used alongside the
accelerometer. This means that
it is viable option to fulfil the
specification.
This is a extremely simple
method for line of sight
communication . This hinders its
benefits as it requires the user to
bee able to point the emitter at
the car at all time. This is not
feasible due to the how the
accelerometer will control
movement. The accelerometer
requires the user to rotate the
device so line of sight can not be
maintained. So this is an entirely
inappropriate device. Data
transfer rates are also lower
than with Wi-Fi type systems.
Wireless Communication Component Research
Nathan Raj 13
14. LCD Screen OLED Screen Graphic OLED Screen
This LCD screen at £4.61 is
the cheapest option
However, it uses a backlight
which means it uses more
battery power which will
reduces the play time of the
controller. Also the backlight
does not provide as much
contrast which could lead to
eye strain for the consumer
This OLED screen retails at
£14.37 so is more expensive
but as it does not use a
backlight is it provides a
better contrast ratio and is
more power efficient so the
controller does not need to
change battery as often. I
have programming
experience with this screen
before as well. This is the
product that I will go with.
This OLED screen costs
£16.27 and so is the most
expensive of the possible
option. It offers the ability
to display small graphics
alongside the text. This
means it is harder to
program and given the time
constraints this is not an
option at this time but could
be a future improvement.
Screen Component Research
I only looked at 2 line displays as these have compact footprints suitable for fitting on a hand mounted unit. 2 lines should be adequate
for a basic UI.
Nathan Raj 14
15. Make PCB Visual Check
Write some code to test
the outputs
Write Code to test inputs
by getting them to
activate the outputs
Connect Battery
Power gets to the chip
and is tested with a multi-
meter
Download empty program
to check if the chip can
talk with a computer
Solder Gaps
Develop Code for Final
Prototype
Re-solder
Re-solder
Re-solder
Re-solder
The reason for testing the
outputs before the inputs is that
if there is a failure then the
problems remains undiagnosed.
Quality Testing
Made sure there were no cross tracks
No overlapping components
The above can be done at the design stage, after printing the mask onto acetate and
after printing the design onto a PCB
UV light box – a pale yellow print should appear
Develop the PCB while checking for broken tracks with a continuity test using a multi
meter
Download a blank program to the chip
Download test code to check inputs and outputs – test outputs them use them to test
inputs
Develop program and test against specification
Nathan Raj 15
16. Types of motor Description Picture Comments
Stepper Motor A motor that is
programmed to
move in steps used
mainly in printers.
This motor is not useful as it only works in steps. This
allows for accurate turning. However, I require fast
continuous rotation which means that they are not
helpful. They need a driver chip to interface between the
PIC and motor.
Servo Motor A motor that
accurately
positions the
motor to within
2700 for high
precision tasks.
These motors are originally intended to turn 270 degrees,
However, they can be modified by removing a plastic tab
on the gears that stops it rotating to far and also removing
the variable resistor that gives the control circuit the
motors position. The inbuilt gearbox also gives a low RPM
to achieve high torque. Again limited use in my project as I
do not require turning anything to a specific angle.
DC Motor A shaft suspended
within a magnetic
field as power is
fed to it, it spins at
a high RPM
I decided to use this type of motor because it is best
suited to the needs and specification to my project. It
provides a larger amount of torque as well as having a
variable RPM (using PWM) which enables me to have a
fast and slow mode to my game. However, the only
problem would be that they cost more which would
reduce the profit margin on any sold. They are available in
a wide range of input voltages, and have a variety of gear
ratios using the attached compound gear box.
They can be controlled using H bridge circuits – usually in a
motor control chip like the L293d which enable 2 motors
to be controlled using 4 outputs from the PIC.
Type of Motors
Nathan Raj 16
17. Circuit 1
This first circuit uses a variable
resistor to speed up and down
the motor. The variable resistor
However, takes a lot of current
which reduce the RPM of the
motor at the expense of heat and
there is no direction control. Also
it relies on the user to move a
switch on the car itself which fails
the specification point of being 15
metres away
Circuit 2
I can use the pins C.3, C.4, C.5 and B.4 to
utilise the hardware PWM built into the
20X2 chips to control a motor. However,
I will need two PIC chips one for each
motor which is a waste of space and
resources. I can synthesise PWM by
using the high low and pause commands
– see later coding.
Circuit 3
I could also use a H-bridge circuit
and this can be controlled by a
PIC chip. The FETs can handle the
large currents required to turn a
motor at the RPM I require for
the car. By activating the FET
alternatively the polarity across
the magnets in the motor can be
reversed allowing both
backwards and forward motion
and by applying PWM from the
any of the pins unlike the last
circuit the last circuit to the top
FET of each activated pair I could
get speed control. However, I will
need two PIC chips one for each
motor which is the same issue as
the last design
Circuit 4
This IC is the L293D chip which has 2 H-bridges built into to control 2 motors
so resolves the issue of needing two PIC chips. Its inbuilt logic allows 2 lines to
control each motor rather than the 4 required if the PIC and H bridge were
directly connected. It needs a 5V supply for this as well as a separate higher
voltage/current supply for the motors. The motors can produce voltage spikes
on the power lines degrading the performance of the PIC – so separate power
is good. All power supplies are connected to the same 0V line as this is the
reference voltage which the PIC/L293d uses to determine what is a high/low
signal.
Possible motor control circuits
Nathan Raj 17
18. Motor Power Delivery
Common Negative
Motor Specific Power Supply
Control Lines
PIC Chip
PCB power
Supply
Motor 1
Motor 2
As you can see in the above the diagram the motor controller chip has two separate power supplies. Firstly it has the same five
volts supply as the PIC. This is to power the logic part of the operations. The motors are powered from a separate supply
consisting of 16 AAA rechargeable batteries in series giving a total of 20.8V. There are two reasons for this separate supply.
1) The motors will need a higher voltage and current that can be provided from a five volt supply.
2) The motors will generate electrical noise on the power supply lines, This takes the form of voltage spikes (transients) This can
damage the PIC or cause it to execute the code non-sequentially – this less than helpful!
Typical voltage spikes from a DC motor.
Nathan Raj 18
19. Here I test the accelerometer by measuring the output voltage on a multimeter. The images
show the voltages given off on the X,Y and Z axis. This however was not clear enough as the
multimeter was not fast enough to respond due to its low polling rate. I then replaced the
multimeter with a oscilloscope. This provided a graph where I could easily see the rate of
change in the voltage. The voltages vary as the accelerometer moves in that axis so I can
use the ADC pins on the PIC chip to interpret the voltage as numbers to decode. An example
of this can be seen on the next page.
O
S
C
+5V
Accelerometer
0V
X-Axis
Y-Axis
Z-Axis
V
+5V
Accelerometer
0V
X-Axis
Y-Axis
Z-Axis
Practical Investigation 1
I changes the oscilloscope to the other
outputs to measure all three axis.
Nathan Raj 19
20. How an ADC works
SAR – Successive approximation register, a logic unit which can produce
binary numbers.
DAC – Digital to Analogue converter, converts the number produced by the
SAR back into a analogue voltage.
The comparator compares the DAC voltage to the input voltage (Vin) – this
input voltage is the one you want to convert into its closest binary number.
If the DAC voltage is greater than the input voltage the output from the
comparator is high.
The conversion sequence –
1. The SAR sets the most significant bit (MSB) to 1, in a 4 bit converter the SAR would produce 1000.
2. The DAC converts this into a voltage.
3. The comparator compares this to the input voltage.
4. If it is greater than the input the comparator output is high – the SAR then resets the MSB back to 0 and sets the next MSB to 1 i.e. 0100.
5. The DAC and comparator do their jobs if the output from the comparator stays high this bit is reset and the next MSB is set to 1 i.e. 0010.
6. Eventually the output form the DAC drops below the input voltage- say this happens at 0100, the output from the comparator goes low, the SAR then
‘knows’ this number is less than the input voltage so it sets the next MSB to 1 i.e. 0110.
7. If the output stays low it set the final bit to 1, this then is the closest binary number to the input i.e. 0111
8. If the output goes high then it resets this bit to 0 and tries the next bit i.e. 0101
9. By this cycle the converter eventually produces the output number closest to the input voltage
The PIC can operate both an 8 bit and 10 bit conversion. Hopefully it is clear from the above explanation that the 10 bit would take longer. It would of course offer
higher resolution but I don’t think this will be an issue –but it is an option if I need it.
+
-
SAR
DAC
Vin
Finished
Start conversion
Read out the finished
conversion here
Sample and
Hold circuit
There are start and finish signals from the PIC chip which control
how long is spent converting each voltage held the sampling
circuit. This circuit holds the voltage being converted stopping it
from changing mid conversion. Finally after the stop signal is sent
each bit of the converted voltage is read off the tracks leading to
the DAC.
Nathan Raj 20
21. Scale on scope is
X axis – 10ms/div
Y axis – 0.1V/div
Change in X-axis – 0.5 div
Change in Y-axis – 5 div
Therefore in 5ms the voltage
increases by 0.5V
Therefore the gradient is
Δ𝑦
Δ𝑥
=
0.5
5 × 10−3
= 100𝑉𝑆−1
ChangeinVoltage
0.5Volts
These results where obtained by moving the
sensor very quickly and such would represent
a worst case scenario. As you can see it was
easily able to respond adequately and was
capable of a speed of response of 100VS-1.
Also the total response of 0.5 V is more than
adequate for the PIC 8 bit ADC. This is
because the ADC values range between 0-
255 over 0-5V. This means that the response
of 5V is change of 26 in the ADC.
8 bit ADC – On-board ADC Sensitivity
0-255 – Full range of ADC
0V-5V – Range of analogue voltage input
0V-0.5V – Change in voltage from sensor
0-25 – Change in digital signal
Practical Investigation 2
Nathan Raj 21
22. 𝑠 = 𝑢𝑡 +
1
2
𝑎𝑡2
𝑠 = 0.1𝜋
𝑢 = 0
𝑎 =?
𝑡 = 1
0.1𝜋 =
1
2
𝑎 × 12
0.1𝜋 =
1
2
𝑎
0.2𝜋 𝑚𝑠−2
= 𝑎
0.628 𝑚𝑠−2 = 𝑎
0.8 ×
0.628
9.81
= 51𝑚𝑉𝑔−1
I am using the accelerometer at its 1.5g setting
𝑔 = 9.81𝑚𝑠−2
Sensitivity of the accelerometer
in V/g
Mathematical analysis of feasibility of using data from the accelerometer
I downloaded the accelerometer specification off the internet and found the typical voltage change per 1g of acceleration.
Here I used calculated the acceleration created when the is moved so when I will not have nasty surprises when I write test code. After
calculating the acceleration I related it to the accelerometer by multiplying it by the sensitivity and dividing it by the acceleration due to
gravity. This provided me with a final answer of 51mVg-1. This is well with the ability of the ADC to use, as it represents several steps which
the ADC can resolve between
Nathan Raj 22
23. This is the code I used to test the Accelerometer
pause 1000
serout c.2,n2400,(254,128)
serout c.2,n2400,(254,1)
serout c.2,n2400,(254,192)
serout c.2,n2400,(254,1)
serout c.2,n2400,("nothing")
pause 1000
goto main
main:
readadc B.3,b3
readadc B.5,b5
readadc B.1,b1
goto display
display:
serout c.2,n2400,(254,128)
serout c.2,n2400,(254,1)
serout c.2,n2400,("X-")
serout c.2,n2400,(#b5)
serout c.2,n2400,(" Y-")
serout c.2,n2400,(#b1)
serout c.2,n2400,(" Z-")
serout c.2,n2400,(#b3)
goto main
This test bench feeds the accelerometer
inputs into the ADC pins on the PIC chip.
This cause the PIC to measure the
analogue voltages from the three axis of
the accelerometer. These are then stored
in byte variables before they are
outputted onto the OLED screen. By
displaying the data I could work out a
range of typical values that the
accelerometer will send when it is arm
mounted so I could write my code
appropriately. The range I observed when
using it provided me proof that I could
control the car using the accelerometer. I
as I moved my arm, the range observed
was suitable to construct my code around.
Practical Investigation 3
This is an circuit diagram for testing
circuit. Please note that the voltmeter
are not actually there but instead feed
into ADC pins on a PIC (not shown).
Nathan Raj 23
24. Questionnaire
1) What would you like the car to be made out of?
1. Metal- 5/10
2. Wood- 2/10
3. Plastic 3/10
2)Range of control?
1. 1 metres- 1/10
2. 10 metres- 6/10
3. 100 metres- 3/10
3) How fast do you want it to go?
1. 0.1m/s- 0/10
2. 0.2m/s- 6/10
3. 1m/s- 4/10
4) Assuming electrical power, what kind of batteries
1. Rechargeable AA - 1/10
2. Rechargeable AAA - 2/10
3. Sealed rechargeable unit – 7/10
5) What price would you like to pay for it?
1. 50-100 – 2/10
2. 100-250 – 7/10
3. 250+ - 1/10
6) Would you like waterproofed?
1. Yes - 7/10
2. No - 3/10
7) What length do you want the car to be?
1. Under 10 cm - 2/10
2. Between 10 to 50 cm - 6/10
3. Above 50 cm - 2/10
8) What kind of motors would you like?
1. Petrol powered engine - 4/10
2. Brushed electric motors – 2/10
3. Brushless electric motor – 4/10
There is a large demand for metal vehicles which have more resistance to damage. However, I cannot prototype a metal design due to lack
of time. On the topic of range of control only one person wanted a small range. Far more people wanted a larger range up to a certain
point, at which there is fall in numbers because people wanted to be able to see where car was! This is well within the capability of the
wireless systems available to me.
People generally wanted the car to go fast However, not so fast it was uncontrollable. In terms of power source more people wanted a
sealed unit with rechargeable batteries, which interestingly is the same people who later ask for waterproofing. I do not have the time or
equipment to develop these features, but I can use rechargeable batteries as a compromise and mount them in position people can easily
change/access them.
People also generally wanted a low price but were willing to pay for quality. See my costing page for more discussion. There were a lot
people who wanted the car to be water-proofed However, it is extremely difficult to do this effectively and given my limited timeframe .
Also people want to have a medium sized car, again this is within the envelope my fabrication techniques will allow. People also wanted a
petrol motor but it is too expensive and time consuming to add for an initial prototype. I also doubt if people had thought through the
difficulties of using such a vehicle indoors!
As you can see from my discussion, question 1,4,6 and 8 are unfeasible given my current time frame and tools and as such I have decided on
suitable alternative. I will use a plastic case to house the car. I will use rechargeable AAA batteries to power the unit. Also I will use
brushed electric motors which will they wear out quickly are a cheap option for a prototype.
I made sure one of the people I asked was
the client
Nathan Raj 24
25. 1 Metres
10 metres
100 metres
0.1m/s
0.2m/s
1m/s
Metal
Wood
Plastic
Reachargable AA
Reachargable AAA
Sealed rechargeable
unit
50-100
100-250
250+
Yes
No
<10cm
<50cm
>50cm
Petrol Engine
Brushed electric
motors
Brushless electric
motors
Questionnaire Results
Nathan Raj 25
26. How to Make a PCB
Stage 1- Design of PCB
Black Film
Photosensitive Plastic
Copper
Plastic
Stage 2- Remove top
layer
Photosensitive Plastic
Copper
Plastic
Protective layer is peeled back at last moment to
insure the Room light does not affect the board
Photosensitive Plastic
Copper
Plastic
Photo mask
UV light
UV light does not get through the ink. The clear area left
under UV light is damaged. The equipment used is called a
UV light Box
Stage 3- UV
light Box
Stage 4- Developer
Fluid
Photosensitive Plastic
Copper
Plastic
UV damaged plastic washed away by Developer Fluid
Turns undamaged
plastic black
Stage 5- Etching
Tank
Photosensitive Plastic
Copper
Plastic
N.B Solder through the top
layer
Etching fluid removes the copper where it
can get to it but not under tracks
UV Light Box Etching Tank
Advantages Disadvantages
Low setup costs
Accurate
Easy for school
environment
Reproducible as I can
reuse the photo-mask.
Toxic chemicals
UV Radiation
Slow to produce boards
Nathan Raj 26
27. Step 1
This is the basic part of the
circuit containing a powered
PIC chip.
Step 2
This is the next stage in the PIC
development with the programing
port added.
Controller Circuit board
Development Breakdown
Step 3
Here I add the switch and the
accelerometer inputs.
Step 4
Finally I add the LEDs, OLED and
XBee output components.
5V
5V
5V
5V
Nathan Raj 27
28. Controller PCB Development Breakdown – I aimed for a compact an economical PCB, with a logical layout and no
overlapping components or crossed tracks/jump leads.
Step 1
This is the basic part of the
circuit containing a powered
PIC chip.
Step 2
This is the next stage in the PIC
development with the programing
port added.
Step 3
Here I add the switch and the
accelerometer inputs.
Step 4
Finally I add the LEDs, OLED and
XBee output components.Nathan Raj 28
29. Controller Breadboard
OLED
XBee
AccelerometerBattery
Programming Ports
PTM Non-latching
On/Off Switch
A breadboard is quick to make and change as you do not have solder
components but match to the circuit underlay. This can be complicated
with all the jump wires needed to wire it correctly and because of its ease to
remove components it is quite fragile.
Power
Indicator
Activity
Indicator
20X2
PICAXE
Chip
Nathan Raj 29
30. Car Circuit board Development Breakdown
Step 1
This is the basic part of the
circuit containing a powered
PIC chip.
Step 2
This is the next stage in the PIC
development with the programing
port added.
Step 3
Here I add the LEDs and Pads
for the ultrasound inputs.
Step 4
Finally, I add the motor
control and the ultrasound
output.
Nathan Raj 30
31. Car PCB Development Breakdown – I aimed for a compact and economical PCB, with a logical layout and no overlapping
components or crossed tracks. I used the minimum of jump leads in order to connect the L293d to the PIC.
Step 1
This is the basic part of the
circuit containing a powered
PIC chip.
Step 2
This is the next stage in the PIC
development with the programing
port added.
Step 3
Here I add the LEDs and Pads
for the ultrasound inputs.
Step 4
Finally I add the motor control
and the ultrasound output.Nathan Raj 31
32. Car breadboard
A breadboard is quick to make and change as you do not
have solder components. However you do have to match
the circuit to the pre-existing track arrangement on the
breadboard. This can be complicated with all the jump
wires needed.
XBee
PCB Batteries
Programming Ports
On/Off Switch
20X2
PICAXE
Chip
Motor
Batteries
Motor
Ultrasound
L293D
I used a smaller motors for the
breadboard prototype as I was
only testing the integrity of the
circuit. This meant that I only
needed 1 battery pack instead
of the four I used later on.
Nathan Raj 32
33. Motor Control Chip- L293D
Contains two H-Bridges for
both motorsMotor 1
Motor 2
LEDs
Power Indicator
LED Activity Indicator
LED
Accelerometer Input
XBee Output
Current Limiting
Resistor
Current Limiting
Resistor
Current Limiting
Resistor
Pull-Down
Resistor
PTM
Switch
XBee Input20X2 Control Chip
Contains code
20X2 Control Chip
Contains code
5V
Separate Power
Supply
To reduce noise
and support
large current
draw of motors
Explanation of Circuits
Comparing it to my specification there is the interconnections for the OLEDs
and R/F units. The car circuit can control a H-Bridge so that the range of motion
can be fulfilled. The chip clocks at 8 MHz which is fast enough to eliminate
noticeable input lag. There are LEDs and an accelerometer and ultrasound as
set in the specification. The remaining specification points do not apply to my
circuit.
Nathan Raj 33
34. Comparing Car circuit design to PCB
Power and Switch
20X2 PIC Chip
L293D Motor Control Chip
LEDs
This is a good PCB as it has a logical layout and reasonable
compact and use minimal jump leads. The coloured rings
indicate which part of my circuit matches which part of
the PCB layout.
Nathan Raj 34
35. Comparing Controller circuit design to PCB
Power and Switch
20X2 PIC Chip
PTM Non Latching Switch
LEDs
This is a good PCB as it has a logical layout and reasonable
compact and use minimal jump leads. The coloured rings
indicate which part of my circuit matches which part of
the PCB layout.
Nathan Raj 35
37. Comparing Car PCB Design to Auto Router
As you can see the auto-routed designs have an
illogical layout and a not particularly compact design.
Industrially it is the only technique possible for
complex circuits. Powerful computers and software
can optimally route circuits on multi layer PCB’s.
Nathan Raj 37
38. Front and Rear View of PCBs
This is was the best view I could obtain given the cramped conditions inside the case
Ribbon cable to reduce clutter inside case
Nathan Raj 38
40. Laser Cutting
Laser cutting works by sending pulses of LASERs which melt the material into a
predesigned 2D design.
1. You use a CAD package like 2d design to create a design
2. You then import it to the controller of the laser cutter
3. The laser melts and engraves using different intensities of LASER
4. Remove the cut material and assemble it
Advantages Disadvantages
Cuts fast
Cuts accurately
Needs no moulds
Works with a computer
Does not go blunt
Low cost per unit
Cuts only in 2D
Requires expert computer skills
High initial setup cost
Dangerous Lasers
This technique is highly suitable for my project because
• It is extremely quickly , this is important as I have a very limited developmental timeframe
• It is accurate, enabling me to quickly and reliable produce matching parts
• It uses CAD with all the usual advantages associated with this. e.g. ease of which the design may be
modified or changed, ability to be securely secured won the colleges computer network
• It can work on a range of materials although I suspect I will only use only one kind of plastic
For me it is an ideal rapid prototyping system. I can quickly cut precise pieces to form my casings, allowing more time
for me to develop the control electronics and coding.
Nathan Raj 40
41. Potential Controller Designs
This is a simple design which has the user grasp the two sides of box
and rotate that in the box in their hands. This However, is not
ergonomic to hold so while it would function as a factory prototype
it will not a possible realistic design for customers.
This is a more complex design which mounts the accelerometer
onto the user’s arm. This allows them to control the car by
rotating their arm. This should allow a precise level of control
over car. It might take more development time as the shaping is
rather complex.
This is a complex design which plays on the theme of a joystick to
give a familiarity for the user to control the car. The users needs to
hold on the green pole and by twisting their wrist they can control
the car. The curved vertical surfaces on the top part are difficult to
make on a laser cutter, and probably outside of the available time
envelope for this project.
I like the middle one the most. The
bottom looks to confusing and the
top is a bit boring.
Nathan Raj 41
42. Prototype development of controller
OLED screen was
attached with nuts
and bolts
For the top two pictures I created a the design using some spare cardboard to get a
rough idea on the overall shape and dimensions as I had no experience of trying to fit
something to the human body. With that I could then create a more accurate and rigid
prototype on 2D design using laser cut cardboard. The cardboard is cheap and quick to
cut and can be recycled.
Switch was attached
with nuts and bolts
LEDs was attached with
nuts and bolts
Top layer was held up
with studding pillars
The shape fits my arm nicely. Can
you make the top plate closer to
the bottom so my arm isn’t as
tired?
Nathan Raj 42
43. It is simplistic design that uses two pieces of
plastic sheet held up by studding pillars. It not
an interesting shape so lacks consumer appeal.
Here I have added some shaping to the
structure. This add a more interesting
shape but will unnecessarily add to the
complexity of the design.
This is a simple circular shape which is interesting
and unique shape not normally found in children’s
toys. As it will collide with people/objects the
rounded shape would reduce damage to both
parties!
Wheels
LEDs
On/off switch
Potential Vehicle Designs
I like the bottom one the most as
look like an alien saucer.
All use 2 rear wheel drive motors for propulsion. Steering is achieved through differential motor drive. For example if
one is set forwards and the other backwards the vehicle will turn. The front is a ball caster.
Nathan Raj 43
44. I created two identical circles with studding holes in the same place. I had two circles on top and bottom to
provide extra protection and the better grip the ultrasound wall. On the top circle I added holes for the
on/off switch and the programming port. On the bottom I added the holes for the two motors and ball
castor and slots for the wheels to sit in. The open frame structure is ideal for prototyping as it allows easy
access for trouble shooting and fault rectifying.
Wheel slots
Ultrasound
Ball Bearing Studding
Pillars
Wheel slots
On/Off SwitchProgramming Port
Prototype development of car
I used cardboard for the prototypes as it is cheap and easy to cut. As well when I was
finished I could recycle all of the cardboard.
The shape is like a UFO!
Though that ultrasound looks a lot
like a pig’s nose.
Nathan Raj 44
45. 2D Design files sent to Laser Cutter
Holes for studding pillars
Curve of front fits average
curvature of my hand
Holes for Velcro straps
OLED
On/Off Switch
LEDs
PTM Non-latching
Ultrasound
10mm LEDs
On/Off Switch
Wheel
housing
Interlocking for ultrasound faceplate
360 Wheels
Motors
Interlocking allows for secure joins
with a high surface area for gluing.
Nathan Raj 45
46. This is the code I used to test the Accelerometer. It
uses an ADC to read the values and then put them on
the screen so I can work out what limits I would need
for the real code
pause 1000
serout c.2,n2400,(254,128)
serout c.2,n2400,(254,1)
serout c.2,n2400,(254,192)
serout c.2,n2400,(254,1)
serout c.2,n2400,("nothing")
pause 1000
goto main
main:
readadc B.3,b3
readadc B.5,b5
readadc B.1,b1
goto display
display:
serout c.2,n2400,(254,128)
serout c.2,n2400,(254,1)
serout c.2,n2400,("X-")
serout c.2,n2400,(#b5)
serout c.2,n2400,(" Y-")
serout c.2,n2400,(#b1)
serout c.2,n2400,(" Z-")
serout c.2,n2400,(#b3)
goto main
Controller I/O test
This code allows me to test the
button by displaying a message
on the screen when it is pressed
pause 1000
serout b.2,n2400,(254,1)
serout b.2,n2400,(254,128)
loop1:
if pinC.3=0 then loop2
goto loop1
loop2:
serout b.2,n2400,("Working")
pause 100
serout b.2,n2400,(254,1)
serout b.2,n2400,(254,128)
goto loop1
This code allows me to test the
receive function on the XBee by
receiving numbers and then
displaying them on the screen
pause 2000
low c.2
serout c.2,n2400,(254,128)
serout c.2,n2400,(254,1)
pause 100
serout c.2,n2400,("Receiving")
pause 1000
serout c.2,n2400,(254,128)
serout c.2,n2400,(254,1)
goto loop1
loop1:
low c.2
serin c.6,t2400,($55,$55),b6
serout c.2,n2400,(254,128)
serout c.2,n2400,(254,1)
serout c.2,n2400,(#b6)
pause 500
goto loop1
Here I display the word nothing
on the screen
pause 1000
serout c.2,n2400,(254,128)
serout c.2,n2400,(254,1)
serout c.2,n2400,(254,192)
serout c.2,n2400,(254,1)
serout c.2,n2400,("nothing")
This is the code that I used to the
transmit function on the controller
XBee
pause 2000
serout c.2,n2400,(254,128)
serout c.2,n2400,(254,1)
pause 100
serout c.2,n2400,("Transmitting")
pause 1000
serout c.2,n2400,(254,128)
serout c.2,n2400,(254,1)
goto loop1
loop1:
inc b0
serout c.4,t2400,($55,$55,b0)
serout c.2,n2400,(254,128)
serout c.2,n2400,(254,1)
serout c.2,n2400,(#b0)
pause 500
goto loop1
I tested the outputs before the inputs as I need to activate an
output upon the successful activation of the input in order to
test them.
Nathan Raj 46
47. Car I/O Test
This code cause the
motors to start turning
forwards
Pause 500
motorcontrol:
low c.0
high c.1
high b.7
low b.6
This code tests the
Ultrasound by checking the
checking the time the signal
takes to hit the object in
front of it and if is less that
1000 milliseconds away it
turns in the LEDs
pause 1000
Ultrasound:
pulsout c.4,2
pulsin B.3,1,W0
pause 20
if W0<1000 then gosub leds
pause 100
goto Ultrasound
leds:
high b.4
high b.5
pause 100
low b.4
low b.5
pause 100
return
This code flicks the
LEDs on and off again
main:
high b.4
high b.5
pause 100
low b.4
low b.5
pause 100
goto main
This code tests the receive
function of the XBee by
turning the LEDs on if it
receives the correct
numbers.
pause 2000
loop1:
low c.2
serin c.6,t2400,($55,$55),b6
if b6> 10 then gosub leds
pause 500
goto loop1
leds:
low c.0
high c.1
high b.7
low b.6
pause 5000
return
This is the code that I used to the
transmit function on the controller
XBee
pause 2000
serout c.2,n2400,(254,128)
serout c.2,n2400,(254,1)
pause 100
serout c.2,n2400,("Transmitting")
pause 1000
serout c.2,n2400,(254,128)
serout c.2,n2400,(254,1)
goto loop1
loop1:
inc b0
serout c.4,t2400,($55,$55,b0)
serout c.2,n2400,(254,128)
serout c.2,n2400,(254,1)
serout c.2,n2400,(#b0)
pause 500
goto loop1
Again I tested the outputs before the inputs as I
need to activate an output upon the successful
activation of the input
Nathan Raj 47
48. Yes
Is
b5>100?
Send Number 81
No
Yes
Is
b5<60?
Send Number 82
No
Yes
Is
b1>100
?
Send Number 83
No
Yes
Is
b1<65?
Send Number 84
No
Yes
Is
number
80?
Stops all motors
No
Yes
Is
number
81?
Forward
No
Yes
Is
number
82?
Backwards
No
Yes
Is
number
83?
Left
No
Yes
Is
number
84?
Right
No
Start
Display ‘All Halt’ on
Screen
Send Number 80
Display ‘Hard Right’
on Screen
Display ‘Forward
March’ on Screen
Display ‘Fall Back’
on Screen
Display ‘Hard Left’
on Screen
Store number from
XBee
Start
The accelerometer produces two analogue outputs into the PIC
chip into b1 and b5. Depending on which threshold is triggered in
the PIC chip different numbers are sent by the by the XBee.
This number is received by the second XBee which interprets it and
passes it on to the car’s PIC Chip. This PIC chip controls the LEDs
and a L293D chip which as previously discussed can control the DC
motors. This allows the user to manipulate the car. The ultrasound
scans the area immediately in front of robot and if there is an
obstacle it attempts to evade it
Scan Ultrasound Is echo
<500
No
Yes
Subroutine evade
Program Algorithm for Car and Controller
Nathan Raj 48
49. Controller Programming - Problem
• high c.4
• low c.2
• pause 2000
• gosub clearscreen
• serout c.2,n2400,("Start-up")
• pause 1000
• goto main
• main:
• readadc B.1,b1
• readadc B.5,b5
• goto Break
• clearscreen:
• low c.2
• serout c.2,n2400,(254,1)
• serout c.2,n2400,(254,128)
• return
• Break:
• low b.7
• gosub clearscreen
• serout c.2,n2400,("Stopped")
• let b0=80
• goto Break2
• Break2:
• readadc B.1,b1
• readadc B.5,b5
• if b1>100 then Go
• if b1<65 then Backwards
• if b5<60 then Left
• if b5>100 then Right
• serout c.4,t2400,($55,$55,b0)
• goto Break2
• Go:
• gosub clearscreen
• serout c.2,n2400,("Forward")
• let b0=81
• goto Go2
• Backwards:
• gosub clearscreen
• serout c.2,n2400,("Reverse")
• let b0=82
• goto Backwards2
• Left:
• gosub clearscreen
• serout c.2,n2400,("Left")
• let b0=83
• goto Left2
• Right:
• gosub clearscreen
• serout c.2,n2400,("Right")
• let b0=84
• goto Right2
• Go2:
• high b.7
• low c.2
• serout c.4,t2400,($55,$55,b0)
• goto Break
• Backwards2:
• high b.7
• serout c.4,t2400,($55,$55,b0)
• goto Break
• Left2:
• high b.7
• serout c.4,t2400,($55,$55,b0)
• goto Break
• Right2:
• high b.7
• serout c.4,t2400,($55,$55,b0)
• goto Break
This is the initial code that I wrote for the
controller. It has an unexpected issue where
the XBee units would start to transmit
interference to their own signal. I solved the
issue by stripping the code to a more basic
form and building back to the functionality
seen in V2.
Nathan Raj 49
50. Controller Programming V2
• high c.4
• low c.2
• pause 2000
• serout c.2,n2400,("Start-
up")
• pause 1000
• goto Break
• Break:
• readadc B.1,b1
• readadc B.5,b5
• low b.7
• let b0=80
• serout
c.2,n2400,(254,128)
• serout c.2,n2400,(254,1)
• serout c.2,n2400,("All
Halt")
• if b1>100 then Go
• if b1<65 then Backwards
• if b5<60 then Left
• if b5>100 then Right
• serout
c.4,t2400,($55,$55,b0)
• goto Break
• Go:
• let b0=81
• high b.7
• serout
c.2,n2400,(254,128)
• serout c.2,n2400,(254,1)
• serout c.2,n2400,("Hard
Left")
• pause 1000
• serout
c.4,t2400,($55,$55,b0)
• goto Break
• Backwards:
• let b0=82
• high b.7
• serout
c.2,n2400,(254,128)
• serout c.2,n2400,(254,1)
• serout c.2,n2400,("Hard
Right")
• pause 1000
• serout
c.4,t2400,($55,$55,b0)
• goto Break
• Left:
• let b0=83
• high b.7
• serout
c.2,n2400,(254,128)
• serout c.2,n2400,(254,1)
• serout c.2,n2400,("Fall
Back")
• pause 1000
• serout
c.4,t2400,($55,$55,b0)
• goto Break
• Right:
• let b0=84
• high b.7
• serout
c.2,n2400,(254,128)
• serout c.2,n2400,(254,1)
• serout
c.2,n2400,("Forward
March")
• pause 1000
• serout
c.4,t2400,($55,$55,b0)
• goto Break
This is the version of code I
programmed when I built up
from the stripped down code. It
use a main loop where it check
the accelerometer to work out
which variable it needs to
transmits and then goes to the
relevant loop and sends the
number displaying the
instruction on the screen before
returning the main loop
I am not repeating annotations from
previous versions
Nathan Raj 50
51. Car Programming V2
• pause 500
• Loop1:
• high b.4
• high b.5
• pulsout c.4,2 ;Ultrasound sending wave
• pulsin B.3,1,W0 ;Ultrasound storing wave
reflection time
• pause 20
• if W0<500 then gosub evade ; Analysing the
wave reflection time
• serin c.6,t2400,($55,$55),b0; Waits for a
signal on pinc.6 with correct qualifiers
• if b0=80 then Break
• if b0=81 then SF
• if b0=82 then SB
• if b0=83 then SL
• if b0=84 then SR
• goto loop1
• evade: ; If the car is to close to an object it
avoids it
• low c.0
• high c.1
• low b.7
• high b.6
• pause 500
• low c.0
• high c.1
• high b.7
• low b.6
• pause 180
• return
• Break:
• low c.0
• low c.1
• low b.7
• low b.6
• Goto Loop1
• SF:
• low b.4
• low b.5
• high c.0
• low c.1
• high b.7
• low b.6
• goto Loop1
• SB:
• low b.4
• low b.5
• low c.0
• high c.1
• low b.7
• high b.6
• goto Loop1
• SL:
• low b.4
• low b.5
• high c.0
• low c.1
• low b.7
• high b.6
• goto Loop1
• SR:
• low b.4
• low b.5
• low c.0
• high c.1
• high b.7
• low b.6
• goto Loop1
Here I added the code for the
ultrasound. This acts as a break where it
detects if the user is going to cause the
car to collide with a wall and causes it to
make a course correction.
I am not repeating annotations from
previous versions
This code instructs the car to wait for
a signal for the XBee on C.6 before
interpreting the variable. The
variable cause the PIC to jump a set of
instructions for the L293D Motor
Control chip to control the motors.
There are qualifiers for the XBee to
prevent interference altering the
normal use of the device
Nathan Raj 51
52. Photos showing the controller working
This photos show the accelerometer displaying different commands on the OLED indicating that the
XBee is transmitting the encoded numbers to the car, as I tilt my arm in different directions.
Nathan Raj 52
53. Final Design
Studding Pillars
Ultrasound
OLED
Wheels
Motors
On/Off Switch
Virtual Reality - Controller
Virtual Reality - Car
Real Life - Controller
Real Life - Car
The studding pillars are attached
using M4 nuts and bolts. The
LEDs are friction fit. The on/off
switch has its own nuts to
attach it through the hole. The
OLED and the ultrasound have
M2.5 nuts and bolts to attach
them to the case.
Client comments
Very impressed in how you were
able to model the products before
making them.
Nathan Raj 53
54. Problems and solutions
Issues Solutions Pg.
Differential torque I wrote some code which balanced the motors by switching off the more
powerful left motor for short periods of time
62
Broken power switch
All three of these components broken a various points in the prototype
construction and testing stage and where replaced which components with
full functionality.
#
Broken programming cable
Broken ultrasound unit
Car catching on chairs legs because of the wheels I redesigned the casing and housed the wheels inside the body of a car so
that the top down profile of the car was a smooth circle which means it can
turn without getting caught on any object. This gives it a tighter turning
circle as the actuator are closer to the centre of rotation.
44
The processor was struggling to control the wheels,
monitor the ultrasound and XBee serial channels
simultaneous
I implemented a dual chip systems which uses a dedicated 08M2 chip to
monitor the Ultrasound unit which allows it to trigger a hardware interrupt
on the main chip when it gets to close to a wall allowing momentum to be
reduced from earlier.
58-61
Car travels below speed requested in specification I added two more 6V battery packs to the L293D motor power pin which
more than doubled the speed to 0.291 m/s
#
The LEDs were too dim I replaced the LEDs with new brighter units which are rated at 3000mcd #
Nathan Raj 54
55. Improvements - For Examiner Guidance
On the next few pages I discuss the various improvement I had time to make.
Improvements Page Number
Two way Handshake 55-57
Dual Core system 58-61
Correcting Differential Torque 62
Reprogramming the firmware of the OLED 63
On the next few pages I discuss the various improvement I could make with more time or resources.
Improvements Page Number
Considerations for future improvements 64
Mass Production methods 65-66
Design for Market 67
Future Communications Improvements 68
Nathan Raj 55
56. No
Yes
Ispinc.1
is
pressed?
Display ‘Press button
for handshake’
Yes
Is
number
85?
Transmit 85
15 times
No
Start
Display ‘Start Up’
on Screen
Display
‘Connection
Successful’ on
Screen
Store number from
XBee
Start
Goto Main
Code
Display ‘Connection
Pending’
Transmit 85
15 times
Store number from
XBee
Is the
number
85?
Yes
No
Display
‘Connection failed’
on Screen
Display ‘Engine
Powering up’ on
Screen
Goto Main
Code
The two PIC chips when starting up have a short handshake routine
to double check both are functioning properly. When the user
presses the button on the controller it display connection pending
and transmits the number 85 several times to connect with the
car. If the car detect the correct number it sends the number back
before entering the main code. The controller then receive the
number and if it is 85 it moves into the main code.
Controller
Send 85 x15
Receive 85
Execute control code
Car
Receive 85
Send 85 x15
Execute driving code
Two Way Handshake Routine
I implemented the handshake routine as building’s Wi-Fi utilised the same 2.4GHz Band technology as the
XBee RF Chips. I had originally used qualifiers which prevented stray signals from being picked up However,
the handshake makes sure the devices are both functioning as intended on start-up. The routine has a
number encoded in qualifiers send back and forth between the devices to test their functionality.
Nathan Raj 56
57. Controller Programming V3
• high c.4
• low c.2
• pause 2000
• serout c.2,n2400,("Start-up")
• pause 1000
• goto Connection
• Connection:
• gosub clearscreen
• serout c.2,n2400,("Press
button")
• serout c.2,n2400,(254,192)
• serout c.2,n2400,(" for
handshake")
• Connection2:
• if pinc.1=1 then Ignition
• goto Connection2
• Ignition:
• gosub clearscreen
• serout c.2,n2400,(" Connection
")
• serout c.2,n2400,(254,192)
• serout c.2,n2400,(" Pending
")
• wait 13
• let b0=85
• Ignition0:
• inc b3
• serout c.4,t2400,($55,$55,b0)
• if b3<15 then Ignition0
• serin c.6,t2400,($55,$55),b2
• If b3=85 then Ignition3
• gosub clearscreen
• serout c.2,n2400,(" Connection
")
• serout c.2,n2400,(254,192)
• serout c.2,n2400,(" Failed ")
• wait 3
• Goto Connection
• Ignition3:
• gosub clearscreen
• serout c.2,n2400,(" Connection
")
• serout c.2,n2400,(254,192)
• serout c.2,n2400,(" Successful
")
• wait 3
• gosub clearscreen
• serout c.2,n2400,(" Engine ")
• serout c.2,n2400,(254,192)
• serout c.2,n2400,(" Powering
up ")
• wait 2
• goto Break
• clearscreen:
• serout c.2,n2400,(254,128)
• serout c.2,n2400,(254,1)
• return
• Break:
• readadc B.1,b1
• readadc B.5,b5
• low b.7
• let b0=80
• gosub clearscreen
• serout c.2,n2400,("All Halt")
• if b1>100 then Left
• if b1<65 then Right
• if b5<60 then Backwards
• if b5>100 then Forwards
• serout c.4,t2400,($55,$55,b0)
• goto Break
• Left:
• let b0=81
• high b.7
• gosub clearscreen
• serout c.2,n2400,("Hard Left")
• pause 500
• serout c.4,t2400,($55,$55,b0)
• goto Break
• Right:
• let b0=82
• high b.7
• gosub clearscreen
• serout c.2,n2400,("Hard Right")
• pause 500
• serout c.4,t2400,($55,$55,b0)
• goto Break
• Backwards:
• let b0=83
• high b.7
• gosub clearscreen
• serout c.2,n2400,("Fall Back")
• pause 500
• serout c.4,t2400,($55,$55,b0)
• goto Break
• Forwards:
• let b0=84
• high b.7
• gosub clearscreen
• serout c.2,n2400,("Forward
March")
• pause 500
• serout c.4,t2400,($55,$55,b0)
• goto Break
In this version I added subroutines
to clear up some of the most
repeated lines of code and
introduced a two way handshake.
Please see my page on the subject
for more information. I also reduce
the pause in the loop to 500 so less
time is spent in the loop reducing
input lag.
I am not repeating annotations from
previous versions
Nathan Raj 57
58. Car Programming V3
pause 500
Ignition:;the handshake waits for
the correct number
serin c.6,t2400,($55,$55),b2
if b2=85 then Loop0
goto Ignition
Loop0:;the handshake now sends
the correct number to the
controller
inc b3
serout b.1,t2400,($55,$55,b2)
if b3<15 then Loop0
Loop1:
high b.4
high b.5
pulsout c.4,2
pulsin B.3,1,W0
pause 20
if W0<500 then gosub evade ;
Analysing the wave reflection time
serin c.6,t2400,($55,$55),b0
if b0=80 then Break
if b0=81 then SF
if b0=82 then SB
if b0=83 then SL
if b0=84 then SR
goto loop1
evade:
low c.0
high c.1
low b.7
high b.6
pause 500
low c.0
high c.1
high b.7
low b.6
pause 180
return
Break:
low c.0
low c.1
low b.7
low b.6
Goto Loop1
SF:
low b.4
low b.5
high c.0
low c.1
high b.7
low b.6
goto Loop1
SB:
low b.4
low b.5
low c.0
high c.1
low b.7
high b.6
goto Loop1
SL:
low b.4
low b.5
high c.0
low c.1
low b.7
high b.6
goto Loop1
SR:
low b.4
low b.5
low c.0
high c.1
high b.7
low b.6
goto Loop1
This version of code revise
the start-up by adding a
handshake routine. Please
see the page about this
topic
I am not repeating annotations from
previous versions
Nathan Raj 58
59. My most significant improvement - Dual Core system
During the testing I found finding the PIC chip was sluggish in responding to ultrasound as it also had to control the
motors. The solution was to use a multicore system. Rather than learn how to program a new hardware platform I
decided to dedicate a smaller PIC chip to collecting and analysing the data from the ultrasound which then would
trigger a interrupt on main PIC chip. Using a software interrupt would slow down the main chip too much as it
continues to search for input to go high.
This means I will have to use a hardware interrupt. As I could find no one with any practical experience with this I had
to use forums and datasheets to work out how to program this.
To sum up, the larger chip is now simply now simply scanning the XBee input, driving the motors and LEDs. It does not
get involved with running the ultrasound system, this has been handed on to the smaller of the chips. The larger chip
simply responds to interrupts from the smaller chip. This considerably reduces the processing load on the main
processor enabling it to execute its control loops far faster. This reduces input lag from the ultrasound.
Input Process Output
Ultrasound Ultrasound08M2
20X2
Motors
LEDs
Echo Input Trigger Output
Hardware
Interrupt
XBee
User Input
Nathan Raj 59
60. Yes
Is
number
80?
Stops all motors
No
Yes
Is
number
81?
Forward
No
Yes
Is
number
82?
Backwards
No
Yes
Is
number
83?
Left
No
Yes
Is
number
84?
Right
No
Store number from
XBee
From
handshake
Scan Ultrasound Is echo
<500
No
Yes
Subroutine evade
The circled area indicates the section
of the flowchart and algorithm which
will be passed over to the 08M2
secondary processor. This will leave
the rest of the flowchart in the hands
of the main processor (20X2)
Communication between the two
parts of the system is due to a
hardware interrupt. Please see my
coding pages for more details.
I believe this will be a significant
improvement overall and should result
in a significant reduction in the lag
needed to execute the main control
loop. Which handles the inputs from
the controller
New program algorithm
Nathan Raj 60
61. pause 2000
b0=%00000010 ;This sets up pinb.1 as hardware interrupt
gosub interruptenabler ;This line just runs the reset loop quickly
main: ;This is where the normally running code goes
;blah
;blah
goto main
interrupt: ;This is the code that you want to execute due to the interrupt
high b.5
pause 1000
low b.5
pause 100
b0 = b0 ^ %01000000
interruptenabler:;This is the reset loop
hInt1Flag = 0;This reset memory location where the flag is stored
hintsetup b0 ;This sets up pinb.1 as hardware interrupt
setintflags %00000010,%00000010;This sets the PIC chip to monitor the input
return; This returns the program to where it was before the interrupt
This is the pin where
the interrupt is setup.
This is a track from the
08M2 chip
08M2 drives and process
ultrasound data
Motor Control Chip- L293D
Contains two H-Bridges for
both motors
Motor 1
Motor 2
LEDs
Current Limiting
Resistor
20X2 Control Chip
Separate Power
Supply
To reduce noise and
support large current
draw of motors
08M2
Ultrasound driver
chip
Explaining how improvements works
Nathan Raj 61
62. No
Yes
Is
echo<10
00
Scan Ultrasound’
Start
Go Forwards
Stop Motors
Single Core
main:
high c.0,b.7
low c.1,b.6
main2:
pulsout c.4,2
pulsin B.3,1,W0
pause 20
if W0<500 then break
goto main2
break:
low c.0,b.7
goto break
Dual Core
main:
pulsout c.2,2
pulsin c.1,1,W0
pause 20
if W0<500 then interrupt
goto main
interrupt:
high c.4
pause 500
low c.4
pause 300
goto main
pause 2000
b0=%00000010
gosub interruptenabler
main:
high c.0,b.7
low c.1,b.6
goto main
interrupt:
low c.0,c.1,b.7,b.6
b0 = b0 ^ %01000000
interruptenabler:
hInt1Flag = 0
hintsetup b0
setintflags
%00000010,%00000010
return
Single Core vs. Dual Core
In this code “the one
and only processor” is
responsible for both
scanning the
ultrasound and driving
the motors.
In this code I have split the ultrasound scanning
and motor driving between two cores using a
hardware interrupt as explained earlier to scan
the ultrasound. As you can see from the
photographs you can clearly see that there was a
significant improvement in response time with
the 2 core system stopping significantly quicker
(i.e. further away from the wall) than the single
core system.
Dual core system
Single core system
This flowchart shows the
basic algorithm behind the
code running in both systems.
I simply tell the robots to
move forwards scanning for
an object and then stopping.
Nathan Raj 62
63. Correcting differential torque
Pause 500
motorcontrol:
low c.0,b.6
high c.1,b.7
pause 22
low c.1
pauseus 2
goto motorcontrol
Testing Track
Before After
After the beta-testing one complaint was apparent. Due to the
various manufacturing tolerances in motors and gearboxes they
outputted slightly different torque/power/rpm. This meant that
over a meter the car was 16 cm off to the right. I corrected this
by turning the left motor off slightly. The exact times are that
every 22 milliseconds the left motor is turned off for 2
microseconds. This provide a mark space ratio of 22000:2. The
alteration of the ratio is an example of pulse width modulation. I
did this by trial and error.
Initial trajectory
Corrected
trajectory
16 cm off track 0.8 cm off track
Nathan Raj 63
64. Reprogramming the OLED
The OLEDs firmware comes with advertising so I enquired
after the firmware and got a copy of the full firmware for
the OLED driver chip from the manufacturer’s website. I
wired a breadboard and reprogrammed the message to
my own name. The section of the code which I changed
is on the next page. The ability to do this would add to
the customer appeal.
18X2 OLED Driver/firmware chip
Power indicator
Testing OLED
Battery Pack On/off switch
#ifdef use_OLED
EEPROM $00, (" Nathan S. Raj ")
#else
EEPROM $00, (" Serial LCD ")
#endif
EEPROM $10, (" 2015 ")
This is the small section of the firmware code which I
alter to create my own start-up messae.ge. The rest of
the firmware code is concerned with generating the on
screen character from the PICAXE serin command. OF
course I left alone!
Nathan Raj 64
65. Other Possible Hardware
Improvements
Injection moulding – this gives cases that have thicker plastics which makes cases that are more robust. This also allows for more
unique shapes and designs which could make even more visually appealing design which is also ergonomically to hold and the addition
of a click-fit battery compartment separate from the rest of the casing (housing motor’s, PCB etc) would be necessary to prevent
damage to the circuit boards when changing the batteries. The batteries could even be housed in a sealed section of the casing, and
charged through a plug in PSU. Li-Po batteries are typically used with their huge capacity and light weight.
I could use the spare inputs/outputs for new components which can add functionality to the car and controller like a rumble motor in
the controller to provide haptic feedback. This could be switched on/off by using a simple transistor interface from the PIC.
Mass produced PCB with surface mounted components so it smaller and cheaper. The PCB’s can be made by pick and place robots at
very high component densities. The boards are also highly reliable and resilient. This is because it is a game and will be used in a rough
manner and this will reduce the damage. This manufacturing methods will allow for a low per unit cost to increase profit margin.
Injection Moulded Car Bumper
which has thick plastic and is
typical of the very robust
mouldings which can be made
using injection moulding.
A ergonomically controller
for the palm of the hand
An example of a click fit battery
compartment in a remote
A rumble motor for
vibrations in the controller
Nathan Raj 65
66. Injection moulding methodology
Injection moulding is fast, highly accurate and easily
reproducible.
1)The screw thread drives plastic pellets along heated
barrel.
2) This causes the plastic melts
3) The ram pushes the thread forward in the barrel and
injects plastic into the mould
4)Once the plastic cools the mould opens and ejector pins
push object out.
Advantages Disadvantages
Multiple injection points – for complex
shapes ensures plastic gets into all
area’s of the mould
Water cooled moulds – helps set plastic
quickly –speeds up production.
Lost cost per item allows for large profit
margins on products sold.
Short mouldings – If plastic sets too
quickly end up with bits missing.
Flashing – Plastic seeps out of mould and
forms edging around the object.
Large Setup costs prohibit use in school
environment
Nathan Raj 66
67. PCB production in Industry - Reflow soldering
While I hand soldered all of my PCBs for the prototypes in a mass production facility wave soldering will be used to swiftly create
all the electrical connections with a same high quality joint. Due to how this method works they can only use surface mounted
components.
Legs
PCB
Copper
track
Solder
Chip
Heat proof
wax
PCB moved across top
of solder wave
Gaps left where
you want a
soldered joint
Solder can only form a
joint in the gaps in the
wax
Wax removed –
finished PCB
Wave solder bath – molten solder is pumped up
the middle to form a wave of molten solder
Advantages Disadvantages
Lost cost per item allows for large
profit margins on products sold.
High speed of production allowing
for more product unit to be made.
Large Setup costs prohibit use in school
environment.
Requires the use of surface mounted
components only.
Not as strong physical connection as
through the hole soldering.
Nathan Raj 67
68. Design for Market
Flush fitting Ultrasound
Latching PTM On/Off Switch
shaped like a fuel cap
Translucent windscreen
lights up using an LED to
signal power status
Wheels enclosed by
body of car to
prevent damage
from crashing
Castor Wheel under
to prevent the from
of the car from
scrapping along the
ground
I sketched this design to show what a industrially designed model will look like. Typically it will be made using injection
moulding, this is the only technique which can give me the complex shape and level of detail required. It will of course be
capable of mass production with this technique, with all the usual economies of scale associated with it.
The battery unit will be lithium ion with its very high energy density and low internal resistance enabling it to deliver high
performance and high current without overheating. Charging will be the means of an external charging unit and jack plug. This
means there will be no user access for the interior. This offers significant advantages from a safety point of view and in terms of
reliability as the user cannot “fiddle” with the constituent parts of the vehicle!
The PCB will be mass produced using surface mounted technology and reflow soldering. Such boards are highly reliable, easily
capable of mass production, and reasonably sturdy to survive collision. PIC would of course be pre-programmed before being
placed on the board eliminating the need of programming ports on the system.
Nathan Raj 68
69. Future Communication Improvements
While testing I initially had problems with getting the car and the controller to talk
successfully. When I added the handshake routine this cleared away most of issues
allowing for a far faster start up. This however does not prevent a drop off in
connection later on in the communication. This means that a future product will
need a better way of ensuring communication. After a searching through various
forums I was pointed towards a tutorial which should enable me to create a private
network group and block any external interference from outside my two RFID chips.
This also has an added benefit in that for the final product each XBee pair will only
talk with each other so customer can play with friends adding a selling point. This
means that the qualifiers in the code will not have to be modified by hand for each
car when the code is flashed to them but instead when each XBee initially setup they
are instructed to only receive data from a specific MAC address which is it’s partner
in crime.
Nathan Raj 69
70. Cost
Components Number Unit Cost Total project Cost (£) V1,V2
PCB 1102 0.0071 0.78
OLED 1 18.00 18
Resistor 14 0.01 0.14
XBee 2 30.19 60.38
20X2 3 3.59 10.77
08M2 1 1.80 1.80
Battery Packs 11 0.98 10.78
Voltage Regulator 3 0.25 0.75
Programming Ports 4 0.40 1.60
5mm LEDs 2 0.08 0.16
10mm LEDs 4 0.26 1.04
Toggle Switches 3 0.59 1.77
Motors 4 10.79 43.16
Wheels 4 25 100
Wheel Hubs 4 4.14 16.56
Caster Wheels 4 2.08 8.32
PTM Non-latching Switch 1 0.28 0.28
Accelerometer 1 9.84 9.84
L293D 2 3.11 6.22
Ultrasound 2 11.99 23.98
SIL 6 0.60 3.60
DIL 6 0.28 1.68
Acrylic 5 6 30
Miscellaneous 8.39
Total 360
These are the prices of the components at the time of
purchase. These prices may have changed in the
intervening time. The cost for the prototype is greater
than the originally planned for £250 as I had to created a
second prototype buggy with a multi-core system because
ultrasound overhead on the PIC chip was impairing
performance.
A finished product for market will be cheaper as all the
components will be bought in large quantities at trade
pricing so due to the economy of scale the cost per unit
will be lower allowing for a greater profit margin. Mass
production techniques like those I already covered
(injection moulding, surface mounted PCB’s) offer low
cost per item despite high set up costs, as all costs are
spread over many items. My development time/costs
would also be spread rather than heaped onto the one
product.
Outsourcing production to specialist component
manufacturers also spreads the equipment set up costs
further as these companies would use the equipment for
many different clients not just myself.
This is too expensive but my
brother explained to me that as a
prototype these extra cost were
likely to be incurred.
Nathan Raj 70
71. Accelerometer Testing
Breadboard
Designing the circuit board
PCB wizard
Creating the PCB design
PCB Wizard
Printing into acetate
Photocopier
Etching the circuit board
Etching tank
Exposing the circuit board to UV light
UV light box
Drilling holes into circuit board
PCB Drill
Soldering in components
Soldering Iron
Testing components with basic commands
PICaxe Programming Editor
Programming
PICaxe Programming Editor
Modifying program
PICaxe Programming Editor
Design the case on 2D design
2D Design CAD
Create draft of case on laser cutter
Check size measurements of case
Vernier Callipers
Print final case into plastic
2D Design CAD
Cutting studding
Band Saw
Combining the case
Hand Tools
Testing the whole product
Hand Tools
Improvements
Combination of above
Total time (47 hours) (Predicted 43 hours)
One square = 1 hourTime Gantt Chart This does not include the time I spent researching or thinking
of solutions to problems and improvements.
The discrepancy in time was due to
the in when actually manufacturing
I had computer trouble which
slowed down the workflow or was
missing nut and bolts and had to
wait for them to be ordered. Also I
had not predicted building a second
car which would took up some extra
time.
Nathan Raj 71
72. Specification Evaluation
User Requirements:
Car should travel at a minimum of 0.1ms-1
Batteries must last one hour
Easy to replace batteries
The OLED must be visible to read from the
screen at 50cm.
The R/F units must be capable of working at
15 meters
The car must be able to go forwards,
backwards, and rotating about a point so it
turns within its own length
There should be no noticeable input lag from
the controller
The vehicle will have streamlined and
appealing form
The LEDs must be visible at 2 meters.
The accelerometer must intuitively allow
control over the car
Ultrasound can reliable detect walls at 10cm
Must be able to run over a variety of domestic
materials.
The controller must contour to fit the forearm.
Prototype should cost less than £250
Feedback from Users
The car is capable of 0.29ms-1. This was measured by timing the car
over 3 metres. This was repeated 3 times and the mean was taken
and rounded down to give 0.29ms-1.
The batteries last 2 weeks on a single charge being used
intermittently.
The batteries have been replaced by 8 people without instruction.
The OLED is visible from 4 metres minimum by the whole group
The R/F chips are capable of communicating at 20 metres across into
another room .
The car is capable of performing basic movement operations as well
as advanced operations by combining two basic operations. See
programming improvement pages
There is a minor input lag due to the car searching for a XBee input.
Once it has enters a new loop it stops checking for XBee input and
moves the motor control code and cannot check for new inputs.
Users have favourable compared the design to that of UFO
The LEDs are visible at 5 metres by the whole group
12 testers used the car without any prior instruction.
It is capable of crossing carpet, tarmac, rubber and asphalt.
The testers initially complained the screws dug into the arms if they
were not wearing a long sleeved shirt. I can solve the issue by lining
the inside with memory foam.
Please see my comments on the costing page
I used standard sockets for the OLED and LED’s. This means that they are
very easy to swop for others if needed. For example you could change
the colours.
You successfully managed to meet all of the points which is really
good.
As the project developed there was a constant flow of development and changes based on testing/practical experience – I have logged this on
the previous pages. This table formally evaluates some the other spec points.
Nathan Raj 72
73. Health and Safety and the Environment
Health and Safety
The bare cable has be insulated to prevent short circuits during operation
There are no edges on the case sharp enough to cause any harm.
The UV light box was sealed, so that no UV light, which can damage people’s eyesight, could escape.
Goggles and gloves were used during the use of etching and developing fluid.
The developing and etching fluids are toxic and corrosive. If any touched skin they were washed off
with cold water.
I also wore goggles when using the soldering iron and the PCB drill to protect my eyes from spitting
solder and breaking drill bits, respectively
The soldering iron is hot and all effort must be spent to resist the urge to touch the end.
I to 5 minute breaks every 45 minutes to prevent eye strain from programming.
Environmental Issues
I used rechargeable batteries so I did not dispose of batteries after their use
I used recyclable acrylic for the design so that it can be reused afterwards
The programmable PIC chips can be easily reused in a future prototype
I used chip sockets so that if the chips got damaged during testing they can be easily replaced without
replacing the board
I carefully positioned cuts to minimise wastage of plastic in the laser cutter
I created cardboard prototype casing to check the sizing of the case to same plastic wastage on faulty
designs, cardboard is recyclable.
I used OLED which provided a better user experience compared to backlit LCD screens which means
that I will need to replace batteries less often as they use little current.
Nathan Raj 73
74. Strengths Weakness
ThreatsOpportunities
• The cost of production per unit is far
higher for me as compered to
competitors who can sell a product at
profit at half of my production cost.
• Smartphones offer all of the functionality
of my product which factors into how my
competitors are cheaper.
• The non-traditional design of the
controller may put off new customers
unused to novel control systems
• Initially I could not verify that
communication had been established. See
pages 55 & 68.
• The wheels got caught on chair legs. See
page 44.
• The cars veered off the right due to
differential torque due to manufacturing
tolerance in the gearboxes. See page 62
• The processor was struggling to control the
wheels, monitor the ultrasound and XBee
serial channels simultaneously. See pages
58-61
• I took advantage of handshake to suspend
control until it is verified. See page 55.
• I redesigned the car to house the wheel inside the
body which increased mobility and improved the
aesthetic design. See page 44
• I wrote code which use PWM to correct for the
drift from the parallel. See page 62
• I implemented a dual chip systems which uses a
dedicated 08M2 chip to monitor the Ultrasound
unit which allows it to trigger a hardware
interrupt on the main chip when it gets to close
to a wall allowing momentum to be reduced from
earlier. See pages 58-61
• The market for R/C cars controlled with the
body is unsaturated so there is plenty of
opportunity
• This novel control mechanism maybe of
interest to established toy companies who may
want to buy out the company or pair up for a
joint venture.
• I can further improve the product by using
private network groups on the XBee chips to
further improve the experience
Nathan Raj 74
75. Gallery Page 1
A View of inside of the robot A View of inside of the controller
Wheel slots to prevent the
robot getting stuck on
chair legs
Velcro strap allow
the controller to be
individually
tightened for each
user
Interlocking tabs so
I could prototype a
3D object using 2D
sheet acrylic
The pillars allow for
clearance between
circuit board and
components on the top
shelf.
These steel bolts will
be removed from a
final product but
where left on for the
prototype for when I
was testing the motors.
Nathan Raj 75
76. Gallery Page 2 and Final Client Comments
A view of the underside of the controller A view of the underside of the car
Motor nuts are glued in to
prevent them rattling
loose during operation
Caster Wheels to allow for
movement in any direction
are attached via nuts and
bolts
Battery mounted on the
outside for easy changing
during the prototype
phase
Velcro strap allow the
controller to be
individually tightened for
each user
This is the area that will be
lined with memory foam in
the next version of the
controller design
Nathan Raj 76
I love the work that have done for me on this project. I love that you could design a UFO style robot and the QOL things that
you have added in the code and hardware like the stopping it colliding with the wall and make it drive straight are nice. I think it
is cool the way it fastens on to the arm. It is a very natural way to drive it. The fact it is hard to control makes it fun to use. The
open frame design makes it look a bit scary to pick up because I feel like I am going to break it. The market design looks more
like a proper design with everything boxed in. I like the way you can spin it on the spot and I like the way it goes reasonable
quick
I took on board what my client said and was particularly pleased with what he said about the design of the controller. Again it
was good to get positive feedback about the straight driving. I was a bit worried about difficulty of controlling but my client
said that it was a fun part of the game. I do agree with his comments about the market design but this is a common problem
with prototype.