Friday, 30 April 2010
Motor Subsystem;
Firstly, we had to devise a code to check that the motor were wired up correctly and that it would turn backwards and forward.
Main:
low 1 `Drive the motor forward
high 2
pause 5000 `Pause for 5 seconds
high 1 `Drive the motor backwards
low 2
pause 5000 `Pause for 5 seconds
goto main `loop to start
Once this was working, the code was copied and applied to 2 motors to make sure that they both worked;
This routine was called "goforward" (obviously)
`To Drive Motor Forwards
High 5 `Left Motor Fowards
Low 4 `Left Motor Forwards
High 6 `Right Motor Forwards
low 7 `Right Motor Forwards
(Note the change in Pins, as this code was run on the fully assembled buggy, whereas the first code was run during the lab sessions during the first couple of weeks)
Once we had this code and sub-system working, we were able to play around witht the outputs of the chip to create smaller subsections of programming that would enable the buggy to turn left and right. Here are the devised codes;
turnright:
`To Turn Right
High 5 `Left Motor Fowards
Low 4 `Left Motor Forwards
`Code To Turn right Motor Backwards
Low 6
High 7
return
And the code to turn left;
turnleft:
` To Turn Left
High 6 `Right Motor Forwards
low 7 `Right Motor Forwards
`Code to run Left Motor Backwards
Low 5
High 4
These blocks of text where then substituted in to the Alecs program.
Some Initial Programming
Sensor Input Program:
main:
READADC 0,B0
READADC 1,B1
READADC 2,B2
Debug
If b0>100 then b3=1
GOTO main:
Motor Test Program:
Main:
High 0 `Run Motor 1(?) Forwards(?)
Low 1
Pause 3000 `Pause for 3000
Low 0
High 2 `Run Motor 2(?) Forwards(?)
Low 3
Pause 3000 `Pause for 3000
Low 2
Goto Main:
Initial Buggy Program Idea:
Main:
Read 0,B0 `Left Sensor written to Bo
Read 1,B1 `Sensor 2 Written to B1
Read 2,B2 `Right. Sensor written to b2
Low 5 Low 4 Low 6 Low 7
Debug `To check working correctly
If B0=1 Then high 5 Low 4
Else If B2=1 Then high 6 low 7
Endif
Goto Main
Testing day
Thursday, 29 April 2010
Programming
- How to read the inputs effectively, especially as we were reading in ADC inputs and how to convert them again into a binary form , so case statements could be used. We managed to do this through reading each of the inputs into a memory location . Then using If statements these could be analysed and if over a certain value a 1 , 2 ,or 4, which in binary is 001 , 010, 100 could be added to a separate memory location , in my case b3. E.G if my left sensor sensed the line and went past a certain value then in b3 would be 100, if my right 001 and middle 010 or any combination of theses , like if all sensed the line 111. With this case statements could be used. It is important however after selecting the case to erase all the values in b3 so when the programs loops the values do not keep adding up.
- How to change between modes, symbol mode and line follower. As we used a toggle switch which was connected to input pin 7 , we just read in all the pins to a memory location and if over a certain value (because pin7 if on would effectively have a value of 128, and thus make any values being read into the input pins over 128) then it would be in symbol mode and if under the value it would be in line follower mode.
- Lack of program memory, it was soon realised after creating my program that the computer would not allow it to download onto the chip because the program took up to much memory, essentially my programming for the motors which I put into each case was making the file way to big. The way I combated this was to use subroutines. I made one for forward , turn right and turn left. These could be called by using GOSUB...turnright and the program would return to its original location by use of the command RETURN. This saved duplicating lots of code, and made my file size much smaller.
Tuesday, 27 April 2010
Group feedback and product development.
1. Supply a greater voltage to the motors. This could be done by either using the 9V battery, the connection to the motor being controlled by a seperate motor board circuit, or running a further voltage source in parallel with the current supply; maintaining the voltage (4.5V) but increasing the current supply to the motors. This extra step would increase the torque of the motors.
2. Introduce a gearing system to the drive mechanisms. This would allow the buggy to travel at a slower speed, giving the LDR's plenty of time to sense changes in the road conditions and corrective conditions to be implemented appropriately.
3. Change the jockey wheel. The existing jockey wheel would often be mis-aligned when the buggy would try to change its direction of drive; the friction produced fighting against the motors. The installation of two jockey wheels, one in each rear corner, would elimainate this problem and allow the buggy to move more easily.
Development and Progression
The problems were:
1. Motor Power. The motors do not have the torque to turn the chassis (which still appears to be relatively light) upon command.
2. Motor driver board problems. Fault diagnosis suggested that the motor driver board was faulty (a blown chip was suspected), but after creating a new resistor board the fault was found to be in the input voltage to the system (the batteries!).
3. LDR sensitivity. As the suspected fault with the motor driver board briefly stopped development of the moving parts, the group focused their attention onto developing the sensing elements. The LDR's and LED's were mounted onto the front of the buggy at a sensible height to allow adjustment; once testing commenced. Upon reflection it was realised taht the variable conditions experienced in the actual testing laboratory (Room 160 in Aston university) were vastly different to a dimly lit basement.
4. Available products/parts. The supplier used to precure all the components and parts had run out of the LED's that were used to provide a more stable light source for the LDR's to detect. This resulted in a change of LED - a solution that quickly enabled testing to get back on track.
Saturday, 24 April 2010
Fault Diagnosis

Upon finding the motor circuit was not operating correctly it was decided to trace the fault; so that appropriate action could be taken.
1. Using a continuity tester all the PCB was tested to ensure that no solder had 'tracked' across between lines. Only one case was found and quickly rectified but did not resolve the fault.
2. Using a voltmeter all voltages were inspected. Starting at the main battery pack and traced successfully to the motor circuit board. All voltages entering the motor circuit board were correct but the expected voltages that should have been seen on the motor terminals were not there. This suggests that there is a fault with the motor chip; which willneed replacing.
Final Design

Wednesday, 21 April 2010
Bugguie Design
For this a diagram of a the layout was required. It was drawn using Solidworks on an A3 sheet with 1:1 scale. This makes it easy to use and construct.
As well as the wiring being neatened the team decide that the jokey wheel needs to be strengthened. This could possibly be achieved by changing the material used in construction.
Tuesday, 20 April 2010
- A more stable jockey wheel.
- A better chassis for the buggy to sit in.
After a lengthy group meeting today, we have decided on a few more changes for the buggy as a whole.
- The inner circuitry will be redone and neatened.
- The inner circuitry will be mounted on a semi-removable board for aesthetics and practicality.
- The jockey wheel is to be reconstructed.
Thursday, 15 April 2010
Electronics

Sunday, 11 April 2010
First prototype.

The first prototype has been constructed. The group decided to base the design on a three wheeled basis, whereby the chassis was to be made out of plastic containers, to give rigidity and light weight. The use of the original wheels and motors help as we know these can be run effectively without too much complication. Despite this Some major problems have surfaced as a result.
- One of the worm gears is not straight and so will have to be replaced.
- There is a distinct lack of speed and manoeuvrability, however it is still able to run , so placing weight nearer the motors may help , especially when turning.
- As the group decided against lego and other "toys" as this does not show originality, the body had to be made ourselves. This is slightly tedious as nothing will fit tightly , however with the use of drills this situation is being remidied.
- Trying to find an appropriate jockey wheel that can fit with the chassis effectively and to which is effecting the turning. At the moment a lego jockey wheel has been constructed but is ideally not suitable.
Friday, 9 April 2010
Proposed Pin Out diagram
This is the proposed pin-out of the actual PIC circuit board;
Output Pins 0-4 are used to control motor 1 or 2. ( 1 being the left hand motor, 2 being the right hand motor respectively looking at the buggy from the front). The Combinations shown are those to drive the motors forward ( i.e the combination of pin0 being high and pin 1 being low will drive the left hand motor forward, while reversing to Pin0 low and pin1 high will drive the left hand motor backwards.)
The sensor posistions are shown are indicated as if looking at the buggy from the front.
Pin 7 turns on a transistor that activates 5 LEDS mounted above the LDR sensors.
Its pretty flexible so if anyone needs anything moved to make their section a bit easier then give me a shout and ill see if it works and if so ill update the diagram.
Tuesday, 23 March 2010
Case Statements
Let b0 = pins
let b1 = 000111 & pins
select b1
case = 000000; both motors off and return to select
case = 000001; Right hand motor on and return to select
case = 000010; both motors on and return to select
case = 000011; Right hand motor on and return to select
case = 000100; Left hand motor on and return to select
case = 000101; Error
case = 000110; Left hand motor on and return to select
case = 000111; both motors on and return to select
The individual case (ie how to drive both motors will be developed in a later blog).
Programming limitations
IF/ELSE Case Statements
Let b0 = pins
Debug Pins; This command would indicate what the device 'thinks' to the observer
let b1 = 000111 & pins
If b1 = % 00000000; No Action
Else b1 = 000001; Hard right turn
Else b1 = 000010; Continue straight
Else b1 = 000011; Gentle right turn
Else b1 = 000100; Hard left turn
Else b1 = 000101; Error.
Else b1 = 000110; gentle left trun
Else b1 = 000111; Continue straight
Monday, 22 March 2010
Autonomous Vehicles


Autonomous Vehicles and Robots
Introduction
Autonomous Vehicles and Robots are machines that interact with its environment. They use various types of sensors to determine the area around them. Based upon the received signal a microcontroller that has been pre-programmed to decides what should happen next. Because of the initial programming complete by humans they need little contact to perform the required jobs that they are designed to undertake.
Example of Autonomous Vehicles and Robots
There are many examples of Autonomous Vehicles. They range from UAV (unmanned aerial vehicle) to UGV (unmanned ground vehicle) and UUV (unmanned underwater vehicle) . All of these are normally used within the military. However they are not restricted to military use.

Oil and Gas industry's use UUV to construct detail maps of the seafloor before they start building pipework and rigs. They can also be used to survey pipes once the have been laid. In Particular UUV can allow research to be undertaken in areas that would not initial be possible by humans. Many different sensors can be attached to the UUV. For example they can determine the concentration of various elements or compounds. The absorption or reflection of light and the possibility of microscopic life.
As well as Autonomous Vehicles, robots are available and are used commonly in industry. In industry the robots are designed and used to perform repetitive task. These task would have normally ben complete by humans. By reducing the need from humans to perform the task it has reduced the amount of work a company offers but this in turn reduced the overall cost of the products they sell, however a line of robots will have a couple of operators. This is were the human interaction needs to be. If any errors occur the system can be shut and re-programmed. Even though the robots take over a high amount of labour work they provided jobs to the specialist skilled workers (i.e. the ones who can program the machine). From the industrial point of view robots are invaluable to a company that needs to turn out a high volume of products consistently.
Autonomous Robots are highly used within the car industry. Each robot will have six-axis and be mounted with several tools. A few examples of the jobs that they would undertake are:
- Drilling Holes
- Welding Panels
- Screwing
- Painting
- Cutting
The benefit of using automatic robots are they work to a much higher degree of accuracy then a human can. Not only do they have high accuracy they will complete the jobs at speed reducing the amount of time speed on the convenor belt in construction. They will have an a high initial start-up cost but this can easily be overturn with a quick turn around time with reduced number of rejects. Also if a company wish's to produce a new product they can easily be re-programmed where as a human would need to be retrained with time taken to familiarise them with the process of construction, hence increasing the value of having robots.

Conclusion
Autonomous Vehicles and Robots are extremely cleaver machines that have been pre-programmed by humans to do repetitive or dangerous tasks. They have been invaluable to all types of industries and occupations. Without them a large amount of what we have now would not be available - for example oil rigs that are build more than 500m under water. Using robots has increased the quality of products that can be produced which should to more reliability and confidence in company to produce quality made as well as designed products.
Programming
Autonomous Robots- Industrial andDomestic

Autonomous robots (Picture courtesy of KUKA Robotics) and vehicles are machines that are capable of interacting with the enviroment through use of sensors and programming. In effect they are "Intelligent" in the way they need little human contact, to carry put they're desired tasks.
Group Research - Human Factors and concerns with UAV's.
1. Displays and Controls.
2. Automation and System Failures.
3. Crew Composition, Selection and Training.
To add an interesting addition to the automation category however, at what level of automation should a human decision be compulsory. Is it okay for an UAV to decide to destroy a high profile military target at cost to civilian life/infrastructure?
(1) McCarley S.J. & Wickens C.D. (2005)
HUMAN FACTORS CONCERNS IN UAV FLIGHT
Institute of Aviation, Aviation Human Factors Division
University of Illinois at Urbana-Champaign
Saturday, 20 March 2010
Wednesday, 17 March 2010
Programming and Limitations


Practically using sensors i can determine position on the line and can start preparing Programming flow diagrams, however these will be quick to change in the debugging process once the rest of the robot is built.
Tuesday, 16 March 2010
Initial Testing - Motor Torque
Initial Testing - Motor Torque
Today Initial testing was undertaken on the motors provided. This was to identify if the motors that have been supplied are of high enough torque to potential move the buggy along.
This was carried out buy a simple test of mounting the motors and attaching some wheels. To simulate the weight of the batteries/ circuit board etc. The mains power supply was used. See images and video bellow.
As can been seen in the video the initial test was successful, however some issues did arise.
It became apparent that the wheels that have been supplied do not have enough friction to handle the power of the motors (see video below). To overcome this issues we simply placed some duck tape onto the wheels to gain more traction. As a result the test rig moved much better(see video below).
Further developments to undertake from test rig.
See if the design will be stable under loading
See if the design will work with the designated sensor
Increase the friction of the wheels
Circuit board/motor/battery layout.
Progress report - 15/3/10 - Ian Thomas
Type of Design -
4 Wheels. Harder to setup - Unnecessarily so.
2 Wheels. Unless perfectly balanced it would be likely to drag - this was seen as an unprofessional approach.
3 Wheels. Manouevrable and reasonably easy to construct, if not the most original design.
Tracked. Good manouevrability but complicated to construct and needs specific parts.
Hover craft. Too complicated with a lack of manouevrability.
The group decided to analyse a 3 wheeled design and a tracked design further.
TRACKED - Luke Hildred to investigate available track parts.
3 WHEELED - Excellent control. Favourite of the group.
Sensor Choice -
MAGNETIC - Reed switches (Requires further investigation and testing). The less sensitive switch provided in class isn't up to the task - Duncan Scriven to investigate other options.
INFRA RED - Cheap and effective in the right conditions. Lots of online reviews have recommended that these aren't used so the group have decided to forget using them).
LDR - Cheap and effective with extensive research readily available.
Monday, 15 March 2010


