Week 2

Goals of the project as decided so far

The goals for the project have remained the same from what was set out from last week.

However, as part of this weeks project session, it became apparent that one of the ultrasonic sensors was found to be broken, however, the project will now continue based on 3 ultrasonic sensors, 1 on the front and 1 on each side, for left and right detection.


Summary of the second week in the lab

For the duration of this lab session, the primary focus was connecting the ultrasonic sensors to the Raspberry Pi, along with the motor controllers and the 4 motors, 1 for each wheel.

Firstly, we focused on the ultrasonic sensors and getting them connected to the Raspberry Pi as per the circuit design at the end of the blog last week.
We ended up receiving mixed results from the ultrasonic sensors once we started trying to get 2 to work at the same time, this lead onto multiple hours of debugging within the lab session where it was found that one of the sensors was broken.

The main conclusions of the debugging

1 of the 4 ultrasonic sensors is not functional, therefore the project will continue with 3, as mentioned above.
The ultrasonic sensors that we received for the project where V1 instead of V2. 
This is significant as the V1 sensors output the return "echo" signal at 3.3V instead of 5V that the V2s do, meaning that the circuit designed in the first week was not needed as the Raspberry Pi works at 3.3V and the voltage dividers are therefore not needed.

Motor controller setup

Following on after the work on the ultrasonic sensors, we started on the motor controllers. We first learnt how to use the motor controllers, which required a power connector, for which we used the 5V supply on the Raspberry Pi, a standby pin that acts as a reference to the circuit that is required to be set to a high signal for the motors to spin. 
Finally, each motor has 2 inputs, which are toggled between high and low values. If Pin 1 is High and Pin 2 is Low, the motor spins in a way that the wheel spin would cause the car to move forward, if Pin 1 is Low and Pin 2 is High, the reverse happens and the wheel spin will cause the car to go backwards.


All this work was done and verified in a breadboard as show in the image below.

Image showing the breadboard and connections between all components


Image processing/camera

For the image processing side, work was started on the dataset that could be used to detect traffic lights within the project.
The training data was collected using images in the creative commons that where accessible through google searching.
The images where then uploaded to a site called Roboflow that is based around the creation of computer vision applications. Through this interface, it is possible to annotate images to show the correct solution to the AI in order to allow it to become familiar and be able to detect and identify the correct solution.
An example of the training annotations is show below.

Small Collage of example annotations;
Orange box - Green Light || Purple box - Red Light


After the annotations, the dataset can be exported in YOLOv8 format, which is the version of YOLO image processing AI that is supported on the IMX500 camera module that is within the Raspberry PI AI camera.

Following multiple hours of trying methods from Sony, the makers of the camera and Ultralytics, the maker of YOLOv8, I was able to find an export program that is compatible with what is expected for the files in order to run correctly on the IMX500 camera.

However, on testing on the camera, there is an issue with the conversion process of the model as it does not run correctly on the camera.

Issues, reflections and future direction

The first issue was the fact that one of the ultrasonic sensors was faulty, looking into the future, as stated above, we will carry on the project with 3 sensors.

For the camera, try to debug and attempt to fix the issue of the AI not running correctly on the camera.

Main task for the future, transfer the circuit from the breadboard into a Veroboard with soldered connections to finalise the circuitry.




Comments

Popular posts from this blog

Week 4

Week 1