Laser safety glasses arrived the other day, and I can now safely work 250 mW laser. For now my work has been on the oscilloscope, but now I can actually see what happens with the actual laser.
The phase correction trick I had been looking for with my frequency multiplier was where to do the check. There are two timer interrupts taking place for the multiplier setup. One occurs each period of the incoming frequency to be multiplied. This is a timer interrupt because the timer is setup to capture the time count when the event takes place, which allows for a very precise measurement of the period. The second interrupt is the multiplier interrupt that occurs for each of the divisions of the incoming period. This interrupt must adjust when the next interrupt occurs. This interrupt can toggle the state of the output, but right now that is done by hardware. So the multiplier interrupt simply keeps track of how many periods have taken place, and adjusts the timer for the next period.
It won't work to do a phase correction check at the start of an incoming pulse period because you don't know how close you are to a new period division. So the check is done at the period division. Which if the multiplier interrupts to use is the trick. Checking on the first period isn't a good idea because the incoming pulse interrupt might not have taken place yet. But checking at half the total period means plenty of time has elapsed since the incoming pulse interrupt.
When checking at half the period, a lag is calculated. This is a correction factor to be subtracted off the next period which will have the effect of compensating of phase drift. Since lag compensation is calculated every incoming pulse and the incoming pulse period is fairly stable, the amount of compensation is quite small. This system makes a good phase lock.
However, I complected this situation more. In addition to multiplying the incoming frequency, I also add a phase shift value. The phase shift can produce the same problem as doing the phase correction at zero if the phase shift is around 50%. To solve this problem, the phase can be checked at either zero or half the incoming period depending on how much phase shift is being added. Since the phase shift doesn't change quickly, this allows for phase locking to still work even though the phase may be changing.
The results with the laser tunnel are exactly what I had hoped for: a tunnel with fingers slowly rotate. With the Mad Scientist party coming up, all I have to do now is physically assemble the setup in a place it can run safely. Pictured a laser tunnel with 8 fingers. I will have to take a video to show the full effect.
2015 was a great year for fitness. I lost around 25 pounds in the first few months and kept my weight stable the remainder of the year. When the weather warmed I was able to put a huge number of miles on my bicycle. I was up to 1,000 push-ups/day at work. And my skating sessions are the most intense of the 21 years I've been doing it. My bicycle camping goal became a reality, as did my goal of reaching Devil's Lake. There were times I turned the bike ride to and from work into a 14/20 mile sprint. 2015 is probably the healthiest I've been since I was a teenager. But this is me. What about the data?!
I didn't start taking down detailed exercise data until August when I had a heart rate monitor, but nonetheless I have number for those 5 months. I did monitored physical activity for 152 hours, 35 minutes, 34 seconds; cycled 1,111 miles; and burned a 106,949 Calories in the process. Most of the exercise was bicycling, but lately with the winter weather, skating has taken over as my primary exercise form. On December 19th I set a new heart rate record of 193 BPM (105.5% of my maximum), and on December 26th new calorie record of 2,526 Calories for a 2 hour 54 minute skating session. Once warmed up I find I can hold my heart rate at around 185 BPM (101% maximum) for 3 to 5 minutes without feeling like I'm overdoing it.
While I don't have the stationary bicycle setup to be a generator yet, I've still been using it. My performance is pretty miserable and I average around 135 BPM (73%). Most of my rides are 45 minutes, which happens to be the length of one episode of Star Trek. This is also the length of time that when well prepared I can cycle my 12 mile circuit that includes a hill climb. I do this run holding an average heart rate of 165 BPM (90%). So improvement is needed on the stationary. However, my legs shouldn't be getting atrophy and for now that's the winter goal. When the cycling weather returns I want to get right back into those long rides I ended with last year's season so I can push my numbers up.
Over the summer I continued to push my cycling number up. I had 42 rides over 20 miles, 15 rides over 30 miles, 6 over 40, and 1 over 50 miles in length.
Picture is the last of the repairs to the massage table. I replaced a dowel support that had been broken beyond repair. I used a belt sander to shape the ends which worked a lot better than I thought it would.
The Arduino timer experiment is going better. After reading the manual for the ATmega328P (the Arduino CPU) I found Timer1 has an input capture mode. This allows very precise measurement of pulse width. In addition, I can use the output compare register to toggle the pin used to divide the frequency. The setup still glitches from time to time, but is pretty good. I've been trying to learn about Software Phase-Locked Loops (SPLL) which would offer the best method of doing what I am trying to do. For now, I have a mostly phase-locked frequency multiplier. Now I need to be able to adjust the phase.
Pictured is a scope trace that shows the frequency multiplier. The bottom trace is the tachometer from the fan, and the upper trace is the frequency multiplier output.
Generated a new PGP key for e-mail encryption and new SSL keys for web encryption. This is a yearly event I was suppose to do on the first, but the old keys won't expire until the end of the month.
Mildly productive day. Wanted to get out in this weather so I biked down to the local coffee shop. Temperature was around 10 degrees F and there was a light snow falling. After a pretty ride I found my coffee shop full of people and I had to wait awhile before I could get next to the fire. Once there I worked on the AI unit for my game. I corrected one of the problems I had, but discovered an other major problem. Haven't been able to trace it down, but I have some eyes into the problem.
After the coffee shop closed, I biked back and continued work on my laser project. I had been trying to subdivide a pulse using the Ardoino timers. I wanted to use just one timer to both measure and generate pulses. Kept running into a strange drifting problem that after a lot of backing up I traced to the fact I had my tachometer input going into the wrong pin. The cross-talk to the floating pin it was suppose to be connected to made it look like it was working some of the time. Silly mistake. After it was corrected I was left with one finial glitch. Seems that occasionally the timer gets confused and misses a bunch of counts, then counts them the next revolution. I haven't been able to pinpoint why this is happening, but I have been able to mostly get rid of the problem by using an average. Safety glasses still have not arrived—so no actual laser firing is taking place. But I'm getting closer to being ready.
Pictured is the massage with the last glue-up clamps in place. They came off today and the table is again fully functional. There is still one dowel to replace, but the repairs are pretty much finished.