Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Frequency shift keying through audio signals


  • Please log in to reply
14 replies to this topic

#1 devilfisch

devilfisch

    Member

  • Members
  • PipPip
  • 26 posts

Posted 04 June 2011 - 07:35 AM

Hi and good day everyone! I'm new here and this is my first post. I would like to ask for some advice on frequency shift keying using the Netduino. My idea is quite similar to the Arduino project mentioned here. Seeing that it was possible with the Arduino it should then be possible with C# right? Or am I terribly mistaken?

As mentioned above I don't have my Netduino Plus yet but I wish to start planning what I can do with it so I can prepare what other components I might need while it's not in my hands. It's also my first time handling such a device so forgive me if I'm ignorant. What I plan to do is interface my Netduino Plus with my Samsung Galaxy Tab via an FSK modem using the Galaxy Tab's audio port.

I know I can interface with a Bluetooth serial connection on Android but I plan to make the hardware easy to use on other devices such as the iPhone or a Windows Phone 7 handset using only software on the interfacing device instead of doing changes on the Netduino hardware.

I do know that it would be a lot easier to just turn the Netduino Plus into a webserver and control stuff from a webpage but the problem with that approach is that I'll need a network in the area to make it useful. My project requires portability and I would most likely take it around places where a network is non-existent. Using Ethernet would probably not be the best of choice unless I tag along a wireless to Ethernet bridge/access point or have the Netduino Plus work as an access point with a Wifi shield. That is, unless someone who is more knowledgeable points me to the right direction.

Even with a networking solution, I'd still want to be able to achieve my original plan if it's possible. If anyone has done this or knows how to do this please let me know. Also a sample C# script will be greatly appreciated as I totally have no idea where to start.

Thanks and have a nice day!

#2 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 04 June 2011 - 09:42 AM

Your idea is very nice, but it is not so straightforward to realize by using C# and Netduino. The main problem is the speed, that is very low because C# is interpreted. Arduino uses native code and it is very fast. Anyway, you should be able to realize a FSK modem adding the proper hardware. Basically you may add the modem to the UART, so that the C# speed won't be a problem anymore. Juat a question: how do you plan to use as a signal medium? A cable? A radio? What else? Cheers PS: heartly welcome in the forum!
Biggest fault of Netduino? It runs by electricity.

#3 devilfisch

devilfisch

    Member

  • Members
  • PipPip
  • 26 posts

Posted 04 June 2011 - 10:27 AM

Thanks for your response and for the kind welcome Mario!

Yes, I was thinking that speed could be a problem so I kept searching for other means. I have found a FSK modem featured in the book IPhone Hacks that interfaces via the audio port of the IPhone. I think it would work for Android and other devices with little or no modification although I'm not sure about the signal levels (I assume it outputs 5V) towards the Netduino so I might need to do something to bring it down to 3.3V first but that shouldn't be much of a problem.

I plan to use a TRRS 3.5mm audio cable for my signal medium. The Galaxy Tab would send signals to the Netduino via one of the audio channels and receive signals using the mic input. The FSK modem, assuming that it's the best and only course of action, would sit in between the Netduino and the Galaxy Tab or other phone/tablet device.

#4 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 04 June 2011 - 03:01 PM

Do you need only 1200bps or much faster?
Biggest fault of Netduino? It runs by electricity.

#5 devilfisch

devilfisch

    Member

  • Members
  • PipPip
  • 26 posts

Posted 04 June 2011 - 07:13 PM

A fast connection isn't necessary. I only wish to send short numerical or hex data and simple commands from the Android device. After receiving the commands the Netduino will perform functions based on those commands and then send an acknowledgement signal back to the Android device once it has done its job. Additionally, I plan to make the Netduino capable of running autonomously once it receives certain commands so basically the Android device is just like a "programmer" to tell the Netduino what it should do.

#6 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 05 June 2011 - 03:12 PM

We used for long time the TCM3105, and it worked very well.
If you don't ask for speed, I'd recommend this solution. The design of a FSK modem is not straightforward, and it requires several EE knowledges.
Cheers
Biggest fault of Netduino? It runs by electricity.

#7 devilfisch

devilfisch

    Member

  • Members
  • PipPip
  • 26 posts

Posted 06 June 2011 - 04:05 AM

Thanks for the recommendation. I took a peek at the datasheet and found that the TCM3105 is already a FSK modem all on its own which could greatly simplify my circuit! Simplicity is awesome! I might be asking too much but do you have a sample circuit and/or some Netduino code using this IC that I can refer to and study? Of course, I'll try searching for some myself too. Well, anything would help. Anyway, thanks again! I really appreciate your help.

#8 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 06 June 2011 - 07:29 AM

The schematic at page 10 of the datasheet could be a good start. I would point out that you are supposing to choose a FSK modem for highly noisy and/or long wiring, having benefits due a narrow bandwidth. These benefits has to be payed with a relatively complex circuit (as seen at page 10). If you don't mind about noise and/or long wiring, there are much simpler way to build a FSK/PSK modem, although the bandwidth won't be limited. I mean that if you choose a square-wave modulation, the circuit will be easy enough, but the spectrum shows tons of harmonics. An very interesting task would be the correlation receiver, as the Stealth planes (and many satellites) use. The baud rate is very low (below 100 bit/s), but it is able to receive data even in a highly noised signal. Maybe it has a limited practical application, but it is interesting to develop and make it working. Cheers
Biggest fault of Netduino? It runs by electricity.

#9 devilfisch

devilfisch

    Member

  • Members
  • PipPip
  • 26 posts

Posted 14 June 2011 - 05:41 AM

I don't really mind doing a complicated circuit as it is what I intended to do to learn more about electronics in the first place although I would be happy with the simplest possible circuit. I don't think noise will be too much of a problem as I'll be using really short audio cables (less than 3 feet maybe) for the interface. Do you have a schematic of a square-wave modem so I can study it? Anyway, away from the subject for a bit, I just received my Netduino Plus yesterday and immediately played with it to drive 10 LEDs and make random patterns. Really cool. I never expected it to be so easy to learn. I'm even more stoked now. :D

#10 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 14 June 2011 - 07:06 AM

When we consider square waves instead of sines, it means that we don't care about the bandwidth. we must also rely on several assumptions, that in a sine-world could not be accepted.
Just to be clear, if we mean transfer data through an audio channel, we must take in consideration the bandwidth (and many other parameters as well). Otherwise the data will be corrupted.

For my high-school final exam, I presented a simple circuit. Two boards: a master, with some buttons, and a slave, with some leds. The result was trivial: by pressing a button, the related led will light.
The smart side was how the board communicate: the button action was transformed to a digital message by a MCU, then fed into a FSK modulator (300Hz-3KHz bw)...twisted cable pair...FSK demodulator, then another MCU to decode the message and light the proper led.
You may try to replicate all that, by avoiding (at the first) the modem. Just encode and decode any pattern, using the Manchester coding (that was I used). It is the easiest way to make a PSK modem, using a square wave.
The circuit is also trivial: just connect an output port to an input. You may "simulate" both the master and slave board with only one, by running the tasks isolated. That would be comfortable with a single Netduino.

When you've done this basic codec, you may shift to something more complex.
Cheers
Biggest fault of Netduino? It runs by electricity.

#11 devilfisch

devilfisch

    Member

  • Members
  • PipPip
  • 26 posts

Posted 14 June 2011 - 08:18 AM

Yes, data - or more like commands - will be sent via an audio cable as the signal will be generated audio from the Galaxy Tab audio socket. Digital signals towards the Galaxy Tab should also be converted back to audio to pass through the mic input as well. I plan to make the protocol very short, maybe using 4 bits (a nibble) to send/receive commands to minimize bandwidth use. I'll try to study this Manchester coding method. I think it would fit my purpose well. If only I could bug my cousin who is an electrical communications engineer about it. Unfortunately, he's studying for his Cisco exams so I can't disturb him right now. :( Thanks again for the tips Mario. :)

#12 http://androino.blogspot.c

http://androino.blogspot.c

    New Member

  • Members
  • Pip
  • 4 posts

Posted 11 July 2011 - 11:25 AM

Hi everyone, I'm Alberto a student from Spain, who is working on his Final Project as Telecommunication Engineering. This is my blog where i explain what i'm doing and what are my objectives. http://androino.blogspot.com/ If you look at Project Description, you can see that my project will need to use something quite similar to what you are talking about. I found this blog while I was looking for some information about the technologies used nowadays. I would like to keep in touch and listen to all the suggestion you can make in order to improve my project. Thank you very much, I’m looking forward to hearing from you. I also encourage to create your own blog where all your improvements can be analyzed .

#13 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 12 July 2011 - 07:31 AM

Alberto, I am sorry to answer you so in late. There's no any project involving the FSK at the moment...I may help you, if you need. However, I don't see any common point with your project (Android and Arduino) with Netduino. What do you expect from this forum?
Biggest fault of Netduino? It runs by electricity.

#14 http://androino.blogspot.c

http://androino.blogspot.c

    New Member

  • Members
  • Pip
  • 4 posts

Posted 12 July 2011 - 09:10 AM

Ok, Instead using netduino, like @devilfisch propose, I would use Arduino Duemilanove in order to work with an udio signal that comes from this microcrontoller that also comes from a sensor connected to it. Thats why I thought you used a FSK modem to work with that kind of audio signals.

Thank you, anyway.


Alberto, I am sorry to answer you so in late.

There's no any project involving the FSK at the moment...I may help you, if you need. However, I don't see any common point with your project (Android and Arduino) with Netduino.
What do you expect from this forum?



#15 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 12 July 2011 - 09:51 AM

Okay, until our discussion keeps in a general argumentation (that might involve Netduino too), we may continue to write here. Otherwise, we must move off this forum. Alberto, I took a peek at your web-site, but frankly I don't understand what exactly are you going to do. It's clear that you want to use Android and Arduino as devices, but you should explain better what's your goal. Please submit an example of network or something that could clarify the project. Then, why are you going to use audio signals and not web-services, for example? Audio modems are still used, but nowadays there are much simpler and powerful techniques to exchange data. FSK (or PSK) is used for very long and noisy connections. Could you clarify this point also? Cheers
Biggest fault of Netduino? It runs by electricity.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.