Difference between revisions of "F13: Garage Parking Assistant"
Proj user1 (talk | contribs) (→Objectives & Introduction) |
Proj user1 (talk | contribs) (→Hardware Design) |
||
Line 127: | Line 127: | ||
'''Rangefinder''' | '''Rangefinder''' | ||
+ | |||
+ | The garage module uses an ultrasonic rangefinder to detect the distance of the approaching vehicle. An ultrasonic rangefinder was chosen over other rangefinder types because it has the best balance of range (0 - 21ft) and resolution (1 inch) for our application. The ultrasonic rangefinder outputs an analog signal to represent the distance to the vehicle. The analog signal is connected to an ADC input on the microcontroller which translates the signal to a numeric value. The microcontroller uses this value to compute the distance in inches. | ||
+ | |||
+ | The garage module symbolically displays the distance of the approaching vehicle on an LED strip. The LED strip houses 32, individually addressable, tri-color LEDs. Each LED has a red, green, and blue component; which can be mixed to output any visible color. The LED strip contains built in LPD8806 LED drivers. The LED drivers are interfaced via a daisy-chain SPI bus. Note: This SPI bus uses only two signals: Clock and MOSI. | ||
+ | |||
+ | The module is designed toggle the color of the individual between green and red depending on the distance of the the approaching vehicle. As the vehicle approaches, the LED's will, one-by-one, turn from green to red. When the vehicle reaches its stop point, the entire LED strip will flash red on/off. | ||
+ | |||
+ | The modules will communicate with each other using the onboard Nordic chip. The garage module uses this interface to transmit the distance to the vehicle module. | ||
One of the garage microcontroller's responsibilities is to determine the distance of the approaching vehicle. The garage microcontroller uses an ultrasonic rangefinder to accomplish this task. The ultrasonic rangefinder measures the distance to the closest object and outputs it as an analog signal to the microcontroller. The microcontroller uses the onboard ADC to convert the analog signal to data. The data is then used to compute the distance, in feet. | One of the garage microcontroller's responsibilities is to determine the distance of the approaching vehicle. The garage microcontroller uses an ultrasonic rangefinder to accomplish this task. The ultrasonic rangefinder measures the distance to the closest object and outputs it as an analog signal to the microcontroller. The microcontroller uses the onboard ADC to convert the analog signal to data. The data is then used to compute the distance, in feet. |
Revision as of 04:59, 5 December 2013
Contents
Grading Criteria
- How well is Software & Hardware Design described?
- How well can this report be used to reproduce this project?
- Code Quality
- Overall Report Quality:
- Software Block Diagrams
- Hardware Block Diagrams
- Schematic Quality
- Quality of technical challenges and solutions adopted.
Garage Parking Assistant
Project by: Eric Maki & Kathryn Ng
Abstract
The purpose of this project is to build a multifunctional parking assistant. The parking assistant will simplify the driver’s task of parking a car in a garage. The parking assistant will automatically open the garage door as the vehicle approaches the garage. Once the vehicle is inside the garage, the parking assistant will notify the driver of the vehicle's position relative to a predetermined stop point. When the vehicle reaches the stop point, the parking assistant will alert the driver with audible and visual cues.
Objectives & Introduction
Show list of your objectives. This section includes the high level details of your project. You can write about the various sensors or peripherals you used to get your project completed.
The project consists of two separate modules which communicate with each other wirelessly. One module is located in the garage while the other is located in the vehicle with the driver. Each module is designed around an SJOne board with ARM Cortex-M3 (LPC1758) microcontroller.
The garage module uses an ultrasonic rangefinder to measure the distance of an approaching vehicle. The distance will be displayed symbolically on an LED strip. The distance will be transmitted wireless using the onboard Nordic IC to the vehicle module. The vehicle module will open the garage door, using a dissected garage door opener. It will display the distance on a 7-segment LED display and sound an alarm when the vehicle reaches it's stopping point.
Team Members & Responsibilities
- Eric - Garage Module
- Measure approaching distance
- Transmit distance
- Display closing distance
- Display stop point
- Kathryn - Vehicle Module
- Receive approaching distance
- Open garage door
- Display closing distance
- Sound alarm
Schedule
Week# | Date | Task | Status |
---|---|---|---|
1 | 10/08/13 | Proposal due. Order parts. | Completed task on time. |
2 | 10/15/13 | All parts arrive. Write code to open garage door. | Completed task on time. |
3 | 10/22/13 | Establish board-to-board wireless connection | Completed task on time. |
4 | 10/29/13 | Start working on tasks listed on 11/5 and 11/12. | Task in progress. |
5 | 11/05/13 | Garage microcontroller: Range finder. Vehicle microcontroller: LED display | Completed task on time. |
6 | 11/12/13 | Garage microcontroller: LED strip functional. Vehicle microcontroller: Piezo functional | Task is in progress. |
7 | 11/19/13 | Complete garage/vehicle module integration. Start system testing. | Task is in progress. |
8 | 11/26/13 | Complete system testing. Practice Demo. | |
9 | 12/03/13 | Complete demonstration and report. |
Parts List & Cost
Give a simple list of the cost of your project broken down by components. Do not write long stories here.
Qty | Part | Cost | Purchase from |
---|---|---|---|
2 | SJSU Board with LPC1758 microcontroller | $75 | SJSU CmpE |
2 | Antennas | Provided by instructor | |
1 | Addressable RGB LED Light Strip | $29.95 | Adafruit.com |
1 | Ultrasonic Rangefinder | Provided by instructor ($25.95) | Sparkfun.com |
1 | N-Channel MOSFET | $0.95 | Sparkfun.com |
1 | Universal Garage Door Remote | $34.97 | Home Depot / Walmart |
1 | Piezo Buzzer | Provided by instructor | |
2 | Connectors for LED strip lights (JST plug and receptacle) | $1.50 | Adafruit.com |
Design & Implementation
The design section can go over your hardware and software design. Organize this section using sub-sections that go over your design and implementation.
Hardware Design
Discuss your hardware design here. Show detailed schematics, and the interface here.
Rangefinder
The garage module uses an ultrasonic rangefinder to detect the distance of the approaching vehicle. An ultrasonic rangefinder was chosen over other rangefinder types because it has the best balance of range (0 - 21ft) and resolution (1 inch) for our application. The ultrasonic rangefinder outputs an analog signal to represent the distance to the vehicle. The analog signal is connected to an ADC input on the microcontroller which translates the signal to a numeric value. The microcontroller uses this value to compute the distance in inches.
The garage module symbolically displays the distance of the approaching vehicle on an LED strip. The LED strip houses 32, individually addressable, tri-color LEDs. Each LED has a red, green, and blue component; which can be mixed to output any visible color. The LED strip contains built in LPD8806 LED drivers. The LED drivers are interfaced via a daisy-chain SPI bus. Note: This SPI bus uses only two signals: Clock and MOSI.
The module is designed toggle the color of the individual between green and red depending on the distance of the the approaching vehicle. As the vehicle approaches, the LED's will, one-by-one, turn from green to red. When the vehicle reaches its stop point, the entire LED strip will flash red on/off.
The modules will communicate with each other using the onboard Nordic chip. The garage module uses this interface to transmit the distance to the vehicle module.
One of the garage microcontroller's responsibilities is to determine the distance of the approaching vehicle. The garage microcontroller uses an ultrasonic rangefinder to accomplish this task. The ultrasonic rangefinder measures the distance to the closest object and outputs it as an analog signal to the microcontroller. The microcontroller uses the onboard ADC to convert the analog signal to data. The data is then used to compute the distance, in feet.
The photo below depicts a test of the ultrasonic rangefinder. The rangefinder is positioned to measure the distance to a nearby wall. The microcontroller is processing the analog distance signal and outputing the distance on it's onboard LED display. Note: The rangefinder and microcontroller are mounted in a temporary electronic enclosure for easy testing. The final design will be mounted in a compact plastic case.
Early stage testing of ultrasonic rangefinder
Below is a close-up of the microcontroller. The LED display indicates the distance to the wall: 7 feet.
Display indicates a range of 7 feet
LED Strip
A second responsibility of the garage microcontroller is to symbolically display the distance of the approaching vehicle on an LED strip. The LED's will incrementally turn on and change color as the vehicle approaches. When the vehicle reaches its final position the entire LED strip will flash red to indicate to the driver to stop.
The photo below depicts the LED light strip and the temporary enclosure mounted on the garage wall. The three left-most LEDs are turned on as a white color. The LED strip is connected to the enclosure using a ribbon cable. The enclosure is powered by an external 5V wall adapter.
Early stage testing of LED strip
Below is a close-up of the partially lit LED strip and the enclosure, both mounted on the wall.
Close-up of LED strip and temporary enclosure
Below is an animated picture demonstrating the capabilities of the LED Strip.
Wireless
A third responsibility of the garage microcontroller is to wirelessly transmit the distance to the vehicle microcontroller. The garage microcontroller uses the onboard Nordic wireless radio in conjunction with an SMA antenna for maximum range.
*******************************
****Placeholder for picture****
*******************************
Close-up of SMA antenna
Garage Door Opener
The first task of the car microcontroller is to open the garage door by sending a GPIO signal to the remote controller when the car microcontroller receives data from garage microcontroller.
The photo below shows a rectangular garage door opener with the pushbutton cover removed connected to the car microcontroller.
LED Display - Car Side
The second task of the car microcontroller is to display the distance of the approaching vehicle on a 2-digit LED display on the car microcontroller. It requires the car microcontroller to receive distance data wirelessly from the garage microcontroller.
The photo below shows the 2-digit LED display on the car microcontroller.
Alarm
The third task of the car microcontroller is to sound an alarm to alert the driver that the car is too close to the car. At a certain distance, the piezo buzzer will make noise based upon the distance data sent wirelessly from the garage microcontroller. Tentatively, the buzzer will sound off about 2 feet from the wall.
The photo below shows the piezo buzzer connected to the car microcontroller.
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 inner working of your project.
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 psuedocode 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.
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:
My Issue #1: RS232 and UART
The Ultrasonic Rangefinder (LV-EZ1) outputs data as an RS232 signal. The intent was to read this signal using the SJOne's UART connection along with the provided drivers. The problem was that we were reading garbage data. The cause was an incompatibility between the RS232 signal and the provided drivers. The provided UART drivers expect 0V = Logic LOW, and 3.3V (Vcc) = Logic HIGH. The the rangefinder outputs a modfied RS232 signal. The modified RS232 is defined as 0V = Logic HIGH, and 3.3V (Vcc) = Logic LOW. Data was becoming corrupted due to being inverted. Our solution was not to use the serial output of the rangefinder. Instead we used the alternate analog output of the rangefinder in conjunction with the ADC on the SJOne. Other possible solutions include: Updating the micro-controller software to accept the inverted signal, or use the PWM output of the rangefinder.
My Issue #2: PWM and Piezo buzzer
The PWM outputs a continuous pulse of varying duty cycle. I had attempted to update the software to change the frequency of the piezo buzzer. However, no sound was produced after the inital hum. Thus, the solution is to use GPIO output and create a function which would vary the frequency to create a noise from the buzzer.
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
Garage Parking Assistant Demonstration Video
Project Source Code
Send me your zipped source code and I will upload this to SourceForge and link it for you.
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.