Monthly Archives: August 2011

More on Dino’s simple common emitter amplifier…

I hadn’t worked through the biasing calculations for collector feedback common emitter amplifiers before, so I thought I’d do that for the simple one transistor NPN preamp that Dino built as his weeklyhack. But even before I got to it, I was confused by something. Check out the schematic (cribbed from Dino’s post):

I was confused by R1. It’s only purpose seemed to be to provide a DC offset, which was immediately removed by the action of C1. So, since I had built the circuit in LTSpice, I tried varying its value from 1 ohm to 100MEG ohms, and indeed, it had no effect on the overall gain of the amplifier. So, I removed it entirely. And the circuit continued to work just fine.

So, what’s the deal? I suspect that R1 was part of a circuit that powered an electret microphone: if the Input on his schematic were an electret microphone, you’d need to provide some voltage into it to power the built in FET preamp (like you see in the diagrams on the Wikipedia page for electrets). If that power is not needed, then all that happens is the current is dissipated by the input as heat. If you cascade two of these in the naive way, you end up a resistor feeding between voltage between two DC blocking transistors, which doesn’t waste a lot of power (no current flows at DC), but you end up with an extra cap and resistor.

Gutenberg Gem: Francis Galton’s Finger Prints

I’ve always had an interest in forensics in general, and fingerprints in specific. Previously, I had blogged about the FBI publication The Science of Fingerprints. Today, I noticed that another major work on the subject had been released by Project Gutenberg: Francis Galton’s Finger Prints.

Francis Galton was a prolific scientist in a number of fields. Half-cousin of Charles Darwin, he’s perhaps most famous for pioneering the field of eugenics, but he also was the first to create a system for the classification of fingerprints, and argued based upon statistics that fingerprints were unique.

Nice to see this online.

Preamps and Microphones…

A few weeks ago I did an experiment that stored an 8 bit PCM file in the flash memory of an Arduino, and then used PWM to flash a laser at a high rate so I could transmit that audio over a long distance to a solar cell based receiver. A few days ago, I assembled a nifty little gadget called the bliplace, which interfaced a small electret microphone to an AVR ATtiny processor. For the last couple of days, I considered merging the two: the idea was to build a small interface circuit to condition the signal from an electret microphone to feed into the A/D converter of an Arduino. Then, it would be simple enough to use the Arduino to modulate the PWM output.

I’m a bit confused about the bliplace, it doesn’t seem to employ any kind of preamp to increase the output. My understanding is that the output from these kind of microphones is typically quite low, so a preamp would seem to be necessary to boost the overall voltage swing to something that the Arduino can measure with some precision.

My idea was to use a simple op amp circuit to boost the voltage from the microphone, and center it around 2.5v. It’s not hard. You create a resistor divider to halve a 5v supply, and put it into the non-inverting input of the op amp. You then feed the input signal through a blocking cap (I used 0.1uF) and a 1K resistor into the inverting input. Then, feedback from the output of the amp is fed through a 100K resistor back into the inverting input. Here’s the schematic in LTSpice:

I put it together today on a breadboard, and it seems to work. I couldn’t dig up a suitable microphone (I know I have some somewhere), but I’ll get to it in the next day or two and get it all soldered up so I can hook it to my Arduino. Since the LM324s are a quad operational amplifier, I could even use the spare op amps to do some additional filtering. I’m still working on that part.

Through some strange coincidence, a couple of other people I know have been playing with amplifiers too. Whisker over at tymkrs has been working on a preamp for a microphone, and MakerDino’s weekly hack at HackAWeek was to build a single transistor preamp. It’s a simple little class A amplifier, and he did a great video:

I played around with the circuit in LTSpice a bit, and it seems to work pretty well. It provides about 36db of gain, and seems reasonably linear. You can get distortion of the input signal is too high, but other than that, it looks pretty good. The gain is enough to convert a 10mV signal to a 600mA signal. Current draw is about 700 microamps with a 3v supply. Not bad! I could use similar circuit for electret preamp. I’ll play with both circuits some more. Thanks Dino!

Morning pass of ARISSAT-1

Success! I managed to record the pass of ARISSAT-1 from my front yard this morning.

I woke up around 7:00AM, and tried quickly to get ready. I pulled on some clothes, then I dug out my handy Arrow antenna (a hand held dual band Yagi antenna for 2m and 70cm) and my tiny Yaesu VX-3 that I had remembered to charge, a patch cable, my MacBook, and headed to the front yard. Yikes! The sprinklers were on. I turned them off, then dug a camping chair out of the back of my SUV so I had a dry place to sit. I also got a tripod with my little Kodak HD video recorder mounted on it, and aimed it roughly at the chair, thinking I’d shoot some video.

Here’s the prediction that my home grown library did for the pass:

RADIOSCAF-B will be visible from grid CM87ux starting in 00:13:35 at 14:28:04
  14:28:04  +0.1° 312.2° ?  49.1°N 144.6°W AOS 381.52
  14:29:00  +3.9° 313.7° ?  47.8°N 139.7°W     382.01
  14:30:00  +9.2° 316.1° ?  46.1°N 134.7°W     382.55
  14:31:00 +17.0° 320.3° ?  44.3°N 130.1°W     383.11
  14:32:00 +30.9° 330.2° ?  42.3°N 125.8°W     383.68
  14:33:00 +55.2°  10.5° ?  40.0°N 121.7°W     384.27
  14:33:14 +58.2°  32.9° ?  39.5°N 120.9°W MAX 384.41
  14:34:00 +43.6°  90.6° ?  37.7°N 118.0°W     384.86
  14:35:00 +23.4° 110.2° ?  35.2°N 114.5°W     385.46
  14:36:00 +13.0° 116.6° ?  32.6°N 111.2°W     386.07
  14:37:00  +6.5° 119.8° ?  29.9°N 108.2°W     386.67
  14:38:00  +1.9° 121.7° ?  27.2°N 105.3°W     387.27
  14:38:28  +0.1° 122.3° ?  25.9°N 104.0°W LOS 387.55

The satellite was supposed to start to the north, then pass to the east, reaching maximum altitude at about 14:33. I figured I wouldn’t be able to hear the satellite at all until it was above 20 degrees or so, maybe at 14:31UTC, because I have a rather high horizon to the north. But at 14:29 I tentatively turned on my radio, tuned to 145.950 and aimed it roughly north, and it was clear that there was some signal coming in. I started Audacity recording. After a minute or so, the signal was very strong, full quieting between deep fades that seemed to occur at around six second intervals.

Here’s the .mp3 file. It’s fine for listening to, and may (or may not) be adequate for SSTV decoding. If you really want to try SSTV, mail me a request and I’ll try to arrange a way to get you the 33M uncompressed audio file. I beeped out the “secret word” that appears in the recording, so as not to spoil it for others.

ARISSAT-1 Recording, Aug 5, 2011, 14:30UTC, 3.3M MP3 File

After I was done, I fired up MMSSTV on my windows box and did some SSTV decodes, here are the images as they appeared in the recording.

Not too bad. It’s pretty clear from the recording and from the pictures that the satellite is tumbling: periodic deep fades appear to happen about every six seconds or so. Still, the imagery is a pretty neat bonus. As the satellite’s spin slows, we should be able to easily get good SSTV imagery, even with equipment as primitive as mine.

According to the ARISSAT-1 website, the satellite was 20 seconds ahead of the ISS, and maybe a kilometer lower. It’s projected lifetime is short: maybe just sixty days, so don’t delay. Tune it in, collect your certificates, and have some fun.

Schematic for tanjent’s “bliplace”

Yesterday, I wrote about soldering together my bliplace kit. Today, I thought I’d have a peek at the code and the schematic. Here’s the schematic:

Not much there, but a couple of interesting things. The microphone is an electret, which needs some power to be functional (supplied through the 10K RU resistor). To me, the capacitor CC and the RD resistor look like a high pass filter, with the supplied values the cutoff frequency is nominally about 160Hz. Not 100% sure I understand how the capacitor CN or what the overall input impedance is for the ADC input pins on the Atmel chip, so I am not 100% sure I understand the subtlety.

I also thought that current limiting resistors were interesting. The center LED always seems to glow brighter, and this seems to be because R2 is only 100 ohms, compared to the 1000 ohms that were used for the other two. I also wondered about the LEDs: this gadget is powered by a single 3V cell. The ATTiny25/V can run down to 1.8 volts, but I thought that white LEDs had fairly high forward voltage requirements. For instance, this page on Wikipedia says that the typical voltage drop for white LEDs is around 3.5 volts. I don’t have a lot of white LEDs lying around, but it does suggest some experimentation.

Antenna? Who needs an antenna?

Drew, KO4MA, didn’t let a little thing like the missing antenna on ARISSAT-1 keep him down. He aimed his antennas at the satellite, and recorded the following:



What’s goin on here? Drew has a pretty good antenna setup, which includes an M2 CP42 for the uplink. That provides about 16.8db of gain. Since the ARISSAT-1 receiver was supposed to be reasonably sensitive to be workable with portable equipment, that gain is enough to put a reasonable signal into the transponder. I don’t think I am going to be working the bird with my setup, but i suspect that there are quite a few amateurs with similar setups that could still work ARISSAT-1 even with its lack of antenna.

Very cool.

Addendum: I was rereading my posts from yesterday, when the frustration of deploying ARISSAT-1 with a missing antenna was fresh in my mind. And I do frankly admit to a fair amount of frustration with AMSAT. But I was reading some even more negative traffic on the amsat-bb list, and that put it in a bit of perspective for me. ARISSAT-1 wasn’t a waste, nor is it useless, nor was it a bad thing for AMSAT to invest in. In terms of its primary, largely educational mission, I suspect it will be quite successful. Several times during the NASA briefing yesterday, they mentioned that this was the first of a series of educational birds to be launched from the ISS. These launch opportunities are incredibly valuable to the amateur community, and we should make sure that our frustration with problems doesn’t boil over into lashing out at our allies who are helping us achieve our goals in amateur radio and space.

Building tanjent’s “bliplace” kit…

I was in the mood to melt some solder, but didn’t really have a lot of time and/or brainpower last night, so I turned to my box of little electronics kits that seems to have been growing over the last few years. I located a small plastic bag which contained tanjent’s “bliplace”, a tiny kit that he generously was handing out at a conference we both attended. It’s simple: an Atmel ATTINY 8 pin controller, three caps, five resistors, an electret microphone and a battery is all it takes to get it to run. I figured it would take me about 20 minutes to assemble. It took about 35, mostly because I wasn’t paying attention and soldered the first two resistors in the wrong place (the board has a very symmetric layout, and I got turned around). That got me some practice in using my solder sucker, and had to solder in two new 1K resistors from my junkbox. But in the end, it worked!

What is bliplace? In his words:

Bliplace is a wearable, hackable, sound-activated blinky light toy. It uses a small microcontroller and a mix of hardware and software feedback to automatically synchronize with and adapt to the sounds around it – it should pulse along with the ambient noises around you no matter if you’re in a quiet park or a thunderously loud concert.

Here’s the video of the thing working. Pardon the sound levels when I turn the radio up, I shot and edited this on my iPhone.



It’s a clever little gadget by itself. But what’s especially cool is that it is open source. You can get the board and schematic files, Gerber files, and the source code for the firmware. I think it would be interesting to make an “amped up” version of this thing, which would drive some big power transistors to switch some truly high power CREE LEDs. The code is released under the MIT license, so modifications should be easy and redistributable. It should be trivial to get this to run on the Arduino platform as well, which will make experiments easier for the wider audience.

I’ll be staring at the code a bit harder over the next few days. Stay tuned.

ARISSAT-1 Update…

Okay folks, I’m sorry, I promised that I’d try to stay up late enough to record some of the first passes of ARISSAT-1, but physical need for sleep outpaced my natural enthusiasm and curiosity, and the first good pass found me sound asleep. Through some perverse quirk of fate, all the best passes of the ISS are occurring in the early morning hours. Running my own homebrew satellite prediction library, I find that my best opportunity for a pass where I am awake and the satellite is illuninated, and therefore in high power mode, will likely be tomorrow starting around 7:28AM PST. I’ll try to get myself all setup for that, and will hopefully have some audio and/or video tomorrow.

In the meantime, it has been heard.

VK2BRB recorded this YouTube video:



SW1OBT heard the voice beacon, and the start of the SSTV transmission:



ARISSAT-1 is off to a bumpy start…

First, the good news: ARISSAT-1 is floating free in space. I urge hams to listen for its 2m downlink on 145.950 to see if you can hear it. There is also a CW beacon on 145.919 and a special BPSK-1000 telemetry downlink on 145.920.

Now, the bad news. It appears that the UHF antenna was damaged or broken off at some time. The satellite was supposed to operate a 70cm->2m linear transponder, but without this antenna, it is unknown what the status of that capability will be (politely put, it’s almost certainly not going to work).

Okay, now the commentary:

It seemed rather obvious that the handling and deployment of the satellite was ill-conceived and poorly handled. You might imagine that some pre-EVA check of the satellite could have determined that the satellite was missing its antenna. You’d also imagine that the relative fragility of the solar cells (mentioned by one of the cosmonauts well into the EVA, after the satellite had been spun around and “contacted” all sorts of objects on the space shuttle) would have been part of a pre-mission briefing. Watching the video, it seemed that these cosmonauts were using all the care that a bunch of high school kids you hired to move your couch might have had. In the end, it appeared to me that they deployed the satellite simply because they couldn’t be bothered to stow it again as much as to achieve the goal of launching this amateur payload.

And lack of communication is one of the single most frustrating things I find about AMSAT. Surf on over to their website at arissat1.org and look for an update. It’s been two hours since deployment, and here is the only update in information that you can see:

Really? That’s all you have to say about the deployment? The culmination of four years of planning, building and testing, and it’s finally in space, and you can’t even file a report that contains any actual information?

I was curious about what the configuration of these antennas actually was. After finding a couple of broken links to the February 2010 design review, I found this page:

Design Review of ARISSAT-1

Lou McFadin, W5DID did a presentation on the antenna systems. It appears that the antennas were designed to be detachable and use a flange system similar to other antennas deployed on the ISS. There is a lot of detail missing from the presentation, but it seems to me that the obvious failure mode is simply forgetting to install the antennas rather than damage to them. The fact that the antenna situation was only detected once outside the ISS seemed very odd indeed. It should also be noted that one of the design goals was to be able to endure “rough handling”, which means that if the antenna were damaged, then one of its primary design goals was not adequately met.

Frustrating!

Oh well. I’ll be listening for telemetry on its first good pass, which appears to be a 38 degree pass after 1:00AM this morning. I’ll let you know what I find out. I’m monitoring a bunch of blogs to see if anyone is picking up telemetry, expect updates as addendums to this post later in the day.

A nice Flickr set of images from the NASA feed of the deployment

Addendum: It lives! Masa, JN1GKZ reported on the ARISSat-1 website that he heard the FM, CW and BPSK signals on 2m during its pass over Tokyo. It can run in “high power” mode when illuminated, the late night passes I will see tonight will be in eclipse: we’ll see how low power mode works.

Raymond Jimenez’s Amateur Nuclear Fusion

While looking up some references on amateur nuclear fusion (don’t ask!) I found that Raymond Jimenez had written a cute 40 page book on his own experiments with a Farnsworth Fusor. You can apparently order a dead tree version from Lulu for $12.50, but it’s also available as a free download.

Raymond Jimenez’s Storefront – Lulu.com

Best quote:

Deuterium is an easy gas to obtain. I submitted an order with Matheson Tri-Gas: a couple of phone calls and parental approval were all it took.

Decoding a quadrature encoder just isn’t that difficult

I was shown some truly horrifying code that reported to decode a quadrature shaft encoder. It was just mind bogglingly stupifying that someone would go to that much work to write something so utterly horrible. Here’s the way that I think of them.

A quadrature shaft encoder looks like a 2-bit Gray code counter. Instead of counting up in binary in the usual way, it goes up changing exactly one bit at a time. So, what are the four possibilities?

00
01
11
10
...repeats to 00

Let’s imagine that you had a previous reading for the shaft encoder, and now you notice that some new value can be read. The new value is another two bits. That makes the total of 16 possibilities. There are four 16 bit combinations that indicate a clockwise rotation, and four that indicate a counter clockwise rotation. The rest are “impossible” states, or states where the input didn’t change. You can
just write out the table.

OLD NEW CW  CCW
00  00  0   0 
00  01  1   0 
00  11  0   0 
00  10  0   1
01  00  0   1 
01  01  0   0
01  11  1   0 
01  10  0   0
11  00  0   0
11  01  0   1
11  11  0   0
11  10  1   0
10  00  1   0
10  01  0   0
10  11  0   1
10  10  0   0

You can convert this into code any of a number of ways: switch statements, table lookup, you could minimize the logical instructions using a Karnaugh map… whatever floats your boat. I’d probably just go with a switch statement, something that looks like this (assume OLD and NEW are integers holding the two 8 bit values):

[sourcecode lang=”c”]

int
cw(int o, int n)
{
switch (o) {
case 0:
return n == 1 ;
case 1:
return n == 3 ;
case 3:
return n == 2 ;
case 2:
return n == 0 ;
}
}

[/sourcecode]

And similarly for ccw.

It ain’t rocket science.

Addendum: It’s pretty easy to create the delta too (-1 if ccw, +1 if cw, else 0)

[sourcecode lang=”c”]

int
delta(int o, int n)
{
switch (o) {
case 0:
return (n == 1) – (n == 2) ;
case 1:
return (n == 3) – (n == 0) ;
case 3:
return (n == 2) – (n == 1) ;
case 2:
return (n == 0) – (n == 3) ;
}
}

[/sourcecode]

Clouds in a Glass of Beer Guinness

I subscribe to the Sixty Symbols YouTube channel which is produced by the University of Nottingham, and today, I noticed they had a new video on a subject near and dear to many a physicists heart: Guinness.



If you think that beer is beneath the interest of physics, you should surf on over to Amazon.com and check out Craig Bohren’s Clouds in a Glass of Beer. It is an excellent accessible book on atmospheric physics that examines (among other topics) the way that bubbles form in beer. It’s a creative, informative book that presumes no great knowledge of physics, but can help remove some of the many misconceptions we have surrounding atmospheric physics and weather.

Amazon.com: Clouds in a Glass of Beer: Simple Experiments in Atmospheric Physics

If that doesn’t satisfy your need for equations, you can try this rather beefier exposition, entitled Waves in Guinness.

Raspberry Pi $25 PC goes into alpha production

I’m interested in low cost computing. Like the kind of computing that costs what a Blu Ray disk costs. For a while, that’s been something like the Arduino, which has a 16Mhz 8 bit processor. But the Raspberry Pi is something else: a proposed computer which plugs into an HDMI port for display, uses USB for peripherals, and runs Linux. Best of all, the target price is $25. I hadn’t heard much about this project lately, but apparently some of the first alpha prototypes are being produced. I’m sure to get some of these when they finally go into production: I’ve got a couple of projects that could make good use of such an inexpensive computing platform. I’m keeping my eyes open on this one.

Raspberry Pi $25 PC goes into alpha production – Computer Chips & Hardware Technology | Geek.com.