Weekly Reports

Week 2: Sept 9-12

This week, the two of us met to discuss our first and second choices for the class project. We did some initial research in terms of pricing, components, feasibility, and optical design for each of the project choices. Based on this research we have decided our first choice will be the Traffic Observer. For this project we have investigated possible optical sources, as well as ideal microcontrollers available for data logging. Premilimary designs and cost allocations have been made according to parts found on websites such as digikey.ca and globalspec.com. We are continuing to research the feasibility of the remaining two topics to decide which one will be our second choice.

Week 3: Sept 13-20

As the topic selection was this week, Leigh and I extensively researched our first and second choices, which were the Traffic Monitoring System (TMS) and the Free Space Optics System, respectively. Our design proposal was written and a detailed initial design with initial budget approximations were completed as well. For the upcoming week, as we will be putting in our first order for initial components, we have already researched and obtained part numbers and prices for microcontrollers, lenses, LEDs, and other key parts for our design. We have learned today that our first choice was accepted, and will now begin further work on the TMS design - starting with the 555 timer modulator circuit.

Week 4: Sept 21-27

This week Michael and I further researched components and their prices for our design. We were introduced to our third “group member”, Roy, who is a graduate student with Dr. Fang and obtained his undergraduate degree in electrical engineering. We discussed our design with him and he gave us some feedback, especially with regards to the selection of the microcontroller. He explained to us how microcontollers work, and also how he has selected microcontrollers in the past. In the end we took his advice and decided to select a microcontroller that is well supported, meaning that many people use it. We have decided to hold off on purchasing a lens until we have tested our initial design (infrared LEDs) using spare lenses in the lab. In the event that our original design does not work, we will save money having not purchased the lens. If it does work we will purchase a lens immidiately. On Monday September 29, we submitted our order request to Ana. The parts we have decided to purchase from Digiky are: a 555 timer (LM555CNNS-ND), 2 infrared LEDs (1N6264), an infrared receiver (TSOP852) and a microcontroller (PIC32MX3XX). In the next week we will be working on our final design, including the 555 timer circuit, improved logic for detection and system mounting. We will also begin research on programming microcontrollers.

Week 5: Sept 28 - Oct 4

We have finalized our design this week as we presented on Friday, October 3. The electronics portion of the design has been finalized and proof of principle testing has begun as a Multisim simulation file was created for it. A powerpoint presentation and semi-final report was written and submitted on Friday describing our final design specifications for both the electronic and optical portions. We have decided on using three optical source/detector pairs and have begun to write our algorithm for determing the type of traffic that is encountered. Most importantly, the microcontroller was selected to be the PIC18F877 as it came with much online support and access to some key freeware programs including a compiler. We are going to attempt to use Infrared LEDs as our source and have received good feedback from Glen that we could be successful with our choice. If not, a contingency plan to use visible lasers with phototransistor receivers has been developed. There was much progress this week, and we await the arrival of our ordered components so that we may begin to build and take initial observations of our system.

Week 6: Oct 5-11

Our parts arrived this week. All of our parts were correct. We discovered that our receiver will not accept continuous signals at 38kHz as we originally thought. The signal sent out must be sent in bursts. The maximum burst to rest time is 70 cycles on to 10 cycles off. Also, the receiver must have leads soddered onto it. This means that we must create a second 555 timer in addition to the first in order to pulse the modulated signal. We are going to research this option. The downside to this is that it reduces our time resolution, since there will be 10 cycle bursts where the system will not be operating. Early calculations show us that this will not create an unreasonable amount of error, however we must investigate this more. As of now, no alternate receiver that accepts continous signals has been found. We discovered that visible lenses made of BK7 material will work in collimating our 940nm light source. Research on the microcontroller and how to program it is ongoing. Next week we will begin our proof of principle tests for the optical components. We will begin by testing the unmodulated IR LED using an IR photodetector indoors in order to determine how far it will go. Next we will test using lenses in the lab to see if they will work in collimating the IR light and what difference that will make in detection distance. Depending on what we decide to do with the receiver problem,we may begin working on the double 555 timer cicuit as well.

Week 7: Oct 12-18

This week we began testing our optical components. Both our infrared LED and our receiver work, and the two components work together. In order for the signal to be picked up by the receiver the LED must be modulated at 38kHz and in bursts of 70 cycles on, 10 cycles off. We did this using electrical equipment in the lab and received a good signal at the receiver. Due to the very small emission angle of the LED (~8 degrees), we are having trouble with alignment. We found that we need to start with the receiver and the LED very close together and then slowly move them apart in order to accurately align them. So far, we have managed to detect the signal from 7ft away, however the only reason that we could not go further is because the electrical components attached to the optical components were plugged into the wall. This week we hope to get into the lab and rearrange the equipment in a way that will allow us to test it at a further distance. It is not feasible for us to test the optical components outdoors at this point in time, however we plan to shine ambient light from a lamp directly through the path of the IR LED in order to mimick sunlight and determine how far the system will work outside. This far we have not needed a lens as previously suggested, because the LED beam is so narrow, and the receiver's detection angle is so large.

Week 8: Oct 20-24

The optical proof of principle test was a success. We were able to transmit a 38kHz, modulated signal to our infrared receiver across the lab diagonal, with ambient lighting and daylight. There was a slight problem however; after being blocked for a long period of time, the signal would disappear, only to reappear again after the beam was blocked a subsequent time. To fix this, we are going to experiment with the rest time of the modulated frequency, to see if perhaps it is too small, and the receiver is being overwhelmed. Another possibility could be that our receiver is defective and we must try another. However, the main importance, is that the signal was transmitted and received very strongly over a distance of approximately 35 feet. Also, for the upcoming week, we will have our electronics P.O.P test, which will include an understanding of the microcontroller capabilities as well as the completion of the 555 timer modulation circuit.

Week 9: Oct 12-31

For the electronic proof of principle the 555 timer circuit was constructed in Multisim. The circuit worked as needed to modulate the IR LED: with 70 cycles on, 10 cycles off at 38kHz. This was acheived using two astable multivibrators as seen below. The next step is to build the 555 timer, which is currently a work in progress. The logic for the microcontroller program was worked out, and the registers needed to accomplish this were found. It was proven that the program we hope to use to transmit the appropriate data from the LEDs to the computer can be accomplished using the PIC16F877. The next step is to use the logic and registers to program the microcontroller.

Week 10: Nov 3-7

Our electronic proof of principle should have been observed for this week, as we not only completed and successfully tested the modulator circuit, but also were able to output text that was received by the microcontroller. Both of those components are coming along quite well, and all we have left is to build the physical structure of our completed system, and program the algorithm into the microcontroller. A problem with the original IR receivers existed in that the signal would not be able to recover itself after it was lost, however this problem was remedied when we used a new type of receiver that was given to us from Glen. The IR signals are focused onto the receiver with a lens, and are able to maintain the signal quite strongly. The microcontroller is being utilized for its timers, however an external oscillator was needed to be added to it as there is no on-board clock. Further programming will be done this week, as well as an updated budget to determine where we stand cost-wise.

Week 11: Nov 10-14

The microcontroller programming is the only aspect left to accomplish. We have completed the modulator circuit and are able to power it using batteries, while also focusing the signal on the receiver with a lens. We must now understand how to use “interrupt flags” and how to trigger them with our varying signal. Further research will be done in the upcoming week on how to approach this problem and integrate our desired algorithm.

Week 12: Nov 14-21

It was found that the microcontroller does not have the capability to take in three squarewave inputs and determine when they are blocked, as well as determin object velocity. There are not enough timers (4 are required and the PIC 16F877 only has 3), and the algorithm contains too many interrupts so that they interrupt each other and make the operation inefficient. The solution to this has been to use a comparator IC after the receivers so that when the signal is not blocked the signal is high (+5V) and when the signal is blocked the signal falls low (0V). The microcontroller program to match this new receiver output has been written and successfully compiled. Tomorrow the whole system will be tested in the lab, including the programmed microcontroller and the new comparator circuit. The mounting materials will be bought and assembled tomorrow afternoon.

Week 13: Nov 24-28

The entire project was demonstrated this week. The analog components worked fine. The Microcontroller proved to be much more difficult to program, and the the demonstration showed the MCU creating an output of the word “Person” numerous times for every person that walked by. However, it was able to be programmed to account for direction and distinguish between a person, a car, and a cyclist. There was a major setback as one of the receivers had burned out, so now the project must function using only two instead of three. For next week, we must provide better functionality of the Traffic System circuit, to just observe pedestrian traffic using two beams.

Week 14: December 2

Today was the second chance for demonstration for our group. After countless hours in the lab and spending time there into the late hours of the morning, we were able to fix the algorithm for the microcontroller to take two times; one for the crossing of each beam, and compute the speed of a passing individual by dividing the distance between the beams by the time difference. This concept was proven, however a small problem occurred with the rollover of the timer on the microcontroller - some instances the time would be off and there would be an incorrect speed given. However it was demonstrated to work succuessfully for numerous trials. Perhaps changing the distance to minimize rollover time would have helped, however the functionality of the circuit today was impeccable. The output to the screen displayed:

Time 1: xxxxx Time 2: yyyyy Speed: zzzzzz

Where x, y, and z were given numbers.

The speed demonstrated direction as crossing the beams from one side produced a positive speed, and crossing from the other produced a negative speed. Also data logging was programmed to occur. All in all, the final design - both hardware and software - were done quite well and there was a great effort put in by both parties. This class was a great hands on learning experience, and the given project was very interesting to work with. Expect the coming reports to have further in depth details about the components and testing of the Traffic Monitoring System circuit.

Thank you,

Leigh Conroy and Mike Cino


Personal Tools