Friday, 30 April 2010

Experience

Overall the robot project wasn't successful but it was quite a fun to go through all the process.I also realized that there were many things to consider practically such as installation of motors, building up circuit by soldering and putting all parts together.This experience hopefully would be helpful in the future work.

circuit diagram


Code

main:
high 5 ; for LEDS
high 6
readadc 1, b1
readadc 2, b2

select case b1
case 82 to 255 ;LDR doesn't detect light
low 2
high 1
case 0 to 81 ;LDR detects light
high 2
low 1
end select

select case b2
case 56 to 255 ;LDR doesn't detect light
low 4
high 3
case 0 to 55 ;LDR detects light
high 4
low 3
end select

debug b1
debug b2

goto main

Thursday, 29 April 2010

Final Design 2

Final Design

Circuit Diagram

Conclusion

Buggy Design

Our buggy design was simple and the chassis had three wheels, two at the back and one at the front. The original idea was to have the chassis as a platform for the circuit that controlled the rotation of the two back wheels. This meant that the circuit was untidy and it was difficult to keep the buggy stable. The LEDs and LDRs were placed in the right positions but because they were held down by tape they weren't held securely. Due to the breadboard not being stable on the buggy the LEDs kept short-circuiting. One major problem with design was chosing the right front wheel. Many designs were developed over several days and none gave the required turning. If the buggy could have been redesigned then it would have been made to be more stable. To do this the breadboard, micrcontroller and darlington driver would be placed securely on the chassis before completeing the circuit. A better caster wheel would have been used instead of a botched wheel.

Circuit

During testing the programmed circuit controlled the motors as it was supposed to with no errors. Two LDRs were used and placed either side of the black line and when both read light the buggy would move forward and when one read dark the buggy would turn. For example, if the left LDR read dark and the other read light, then the left motor would reverse and the right motor would move forward. However, this only worked well when the LDRs were covered but not very well on the track. Each LDR was paired with an LED and covered in black paper so that it had a control light setting. As the LED moved over the black line it would reflect less light into the LDR. The idea of using paper could have been improved if more time was available and LDRs and LEDs could have been secured properly. As this wasn't the case the LDRs kept detecting wide ranges of light and it was difficult to calibrate each time the buggy was used. Another improvement would be to use a third LDR in the middle that would always read dark and keep the buggy on the track at all times.

Wednesday, 28 April 2010

My Evaluation

Testing the buggy
last lecture we tested the buggy's line following capabilities around a simple track and while doing this we encountered two big problems. The first of which was calibration. We found that initially the buggy would turn the corners only about 60% of the time, this was because it was taking the LDR's too long to read and react to the change in light as it passed over the black line. So to get around this problem we had to change the case values so that they were exactly on the threshold of when the LDR's began to detect less light, this lessened the time it took the LDR'S to react and the buggy began to turn the first couple of corners. However there was a disadvantage to this heightened sensitivity, we noticed that the track was darker toward the end, although it was a slight variation in light intensity it was enough to make our LDR's read 'dark' and cause the motors to turn seemingly 'on their own'.
The second problem was that the front wheel was having difficulty turning due to the fact that the black line was slightly raised and the wheel kept getting wedged between it. we did try to adjust the wheel by making it slightly higher however this had little affect and we had to resort to manually twisting the wheel when it got stuck.

Comparison of our buggy to other groups
  • Building quality- there was a wide variety of materials used by the other groups to build their chassis, some used acrylic others used reinforced cardboard. However it was apparent that those who built the chassis using mecano, as we did, had a much stronger and stable frame, therefore although our wires were slightly messy I feel our buggy was well built.
  • line following ability - many groups couldn't get their buggy to read the line at al,l and those that did didn't do any better than we did so i feel our buggy was fairly on par.
  • symbol reading - unfortunately we didn't have time to implement a switch therefore we, like many groups failed miserably on this test, however the buggy did manage to reverse.
  • Number of LDR'S- some groups managed to used 3 LDR's (group B) which made their buggy alot more accurate when turning and correcting itself. our buggy had only 2 LDR's and as a consequence of that turning was difficult as the buggy would over turn.
What I would do differently
  1. Firstly we spent the majority of our time trying to create a decent front wheel, this task could have been made much easier had we used a caster wheel instaed of trying to construct one from mecano.
  2. Had we used a caster wheel we would of had enough time to implement a switch and write a second programme containing interrupts in the correct places so that the buggy could of read the symbols.
  3. we had constant problems with our LED's as they kept short circuiting due to the metal mecano struts, this made calibration difficult as their light intensity would change. To get around this problem we would completely insulates the LED's properly before connecting them to the chassis.
  4. We would try to use 3 LDR's, one in the centre and two one the sides, this way the buggy wont over turn as the middle sensor would detect the black line and cause the buggy to travel forward.
  5. finally and most importantly, we would create a better guard for the LDR'S and LED'S ideally using a dense material such as plastic, this would create a constant environment for the LDR'S and would make calibration a lot more efficient and effective.

Monday, 26 April 2010

Its Alive ...its ALIVE!!!




Today andy and I finally got the buggy to follow the line.

What we did:
  1. Firstly we attached the leds to the chassis and with a bit of soldering we connected them to the circuit board. one of the main problems we encountered doing this was that the leds kept on short circuiting due to the meccano struts. To get round this we had to wrap the legs in insulation tape.
  2. Next we did the same with the LDRS. we decided to have the LDR's 6cm apart as we found that when they were any closer the buggy would over correct itself and when they were further apart the buggy the was not sensitive enough.The LDR's were also 2cm from each led, we found that this arrangement provided the LDR ' s with enough light to adequately read this light differences produced as the buggy rolled over the black line. The LDR's were also placed aproximately half way between the front and back wheels. we thought this best because when our buggy turns, the wheels rotate in opposite directions, however sometimes the back wheels slip which makes the centre of the buggy the axis of rotation.which is where we tried to place the LDR's.
  3. finally we created a paper guard that we coloured in black to absorb an outside light (i.e. from sun etc.) and provide a constant environment at which the LDR's could work under.
  4. After this it we began calibrating the LDR' which was simply a case of trial and error.

PRINCIPLES HOW A ROBOT CAN FOLLOW A GUIDELINE

There are three fundamental situation that could happen

1.Being on the line
the simplest case is when sensors are above a guideline and robort follows it going straight on
2.Loosing the line
apporaching a curve a right sensor looses contat with line. The robot unclutches its left engine which makes it to turn left returning back on line
3.Outside the line
if a curve is to sharp the robot can loose the guideline and it is outside of it. It changes the direction of the engine which causes the robot to turn towards the line the sensors that are placed offaxis get closer to the line

Future scope

1. Software control of the line type to make automatic detection possiable
2. Obstacle detecting sensor to avoid physical abstacles and continue on the line
3. Distance sensing and postion logging and transmission

limitation

1. Choice of line is made in the hardware
2. Abstraction cannot be changed by software
3. Calibration is difficult and it is not easy to set a perfect value
4. The steering mechanism is not easily implemented in huge vehicles and impossible for non-electric vehicles
5. Few curves are not made efficiently and must be avoided
6. Hard to debug a faulty sensor
7. Lack of speed control makes the robot unstable at times

Application

1. Industrial automated equipment carriers
2. Automated cars
3. Tour guides in famous places and similar application
4. Second wave robotic reconnaissance operation

Sunday, 25 April 2010

Chassis

LEDs and LDRs

Today the LEDs and LDRs were extended from the top to the bottom of the chassis so that the LDRs could read the line. The LDRs were covered in black paper and plastic straw to block out any ambient light so that the LDRs would only detect the light from the LEDs. The LEDs and LDRs were held straight by electrical tape to prevent a short circuit.

Problems

The LEDs caused calibration problems with the LDRs because the values being read kept moving rapidly between two extremes. It was decided that it would be better to just use LDRs and calibrate the potentiometers and the code to suit the two differences in light.

Buggy Chassis



Problems with the chassis

Due to the original design of the buggy chassis the motors started to slow down and then stop completely. This is because of the weight that was on top of the motors causing the gears to stop rotating. The back of the chassis was under so much stress that some of the screws and plated started to bend. This caused the wheels to lean inwards rather than stand vertical and let the buggy move forward in a straight line.

Improvements

The new chassis has the motors on top and upside down so that they can work properly and operate at their maximum speed. The chassis is also lighter so that turning is easier and faster than before. Not only is the chassis lighter but it is also easier to extend the LDRs and LEDs to below the chassis.

Saturday, 24 April 2010

Buggy Running


Today i managed to get the front wheel working by using one of the small red wheels and changing the design slightly, the wheel now turns at a 90 degree angle. To get it to work we had to do two things. Firstly the wheel had to be connected in a way that it was trailing its pivot/ the point at which it rotates. Secondly we had to move the batteries to the back as they were putting too much weight on the front wheel which increased friction and hindered steering. Here is a quick vid of the buggy in action.
As you can see the buggy works as follows, when one ldr is covered it turns one way, when the other is covered it turn the other way and finally although the videos does not show when both ldrs are covered the buggy reverses.

NEXT STEP
tomorrow we will be:
  • wiring up the leds and connecting them along with the ldrs to the chassis
  • creating a second program that incorporates interupts
  • connecting a switcth to the circuit
  • begin calibrating the LDRS

Chassis Build

Front Wheel Problems

Yesterday the front wheel was put on the chassis but Jarrett and I had problems getting the correct design to hold the front wheel and chosing the right wheel design. We found that if the struts holding the front wheel were to tight then the wheel would not spin. However, if they weren't tight enough then as the buggy began to move forwards after turning, the wheel would be locked in the side position.

Back Wheel Problems

The wheels we have chosen at the back of the buggy are to smooth so that there isn't enough grip on the surface. Today I'm goin to try to fit elastic bands to them and see if it makes a difference.

LEDs

If the problems with the front and back wheels can be solved then we will start to finish the circuit by adding LEDs. The purpose of the LEDs is to emit light to LDRs so that it can tell the difference between moving over a white surface and then a black surface. The white surface will reflect back the light more than the black surface to the LDRs.

Thursday, 22 April 2010

Building the chassis




Our initial idea for the chassis was to use paper mache, however as andrew has already pointed out, we quickly found out that this was not an ideal material to use as it was too time consuming, weak and heavy. we then decided to use meccano as it would save a lot of weight and time. We began building a three wheeled model as we felt it would be the most suitable chassis for our buggy.
Andrew created the back of the chassis to hold the motors in place and i was left to do the front wheel. we also created a simple deck where the circuitry is to be stored.

Problems found with current chassis
  1. while testing the buggy out we found that the front wheel has difficulty turning. This may be because the front wheel used is too heavy and creates too much friction, so to get round this problem i will try to change it with the smaller red wheel that was handed out.
  2. the circuitry has difficulty staying on the buggy as it drives. to get around this problem i suggest two solutions. firstly we should create rails to hold the the components in place. secondly a lower platform could be formed using two struts parallel to the main strut. this would create extra space so for the battery pack.
Future plans
  • While testing the buggy we found that using our current program (which tells the the buggy to turn by rotating the wheels in opposite directions) the buggy had difficulty turning, now this may be solely to do with the problems we are having with the front wheel however, If the front wheel isn't to blame we will have to program the buggy to turn by making one wheel stop and the other go. This will mean writing two separate programs and incorporating a switch.
  • Calibrating the LDRs is going to be the biggest task, however it would be made much easier if we have a light source to light the paper track. so we will be attaching white led's to the underside of the buggy.

Tuesday, 20 April 2010

Chassis Build

Today the back of the chassis was built to support the two motors and the yellow wheels using Meccano parts.

Monday, 19 April 2010

Chassis Build

1st Idea

Firstly we decided to use cardboard and paper mache for the chassis but realised that the material was to weak. There was also no way of connecting the motors to the material that would make sure that they would be stable. As a result of not being able to connect the motors properly the wheels would not stand vertically.

2nd Idea

To get the motors to connect to a stonger axle so that the wheels are vertical, we decided to use Meccano parts. This is will help with the stability of the buggy and to make sure that it will move forward in a straight line and turn correctly.