Week 5 - 3/3/2017
Just to confirm at the beginning of the
session the individual circuits were tested separately and as a whole as we
didn’t need any more issues to arise at this point in the proceedings. After
confirming that they each work, the circuits were then connected to the Arduino
board and ultrasonic sensor.
The Ultrasonic sensor was attached to the Mobile
platform using a smaller breadboard that can just sit at top of the mobile
platform. This is then connected to the Arduino which we have been able to
re-wire so that it takes its power source from the batteries rather than having
it plugged in to the main power or a laptop.
For the Arduino to control the robotic
car, two separate programs were written, the first for the line sensor and
motor drive circuit, therefore knowing which way the wheels were going to turn
depending on which way the path was going, which is what the sensors will relay
the information back to the Arduino to complete the loop of the program. The
second program is for the ultrasonic sensor circuit, this sensor is going to
continuously take measurements of the path in front of the car, then when these
measurements get to a certain distance that still gives us a turning circle
distance for the car before reaching to object that is blocking the path.
The 2 programs were tested on the Arduino board and
each worked as expected, therefore our project is nearing completion. It was
now time to fully connect everything and ensure that it works when placed on a
path.
We tried to combine the 2 program together to get
the final program. The combined program didn’t work in the way in which we
expected. The robot is meant to:
-follow a line
-stop if it finds an obstacle less than 25cm away
on the track
-move when the obstacle is removed
(possible extension is for the robot to then rotate
until it finds a new track, without an obstacle, to follow)
With the combined program the robot can
follow a line but doesn’t respond to an object in front of it. Which is not
what we thought we had programmed the Arduino to react to. This is more than
likely to do with an error within the code and should easily be rectified
before the bench inspection in a weeks’ time.
During a discussion we had a concern that may be an
issue within how the RC is programed in its basic electronics; the robot might
appear to follow a black line but actually avoids it, the line sensor gives
logic 1 on a white surface and logic 0 on a black surface so when on a black
surface, it moves in a direction to avoid it, we might have issues with tight
bends on the track, meaning if it goes off track it will continue moving.
Also we decided on a final track circuit for the
car to follow. We wanted to ensure that there would be turns and options for
the car, due to the current standings of the car not re-routing we have chosen
to design a single lane track but this could change if we can fix the coding of
the Arduino.
No comments:
Post a Comment