Tag: radio

RF mixer simulation in Max

Audio simulation of an RF circuit.

Screen Shot 2015-03-29 at 4.49.36 PM

The simulation serves no purpose, but its fun. There are 4 versions. I think the third one sounds best (rf-mixer-sim3.maxpat). Its interesting to hear how much spectral distortion happens from multiplying sawtooth waves.

Screen Shot 2015-03-29 at 4.46.55 PM



folder: rf-mixer


Note: please set the signal vector size to 1 (or as low as possible) and enable overdrive and audio interrupt

Screen Shot 2015-03-29 at 5.22.30 PM

Four versions:

  • rf-mixer-sim.maxpat (initial attempt)
  • rf-mixer-sim2.maxpat (uses sah~ and rate~ objects)
  • rf-mixer-sim3.maxpat (uses gate~ objects with a phasor~ clock)
  • rf-mixer-sim4.maxpat (bandpass filter on RF input)


Macbook analog TV mirroring

How to connect a new computer to an old Television

Signal path

Connect a VGA adapter to the Macbook DVI (Thunderbolt) port.

Screen Shot 2015-03-27 at 4.59.58 PM


Connect a VGA cable from the adapter to a PC-to-TV adapter. This converts VGA to video component (RCA plug) output. The sound from the Macbook can go through this adapter as well – it gets passed through to the RF modulator.

Screen Shot 2015-03-27 at 5.02.22 PM


Connect the PC-to-TV adapter, using RCA cables, to an RF modulator.



Connect a coaxial cable from the modulator to an RF transformer (75 to 300 ohms)

Screen Shot 2015-03-27 at 5.10.10 PM


Connect the 300 ohm leads of the matching transformer to the antenna input terminals of the TV.




Using the NE602

“The NE602 could very well become the RF experimenter’s ‘555’ chip”

From “Electronics Now”, February 1997, by Joseph J. Carr 


Screen Shot 2015-03-26 at 11.22.29 PM

Note: If you are searching for NE602, try the following variations:

  • NE602
  • NE612
  • SA602
  • SA612

As well as any of the above with the suffixes AN, or AD, for example: NE602AN

Regenerative shortwave radio experiment

Circuit design by Ray Ring


The audio is playing through headphones here, so you can’t hear the excellent signal quality

I didn’t have the OpAmp called for in the circuit, so I built this audio amplifier designed by Dean Segovis: http://hackaweek.com/hacks/?p=131

The antenna was a piece of wire about 30 feet long.

An air variable capacitor was used for tuning.

More to come…

Mac OS frequency control for Softrock SDR devices


By VK6JBL (Andrew Nilsson)

Available for download at https://groups.yahoo.com/neo/groups/softrock40/files/VK6JBL/

Note: You need to join the Yahoo softrock40 group to access the link

More information about Softrock using Mac OS here: http://blog.marxy.org/2012/02/softrock-ensemble-rxtx-with-dsp-radio.html

By Peter B Marks

Note: On Mavericks you may need to unload the kext for the USB device before plugging in the Softrock:

sudo kextunload -bundle com.apple.driver.AppleUSBFTDI

Screen Shot 2015-02-01 at 1.56.18 AM

 update 3-2016

Using the method above gives error messages, similar to:

(kernel) Kext /System/Library/Extensions/AppleUSBFTDI.kext/Contents/MacOS/AppleUSBFTDI not found for unload request.
Failed to unload /System/Library/Extensions/AppleUSBFTDI.kext/Contents/MacOS/AppleUSBFTDI – (libkern/kext) not found.

Various suggestions:

Reboot the computer. Run the command again. Ignore the error message. And then try plugging in the softrock again.

Tried some variations of the command…

sudo kextunload -b /System/Library/Extensions/AppleUSBFTDI.kext/Contents/MacOS/AppleUSBFTDI

But the following one seemed to do the trick (at least for now) even though it still gives an error:

sudo kextunload -bundle-id com.FTDI.driver.FTDIUSBSerialDriver

For a more practical solution, check the FTDI manual, if it makes any sense to you.




A linux command line utility to control softrock, also  by Andrew Nilsson

Local source is in tkzic/softrock/usbsoftrock

Online repo: https://code.google.com/p/usbsoftrock/ (last updated 2/2011)

It appears that this may have the code needed to build a Max external.

Soft66lc FTDI driver issues in Mac Os

Notes: Since Mavericks, the Soft66lc SDR external has not been working in Max. Although I was not able to update the external, there is a temporary workaround.

Mac OS is hijacking the FTDI USB device with its own driver. You can unload the driver from terminal:

sudo kextunload -bundle com.apple.driver.AppleUSBFTDI

To reload the driver use “kextload”.

Here is  article from Sparkfun with details about this workaround: https://learn.sparkfun.com/tutorials/how-to-install-ftdi-drivers/mac

And a more elaborate workaround that removes the Apple driver: http://www.mommosoft.com/blog/2014/10/24/ftdi-chip-and-os-x-10-10/

Notes about latency and FTDI http://openbci.com/forum/index.php?p=/discussion/199/latency-timer-os-x-new-info-plist

The real solution involves using the new Apple driver to communicate with the device: https://developer.apple.com/library/mac/technotes/tn2315/_index.html

Or spoofing the driver with a codeless kext: http://stackoverflow.com/questions/7263648/codeless-kext-loading-problem




Processing shortwave radio sounds

Using the python sms-tools library.

sms-tools: https://github.com/MTG/sms-tools

Here is a song made from the processed sounds:

mp3 version:

This project was an assignment for the Coursera “Audio Signal Processing for Music Applications” course. https://www.coursera.org/course/audio

Source material

Sounds were recorded from a shortwave radio between 5-10MHz.

freesound.org links to the sounds:




The sound is an AM shortwave broadcast station from between 7-8 MHz. It is speech with atmospheric noise and a digitally modulated carrier at 440Hz in the background.

I tried various approaches to removing the speech and isolating the carrier. But ended up using the following parameters to remove noise and speech, but for most part leaving a 440hz digital mode signal with large gaps in it.

  • M=701
  • N=1024
  • minf0=400
  • maxf0=500
  • thresh=-90
  • max harmonics=50

After more experimentation, the following changes resulted in a cool continuous tone with speechlike quality (but not intelligible) and the background noise is gone.

Here is the full list of parameters:


Here is a plot:

Screen Shot 2014-12-16 at 8.03.55 PM

Here is the resulting sound of the sinusoidal part of the harmonic model:


The sound is continuous digital modulation (buzzing) from a shortwave radio between 7-8 MHz. The buzz is around 100Hz with atmospheric background noise.

Transformation using HPS (harmonic plus stochastic) model.

Not very impressive analysis, but the resynthesis had a very cool looking spectrogram due to some frequency shifting.


Screen Shot 2014-12-16 at 8.12.43 PM

I realized that I had set f0min too high. Went back to using the HPR model without transformation to see if I could separate the tone. Here is the plot:


Screen Shot 2014-12-16 at 8.33.50 PM

Here are the resulting sounds transformation (unused) and the sinusoidal/residual results that were used in the track.

source: digital_pulse_7hz.wav

A repeating pulse around from a shortwave radio between 7-8 MHz. The frequency of the pulse is around 1000Hz with a noise component.

Another noise filter – this was way more difficult due to high freq material.


Screen Shot 2014-12-16 at 8.40.12 PM

Instead, I went with a downward pitch transform, using the HPS model transform. Here are the resulting sounds from  the HPR filter (unused) and the HPS transform.


The sound contains typical amateur radio CW signals from the 40 Meter band, with several interfering signals (QRM) and atmospheric noise (QRN). Using the HPR model, I was able to completely isolate and re-synthesize the CW signal, removing all the noise and interfering signals.


Note that you can actually see the morse code letters “T, U, and W” on the spectrogram of model!

Screen Shot 2014-12-16 at 8.55.20 PM

Here is the re-synthesized CW sound:


The WWV National Bureau of Standards “clock” station at 5MHz. A combination of pulses, tones, speech, and background noise.

I was trying to separate the voice from the rest of the tones and noise. After several hours and various approaches, I gave up. The signal may be too complex to separate using these models. There were some interesting plots with the HPR model

Screen Shot 2014-12-16 at 9.11.54 PM

Finally decided to just isolate the 440 Hz. clock pulse from the rest of the signal:


Screen Shot 2014-12-16 at 9.06.09 PM

Here is the resulting sound (note that the tone starts several seconds into the sample)