Warning: This post is several years old and the author has marked it as poor quality (compared to more recent posts). It has been left intact for historical reasons, but but its content (and code) may be inaccurate or poorly written.

Man, what a long day! Work is so tedious sometimes. This week I’ve been proofing scientific literature using Office 2003 with “track changes”. I make changes, my boss makes changes, I make more changes, and it goes back and forth a few times. I wonder why office 2007 is so bad. Does anybody truly like it, and find it to be a significant improvement upon 2003? … or Vista over XP? Maybe I’m just getting old, inflexible, and grumpy.

This is what I’m currently working on. The light bubbles on the right are deletions. The dark bubbles on the right are comments. The red text is insertions/modifications I made. Pretty intense, right? Pages and pages of this. I’m starting to grasp the daunting amount of time a scientist must spend writing in the laboratory as opposed to performing actual experiments or even doing literature research.

Last night I assembled a Pixie II circuit similar to the one pictured here. I must say that I’m a little disappointed with the information available on the internet regarding simple RF theory in relation to transceiver circuits. I’m just now starting to get into RF circuitry and the concept looking at circuits and imagining a combination of AC and DC flowing through it is warping my brain. I have everything I need to build a simple Pixie II transceiver (which is supposedly capable of Morse code transmissions over 300 miles, and QRSS applications over 3,000 miles) but I don’t want to use it unless I understand how it actually works.

I’m trying to break this circuit down into its primary components. I understand the role of the lowpass filter. I understand the role of the 1st transistor and related circuitry in amplifying the output of the crystal oscillator (left side). I totally get the audio amplifier circuitry (bottom). It’s that center transistor (which supposedly handles signal amplification, receiving, and mixing) that I can’t get my mind around. Every time I think figure it out for one mode (sending or receiving), I mentally lose the other one. It has me very frustrated because it seems like this should be easier than I’m making it. I selected this circuit because it was simple and I assumed I’d be smart enough to figure it out… maybe I was wrong? I wish I had an oscilloscope so I could probe the RF passing through various stages of this circuit. I guess I should take another stab at reading chapters 5-11 of the ARRL handbook.





Warning: This post is several years old and the author has marked it as poor quality (compared to more recent posts). It has been left intact for historical reasons, but but its content (and code) may be inaccurate or poorly written.

Over the last couple weeks whenever I had the time I’d work on creating a little Morse code keyer. After a few different designs I came up with the winner. Basically it just uses a bar of aluminum which rocks on a metal pin. Thumb-screws on each side of the balance point (fulcrum?) can be adjusted to modulate the distance the paddle has to go down to be activated, and how high the paddle goes up when released. A couple springs (one pull-type and one push-type) help give it a good bounce between keys. Two knobs control volume and frequency. I especially like the ability to control the frequency! A capacitor inline with the speaker helps smooth the output a bit too. It’s not professional, but hey – for a couple bucks of parts I made a functional keyer and had fun doing it. Now I guess I should put more time into learning Morse code…

Thoughts from future Scott (August 2019, ten years later)

Wow this is rough! I’m 90% sure this is based on a 555 circuit. lol @ the use of Jenga blocks. It looks like the wire was sourced from cat5 cable. That aluminum slab later became the base and heat sink for an IRF510-based push-pull amplifier.





Warning: This post is several years old and the author has marked it as poor quality (compared to more recent posts). It has been left intact for historical reasons, but but its content (and code) may be inaccurate or poorly written.

Two hours after getting home from work I’m already basking in the newfound carefreeness thanks to the successful completion of my thesis defense (and graduation requirements). Yesterday I went to SkyCraft, early this morning I posted a schematic diagram of a basic circuit concept for a radio/microphone interface box with tone generating functions, and this afternoon I finished its assembly. It’s hacked together, I know, but it’s just a prototype. What does it do? It’s complicated. It’s basically just an exercise in microchip programming.

Future Scott reacts to this in August, 2019 (10 years later)

LOL! That’s a pipette box! A chip socket was sunk into a plastic enclosure somehow! And that “regulated power supply” is an LM7805 on non-metallic perfboard screwed to two Jenga blocks!

Here’s the little setup with the main control unit and a DC to DC regulated power supply / serial microchip programmer I made.

Here’s the main control box. Notice the “2-way lighted switches” which I described in the previous entry. I found that proper grounding (floating pin prevention) was critical to their proper function. I’m still new to these chips, so I’m learning, but I’m making progress!

Getting a little artsy with my photographs now… this is the core of the device. It’s a picaxe 14m!

This is a 5v regulated power supply I built. The headphone adapter is for easy connection to the serial port. It has a power switch and a program/run switch (allowing use of pin 13, serial out) while still “connected” to the PC.

I’ve slightly improved the connection between my radio’s coax cable to the J-pole antenna I made.

I’m able to get pretty good from this antenna, but it’s probably not likely to do much to my assembly skills (and lack of tuning), and more likely due to the fact that I have an unobstructed view of middle/southern Orlando from the 3rd story of my apartment balcony. I could probably wire up a rubber duck on a stick and get good results with that location! I’ll miss my reception when I move.





Update: The DIY ECG project has had several iterations. The latest one can be viewed here: https://www.swharden.com/wp/2019-03-15-sound-card-ecg-with-ad8232/

Warning: This post is several years old and the author has marked it as poor quality (compared to more recent posts). It has been left intact for historical reasons, but but its content (and code) may be inaccurate or poorly written.

Instead of using a single op-amp circuit like the previous entries which gave me decent but staticky traces, I decided to build a more advanced ECG circuit documented by Jason Nguyen which used 6 op amps! (I’d only been using one). Luckily I got a few couple LM324 quad op-amps from radioshack ($1.40 each), so I had everything I needed.

The results look great! Noise is almost zero, so true details of the trace are visible. I can now clearly see the PQRST features in the wave. I’ll detail how I did this in a later entry. For now, here are some photos of the little device.

UPDATE: After analyzing ~20 minutes of heartbeat data I found a peculiarity. Technically this could be some kind of noise (a ‘pop’ in the microphone signal), but because this peculiarity happened only once in 20 minutes I’m not ruling out the possibility that this is the first irregular heartbeat I captured with my DIY ECG. Note that single-beat irregularities are common in healthy people, and that this does not alarm me so much as fascinate me.





Update: The DIY ECG project has had several iterations. The latest one can be viewed here: https://www.swharden.com/wp/2019-03-15-sound-card-ecg-with-ad8232/

Warning: This post is several years old and the author has marked it as poor quality (compared to more recent posts). It has been left intact for historical reasons, but but its content (and code) may be inaccurate or poorly written.

Last night I finished building my DIY ECG as a prototype (I finally got the circuit off the breadboard and onto a plastic sheet). This is a similar circuit to the one used to record data from the last entry (resister values are now identical to the crude circuit described several posts ago). I left-in the crude band-pass filter (made by grounding my primary electrode sensor through a 0.1µF capacitor) because it seemed to help a great deal, and wasn’t hard to implement. I picked up all of my parts (including the LM324 quad op-amp microchip) at RadioShack. Of note, the quad-op-amp is overkill because I’m only using one of the 4 op-amps. Theoretically I could add 3 more electrodes to this circuit (which would allow for multi-sensor recording) but this would require multiple microphone jacks, which isn’t very common. I guess I could use 2 microphone jacks, and differentiate right/left channels.

I made the prototype by drilling holes in a small rectangular piece of a non-conductive plastic material. I picked up a stack of these rectangular sections for a quarter at a local electrical surplus store and they’re perfect for prototyping. The two green wires coming out the left side attach to a power supply (either a plugged in AC->DC transformer, 3 or 4 AA batteries, or even a 9V should work). The blue wires on the right attach to the electrodes I put on my chest. The black wires go to a headphone-jack which I plug into the microphone hole of my PC to record the signal.

This is the back of the device which shows my crummy soldering. I’m a molecular biologist not an electrical engineer. The white/yellow wires correspond to the left/right channels of the microphone connector. I only use the left one (white), but attached the right channel (yellow) to the op-amp just in case I decide to add another sensor later – this is not required.

Here’s the full device: You can see the circuit (note its small size – easy to mount inside of a tictac box or something) with the green wires leading to a power supply, black cable being the microphone connector, and the blue wires leading to electrodes made… from… Fanta… cans…? Yes, in the spirit of rigging electronics (my specialty) I found that surprisingly nice chest electrodes can be made from aluminum soda cans! If you go this route, cut them delicately so you don’t get metal shards in your skin like I did at first. Also, note that you have to firmly scrape each side of the aluminum to get the insulating waxy-plastic stuff off or it just won’t work. I guess it’s coated with something to prevent the soda from tasting like metal. Aluminum rapidly transfers heat and it’s nearly impossible to solder leads onto these pads, so I wrapped a wire (tipped with a bead of solder) with the edge of the aluminum several times and crushed the heck out of it with pliers and it seems to stay on well and make a good connection. Also, before taping these onto your skin, it helps to put a conductive goo on it to make the connection better. I added skin moisturizer to each electrode and taped the gooey electrode directly onto my chest.

I recorded ~20 minutes of data last night with this rig and it looked pretty good. I went to analyze it with Python and it kept crashing! The python script I gave you previously loads the entire wave file into an array of numbers, but with a 20 minute wave file (at over 40,000 samples a second) it is too big for memory. I wrote an updated wave loader which loads large wave files in parts which is much more efficient. It also performs the condensation method at load time. Basically, it loads 100 data points (or whatever deg is set to), averages them, and adds this value to a list. The result is a smoothed trace with a resolution of 400 Hz instead of 40 kHz. I’d test this on the wave file I recorded last night but that’s on my laptop which is in the car and I’ve got to get back to work. Here’s that function:

 def loadWav(fname,deg=100):
     global hz
     w=wave.open(fname)
     nchannel, width, rate, length, comptype, compname = w.getparams()
     print "[%s]
 rate: %d Hz
 frames: %d
 length: %.02f sec" %
           (fname, rate, length, float(length)/rate)
     hz=rate/deg
     chunks=int(length/deg)
     data=[]
     for i in range(chunks):
         if i%7777==0:
             print "processing chunk %d of %d (%0.02f%%)" %
                   (i,chunks,100.0*i/chunks)
         vals = struct.unpack("%sh" %deg,w.readframes(deg))
         data.append(sum(vals)/float(deg))
     print "complete!"
     return data