Russell Willmot's Lab Notebook

Back to Main Page

Week 01

August 25, 2009 (1 hour):
Met as a team after class to discuss preliminary project proposal for our motorized following golf caddy. We agreed to search for a motorized cart to buy to avoid the mechanical challenges of the project.

PSSC's

1. An ability to move under its own power.
2. An ability to follow a small, wireless transmitter/remote.
3. An ability to toggle between "follow" and "rest" modes.
4. An ability to sense a number of different hazards (sand traps, water traps, trees, golfers, etc.)
5. An ability to keep score for a single golfer.

Preliminary System Layout

August 26, 2009 (1 hour):
Found two commercial products similar to our project.

1. The "GoGo" by OEM SRL

2. The "Shadow Caddy" by a British company

August 27, 2009 (4 hours):
Developed preliminary design for location detection circuitry. GPS accuracy is +/- 15 to 30 feet for the civilian codes (not accurate enough for our project). IR or optical location detection requires line-of-sight (not guaranteed in our application). Video image processing requires expensive equipment and is too programming-intensive (especially for EE's)!

The simplest and most reliable way to do the location detection is with the Time Difference of Arrival (TDOA) method. By using two antennas spaced a certain distance apart relative to wavelength, the difference in the received phase can be calculated to make a Direction-of-Arrival estimation of the incoming signal.

In an outdoor application, away from wireless routers, microwaves, and other sources of interference, the 2.4 GHz ISM band could be used for location detection. Analog Devices makes a phase detector IC which can take two inputs and subtract their phases, and output an analog voltage from 0 to 1.8V corresponding to that phase difference. The inputs can be as weak as -60dBm and the devices works from a couple hundred MHz up to 2.7 GHz.

Since the AD8303 device can only measure phase differences of 0 to 180 degrees and does not distinguish between positive and negative angles, the following specifications must be made about the system if it is to be able to make 360 degree measurements:
1. The antennas must be spaced one quarter wavelength apart from one another.
2. Four antennas are needed to eliminate the 180 degree ambiguity. 3. Quarter wavelength phase shifters will need to be connected to the "subtracting" signals before entering the AD8302 to insure that no negative angles are measured.

Time Difference of Arrival Method
TDOA Method


Phase Difference to Angle of Arrival Relationship
AOA Relationship


August 28, 2009 (1 hour):
Team decided that the golf caddy is too mechanically-intensive and that a Persistence-of-Vision (POV) machine would be easier to do. We would still like to keep the location detection idea and incorporate that into the POV project.

POV Block Diagram
POV Block Diagram

WEEK 01 SUMMARY
Accomplishments: We discovered that original idea (following golf cart) was not going to work, so we came up with a new idea (a persistence of vision machine). We developed a block diagram for the new project, and submitted a preliminary project proposal for it.
Weekly Work Total: 7 hours
Project Work Total: 7 hours

Week 02

September 1, 2009 (2 hours):
Prepared Powerpoint presentation for in-class presentation of preliminary PSSC's. Made a list of the major modules of the design and assigned team members to each:
1. Stationary-to-Rotary Data Transfer - Shaun, Steve, Russell
2. Motor Selection - Steve, Eric
3. Receiver/Transmitter Location Detection Circuit - Russell
4. IR Sensors for speed feedback/reference frame - Shaun, Eric
5. Preliminary Software Plan - Eric, Shaun
6. Rotating LED post - Steve
7. Mechanical Considerations - Eric, Russell
8. Power Circuitry - Steve

September 2, 2009 (2 hours):
Discussed basic mechanical layout of project with Shaun and Steve. Worked with Shaun to develop timing model for LEDs.

Basic Mechanical Layout
Mechanical Layout


At 30 frames per second, the human eye cannot distinguish between individual images and the visualization appears to be continuous. 30 frames per second = 1800 RPM. We would like to use RGB LEDs and make the image 32 LEDs (or pixels) tall. To make pixels as square as possible, they will have to be 0.5 cm wide (the LEDs are 0.5 cm tall). For a 12" diameter base, this means that the LEDs will have to change every 177 microseconds. Our plan is to shift out the LED colors to shift registers to display the colors for a given column of the image. 32 LEDs * 3 bits/LED / 177 microseconds ~ 540 kbps (average data rate). Using the Motorola 9S12's SPI module as a reference, we can assume that the data will be shifted at 12 Mbps (provided the shift register delays are not too long). When its time for the lights to switch from one column to the next, the 96 bits of data will take 8 microseconds to get out to the shift registers. This corresponds to a 0.23mm "transition period" from one pixel to the next. We feel this will be small enough to be undetectable to the human eye.

September 4, 2009 (1 hour):
Revised PSSC's with team per the feedback from Dr. Meyer, Dr. Johnson, and David.

1. An ability to display a pattern with moving LEDs
2. An ability to control the direction in which the pattern is being displayed
3. An ability to have the pattern track an RF beacon and display in its direction
4. An ability to change the pattern while the machine is in motion
5. An ability to accept user-generated text to display

WEEK 02 SUMMARY
Accomplishments: We finalized our PSSC's and the project proposal. I completed a preliminary timing analysis as well as a preliminary mechanical layout. The project was divided into modules and assigned to different members of the team.
Weekly Work Total: 5 hours
Project Work Total: 12 hours

Week 03

September 6, 2009 (2 hours):
Made preliminary circuit layouts for the upper PCB, lower PCB, and a more detailed schematic of the location detection circuitry.

Upper PCB
Upper PCB


Lower PCB
Lower PCB


Location Detection
Location Detection


September 7, 2009 (1 hour):
Met with team to discuss plans for completing Design Constraint Analysis. Used preliminary circuit diagrams of Upper and Lower PCBs to make a list of components to find:
1. LCD Screen - Eric
2. Shift Registers for LCD Screen - Eric
3. 2.4 GHz Transceivers - Russell
4. Phase Detectors - Russell
5. Antennas - Russell
6. Speaker - Eric
7. Digital Thermometer - Shaun
8. IR LED - Shaun
9. Keypad - Russell
10. Keypad Decoder - Russell
11. Rectifier and DC/DC Converters (lower PCB) - Steve, Shaun
12. Relay - Steve
13. Opto-isolator - Eric
14. Motor - Eric, Shaun
15. Battery(ies) - Eric
16. Voltage Regulators, etc for Battery (upper PCB) - Steve
17. IR Sensor - Shaun
18. RGB LEDs - Steve
19. Shift Registers for LEDs - Shaun

Asked each member to prepare a "Component Summary" Sheet, detailing the Voltage Requirements, Timing Requirements, Power Requirements, Cost, etc. for each device they find.

September 8, 2009 (2 hours):
Created lookup table for location detection circuit. Microcontroller will take the two analog voltages as inputs and determine the Angle-of-Arrival of the incoming signal based on this table. The team decided that 10 degrees was enough resolution in determining the Angle-of-Arrival. In order to make this distinction for all angles around the device (360 degrees), the analog voltages must be known to within 14 mV of accuracy. The 10-bit analog-to-digital conversion module on the ARM can measure the voltage to within +/- 3 mV, so we have plenty of margin there to work with.
I found a transceiver module that can handle our data transfer between the upper spinning board and the lower stationary one. The device is a Nordic Semicondutor nRF2401A and SparkFun makes a small eval board on which it integrates an oscillator, an antenna, as well as a number of other components the nRF2401A uses to operate. The device operates in the 2.4 GHz - 2.5 GHz band, so we may need to turn off wireless routers and bluetooth devices before turning on our device. It transmits a very low amount of power (0 dBm), which is good for us because of the short range (~30 cm) link we are trying to make. The nRF2401A claims to support data rates of at least 250 kbps, allowing us to send a 2 KB pixel map in 64 ms.

September 10, 2009 (3 hours):
Met with team to discuss keypad and LCD mounting options. The ARM eval board comes with both, the difficult part is figuring out a way to mount them. Shaun is going to ask NI if we can take the screen and the pushbuttons off the eval board, mount them to our structure, and just run wires down to the board. We can't mount the whole board to the structure because then we would have limited access to the JTAG (programming) connector as well as the Ethernet port (we would also have to re-solder the headers to the back side of the board). Professor Meyer approved the use of the ARM eval board with our final project since we will be selecting another micro for the upper (spinning) PCB anyway.
After looking into the speaker idea, we discovered that a non-trivial amount of additional hardware would be required to drive the speaker and play the sounds that we want to play (transformer, bipolar voltage supply, amplifier). We decided to eliminate the speaker idea from our project for the moment because it is not a PSSC. We will add it if we have time and if it doesn't cost too much.
I found the 2.4 GHz transceiver I want to use and prepared a Component Summary sheet for it.

Here is the updated list of components the team still needs to find:
1. Antennas, Filters - Russell
2. Transmitter - Russell
3. IR LED - Shaun
4. IR Sensor - Shaun
5. Pushbuttons - Russell
6. Transformer - Eric
7. Rectifier - Eric
8. Relay - Steve
9. Opto-isolator - Eric
10. Motor - Eric, Shaun
11. Battery(ies) - Shaun
12. Voltage Regulators for Battery (upper PCB) - Steve, Shaun
13. Shift Registers for LEDs - Shaun
14. BJTs for LEDs - Shaun

September 11, 2009 (1 hour):
Analog Devices recommends this connector with the pcb for their Phase Detector. I found an antenna that operates in the frequency range we're interested in and mates with the connector.

WEEK 03 SUMMARY
Accomplishments: Our group identified the following components for our project: Transceivers, Phase Detectors, Antennas, Voltage Regulators, RGB LEDs, Relay, Digital Thermometer, IR LED, and IR Sensor. I did a preliminary design of the bandpass filter for the receiver.
Weekly Work Total: 9 hours
Project Work Total: 21 hours

Week 04

September 13, 2009 (3 hours):
There needs to be a filter between the receiving antenna and the phase detector to make sure that the phase detector only picks up the 1.2 GHz signal from the transmitter and no other signals that could invalidate the phase measurement. Most surface mount filters need to be custom made and with our small order quantity, they could be very expensive. The best option would be to design a bandpass filter out of lumped components and solder them to the pcb. This is a feasible solution because at 1.2 GHz, the loss of the components is not terribly critical and as long as they are placed very close to one another, there will not be any adverse effects due to time delay.
After performing a couple of iterations with Agilent's Advanced Design System (ADS) software, I found that a two pole bandpass filter with 10% bandwidth would be sufficient. At our operating frequency, the closest and most problematic band will be 900 MHz because of the large amount of cell phone usage of this channel. With the filter design specified below, any 900 MHz signals received by the antenna will be attenuated by 30 dB and will not significantly affect the phase measurement.

Basic Filter Design:
The filter network will consist of a 132 nH series inductor, a 132 fF series capacitor, a 26.3 pF parallel capacitor, and a 0.655 nH parallel inductor (in that order).

September 14, 2009 (3 hours):
I prepared a schematic for the upper and lower boards to help visualize the entire system (Red lines = power, Black lines = data). Different calculations were assigned to each team member:
Timing Analysis - Shaun
Power Analysis - Steve
Voltage Levels - Shaun
Communication (SCI, SPI, 3.3 to 5V logic conversion) - Eric
Micro Modules Needed - Russell
Micro Memory Needed - Shaun
Upper Level Weight Distribution - Eric
Link Budgets - Russell

Upper Schematic
Upper Schematic


Lower Schematic
Lower Schematic


Prepared Component Summary Sheets for the Antennas and Connectors.

September 15, 2009 (6 hours):
Met with Shaun to prepare Design Contstraint Presentation. Realized that we need three microcontrollers to perform all the operations. Retrieving data from the 2.4 GHz transmitter and shifting the bits out to the display LEDs are two time-critical, asynchronous processes that need to be performed by the top PCB. Made the list of requirements for each of the three micros and selected two options (ARM LM3S8962, Freescale MCF52259, PIC24FJ32GA002, Freescale MC9S08AC128) for each.

September 16, 2009 (3 hours):
Dr. Meyer had a concern about the Doppler Effect on our 2.4 GHz data link. I crunched the numbers to find out how much of an effect it would have. Assuming there is 20 cm of separation between the two PCBs, the top transceiver is 5 cm from the axis of rotation, the bottom transceiver is 10 cm from the axis of rotation, and the upper PCB is rotating at 1800 RPM, then the maximum relative speed between the two transceivers will be 4.1 m/s. The equation for observed frequency is Fobs = (1-v/c)*Fo, where v is the relative velocity between the source and observation point, Fo is the source frequency, and c is the speed of light. The maximum variation in frequency we would see at 2.4 GHz would be 0.0000014%, so the Doppler Effect should not disrupt our wireless connection significantly.

I found an oscillator and an amplifier for the transmitter circuit.

September 17, 2009 (5 hours):
Met with the team to work on the Design Constraint Analysis report. The submitted document can be found on the Team 7 main page.

September 19, 2009 (2 hours):
Sent requests to filter companies for quotes. Found an alternate topology for the bandpass filter. The values for these components seem to be more realizable. This is the network:
Parallel 34.85 pF capacitor, parallel 0.47 nH inductor, series 2.65 pF capacitor, parallel 34.85 pF capacitor, parallel 0.47 nH inductor.

The 1.2 GHz antennas arrived. I connected two of them to the two ports of a network analyzer in the RF Lab in MSEE 289 and found that the antennas need to be separated 8.7 cm in order to be 90 degrees out of phase with one another.

WEEK 04 SUMMARY
Accomplishments: We completed the design constraint analysis, addressed the doppler shift concern, and I developed a better filter design.
Weekly Work Total: 22 hours
Project Work Total: 43 hours

Week 05

September 22, 2009 (2 hours):
Did the PADS Tutorial!

September 23, 2009 (3 hours):
Began adding parts to the team 7 PADS library. Stored the library on our team folder in shay (477grp7/PADS/).

September 24, 2009 (8 hours):
Added the rest of the parts we currently have picked out to our team library. Prepared a basic footprint layout for each of the boards we will need, estimated the dimensions of each board. It looks like at most, the total area we will need will be approximately 30 sq in. I made a schematic in PADS Logic for the LED post. I ordered samples of the MAX2754 1.2 GHz oscillator and the MBC13916 low noise amplifier.

September 23, 2009 (2 hours):
Finished the design of the 1.2 GHz bandpass filter. The final topology is 2.7 pF series capacitor, 7.0 pF parallel capacitor, 1.8 nH parallel inductor, 1.3 pF series capacitor, 7.0 pF parallel capacitor, 1.8 nH parallel inductor, 2.7 pF series capacitor. All components are available from the RF lab in MSEE 289 except for the inductors, which have been purchased through digikey. The circuit was simulated with Advanced Design System software, and ESR values were incorporated into the simulation. The 3 dB bandwidth of the filter is 19.2%, the 10 dB bandwidth is 38.9%, the insertion loss will be about -0.76 dB, and the return loss will be -28.8 dB.

The 50 ohm transmission line has also been designed for the RF circuit. For a 0.062" FR4 board with copper on both sides, a grounded CPW line can be used. The signal trace width needs to be 2mm and the signal-ground gap needs to be 0.35mm in order for the characteristic impedance to be 50 ohms. This configuration was simulated with Ansoft HFSS. The loss on this line will be about -0.05 dB/cm and the wavelength on this line will be 14.8 cm.

WEEK 05 SUMMARY
Accomplishments: I did the PADS tutorial, added our parts to the PADS library, and created the schematic for the LED post. I also completed the filter and transmission line designs for the RF circuit.
Weekly Work Total: 15 hours
Project Work Total: 58 hours

Week 06

September 27, 2009 (3 hours):
Made some modifications to the bandpass filter to improve the insertion loss from -1.3 dB to -0.7 dB. Also located several surface mount capacitors and inductors in the RF lab in MSEE 289 that will work for our filter.

Designed the 90 degree phase shifter delay line in Ansoft HFSS. The simulated phase delay was found to be 89 degrees, this should be sufficient for the RF circuit.

September 29, 2009 (5 hours):
Met with the team in the EE 63 senior design lab to work on the final schematic. We had made a couple of design changes to the overall system that required us to find a few extra parts. For example, we found LED drivers that would be able to replace the shift registers and BJTs, which simplified the circuit quite a bit. Also, Shaun was able to get the slip rings to reliably send power from the stationary part of the circuit to the rotating part, but now we have to put a fairly large filter capacitor on the upper PCB as well as some robust switching voltage regulators. I found a robust bridge rectifier for the power supply as well as a 5 volt, 3 amp regulator.

October 1, 2009 (8 hours):
Met with the team to finish the schematic in PADS. I did the lower board.

October 2, 2009 (2 hours):
Did a better test to determine how far apart the antennas need to be spaced to receive signals 90 degrees out of phase of one another. In my first test, I used a two port network analyzer and had one antenna transmitting and one receiving. But this is wrong because in our actual device, all of the antennas on the receiver will only be receiving. So to fix this problem I used the 4-port network analyzer in the RF lab and connected three antennas to the ports. One acted as the transmitter and the other two acted as the two receiving antennas on the receiver. I found that the two receiving antennas experienced some coupling effects between them which forced them to be more closely spaced than 6.25cm (one quarter wave at 1.2 GHz) in order to receive the signal 90 degrees out of phase. The actual separation distance was 2.5cm.
I also found that if you fix the location of the antenna connectors, you can tilt the antennas towards each other or away from each other and vary the received phase delay. This will come in handy in the final PCB design if we need to do some "tuning" of the entire receiver system. Once we find the right antenna orientation, however, we're going to need to find something to keep them in that orientation. I was thinking we take a piece of foam and cut two holes in it and slide it over the two antennas so they can't move.

WEEK 06 SUMMARY
Accomplishments: I improved the response of the bandpass filter, designed the 90 degree delay line, finished the schematic, and found the proper separation distance for the antennas.
Weekly Work Total: 18 hours
Project Work Total: 76 hours

Week 07

October 5, 2009 (1 hour):
Found out from Steve (who had talked to David) that our LED post might be in danger of flexing or even breaking while its spinning. For a 15cm radius at 1800 RPM the LED post will be experiencing an acceleration of 543g's. Assuming the post has a mass of about 12 grams, the force on it will be 14.4 lbs. This is quite a bit of force on a 5.5" by 1" PCB. Shaun had the idea that since we are anchoring the LED post at the top and bottom with the two plexiglass disks, we can put a vertical piece of plexiglas in front of the post to keep it from buckling out too far.

October 6, 2009 (7 hours):
Copied the netlist over from PADS Logic to PADS Layout for the lower board and started to arrange the components on the PCB. I realized that we needed barrel connectors to connect power from the board to the slip rings on both the top and bottom boards. I found these barrel connectors, added them to our list of datasheets on the website and made a part for them in PADS.

After talking with some RF people, I found out that my angle-of-arrival receiver system could be very susceptible to multipath effects. To prevent any inaccuracies, I would like to use a very directional antenna for the transmitter and have the user point it at the POV machine so that any multipath signals from the antenna are very low power. Also, in software, Eric had the idea of putting a 1st order filter on the angle of arrival measurement. This would mean that the micro would have to know for sure where the transmitter is at one point in time, and then if it sees the transmitter has moved to a drastically different angle in a very short amount of time, it would know that that second measurement is probably incorrect.

October 7, 2009 (8 hours):
Added the RF connectors to the PADS library, finished arranging the components in the proper order, put in the traces for the RF circuit, and routed the power traces.

WEEK 07 SUMMARY
Accomplishments: I finished the preliminary pcb layout for the lower board.
Weekly Work Total: 16 hours
Project Work Total: 92 hours

Week 08

October 14, 2009 (8 hours):
Autorouted the rest of the lower board, prepared slides for the design review, and practiced the presentation.

WEEK 08 SUMMARY
Accomplishments: I finished the final PCB layout and prepared for the design review.
Weekly Work Total: 8 hours
Project Work Total: 100 hours

Week 09

October 19, 2009 (4 hours):
Worked on lower pcb. Added the upper and lower ground pours.

October 21, 2009 (11 hours):
Worked on lower pcb. Fixed clearance issues.

October 22, 2009 (9 hours):
Worked on lower pcb. Fixed more clearance issues and passed FreeDFM test.

October 23, 2009 (4 hours):
Finished and submitted lower pcb. Also did part size check on pcb printout.

WEEK 09 SUMMARY
Accomplishments: Our team submitted the final PCB files to Chuck after double-checking everything.
Weekly Work Total: 28 hours
Project Work Total: 128 hours

Week 10

October 27, 2009 (6 hours):
Made flowcharts for the RF transceiver device driver. There is a configuration flowchart at power up as well as transmit and receive flowcharts.

Transceiver Configuration Flowchart
Transceiver Configuration Flowchart


Transceiver Transmit and Receive Flowcharts
Transceiver Transmit and Receive Flowcharts


October 28, 2009 (3 hours):
Made a flowchart to generate the LED pixel map from a string of text. It can be found in two pages.

Pixelmap Generation Flowchart (Page 1)
Pixelmap Generation Flowchart (Page 1)


Pixelmap Generation Flowchart (Page 2)
Pixelmap Generation Flowchart (Page 2)


October 29, 2009 (5 hours):
Made a flowchart to update a single character in an existing pixel map. This function would be used in the clock feature, for example, when only the seconds characters need to be updated most frequently. This flow chart is in two pages.

Pixelmap Single Character Update Flowchart (Page 1)
Pixelmap Single Character Update Flowchart (Page 1)


Pixelmap Single Character Update Flowchart (Page 2)
Pixelmap Single Character Update Flowchart (Page 2)


Also made a spreadsheet that shows the relationship between time to transfer an image wirelessly versus data packet size for each transmission. A 96-bit payload packet size should be large enough to give us a small enough transfer time.

WEEK 10 SUMMARY
Accomplishments: I made several flowcharts for functions that will be needed by the lower micro.
Weekly Work Total: 14 hours
Project Work Total: 142 hours

Week 11

November 2, 2009 (1 hour):
I ordered the last few parts we need for the lower board (a 1N5408 diode).

November 5, 2009 (6 hours):
The pcbs came in! I spent some time practicing soldering. I soldered the power connector onto the lower board, as well as the rectifier, and power diodes. I have to wait to put the bulk capacitor on because the 5V switching regulator has to be on the board first.

November 6, 2009 (8 hours):
Soldered a bunch of LEDs, two LED drivers, and some decoupling capacitors to the LED post. Helped Eric solder the 5V switching regulator to the upper board. It's a pain in the butt because it has an exposed pad beneath the package that needs to be connected to ground. This means that in order to get this component to work, a very thin wire (we used 30 gauge) has to be soldered to this pad on the bottom of the chip, fed through the vias, soldered to the ground pad on the bottom of the board - and all of this needs to be done in a way that still allows us to solder the pins to the pads on the top side of the board.

November 7, 2009 (8 hours):
Finished soldering the LEDs and the header to the LED post. Soldered the 5V switching regulator to the lower board, along with the external capacitors, and the bulk cap.

WEEK 11 SUMMARY
Accomplishments: I ordered the last part I forgot I'd need for the lower board power supply, soldered the LEDs to the LED post, and soldered the 5V power supply components to the lower board.
Weekly Work Total: 23 hours
Project Work Total: 165 hours

Week 12

November 9, 2009 (8 hours):
After Eric soldered the remaining LED drivers, decoupling caps, and current-controlling resistors to the back of the LED post, I made a test circuit on a breadboard to make sure this circuit works. The triple output power supply was used to supply the board with 3.3V and 5V power, GND was grounded, and CLK was connected to a function generator which was producing this wave:

v(t) = 1.65*square(2*pi*10*t)+1.65 (V)

SDI (data in), LE (Latch), and !OE (active low output enable) were connected to a dip switch on the breadboard.

During initial testing, we found out that only the first 16 LEDs were lighting up and the only colors available were red, green, and yellow (yellow = red + green). This was an indication that the data was only being shifted through the first two LED drivers and not to the remaining four.

November 10, 2009 (8 hours):
After some expert debugging by yours truly, we found out that there was a cold solder joint at the "data in" pin of the third LED driver. I resoldered this pin and it works! All lights can turn on white (white = red + green + blue). A video of the post working can be found here.

November 11, 2009 (7 hours):
Bad news. After looking at the output of the 5V power supply on the upper board, we found a huge amount of noise on the 5V rail. Even with appropriate loading, every time the regulator switches there is a huge impulse (~700 mV) followed by "ringing" - an underdamped oscillation at about 50 MHz. Experimented with Shaun with different output capacitors to see if the noise could be reduced. No luck.

November 12, 2009 (3 hours):
I thoroughly read through the datasheet for the 5V switching power supply. Our output inductor was selected properly, but we made some mistakes in selecting the output capacitors. We originally calculated the minimum output capacitance for the regulator to be:

Cout(min) = 1/L*(K/(2*pi*fco))^2, where L is the inductance, K is a constant (recommended value is 5~15), and fco is the crossover frequency. The crossover frequency needs to be less than one fifth of the switching frequency, fsw = 500 kHz. The recommended fco value is 20 kHz. Therefore,

Cout(min) = 1/(100uH)*(10/(2*pi*20kHz))^2 = 63 uF

This is where we made the mistake. We selected a 100 uF, low ESR capacitor to have plenty of margin for our output capacitance. Unfortunately, many of the application circuits in the datasheet require three different output capacitors in parallel: 1. an electrolytic capacitor with an ESR that is not necessarily low, 2. a very low ESR ceramic capacitor, and 3. a generic 0.1 uF decoupling capacitor. Each of the three serves a different function. This is the design process:

The control loop of the regulator has zeros at these frequencies: fz1 = 2.5 kHz, fz2 = 4.8 kHz; and poles at these frequencies: fp1 = 95 kHz, fp2 = 125 kHz. The corner frequency of the inductor and the first output cap (C1) needs to be approximately equal to fz1:

flc = 1/(2*pi*sqrt(L*C1)) ~ fz1
C1 ~ 41 uF

Since we already have 33 uF electrolytic capacitors with a decent ESR (0.7 ohms), and it fits on the existing output cap pads, we can use those for C1. This would yield an flc of 2.77 kHz, which is close enough, according to the datasheet.

The second cap, C2, needs to be chosen based on the ESR of C1 (Rc1esr), and fz2 per the following equation:

fp(esr) = 1/(2*pi*Rc1esr*C2) = fz2,
C2 = 1/(2*pi*Rc1esr*fz2) = 1/(2*pi*0.7*4800) = 47 uF

I bought 1206 size, surface mount, ceramic, 47 uF capacitors online that have an ESR of 10 milliohms in the range of fz2. The part number is JMK316BJ476ML-T. Generic 0.1 uF ceramic capacitors will be used for C3. If this works, there will be no need to fly-wire anything - we already have the 1206 pads for these three caps. The total capacitance is 80.1 uF, which is greater than Cmin = 63 uF. The crossover frequency, fco = 15.1 kHz, must be greater than flc = 2.77 kHz, and less than one fifth of the switching frequency, 1/5*fsw = 100 kHz. The equivalent ESR must be less than 0.543 ohms for a maximum Vout ripple of 50 mV and a 0.7 ohm ESR in parallel with a 0.01 ohm ESR will accomplish this. The new capacitors should get in on November 16th - if we hook this up and we still see the switching noise and ringing, we will need to add a snubber circuit, which will involve fly-wiring an additional resistor and capacitor.

November 13, 2009 (6 hours):
I made a programming connector for the PIC on the upper board. I also wrote pseudocode for the upper board micro program. Since the upper micro will have interrupts from timers and the IR sensor in addition to shifting data to the LEDs and getting data from the transceiver, a polling loop with interrupts is the best way to go. Here are the interrupt service routines:

IR sensor sends pulse to micro:
- Read Timer0 counter
- Store Timer0 value in rev_time_now
- Set IR sensor flag
- Set Timer1 to fire an interrupt (first LED column interrupt) when Timer1 = rev_time_now + wait_t, if rev_time_now + wait_t < timer_overflow
- Set Timer1 to fire an interrupt (first LED column interrupt) when Timer1 = rev_time_now + wait_t - timer_overflow, else
- Enable Timer1 interrupts

Timer1 fires interrupt (time to display first column of image):
- Set LE (latch) high for LED post
- Start Timer2
- Enable Timer2 interrupts
- Disable Timer1 interrupts
- Set Image_Displaying flag
- Set Next_Column flag
- Column_counter = 1

Timer2 fires interrupt (time to display any column of the image, other than the first):
- Set LE (latch) high
- Reset Timer2 to 0 (but allow it to continue running)
- Set Next_Column flag
- Increment Column_counter

Those will be the three ISRs for the program, here are the initializations at startup as well as the main polling loop.

Initializations:
*Configure the RF Transceiver*
- Wait 3ms (96000 clock cycles at 32 MHz)
- Set CS high (to enter config mode)
- Wait 5us (160 clock cycles at 32 MHz)
- Use DATA and CLK1 pins to shift in the following configuration word (MSB first!)(Max data rate = 1 Mbps!):
0xF0.00.00.00.00.00.00.00.00.00.80.21.4F.03
- Set CS low (to exit config mode and save changes)
- Set CE high to enter receive mode
- Wait 202us (6464 clock cycles at 32 MHz)
*Transceiver now ready to accept data*
- Set Image_Pointer to point to start of default image
- Set Image_bytes_received = 0
- Clear all flags
- Set Columns = 96
- Set CW (column width) = 5632
- Set packet_size = 8 (# number of bytes in an RF transmission)
- Set image_size = 1152 (# of bytes per image)

Polling Loop:
- If IR sensor flag set and Image_Displaying flag unset:
- - CPR (clock cycles per revolution) = rev_time_now - rev_time_prev, if rev_time_now > rev_time_prev
- - CPR (clock cycles per revolution) = rev_time_now + (timer_overflow - rev_time_prev), else
- - rev_time_prev = rev_time_now
- - wait_t = angle*CPR/36 - CW*columns/2, if angle*CPR/36 > CW*columns/2
- - wait_t = angle*CPR/36 - CW*columns/2 + CPR, else
- - Set Timer1 to fire an interrupt (first LED column interrupt) when Timer1 = rev_time_now + wait_t, if rev_time_now + wait_t < timer_overflow
- - Set Timer1 to fire an interrupt (first LED column interrupt) when Timer1 = rev_time_now + wait_t - timer_overflow, else
- - Clear IR sensor flag

- If Next_Column flag set:
- - Clear LE (Latch) for LED Post
- - if Column_counter == Columns:
- - - Set Image_Pointer to start of image
- - - Clear Image_Displaying flag
- - - Disable Timer2 Interrupts
- - - Stop and Reset Timer2
- - Shift 96 bits to LED post starting with Image_Pointer
- - Clear Next_Column flag

- If DR (data ready) pin from Transceiver is high and Image_Displaying flag unset:
- - Clear CE pin
- - for i=1:packet_size
- - - Clock in byte(i)
- - - Store in Image_Store_Pointer(Image_bytes_received)
- - - Increment Image_bytes_received
- - if Image_bytes_received == packet_size
- - - angle = bits(2-7)
- - - if bit(1) == 1 (only angle changes, no change to image)
- - - - Clear Image_bytes_received
- - elseif Image_bytes_received == image_size
- - - Set Image_Pointer to start of NEW image
- - - Clear Image_bytes_received
- - - Clock in 96 bits to LED post starting with Image_Pointer


The only things this code does not include is: Display versus Don't Display modes, Dynamic Column width according to motor speed, Motor up-to-speed verification, diagnostics or initial startup system check, and handling of memory allocation (image pointers).

WEEK 12 SUMMARY
Accomplishments: We finished and tested the LED post - and it works! I diagnosed the problem with the 5V power supply and bought the parts that should fix it. I also wrote the pseudocode for the upper micro program.
Weekly Work Total: 32 hours
Project Work Total: 197 hours

Week 13

November 16, 2009 (3 hours):
The 47uF capacitors came in for the power supply. We soldered them on and still saw a lot of noise - we need to put in a snubber circuit.

November 17, 2009 (15 hours):
I tried to put in a snubber circuit and failed. We still have a lot of noise from the power supply output. HOWEVER: when I tested our power supply on Team 5's oscilloscope, the noise was a tenth of what we were measuring (~120mV instead of 1.2V). I checked the 1x/10x settings on both our scope and our probes and they were both at 1x. We determined that our scope is fine but two of the probes we were using were bad, so we gave the bad ones to Chuck and stole Team 5's probe. Problem solved.

We populated the rest of the components for the power supply on both the upper and lower boards and checked them both - there's about 70mV of noise on the 3.3V output! After that we populated the components for the IR LED and IR sensor circuits on both the upper and lower board, and both of those work. Then I populated the components for the motor on/off control on the lower board. Shaun soldered the relay on a perf board and when we tested it we found that by default the motor turns on when you power the board. Shaun added an additional transistor circuit to the perf board to invert the signal so that when you power the board up, the motor is off. Then the motor will only turn on when it receives the correct signal from the micro.

November 18, 2009 (10 hours):
We populated the rest of the components on the upper board (the debug LEDs, the oscillator, the reset button, the PIC, and all the headers). Since PADS so graciously deleted the trace to one of our programming pins, I fly-wired a small wire between the programming pin on the PIC and the header. Eric wrote a short bit of code that turned on and off the debug LEDs which means that: the PIC works, the programming connector is right, the PIC can handle the little bit of noise from our power supply, and the oscillator circuit works!

November 20, 2009 (2 hours):
I took the transmitter up to the RF lab in MSEE and looked at the output on a spectrum analyzer. I was expecting an output of 10 dBm at 1.2 GHz (once we had tuned the circuit with the potentiometer). What I actually saw was a signal spread across a 4 MHz band with a maximum output of 2 dBm. Also, the peak output would "drift" in frequency after a few seconds. One of Professor Chappell's students in the lab saw my output and informed me that the oscillator needs to be locked in a pll. I gave up after that because it's Friday.

WEEK 13 SUMMARY
Accomplishments: I discovered the problem we were having with the power supply measurement, and finished populating the lower board with everything except the RF receiver - it all works!
Weekly Work Total: 30 hours
Project Work Total: 227 hours

Week 14

November 23, 2009 (3 hours):
Updated the website to make it look cool.

November 25, 2009 (5 hours):
Designed the PLL and loop filter for the transmitter circuit. I ordered samples of the TRF3750 frequency synthesizer which will be needed to make the circuit. I also ordered two more antennas for the transmitter.

WEEK 14 SUMMARY
Accomplishments: I updated our website and designed the PLL circuit for the transmitter.
Weekly Work Total: 8 hours
Project Work Total: 235 hours

Week 15

November 30, 2009 (7 hours):
I constructed the PLL circuit on a perf board. The circuit needs a reference oscillator to work properly, but I was not able to find one that would give us a 0-3.3V output. Instead I decided to use a port pin from the micro and just toggle it high and low on a timer interrupt. The TRF3750 can accept either an oscillator or a TTL/CMOS signal as a reference frequency input. I tested the circuit, but it was not giving the correct output.

December 1, 2009 (10 hours):
I took a break from the transmitter circuit and helped Eric write some of the code for the upper microcontroller so that the image display would trigger from an IR sensor interrupt. Afterwards, I tried to debug the transmitter circuit a bit and discovered that the batteries we were using were not providing a high enough voltage to run the circuit. We had two AA's in series, and the unloaded voltage across them is 2.8V. After connecting it to the circuit, I noticed that the voltage sagged down to about 2.2V. The lowest voltage that the 5V boost converter can handle is 2.5V. To fix this, I put another AA battery in series with the other two. This gave us an unloaded voltage of 4.3V which, when loaded, output 3.5V (enough for the boost converter to work properly). The output still did not work, despite this fix.

December 2, 2009 (12 hours):
I wrote the Troubleshooting section of the User Manual and sent it to Steve. Eric and I worked more on the micro code for the upper board, and we both made sample pixel maps to display once we got it working. I found a Canadian Flag pixel map and generated the code needed to hardcode it into the C program. Shaun and Steve managed to get the disk mounted to the motor, and the circuit board mounted to the disk. We flashed the code and spun it up and it works! We had to adjust the delay in software so that the image was facing forward, but once we did we were clearly able to see the smiley face pixel map Eric had made! The video is on youtube and embedded in the main page of the Team 7 website. A great day.

December 3, 2009 (8 hours):
I decided it was a good time to start testing the uMiRF transceiver so that we could get communication between spinning and non-spinning parts. Unfortunately, since Shaun had the ARM and could only program it on his computer at home, I had to solder up another PIC onto a perf board along with the programming header, decoupling caps, debug LEDs, and the second uMiRF to test the transmission. I wrote the program for the perf PIC to start up, initialize the uMiRF, and transmit a payload of data repeatedly. I also wrote a program on the upper board PIC to start up and initialize the uMiRF to receive the payload from the other transceiver. It didn't work.

December 4, 2009 (4 hours):
Worked on debugging the transceiver. We found some sample code that explains how to drive the transceiver but we couldn't find anything substantially different from our code. We loaded a new pixelmap onto the upper micro and tested it. It was the "Block P" image.

December 5, 2009 (3 hours):
While I was trying to debug the transceiver I did something quite stupid. I was trying to probe the headers on the upper board while it was powered and I accidentally shorted the power from the slip rings (~17V) to the 5V rail. Big pop and the 5V switching regulator was blown. I desoldered the one on there and soldered a new one to the board. Tested the power and the rest of the components on the board - everything's fine.

WEEK 15 SUMMARY
Accomplishments: I built the transmitter circuit and added a third battery to fix the power supply issue. I constructed a system to test the transceivers and the wrote the code for it.
Weekly Work Total: 41 hours
Project Work Total: 276 hours

Week 16

December 7, 2009 (6 hours):
Eric discovered over the weekend that the PIC does not like to have its port pins remapped to different modules mid-program. For the upper board we were using the SPI to send data to the transceiver to configure it and then remapping the pins to receive data from the transceiver. To fix this problem, I wrote a manual SPI function that just uses the pins as I/O to configure the transceiver and then maps them to the SPI module to receive data. It worked! Shaun and Steve finished wiring the power through the box so that we could power the whole circuit from the wall.

December 8, 2009 (12 hours):
The image we were seeing was very flickery when we turned the machine on, it looked as though there were timing issues in the code. After looking at Eric's code, I noticed that the interrupt service routines took a substantial amount of time to execute and guessed that this could be the cause of the timing problem. I reworked the code so that instead of shifting all the data for a certain column and latching it in the ISR, the polling loop would shift the data for the next column in preparation, and all the ISR would would was hit the latch when it came time to display the column. This fixed the timing problem we were having - no more glitchyness.

Eric and I worked on the transmitter PLL circuit. I was certain that the code we wrote was right because the synthesizer was acknowledging the data we were sending to it. After probing the reference oscillator output to the synthesizer, I noticed that the output was at the correct frequency but it was only switching from 0 to 1.2V. Thinking the PIC was fried, we soldered on another one and saw the same output. After some continuity tests, I realized that the oscillator output was shorted to another node which had a heavy resistive load on it. With this resistive load, the PIC was not able to drive the pin high - yielding the 1.2V output. The reason the two were shorted was actually kind of interesting. While I was soldering one of the wires on the perf board, it was lying over top of another wire - and when I soldered it, the heat melted the insulation between the two and shorted them together. I redid the circuit (without any wires touching each other during soldering) and the oscillator output looked much better (0-3.3V). However, the transmitter still didn't work. I suspect that not enough power from the output of the VCO was making it back to the input of the synthesizer.

December 9, 2009 (8 hours):
I asked Dr. Meyer after class if we could switch our third PSSC from "an ability to determine the angle of arrival of an RF beacon" to "an ability to display a short animation consisting of more than one still frame." He approved the change. I found some animated gifs online for us to use and Shaun and Eric generated the code for them in Shaun's LabVIEW paint program. I wrote a function and a script in MATLAB that takes a 48 character string and converts it into the pixel map data needed to load onto the POV machine. I created the message that says: "Team 7: THE FLYING BITS ECE 477."

December 10, 2009 (12 hours):
Worst night of the semester:

12:00am - The box is painted, packaged, closed up and ready for the demo the next morning. We turned it on and admired our work for a few minutes.

12:30am - We started to smell something burning and noticed that the box was starting to get very warm. Shaun promptly unplugged it.

12:31am - The box was opened and a bit of smoke escaped from inside.

12:40am - After some testing we realized that the capacitor on the PSC motor was most likely fried, meaning the motor couldn't run.

1:00am - Shaun and I grabbed another fan motor from his apartment and took it back to the lab.

1:30am - For the next 5.5 hours we disassembled the whole box, pulled out the new motor, mounted the new one in, reattached the slip rings, rewired the thing, fixed the alignment issues and got it working again.

December 11, 2009 (4 hours):
I wrote my individual contribution section for the final report and sent it to Steve and started on the final poster.

WEEK 16 SUMMARY
Accomplishments: I got the transceiver working so the upper and lower boards could communicate, found some cool pixel maps, made one last unsuccessful effort to get the RF transmitter working, wrote a MATLAB pixel map generator, and helped change out a new motor.
Weekly Work Total: 42 hours
Project Work Total: 318 hours