Difference between revisions of "F17: Viserion"
Proj user7 (talk | contribs) (→Compass Calibration) |
Proj user7 (talk | contribs) m (→Design and Implementation) |
||
Line 420: | Line 420: | ||
After mounting the RPM sensor, the rotations per second(rps) could be calculated as it generated a signal for every rotation of the motor shaft. Using this signal as interrupt, the rps was calculated in the 1Hz periodic function. Based on the rps value calculated every second the PWM signal sent to drive the DC motor was calculated dynamically to achieve the required rps specified by the Master controller. | After mounting the RPM sensor, the rotations per second(rps) could be calculated as it generated a signal for every rotation of the motor shaft. Using this signal as interrupt, the rps was calculated in the 1Hz periodic function. Based on the rps value calculated every second the PWM signal sent to drive the DC motor was calculated dynamically to achieve the required rps specified by the Master controller. | ||
+ | |||
+ | [[File:CmpE243 F17 Viserion Motor block diagram.png|800px|thumb|center|alt Block diagram]] | ||
=== Hardware Design === | === Hardware Design === |
Revision as of 06:38, 19 December 2017
Contents
- 1 Viserion Team RC Car
- 2 Abstract
- 3 Objectives & Introduction
- 4 Schedule
- 5 Parts List & Cost
- 6 Process Control
- 7 PCB Design
- 8 Sensors Controller
- 9 Motor and I/O Controller
- 10 Master Controller
- 11 Bluetooth Controller And Android Application
- 12 Geographical Controller
- 13 Testing & Technical Challenges
- 14 Conclusion
- 15 References
Viserion Team RC Car
Abstract
Aim of this project is to build a self-navigating car. The car is divided into five modules. Each module consists of SJ One board as the main controller. The different modules in the car are master, sensors, geo, motor and bluetooth module. The car uses CAN communication protocol for communication between the modules.
The five modules of the car are :
Sensor Controller: This module detects obstacles in the driving path with the help of ultrasonic sensors.
Motor Controller: This controller drives the DC motor and Servo in the car.
Geographical Controller: This module assists the car in navigating to a destination with the help of location details provided by GPS and the orientation(bearing and heading angle) provided by the compass.
Bluetooth Controller: The controller uses Bluetooth to communicate with an Android application. Destination coordinates are provided by this module. The bluetooth module also displays important data like sensor readings, GPS coordinates and speed.
Master Controller: This module will collect data from all modules and direct the motor towards the destination.
Objectives & Introduction
Objectives
The objectives are as follows:
1.To detect and avoid obstacles encountered in the path.
2.To move at an appropriate speed depending upon the path requirement.
3.To use Bluetooth module to start/stop the car and display important data on the LCD.
4.To integrate gps and compass to make sure that the car navigates from source to destination.
5.To efficiently establish communication between all the modules using CAN protocol.
6.To reach a destination given by the Bluetooth module autonomously for a valid path.
System Block Diagram
Team Members & Responsibilities
Master Controller
- Aakash Menon
- Omkar Kale
Geographical Controller
- Ajinkya Mandhre
- Aniket Dali
- Jean Madassery
Sensor Controller
MOTOR & I/O CONTROLLER
- Manoj Ramesh Rao
- Pratap Ramachandran
BLUETOOTH CONTROLLER & ANDROID APP
- Dheemanth Bangalore Vishwanatha
- Pratap Kishore Desai
Schedule
Show a simple table or figures that show your scheduled as planned before you started working on the project. Then in another table column, write down the actual schedule so that readers can see the planned vs. actual goals. The point of the schedule is for readers to assess how to pace themselves if they are doing a similar project.
Legend: Motor & I/O Controller , Master Controller , Communication Bridge Controller, Geographical Controller, Sensor Controller , Team Goal , Team PCB, , Team Android
Week# | Start Date | End Date | Task | Actual Completion Date / Notes | Status |
---|---|---|---|---|---|
1 | 10/09/2017 | 10/15/2017 |
|
Done | |
2 | 10/16/2017 | 10/22/2017 |
|
Done on time except
|
|
3 | 10/23/2017 | 29/10/2017 |
|
Done on time except
|
|
4 | 10/30/2017 | 11/05/2017 |
|
Done on time | |
5 | 11/06/2017 | 11/12/2017 |
|
|
|
6 | 11/13/2017 | 11/19/2017 |
|
|
|
7 | 11/20/2017 | 11/25/2017 |
|
|
|
8 | 11/26/2017 | 12/01/2017 |
|
|
|
9 | 12/03/2017 | 12/08/2017 |
|
||
10 | 12/10/2017 | 12/12/2017 |
|
||
11 | 12/13/2017 | 12/16/2017 |
|
||
12 | 12/17/2017 | 12/19/2017 |
|
||
13 | 12/20/2017 |
|
Parts List & Cost
Item# | Part Desciption | Vendor | Qty | Cost |
---|---|---|---|---|
1 | RC Car - Traxxas 1/10 Slash 2WD | Amazon | 1 | $189.95 |
2 | Battery - Traxxas 7600mAh 7.4V 2-Cell 25C LiPo Battery | Amazon | 2 | $143.26 |
3 | Charger - Traxxas 2970 EZ-Peak Plus 4-Amp NiMH/LiPo Fast Charger | Amazon | 1 | $49.95 |
4 | GPS - Readytosky Ublox NEO-M8N GPS Module | Amazon | 1 | $29.98 |
5 | Bluetooth Module HC-05 | Amazon | 1 | $8.99 |
6 | IMU SparkFun 9DoF Razor IMU M0 | SparkFun | 1 | $49.95 |
7 | LV Maxsonar EZ0 Ultrasonic sensors | Robotshop | 6 | $158.7 |
8 | RPM Sensor - Traxxas 6520 RPM Sensor | Amazon | 1 | $10.25 |
9 | Jumper Wires | Amazon | 1 | $10 |
10 | Acrylic Board MIFFLIN Acrylic Plexiglass 12 x 12 | Amazon | 1 | $11 |
11 | CAN tranceivers | Microchip Samples | 30 | Free |
12 | SJOne Boards | Provided by Preet | 5 | $400.0 |
Process Control
Progress Tracking
Unit Testing
code review
PCB Design
Sensors Controller
Based on research done on previous projects we decided to use Maxbotix EZ0 Ultrasonic sensors due to its reliability and cost. Four sensors total are used in this project. Three front sensors and one back sensor. They are all of the same type and manufacturer. Since they are triggered at different time, every 50ms, there was no need to use different sensor with different ranging frequency.
Hardware Design
There are two PCBs on car that are involved in wiring sensors, providing them with power and collecting data from them. “Main PCB” which is directly connected to Sensor Controller and “Sensors breakout PCB” which is mounted at the front of the car as close to sensors as possible to reduce wire length that goes through air. Two PCBs are connected with 12-pin ribbon cable. The sensors are powered with 3.3V and since we had only 5V power from power bank, we had to use 3.3V voltage regulator mounted on “Sensors breakout PCB”. Providing stable input voltage for sensors was also required because of unstable reading we were getting from sensors, caused by electrical interference. Our front sensors were interfaced by ADC, so stable input voltage was a must. Back sensor was interfaced by PWM since SJOne board has only three ADC pins.
3D Printing Design
As a really important part of hardware design, 3D printing part was fun to make. After testing sensors on different heights from the ground and different angles we noticed that best results are when sensors are mounted as closer to the ground as possible, so we came out with our own design for sensors mount. Most important thing to consider when making design was to be able to adjust tilt of the sensors since we were receiving lot of reflection from the ground with temporarly mounts we used until we got the final printed version. So in order to satisfy that requirement mount is constructed from two parts, the stand and part that holds the sensor what gave us freedom to test sensors positioning during testing phase.
Hardware Interface
Sensors are interfaced with combination of GPIO, ADC and PWM pins. GPIO pins are used to trigger all sensors. Three ADC pins collect output from front sensors and PWM pin collect output from back sensor. Below you can see pin layout and schematics.
|
Software Design
Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show pseudocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.
Implementation
This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.
Motor and I/O Controller
The motor controller is responsible for the steering and controlling the speed of the car. Both direction and speed of the car is controlled using the duty cycle of PWM signal. The RC car comes with a DC motor for driving the car and a servo motor for steering the vehicle. The speed of the car can also be controlled using the Electronic Speed Controller(ESC), which drives the motor based on the PWM signal. Additionally, a RPM sensor was mounted inside the DC motor bracket, to control the speed of the car based on this feedback.These modules where interfaced such that it can work solely on the command from the Master Controller. These modules are explained in further detail in the hardware interface section below.
Design and Implementation
For controlling both the DC motor and Servo motor using the SJ-one board, we require to transmit the required duty cycle. Initially the Radio Control remote provided by Traxxas was used to determine the duty cycle for speed and direction by probing it to using a Oscilloscope. Hence, based on our requirements for steering five different PWM duty cycles were captured for center, slight left, left , right and slight right positions. Before implementing speed control based on feedback, ideal speed for testing was chosen and corresponding PWM cycle was captured.
After mounting the RPM sensor, the rotations per second(rps) could be calculated as it generated a signal for every rotation of the motor shaft. Using this signal as interrupt, the rps was calculated in the 1Hz periodic function. Based on the rps value calculated every second the PWM signal sent to drive the DC motor was calculated dynamically to achieve the required rps specified by the Master controller.
Hardware Design
The motor and I/O controller hardware design consists of SJOne microcontroller board connected to servo motor, electronics speed control, LCD module and LED lights. Servo motor and electronics speed control are connected to the microcontroller using PWM signal. The touch screen LCD is connected to the microcontroller board using UART interface. The LED lights are connected to the board using GPIO interface. The electronic speed controller is powered using the 6v power supply from the car battery pack. The servo motor for steering control is power on using 5V from the power bank. The touch screen LCD module is also powered on using the 5V using the power bank.
Hardware Interface
In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high-level workings rather than the inner working of your project.
DC Motor
ESC
The Electronic Speed Controller is a component used for feeding PWM signal to a DC motor to control the speed at which it rotates. In addition to the speed it also controls the direction in which the motor rotates. These features help the car move forward and reverse and do these in different speeds. From the diagram below you can see the ESC has three color coded wires that are used for PWM signal(WHITE Color), VCC(RED Color) and GND(BLACK Color). These three color coded wires connect to the SJOne micro-controller board and power bank used in the car. There are also two wires coded red and black that have wire adapter at the end connect to the battery pack. The other two red and black wire connect directly to the DC Motor. The ESC also has a EZ Set button to switch between different speed modes, calibrate the speed and steering, and most important of all switch on the ESC itself. Please refer to the documentation provided by TRAXXAS for using the ESC.
S.No | Wires on (ESC) | Description | Wire Color Code |
---|---|---|---|
1. | (+)ve | Connects to DC Motor (+)ve | RED |
2. | (-)ve | Connects to DC Motor (-)ve | BLACK |
3. | (+)ve | Connects to (+)ve of Battery | RED |
4. | (-)ve | Connects to (-)ve of Battery | BLACK |
5. | P2.1 (PWM2) | PWM Signal From SJOne | WHITE |
6. | NC | NC | RED |
7. | (-)ve | Negetive terminal | BLACK |
Servo
RPM Sensor
Software Design
Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show pseudocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.
Steering Control
Speed Control
Consistent speed based on feedback
The design section can go over your hardware and software design. Organize this section using sub-sections that go over your design and implementation.
Implementation
This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.
Master Controller
The master controller is the brain of the car. It communicates over CAN bus with other modules to receive data. It accepts the values of different sensors mounted in front and rear, and takes decision based on this data. It uses heartbeat mechanisms to keep a check on other modules in the system. The entire module has two main algorithms : one for Obstacle Avoidance and another for Navigation.
Hardware Design
This module was interfaced with Microchip CAN transceiver MCP2551 to communicate with other nodes in the bus. No external peripherals were connected to the master controller.
The figure below shows the hardware design of the master.
Software Design
Obstacle Avoidance
Directions And Steering Signals
Testing Challenges
Testing
Technical Challenges
Implementation
Bluetooth Controller And Android Application
Design And Implementation
The user selects a destination on the android application which then communicates with the Bluetooth module HC-05 through which car gets to know the route to destination. The user can directly interact with the car using the android application so this is one of the most important modules. The detailed software and hardware design is mentioned in below sub sections.
Hardware Design
This includes
• SJ-One Board
• Bluetooth Module HC-05
• Android Smartphone
• CAN transceiver
Bluetooth Module
Specifications
• Bluetooth protocol: Bluetooth Specification v2.0+EDR
• Frequency: 2.4GHz ISM band
• Speed: Asynchronous: 2.1Mbps(Max) / 160 kbps, Synchronous: 1Mbps/1Mbps
• Profiles: Bluetooth serial port
• Power supply: +3.3VDC 50mA
• Working temperature: -20 ~ +75Centigrade
• Dimension: 26.9mm x 13mm x 2.2 mm
• Modulation: GFSK(Gaussian Frequency Shift Keying)
• Sensitivity: ≤-84dBm at 0.1% BER
• Security: Authentication and encryption
Bluetooth And SJOne Board Connection Diagram
Hardware Interface
The Bluetooth module HC05 is connected to Bluetooth-ECU using UART3. The transmission rate is 9600bps. Bluetooth-ECU communicates with all other ECU's using CAN-Transceiver.The following pins where used for connections.
Bluetooth-ECU
Function On ECU | Pin NO On ECU | Function On HC05 |
---|---|---|
RX | P4_28 | TX |
TX | P4_29 | RX |
Software Design
Bluetooth Module
Android Application
Implementation
Testing
Technical Challenges
Geographical Controller
Design And Implementation
The Geographical controller acts as the navigation unit for the Viserion. It communicates with the attached GPS and compass unit over UART interfaces. It determines the location of the car in terms of Latitude and Longitude and figures out the car's direction with respect to Magnetic North axis. The Geo controller sends the Car's current location to BT application and then receives the source to destination check points, back from the BT application. Geo module periodically calculates the bearing angle with respect to the destination (subsequent checkpoints) and it sends the bearing angle and the compass angle to master module to steer the car towards the destination.
Hardware Design
The components included in Geo Module are as follows
• SJ-One Board
• GPS Module
• Compass Module
• CAN transceiver
The following block diagram captures how the GPS and Compass modules are interfaced with Geographical Controller.
Software Design
Components
Accuracy of Compass and GPS module is of paramount importance, to successfully navigate the car towards the destination. The compass module is sensitive to the magnetic interference generated from the other components on the car and thus needs to be calibrated to compensate those interfaces. GPS module offers different configuration such as baud rate, selection of positioning systems etc, The module needs to be configured using u-center application from UBlocks.
Compass Module
The Sparkfun's SEN-14001 9DOF Razor's MPU-9250 module has ability to detect linear acceleration, angular rotation velocity and magnetic field vectors using on board 3 axis sensors such as accelerometer, gyroscope and magnetometer.
Compass Calibration
The Calibration of compass module is done with the help of Arduino IDE and the Magnetometer script written using open GL framework "processing".
The Guide https://learn.sparkfun.com/tutorials/9dof-razor-imu-m0-hookup-guide
from Sparkfun walks through the steps required to setup the environment to communicate with the compass module.
We followed the following procedure to calibrate the compass module.
1. Download and flash the firmware written by "elizabethsrobert" to output the maximum and minimum values from all the three sensors.
The firmware can be obtained from the following link
https://github.com/sparkfun/9DOF_Razor_IMU
2.Calibrating accelerometer
GPS Module
GPS Calibration
Implementation
Testing
Technical Challenges
Testing & Technical Challenges
Describe the challenges of your project. What advise would you give yourself or someone else if your project can be started from scratch again? Make a smooth transition to testing section and described what it took to test your project.
Include sub-sections that list out a problem and solution, such as:
<Bug/issue name>
Discuss the issue and resolution.
Conclusion
Conclude your project here. You can recap your testing and problems. You should address the "so what" part here to indicate what you ultimately learnt from this project. How has this project increased your knowledge?
Project Video
Upload a video of your project and post the link here.
Project Source Code
References
Acknowledgement
Any acknowledgement that you may wish to provide can be included here.
References Used
List any references used in project.
Appendix
You can list the references you used.