The Pink Princess Laser Modulator

The pink laser princess box projects a red beam on the receiver boxLast weekend, a bunch of us from the Vienna Wireless Society set up a table for a Sally Ride Science Festival held at George Mason University. This is annual event, which promotes science, math, and engineering for girls in grades 5 to 8. Part of the fair takes place outdoors in the morning and early afternoon, with seminars held indoors in the afternoon.

Since it was drizzly, we set up on three plastic folding tables under tarps.  We brought a smattering of equipment for show-and-tell including a portable satellite station, an HF station, an electronics demonstration, and some of the equipment from our most recent high altitude balloon launch.

My instructions on the event were to bring stuff that would be attractive to kids, so I asked with my kids about what kind of presentation would catch their interest. They suggested demos that would either make noise or “be shiny”. They also suggested candy.

To cover the noise angle, I brought a few morse code keys and paddles hooked to a code practice oscillator. I made a little cheat sheet for sending morse code and handed them out. For the demo, I printed a few sheets of five letter words, chopped them up, and put them in a tupperware bowl. I put another bowl right behind it full of candy and a sign: “send code. get candy. 5 letters = 5 Calories”. I ended up handing out 75 pieces of candy, and some of the kids had good fists. A couple used the paddles in addition to the key.

While I was shopping for the candy at the store “Five Below”, which caters to girls of just this age bracket, I noticed that they were selling laser pointers for $2 each. I figured the little batteries were probably worth that much alone, so I bought four lasers to play with. It occurred to me that I could cover the “shiny” criterion with some sort of laser project.

I had seen on the net a description of simple circuits for amplitude modulation of a laser by an audio signal, so that’s what I put together. Line level output enters through 1000:8 ohm transformer and directly modulates the supply voltage to the laser. A couple diodes are thrown in to protect the laser diode from spikes, but that’s about it. A couple months back, the Dollar store had been selling overruns of Disney Princess puzzles in nice tins, a dollar each, so I had bought a bunch of them for projects that didn’t quite fit the Altoids form factor.

The day before the event, I recorded the audio from my radio tuned to 14.070 USB, to capture USB conversations. I had the 2.4 kHz filter on, so there were quite a few PSK31 conversations in the audio band pass. I saved the sound as a *.wav and transferred it to my ipod. The ipod then plugged into the Pink Princess Laser Modulator.

On the receiving end, the circuit was even simpler, all that stood between a 1.5v battery and the audio output jack was a photoresistor. I knew that I had one kicking around, but couldn’t put my finger on it for most of the day, until I remembered that a CdS photoresistor is included with the Arduino experimenter kit as an optical sensor.  The receiver went in an Altoids box, and the output ran into an audio breakout box that allowed me to split the signal to a speaker and to a computer. I duct taped the speaker to the awning of the demonstration booth and let visitors click on individual psk31 streams to decode them.

Texas Topper QRP Amplifier

I seem to be doing well enough running the Kenwood B2000 at 5W or the TenTec 1320 at around 4 watts, but I haven’t made many contacts with my Rockmite, which on a good day puts out around 250+ mW, but less when the battery runs down a bit. A while back, I had ordered the Texas Topper (a.k.a. Tuna Topper) amplifier (nominally 5W out) from www.QRPme.com. For $25 it’s a good deal. The design lends itself to flexibility and experimentation, allowing the user to choose whether to use onboard/offboard options, a tuna-shaped round or altoids-shaped rectangular form factor, a range of input powers (using fixed or variable attenuator, if necessary), fast/slow switching, and transceiver or xmtr/rcvr configuration.A round Texas Topper printed circuit board, unpopulated

I put the kit together last week, made an enclosure, stuck it in, connected everything up, and … nothing. Well, not quite nothing. My WM-2 wattmeter read about 50mW output. Not good — the amplifier was doing something, but not in the direction that I had hoped.

The amplifier is well-documented on Chuck Carpenter’s website, which provides a parts list, pictures of the board, schematics and helpful advice. From the circuit diagram, it’s apparent that there are two halves to the pc board — one that controls switching through a relay, and the business end of the amplifier that centers on a MOSFET followed by a filter network.  As far as I could tell, nothing was shorted.  In the “receive” state, signals fed straight through from input to output connectors. When I keyed down the rockmite, I could hear the relay click in, and I was able to verify that the input signal was being appropriately routed over to a 4:1 transformer to feed to the MOSFET.A constructed Texas Topper on the bench top for troubleshooting

I checked DC voltages with a DVM, and verified that the bias voltage (determined by the forward voltage drop across an LED that conveniently also serves to let you know power is applied) was 2.05V. The voltage on the MOSFET’s metal tab (the drain) was about the same as battery voltage, as it should be.  Unfortunately, I didn’t have an RF probe on hand for tracing of RF voltages — the probe was lost in the last move. It would be easy enough to build one (see nice plans on W5ESE‘s site), but I didn’t have a suitable diode on hand and apparently Radio Shack no longer carries the 1N34 in stock. No problem — I have something better, although not quite as portable: an oscilloscope.

The incoming signal was about 8Vpp, and 4Vpp after the 4:1 input transformer. I expected to detect something on the drain of the MOSFET, but all I got was hum (maybe just background).  Probing beyond the MOSFET, I didn’t get much. I was stumped at this point, and starting wondering if I had done something wrong during construction.

It seemed to me that there were two likely places that I could have screwed up — in winding the two bifilar transformers (which, I recall I did while watching an episode of “No Ordinary Family”, so maybe I was distracted), or maybe in installing the MOSFET. I had placed a mouser order at the same time as the kit order, so I had a couple extra MOSFETs to play with. Using static-free everything (mat, wrist band, soldering tip, etc) and low heat, I replaced the MOSFET. No change. The kit comes with 22 and 26 gauge red magnet wire for winding toroids. To be extra careful, when I rewound the two bifilar transformers, I used on strand of red, and a strand of another color. Radio Shack does carry a magnet wire set, which conveniently includes 22, 26 and 30 Ga lacquered wire, and the 22 is gold and the 26 is green. The transformers look much better when wound with two color wire, and it’s easy to verify at a glance that the correct wires are tied together and that they all end up where they should. Again, though, no change.

I tried replacing the MOSFET one more time, as I thought that perhaps I had not had the right load on the amplifier when I tested it the first time, but again, no change.

The Texas Topper laid out for testing on the benchtopAfter  I looked at the data sheet for the FET and noted that the gate threshold voltage is listed as a minimum of 2v and max of 4v. The transfer function graph showed the drain current picking up sharply above 4v. My rockmite has lower output than most, and it occurred to me that I might be at the lower end of this amplifier’s design — not enough umph to drive the FET’s gate. To up the bias voltage, I stuck a 1N4148 diode between the stock LED and ground. This bumped the bias from about 2V up to 2.75V. Result: 1.5W output. On the oscilloscope, the waveform was a bit distorted on the FET’s drain, but smoothed out in the filter and was well formed at output.  Going from 250 mW to 1.5W is somewhere around 7dB gain — not quite the 10 dB gain typical for this amp, but a huge improvement over my rockmite’s usual output.

So, now I am playing around a little to see what happens when I run this system with a fully charged battery and play a bit with the bias voltage. Hopefully, I’ll have a chance to try out the rockmite-on-steroids this weekend.

 

 

Lessons Learned, part II: Rules

Continuing my over-analysis of TWIFcomp, which is now several times longer than all of the code in the competition combined, I thought I’d take a look back on the rules and see how they panned out. I thought that a comp about short works should have a short list of rules, that they should be posted quickly, and that they should not drift during the competition. I did get the rules up in 24 hours, and for the most part they didn’t change over the course of the competition, except by additions where clarifications were necessary. Obviously, I didn’t plug every loop hole.

Rule 1: Dates

For such a small comp, I didn’t require any declaraction of entry. It wouldn’t have really helped me anyhow. If no one entered, I was up a roll of duct tape and a package of noodles. Conversely, if it was wildly popular, I have a closet full of duct tape and noodles, so no big loss (actually, they are kept in separate closets, but still). Times: GMT confused some people, but in the same way that you don’t deserve to rule the world if you can’t stick the megabucks stickers on the poker chips, a little technical darwinism never hurt anyone. The announcement of results excluseively by tweet was a gimmick specific to the TWIFcomp, but for future comps, it couldn’t hurt to push out the results by various feeds. Actually, this is probably something that would happen anyhow, with or without the involvement of the organizer.

Rule 2: Games

Any programming language, any human language, white space doesn’t count, has to be interactive.  I had anticipated that the definition of interactivity would have been debated, but it was the white space rule that got the most discussion. I really appreciate that some of the participants were purists and held to an absolute 140 byte limit. However, with different encoding schemes, operating systems, etc., length is a slippery concept. Also, you can’t tweet a tab or carriage return. I believe that the most tweetable entry, as submitted, would be Doug Orlean’s Manifest Destiny, written in PLT Scheme. Even with spaces, it fit the length limit, and it had no white space other than single spaces. So, bravo, Doug.

Now, regarding the white space. Here, I realized that I was giving authors a loophole, but it was a non-trivial one. I figured that if someone really could make clever use of white space, that in itself would be a worthy goal. I’m only one vote, though, so if other people didn’t agree, that would have been reflected in the voting. It is obvious from the results of the competition, that people appreciated Adam Thornton’s ingenuity in turning a game of less than 140 characters into a half-gigabyte monstrosity (and I say that affectionately). In the first comment on TWIFcomp, someone had joked about writing a game in white space, and I countered with a dare to write a z-machine. Adam went one step further, squishing the entire inform development system into the invisible world between printable characters.

Conclusion: Some rules are made to be cleverly interpreted.

Rule 3: Submission

Nothing special here. Everyone sent their game in, and I didn’t get a lot of requests to update games during the comp (which is good, since the submission by email system was a little unwieldy). I guess not many people felt much urge to update a 140 character game (although I notice that Alexandre Muniz came out with a revised “Make All Sad” that manages to shave off enough characters to allow addition of new features.

Rule 4: Behavior during the comp.

The rules explicitly allowed discussion of anything during the competition, and I didn’t even care if people posted the games on their own sites as long as they pointed people towards the version on the TWIFcomp site as the canonical version for judging. I did not have time to set up an Author’s Club, as had been done for the last two years for IFcomp — it seemed like overkill for such a short competition. Even so, some author-to-author discussion took place in blog space.

I was happy to find that during the entire comp, I didn’t see any flame wars, insulting posts, etc., on any forum. It was downright civil.

Rule 5: Voting.

I had hoped for a stronger showing in terms of votes, mostly because I was afraid that some games would not get enough votes to make the average reliable, and that one outlier could strongly skew the results. The game with the least number of votes received five, and the game with the most received 15. The votes were relatively consistent, particularly for the top-placing games.  Everyone recused themselves appropriately, and I did not detect any kind of cheating or favoritism in the voting. So, quantitatively poor, but qualitatively good.  I had considered setting a threshold number of votes below which a game would not be evaluated, but given the low numbers and consistency of voting, I went with a simple average.

Rule 6: Prizes.

From duct tape to pokemon. I was very pleased to see enthusiasm for a comp that did not offer cash prizes. I’m sure part of this is that the games were so short, and so little time was invested in writing. On the other hand, in the bigger comps, the amount of the cash prize cannot possibly compensate people for the time they sink into those projects. It is clear from TWIFcomp that peer recognition can be a substantial motivator for online competitions.

Rule 7: Intellectual property.

This was mainly a “I don’t want to get sued rule.” The more the comp went along and people asked if me if their code could be considered as infringing on someone else’s IP, the more I realized that it would be very hard to do so in 140 characters. Even if someone lifted text verbatim out of some other work, it would be a very short quote and probably fair use. Most instances also would have been considered a parody of the original work.  Since there was no way of making any kind of profit in TWIFcomp, I would assume that the waters are not sufficiently chummed to attract lawyers.

The mega-supplemental rule about libraries. This arose as a FAQ, and was tweaked a couple times. This rules was a distant second to the whitespace rule in terms of abuse. The prime offender (and most entertaining example) was Adventiture which took the entire original adventure game as a library. The library had been published before the comp, was online, and freely available, so I have to say that this was entirely within the rules. I am a little surprised that this was not abused by more authors, actually.  If I were to run something like TWIFcomp again, I would probably not allow external libraries in the same way, but restrict the entry to “core” tools for each language (either defining them explicitly or requiring that entrants run their proposed tools by me for approval).

OK, I will now stop obsessing about TWIFcomp. No, really.

TWIFcomp: Programming Languages

61 games, 18 languages. Just under 8k of code.

Here’s how the programming languages were distributed. A good day for Inform 7, but not a bad showing for URQ and other languages dedicated to CYOA. Also, unix scripting languages and shell tools were well-represented.

Histogram showing number of games per language
Number of Games per Programming Language

Of course, this isn’t very scientific. A lot of the games blended languages or used an interpreter or helper file from another language.  The languages could be group differently, i.e., the two BASIC dialects could be merged, and I6 + I7 could count as the Informs, or I6 + I7 + ZIL as the Z-machines. Also, since people could put in up to three games, having three ChoiceScript, for instance, is more likely to mean that one person put in three games, than that ChoiceScript is roughly as popular as Perl across the board.

It is still interesting, though, to see what tools people reach for under “extreme” programming constraints.

A few minutes of fun

I stumbled upon a fun little web toy written in Java. You can create particles of various substances and they are released into a gravitational well that pulls them towards the center of the display. The substances interact in various ways, and you can sit back and watch the simuation run. For instance, you can drop some salt on the screen, and then add water and watch the salt melt. Dropping “seeds” will cause plants to grow, but add a touch of fire and the plants will burn away. By combining the substances, you can achieve effects which take a couple minutes to come into equilibrium.

This game doesn’t tell a story, and I’m not entirely sure what the objective is, but I enjoyed poking at it for what I thought was a few minutes, but was probably more like half and hour.

Kinkos needs competition

I don’t understand how Kinko’s pricing is competitive, when printers, color and otherwise have become commodities. The only time I’d normally set foot in a Kinko’s would be if I was very short on time and had a catastrophic technology failure, i.e, if I were at a convention or in an airport on the way to a meeting. Then, they would deserve a premium. However, today I was working from home and needed to print some items, including color copies. Due to snow insanity (see previous posts) anything governmentish is closed, so no library option. I wandered over to Kinkos, stuck a throw-away usb in their hopefully sanitized machine, and printed my stuff.

I’ll just let the prices speak for themselves. This is in addition to per-minute charges that are completely out of line with cybercafé costs for the rest of the world:

  • single page b/w: $0.49
  • double-sided b/w: $0.98
  • single page color: $0.99
  • double-sided color: 1.98

I realize that the cost is in the consumables and that heavy duty cycle means fast depreciation of the equipment, but let’s be honest here. The printers they have are nice, but not really that high-end. The paper is very light weight, and the print saturation wasn’t all that great for the price. I’m sure I’m also paying for the need to lock-down everything watertight against the assault of a thousand monkeys working on their Shakespearean plays, but still.

I think Kinkos has a good niche, and it makes sense to have centers that produce hardcopy or high volume output, but I would love to see some competition. The obvious place to look would be the big-box office supply stores (Paper Cutter, Office Max, Office Depot). The difficulty: they would need semi-competent staff to run the front end of the copy counter.

Okay, that’s my grumpiness for today. Back on your heads.

FCPS needs to suck it up

The Fairfax County Virginia Public School system is completely out of its mind. Snow has that effect in Virginia.

We just heard that school’s been canceled for Tuesday and Wednesday (after Friday and Monday off). Sure, a snow day, maybe two, is reasonable for a half meter of snow, but come on. They already took a bunch of questionable snow days right before Christmas vacation. How are working parents supposed to buffer all of the extra days at home? We don’t have these days off, and we can’t necessarily work from home on such short notice.

The make-up days are now going to eat into pre-planned holidays, change travel plans, etc. I strongly suggest that the school system write off the half-days previously allocated for teacher training, grading, and parent conferences. I’m perfectly willing to do parent conferences by teleconference; the other activities can be done outside of teaching hours.

While I’m generally sympathetic towards teachers who, in general, have difficult and under-compensated jobs, and towards the school system that is collapsing under loss of revenue due to devaluation of real-estate, I’d like the FCPS to suck it up a little.