Software Modem/Frequency Shift Keying (FSK) Library

I am looking for a SoftModem library for Electric Imp similar to this Arduino sample: https://code.google.com/p/arms22/downloads/detail?name=SoftModem-004.zip

Are all the pieces in place to achieve this with the Imp?

For transmission, you could probably use the fixed frequency DAC and queue up blobs with the different frequency samples in them. Depends on the rate.

Reception is harder, as you need to sample (fixed freq sampler, no problem) but then do the DSP to pull out the data. That might be hard in squirrel.

What’s the application?

I have had some experience with this sort of stuff on various ham/ax25 projects.

I had a look at the code - sending can be done by creating a 117/235 khz modulation, and filtering as appropriate or using a modem IC (TCM3105), although since you are using 4900/7350Hz tones, I am not sure of any modem chips using these tones, so using modulated square waves at 4900/7350 should work well.

For receive, there are several ways to do this. Using a modem IC would be best, although doing zero detection apparently works fairly well when the input signal is filtered. Deviation of the signal is approximately twice the bitrate which should help. Count the number of zero crossings, and then have a software PLL for detecting 1/0 and then determining start/stop. Looking at the code for decoding IR in the Imp, this should be possible, although I have not yet tried in production.

To be honest here, I would be tempted to implement this in an external microcontroller. It will fit without issue in just about any modern controller, and I have done similar in the past, as have friends. But if I was to implement it, I would probably use the the ATMEGA328P and send data to the Imp with serial.

I am trying to do a project similar to what is shown at the link:
Imgur

It would attach an Imp to an iPhone/Android device via the phone/mic jack for two-way communication.

Here is a similar project:

http://www.creativedistraction.com/demos/sensor-data-to-iphone-through-the-headphone-jack-using-arduino/

Umm, I mean I can see why this is a good idea for an arduino which has no network interface, but wouldn’t it be easier to get data to the phone via HTTP? :slight_smile:

Transmitting data between phone and Imp via phone/mic jack is the foundation of the idea that I am experimenting with. It is more than just passing data.

Can you elaborate? I can’t think of a reason to use a physical interface when fast wireless options are available. Yet, here you have a reason. I’m very curious to know what it is.

One possible reason: if the data being extracted from the phone is not exposed through an API, eg. phone calls, for recording purposes. As a former journalist, I struggled with attempting to record phone conversations held on a mobile. Years ago, for landlines, I had a doohickey that clipped around the wire from the desk unit to the handset, but of course that’s no use with mobiles. In the end I had to kludge it with speakers and a separate recording device. It worked, but sub-optimally.

Now I think of it, I may have to try this notion out.

one can easily record phone calls wirelessly. Bluetooth audio isn’t encrypted that I know of. And, if it is, getting audio out of the headphone jack isn’t a problem that requires a data solution, but an electronic one.

So, it’s probably not call recording.

For a moment, I thought it might be something like a credit card reader but Mr. Tucker says it is more than just passing data… it’s like a riddle.