Difference between revisions of "Project City"

From MAE/ECE 148 - Introduction to Autonomous Vehicles
Jump to: navigation, search
Line 4: Line 4:
 
# Interface two Raspberry Pi 3 Model Bs
 
# Interface two Raspberry Pi 3 Model Bs
 
# Use OpenCV to identify and classify common road signs
 
# Use OpenCV to identify and classify common road signs
# Install an array of ultrasonic sensors to avoid road obstacles
 
 
# Implement all tasks into the DonkeyCar framework
 
# Implement all tasks into the DonkeyCar framework
  
Line 23: Line 22:
  
 
=== Hardware ===  
 
=== Hardware ===  
 +
[[File:Small_car.jpg|500px|right|1/10 Scale Chassis with Brushed DC Motor]]
 +
 +
Initially, we had planned to port all our electronics onto a smaller chassis and convert the Brushless DC Motor Drivetrain into a Brushed DC Motor Drivetrain, as the Brushed DC Motor was readily available. The drivetrain conversion on the small chassis proved to be a success, we were able to achieve accurate and precise control of the throttle. There was one drawback of using the smaller chassis; first, although the car is smaller, the turning radius on the 1:10 scale car was much worse compared to the 1:8 scale car, secondly, if we were to use the smaller car, we would need to retain all of our self driving models to achieve autonomous driving again. Therefore, our next step was to look at a Brushed DC Motor conversion for the 1:8 scale car.
  
 
=== Design Constraints ===
 
=== Design Constraints ===
 +
There were three main considerations we took when we looked for a Brushed DC Motor suitable for the car.
 +
 +
# The motor needs to fit and mount onto the current motor mount.
 +
# The motor needs to provide enough power to drive the car.
 +
# The purchased motor needs to arrive in a timely matter.
 +
 +
Each of these constraints proved to be a challenge, as we could easily find a motor that fit two, but not three of the constraints.
 +
 +
For the physical dimensions of the motor, we need to find a motor that had a diameter of 35.8 ± 4.0mm dia., a length of 73.7 ± 4.0mm, and a shaft diameter of 5.0mm exactly.
 +
 +
The original BLDC had a Max Current of 90A, Max Voltage of 27V, Max Power of 2400W, KV of 2200 and Max RPM of 50000rpm. Since we were looking for a Brushed Motor, we looked for something with at least 10% of the original motor's power.
 +
 +
Unfortunately, most of the motors we found that fit all the criteria, did not meet the last: shipping time. Therefore, we looked to do make things work with what we had on hand; by converting the 1/10 scale motor to work on the 1/8 scale car.
  
 
=== Designing the Shaft Adapter ===
 
=== Designing the Shaft Adapter ===
 +
The 1/10 scale motor bolted directly into the 1/8 scale car's motor mounts. The only dimension that did not match was the diameter of the shaft. The 1/10 scale motor had a 3mm dia. shaft, while the 1/10 scale car required a 5mm dia. shaft.
 +
 +
[[File:Shaft_comparison.png]]
 +
 +
Because the 1/10 scale motor used a round shaft, we were not sure if we could design an adapter that would not slip while driving. However, we wanted to try it anyways.
  
 
==== Proof of Concept ====
 
==== Proof of Concept ====
==== Development Release ====
+
[[File:Paper_adapter.jpg|500px]]
 +
 
 +
We first constructed an adapter out of paper, this provided a cheap and easy way to see if an adapter would work. The paper adapter did not slip, however, since it was made of paper and the fitment was not perfect, we observed a lot of eccentric rotation of the pinion while driving.
 +
 
 
==== Production Release ====
 
==== Production Release ====
  
Line 50: Line 73:
  
 
== Identifying Road Signs ==  
 
== Identifying Road Signs ==  
 
== Obstacle Avoidance ==
 
  
 
== Modifying the DonkeyCar Framework ==
 
== Modifying the DonkeyCar Framework ==

Revision as of 18:28, 31 May 2018

The objective of this project is to add an additional camera and array of ultrasonic sensors to the base model car. These additional sensors will interface with the donkeycar software and allow the car to identify and react to common city driving events. The following steps were taken to accomplish this task:

  1. Brushless to Brushed DC Motor drive train conversion
  2. Interface two Raspberry Pi 3 Model Bs
  3. Use OpenCV to identify and classify common road signs
  4. Implement all tasks into the DonkeyCar framework


Team Members

William Liu - william.liu@jacobs.ucsd.edu

Jingpei Lu

Gates Zeng

Drivetrain Conversion

The brushless DC motor (BLDC) provided on the original chassis has one fundamental problem, it cannot be controlled effectively at low speeds. This makes it difficult accurately emulate congested city driving environments. While the BLDC performed well for high speed driving, its lack of accuracy and precision was not ideal for this project. We found two solutions for this project. One, use a Sensored BLDC for improved control while maintaining top end performance. Two, use a Brushed DC Motor for improved control, but sacrifice top end performance.

The Brushed DC Motor was chosen as its top end performance was adequate for the scope of the project and, more importantly, its cost is an order of magnitude less compared to a Sensored BLDC.

Hardware

1/10 Scale Chassis with Brushed DC Motor

Initially, we had planned to port all our electronics onto a smaller chassis and convert the Brushless DC Motor Drivetrain into a Brushed DC Motor Drivetrain, as the Brushed DC Motor was readily available. The drivetrain conversion on the small chassis proved to be a success, we were able to achieve accurate and precise control of the throttle. There was one drawback of using the smaller chassis; first, although the car is smaller, the turning radius on the 1:10 scale car was much worse compared to the 1:8 scale car, secondly, if we were to use the smaller car, we would need to retain all of our self driving models to achieve autonomous driving again. Therefore, our next step was to look at a Brushed DC Motor conversion for the 1:8 scale car.

Design Constraints

There were three main considerations we took when we looked for a Brushed DC Motor suitable for the car.

  1. The motor needs to fit and mount onto the current motor mount.
  2. The motor needs to provide enough power to drive the car.
  3. The purchased motor needs to arrive in a timely matter.

Each of these constraints proved to be a challenge, as we could easily find a motor that fit two, but not three of the constraints.

For the physical dimensions of the motor, we need to find a motor that had a diameter of 35.8 ± 4.0mm dia., a length of 73.7 ± 4.0mm, and a shaft diameter of 5.0mm exactly.

The original BLDC had a Max Current of 90A, Max Voltage of 27V, Max Power of 2400W, KV of 2200 and Max RPM of 50000rpm. Since we were looking for a Brushed Motor, we looked for something with at least 10% of the original motor's power.

Unfortunately, most of the motors we found that fit all the criteria, did not meet the last: shipping time. Therefore, we looked to do make things work with what we had on hand; by converting the 1/10 scale motor to work on the 1/8 scale car.

Designing the Shaft Adapter

The 1/10 scale motor bolted directly into the 1/8 scale car's motor mounts. The only dimension that did not match was the diameter of the shaft. The 1/10 scale motor had a 3mm dia. shaft, while the 1/10 scale car required a 5mm dia. shaft.

Shaft comparison.png

Because the 1/10 scale motor used a round shaft, we were not sure if we could design an adapter that would not slip while driving. However, we wanted to try it anyways.

Proof of Concept

Paper adapter.jpg

We first constructed an adapter out of paper, this provided a cheap and easy way to see if an adapter would work. The paper adapter did not slip, however, since it was made of paper and the fitment was not perfect, we observed a lot of eccentric rotation of the pinion while driving.

Production Release

Tuning for Performance

Hardware

Pinion Comparison

Original Pinion
Pinion 1
Pinion 2
Pinion 3

Interfacing the Pi's

While a Raspberry Pi is a widely available and affordable platform for an autonomous vehicle, it does have hardware limitations that required our team to use a second Pi. One Pi will be used to run the DonkeyCar software to autonomously drive the car. The second Pi will be used to process traffic signs, and read data from the ultrasonic sensors. We needed a way to interface the two Pi's so that they could effectively communicate with each other. There were many solutions to this problem, we considered communication over WiFi, Ethernet, I2C and UART. We ended up choosing UART since the implementation seemed easy and straightforward.

Proof of Concept

Development Release

Production Release

Identifying Road Signs

Modifying the DonkeyCar Framework