Week 3: X-Y movements co-ordinated with sample readings.
Week 3 Progress
The aim of this week was to separate from a group to two individual teams in order to firstly understand then create code that can have the autonomous vehicle to stop and take samples along the programmed pathway while it has a position counter on the car that measures how far the car has travelled which would later be used on MATLAB to show the location on the heatmap. While in the other group was adjusting the CAD file to the final design and sending it off so it could get printed out.
Sampling
We had Brandon create code on the Arduino that would allow the (temperature name object) to obtain 10 samples of both temperature and humidity and then it would create the mean by adding the total temperature and dividing it by the amount of samples taken, this would be the value that would be added to the CSV and used in MATLAB.
Movement and Sampling
We started to look at increasing the tracking position of the car while it would increase in values based on the changes on the ultrasonic position between the last distance versus the current distance from the car to the wall it was facing in the direction.
The original plan was to have the car go continuously forward and every second, it would take a sample, this would make the position of the counter go up. We initially tried implementing the sample code in to the main code, however we ran in to multiple problems
Due to the simplicity of the Arduino board, it couldn't handle parallel processing, so while the car was moving forward, it couldn't do any of the tasks it would suppose to do such as taking samples, increasing the counter properly, as it would keep going up indefinitely and it couldn't detect when it needs to turn so the car. We tried implementing the interrupt, delay and Millis function in the code so it would cancel the current task it is doing and then do the sample however they didn't work proper as it would end up not do the sample and as well, the position counter would still be going up and importantly the car would keep going forward and not detect when it needs to turn.
Next Week Fixes
We figured out solutions for what to do for next week, our next week goal would to completely adjust the code of how the car moved by letting the car move in intervals, so the car would move forward, take the sample of the humidity and temperature and then it will move again, that way it would do each function one step at a time which wouldn't require the need of parallel processing.
CAD UPDATE
The sensor stand had another design altercation in Week 3, with the filleting removed around the edges in order to make sure that no changes would occur to the dimensions of the stand when it goes through its 3D printing process. Another modification that has taken place is the addition of a curve on the 90-degree edge located next to the two larger holes that will be fixing the stand to the platform. The curve was added so that the strength of the stand is improved meaning it is less likely to snap if in any case it was to be put under extended pressure by either the ultrasonic sensor or other environmental factors. Figures __&__ shows the final design for the stand of the HC-SR04 ultrasonic sensor which has been sent to print.



Comments
Post a Comment