User:Acheung17/PowerWheel3

Project Preference
1. Autonomous Power Wheel

Problem Statement
To conduct outdoor testing and improve driving capabilities of the Autonomous Power Wheel and add sensor-based obstacle avoidance system.

Project Plan

 * 1) Research the Ultrasonic Sensor HC-SR04 Distance Measuring Module and understand how it works and how to implement it.
 * 2) Conduct outdoor testing for the Autonomous Power Wheel and improve driving capabilities.
 * 3) Determine driving path for Autonomous Power Wheel around Howard Community College Quad.
 * 4) Design the implantation of Ultrasonic Sensor HC-SR04 Distance Measuring Module on the Autonomous Power Wheel.
 * 5) Create Arduino code for sensor-based obstacle avoidance system.

Week 1 Narrative
This weeks goals was to do more research on the Ultrasonic Sensor HC-SR04 Distance Measuring Module for the sensor-based obstacle avoidance system and to conceive initial design concepts for the mounting and implementation of the Ultrasonic Sensor HC-SR04 Distance Measuring Module.

Ultrasonic Sensor HC-SR04 Distance Measuring Module



The Ultrasonic Sensor HC-SR04 Distance Measuring Module is a ultrasonic range sensor for an arduiono. It detects the distance of the closest object in front of the sensor, from 2 centimeters up to 3 meters. It works by sending out a burst of ultrasound, from one "ear", and listening for the echo when it bounces off of an object, with the the other "ear". The Arduino board sends a short pulse to trigger the detection, then listens for a pulse on the same pin using the "pulseIn" function. The duration of this second pulse is equal to the time taken by the ultrasound to travel to the object and back to the sensor. Using the speed of sound, this time can be converted to distance that can be used to stop the Autonomous Power Wheel when approaching an obstacle.

Design Concepts

Wooden Mount The wooden mount design will be a wooden stand that would attach to the floor of the lower platform in the Power Wheel. It will extend over the front of the Power Wheel to allow the Ultrasonic Sensor HC-SR04 Distance Measuring Module to have an unobstructed view of what is in front of the Power Wheel. At the top of the wooden mount the Ultrasonic Sensor HC-SR04 Distance Measuring Module will be attached with small wood screws to secure it and prevent it from moving while the Power Wheel is driving.

Rotating Mounting Bracket

VIDEO

This concept uses a rotating mounting bracket for the Ultrasonic Sensor HC-SR04 Distance Measuring Module. The sensor will be forward facing while the Power Wheel is driving. When the sensor encounters an obstacle it will stop the Power Wheel and put it in reverse, as the Power Wheel reverses the sensor will sweep back and forth 180° and determine which direction the Power Wheel will need to go to navigate around the obstacle. The whole setup, with the rotating mounting bracket and the Ultrasonic Sensor HC-SR04 Distance Measuring Module, will be mounted on a wooden stand on the lower platform of the Power Wheel.

Concept Choice

The rotating mounting bracket concept is the best choice for the Project's over all goal of a fully autonomous Power Wheel, it will have the least amount of sensors on Power Wheel and be able to use that one sensor to detect obstetrical, not only in front, but on either side of the Power Wheel.

For this part of the Project it would not be feasible to add the rotating mounting bracket. It will not work without the implementation of several other key components, adding reverse capabilities to the Power Wheel and code for the Arduino that will all for more autonomous navigation.

The concept chosen will be the wooden mount concept. This will allow for the Power Wheel to stop and pause when a obstacle appears on its predetermined path and once the obstacle has moved, signal the Power Wheel to continue driving. Also with this concept the rotating mounting bracket can still be added to the design and implemented later by future groups.

Week 2 Narrative
This weeks goals was to redesign the sensor mount design, measure the timing of drive, change the Arduino code, and improve the drive of the Power Wheel to follow path.

Sensor Mount

The sensor mount needed to be redesign because the original concept failed to take into consideration of low lying obstacles. low lying obstacles will most likely be curbs or rocks in the path of the Power Wheel. these obstacles will not be detected by the sensor with the original mount design due to how high the sensor was mounted, it would overlook any obstacle near the ground.

The new mount will have certain constraints and criteria: must attach to the Power Wheel without changing original structure of the Power Wheel, easily attached and removed, must be able to sense low lying obstacles, and be able to protect the sensor against collisions with any obstacles.

The new design will be mounted using the bolt pattern of front bumper on the Power Wheel. The front bumper will be removed and a piece of plywood will be attached, as a mounting plate, using the same bolt pattern as the bumper. The bumper will be reattached on top of the mounting plate with the longer bolts.

The mounting plate will extend down under the Power Wheel and allow room to attach the ultrasonic sensor. At this mounting position it will be able to sense curbs and other low lying obstacles. The mounting plate will also need to protect the ultrasonic sensor from collisions. The mounting plate will have brackets on either side of the ultrasonic sensor, that will extend further than the sensor.

Drive Improvements and Arduino Code

The path the Power Wheel was to drive was decided to be make a right turn from side entrance of the Nursing Building and drive straight till it reached the Science and Technology Building, then make a left, and then come to a stop in front of the James Clark Jr. Library Building.

The Power Wheel was capable of driving with minimal interaction with a human operator. To improve on its driving capabilities the code needed to be changed to better reflect the capabilities of the Power Wheel. To do this test were done to establish what was the extent of the capabilities of the Power Wheel and the on board systems. From there small changes in the code were done to correct the path and improve the drive.

There were many changes to the code to edit the drive of the code. Initially the drive was to turn then stop correct the steering to drive straight then start again. This plan was then changed, to minimize the strain on the Power Wheel and the steering components, to making a turn and straightening the steering while the Power Wheel was still in motion, this minimized the time to make turns and minimized the strain on the power Wheel.

The Power Wheel initially was set to high gear, this was allowing for to much wheel spin resulting in poor traction and inconsistent drive times. To alleviate these the Power Wheel was put in low gear, this reduce wheel spin, but did not completely resolve the issue. The Power Wheel was making a turn as its initial movement and this was not consistent with even the minimal wheel spin, to solve the issue a floor mat was placed under the rear wheels to provide better traction.

Test Drive

Goals for the Future

Future groups cannot completely remove wheel spin from the Power Wheel, unless the tires are modified to have better traction. Some ways to avoid the issue will be to have the Power Wheel drive straight first before a turn is made, this will ensure there will be traction for a turn, and the Power Wheel will not have to overcome the initial momentum of the Power Wheel at rest. Future Groups can also add in a gear shift, the traction was better at lower gears but overall speed was sacrificed, if there was a gear shift, this can be resolved.

Week 3 Narrative
This weeks goals was to attach the wires for the plug to go into the ultrasonic sensor, create the code for the arduino and ultrasonic sensor, and build and mount the wooden plate to mount the ultrasonic sensor.

Ultrasonic Sensor

The ultrasonic sensor needs to be attached to the arduino to work. To attach the ultrasonic sensor, I used a 4-pin plug acquired fro, the engineering workshop. The wires for the plug were not long enough to attach to the arduino from the mounting point of the ultrasonic sensor on the wooden plate. To solve the problem longer wires were soldered on to reach the arduino. After the wires were attached, heat shrink was used to protect the soldering. The extension wires that were used were all the same color, so the wires needed to be labeled to denote which wire was which.

Arduino Code

The code needed to me change to allow for the use of the ultrasonic sensor. The arduino needs to be able to run both the original code to drive and the code for the sensor at the same time. The code for the sensor should be constantly checking if there is any obstacles in the path of the Power Wheel. When an obstacle is detected it needs to pause the driving code at the point it detects the obstacle and be able to restart the code from the same point when the obstacle has been cleared. This will be the goal for the last week of the project.

Wooden Plate

The designs for the wooden plate were made for the Power Wheel to allow for 4.5 inch of clearance under the wooden plate. This was changed and the wooden plate was raised 1 inch to allow for maximum clearance under the wooden plate, the same clearance as the axles of the Power Wheel. This is done to allow the most clearance possible, and to avoid taller objects, like grass, that could have possible obstruct the sensor and are not obstacles that would be required to avoid. This will prevent unnecessary damage to the sensor and unnecessary stops for the Power Wheel.

Week 4 Narrative
The final week for project three's goals were to finish the code for the for the sensor-based obstacle avoidance system. To complete the task a flow chart needed to be made, test parameters needed to be set, and the code itself need to be edited. When this was done the Power Wheel was brought outside to test.

Flow Chart

A flow chart needed to be made to organize the procedures needed to be performed by the code in order to get the sensor-based avoidance system to work and to trouble shoot problems as they were encountered.



This helped show what operations needed to be edited in the code and what needed to added to get the code to function properly.

Test Parameters

To test the code when it was finished there needed to be test parameters to exhibit the Power Wheel stopping for obstacles. To test this we used a person that would lay down in the path of the Power Wheel as it was in motion. When the Power Wheel approached the person it should come to a complete stop. When the obstacle moves, the person, the sensor will detect this and continue with the code. The final test will be after the Power Starts moving again, it will encounter an obstacle that will not move, a wall, and it will come to a complete stop. components

Arduino Code

The code was having difficultly replicating results. Some of the problems were coming from the physical design of the Power Wheel and its components, but some were from the code itself. The Power Wheel would sometimes retract twice when it sensed an obstacle, so when it re-engaged the drive the pedal pusher was to far back and could not depress the pedal. To solve the problem the code was change to stop when sensing obstacle 2 meters away, but after it sensed an obstacle and came to a stop, to hold that till the Power Wheel was clear at 2.5 meters. This was because sometimes an obstacle would move back and forth to get out of the way of the Power Wheel causing it to sense it twice, therefore retracting the pedal pusher twice.

Outdoor Testing

There were initially mixed results when testing the Power Wheel. When testing there was issues with the Power Wheel stopping before it reached the obstacle or not stopping when it did reach the obstacle. One issue was the Ultrasonic Sensor was not attached properly to the mounting plate, this caused the sensor to move and sometimes it would aim at the ground causing it to stop short and not start again. This was resolved by better attaching the sensor to the Power Wheel. Another issue was that the sensor was sensing an obstacle twice and causing it to retract the pedal pusher twice. This would lead to the pedal pusher being to far back to re-engage the Power Wheel to drive. So the code was edited to make the code sense an obstacle within 2 meters and stop the Power Wheel and hold that till the Power Wheel is clear for 2.5 meters in front. This allows for the obstacle to move without the sensor sensing it twice and reengaging the code twice.

Test 1 Test 2 Test 3

Future of the Project

The next steps for the project will be to add: gear shift actuator, rotating mounting bracket, and a wireless kill switch.

A gear shift assembly will allow the Power Wheel to go between high and low gear, and to go in reverse. As of now the Power Wheel is set in low gear, to stop wheel spin and to have constant results, engaging high gear once in motion will allow for the Power Wheel to traverse the path at a much quicker time. This will also be helpful when the Power Wheel encounters a steep incline, it can switch to low gear and have more torque to ascend the incline. Reverse will be helpful to avoid obstacles and to change driving paths. With reverse capabilities, the rotating mounting bracket can be added.

The rotating mounting bracket will allow for the Power Wheel to scan side to side after it has approached an obstacle, to determine the best path needed to avoid the obstacle. With this capability the Power Wheel can avoid obstacles without having to wait for the obstacle to pass or for the obstacle to removed, further reducing the amount interaction from the human operator.

The kill switch will allow for the Power Wheel to stop at any given moment if the human operator determines operation is unsafe. This will allow for the operator to stop the Power Wheel without having to chase down the Power Wheel while in motion, to avoid obstacles, or from driving into unsafe situations.