Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

transmit fsk modulated signal from one pc to another pc

Status
Not open for further replies.

imran kandhro

Newbie level 6
Joined
Feb 12, 2014
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
88
hello ! can any one help me!!
i want to transmit fsk modulated signal from one pc to another pc through their sound cards! and these pc's are connected to each other via cord cable! the problem is i couldn't understand whether the signal is received or not? plz if any one knows guide me!

code for transmiter is given as (on the first pc)

Code:
%transmitters
AO = analogoutput('winsound');
chan = addchannel(AO,1);
duration = 4;
SampleRate=44100;
set(AO,'SampleRate',SampleRate);
set(AO,'TriggerType','Manual')
ActualRate = get(AO,'SampleRate');
len = ActualRate*duration;
% code for signal genration
pi=3.14;
f1=5;       % Baseband signal frequency
f2=25;      % Carrier Frequency
x=[1 0 1 0 1 0 1 0 0 1]; 
nx=size(x,2);
i=1;
while i<nx+1
     t = i:0.001:i+1;         
    if x(i)==1
     fsk=sin(2*pi*f2*t)';     
    else             
        fsk=sin(2*pi*f1*t)';        
    end 
   axis([1 nx -2 2]);
  i=i+1;
    putdata(AO,fsk);
    start(AO);
fprintf('press enter to take data in sound card..... \n');
    pause
fprintf('sound card taking data....... \n');
    trigger(AO);
fprintf('done... \n');
    wait(AO,5);
    subplot(2,1,1);
    plot(t,fsk);
    hold on;
    grid on;
end
delete(AO);

and the receiver code is given as (on anther pc)


Code:
AI=analoginput('winsound')
addchannel(AI,1:2)
duration=4;
SampleRate=44100;
set(AI,'SampleRate',SampleRate);
set(AI,'TriggerType','Manual');
set(AI,'SamplesPerTrigger',duration*SampleRate);
start(AI);
fprintf('press enter to take data...\n');
pause
trigger(AI);
fprintf('taking data....\n')
[data,t]=detdata(AI);
disp('done');
plot(t,data)
delete(AI)
 
Last edited by a moderator:

Re: i have a problem while transmiting the signal which is fsk modulated!

This appears similar to the old-fashioned acoustic modem. You put your phone handset in a cradle, and the computers transmitted sound through the air. The effective communication speed was a few dozen bytes per second.

I don't follow all of your code, but I believe the idea is to send different frequencies for a 'zero' and a 'one'. Absence of data does not make a zero.

You will need to start at a slow speed. You'll need to verify whether each bit was sent properly, and whether it was received.
 
Re: i have a problem while transmiting the signal which is fsk modulated!

This appears similar to the old-fashioned acoustic modem. You put your phone handset in a cradle, and the computers transmitted sound through the air. The effective communication speed was a few dozen bytes per second.

I don't follow all of your code, but I believe the idea is to send different frequencies for a 'zero' and a 'one'. Absence of data does not make a zero.

You will need to start at a slow speed. You'll need to verify whether each bit was sent properly, and whether it was received.

yes you are right! basically i tried to transmit bit by bit and the received signal is in the image shown!
and if you know that whether i have received it or not guide me further!


**broken link removed**
 

Re: i have a problem while transmiting the signal which is fsk modulated!

Sorry, your attachment gave an 'invalid attachment' error.

You may find it easier to use amplitude modulation rather than frequency modulation. A strong amplitude is a '1'. A weak amplitude is a '0'. Measuring amplitude of peaks should be easier than measuring time between waveforms.

You need to set a time length for a bit. The receiving computer will have a certain window of time for detecting each 0 or 1. With computer modems this involved setting a baud rate. It had to be the same in both computers. If the receiving computer could not get in sync, then no data got through.
 

Re: i have a problem while transmiting the signal which is fsk modulated!

Sorry, your attachment gave an 'invalid attachment' error.

You may find it easier to use amplitude modulation rather than frequency modulation. A strong amplitude is a '1'. A weak amplitude is a '0'. Measuring amplitude of peaks should be easier than measuring time between waveforms.

You need to set a time length for a bit. The receiving computer will have a certain window of time for detecting each 0 or 1. With computer modems this involved setting a baud rate. It had to be the same in both computers. If the receiving computer could not get in sync, then no data got through.

you are right but i have to do only fsk not the AM. and for the sync, if you see my code, i have done. b/c for receiving side i have set duration about 4 seconds and for the transmitting side i also set 4 seconds of duration.
and the received fsk signal is shown

https://obrazki.elektroda.pl/2619946200_1392309702.png

thank you! waiting for!!!
 

Re: i have a problem while transmiting the signal which is fsk modulated!

Now I can see your image.

How do you distinguish 1's from 0's?

The frequency appears to be the same, with occasional bursts of negative polarity.

This was my concept of an FM signal, alternating 1's and 0's:

4994577000_1392401412.png
 

Re: i have a problem while transmiting the signal which is fsk modulated!

Yes, this alternating 1's and o's comes at transmitting side but not at receiving side! that is exactly my problem!

Please suggest what should i do for this!

is there any snyc problem?? how to do sync?

- - - Updated - - -

and if you have skype or facebook???
 

Re: i have a problem while transmiting the signal which is fsk modulated!

You will have to do some testing, and find out which waveforms are (and are not) received.

Your image in post #5 is partially successful. However you must now discover why there is only one frequency getting through. Try several different frequencies.

You must open sound preference panels, to make sure all your signals show up on meters, and make sure the volume is satisfactory at all frequencies. (Your image shows one tenth of a volt, and this might be a typical amplitude. However while you are in this experimental stage, your code might be better able to recognize the signal if it is at a stronger amplitude.)

Make a test program that runs continually and displays waveforms continually.

And you might try experimenting with a digital sound processing program. A popular free program is Audacity. It will capture stereo at 44.1 kHz, and it will display detailed waveforms onscreen. You can compare its response versus your own code.

Sorry, I'm not on Facebook. Never used Skype.
 

Re: i have a problem while transmiting the signal which is fsk modulated!

yeah! i was just trying since last 3 days!

i also change their frequencies (carrier's and base band signal) but the result was same as i had shown you before!

i also tried to transmit diffrent binary code! let say sometime i was transmitting 111000 and sometimes i was transmitting another binary code 001111001!

but at all cases the result was exactly same as i had shown you in

https://obrazki.elektroda.pl/2619946200_1392309702.png

i also tried to increases the voltage level to see but no avail. the waveform always comes like i have shown you!

i am requesting to you plz if you can bother to go up with my code! so that i can get help from you!
plz don't mind! i am just congested here!

waiting........
 

Re: i have a problem while transmiting the signal which is fsk modulated!

Sorry, I'm not familiar with the programming language. Anyway the only way to test your code at this point is to try it on a different system.

Your problem right now is entirely different. From your diagram it looks as though your sound card only works on one frequency. Of course this cannot be the case.

You will have to get the sound card working before your project can succeed. You must test the sound card with microphone input, or patch cables from a music source, etc. You must use the correct audio plug. You must use a reliable cable. Etc.

And I cannot tell what frequency your diagram shows. Since it is unchanging, I would not be surprised if it is AC mains hum.

Another thing that would help is for you to monitor the sounds going between the computers. This requires a Y-adapter, and an audio amp, and speaker.
 

Re: i have a problem while transmiting the signal which is fsk modulated!

Sorry, I'm not familiar with the programming language. Anyway the only way to test your code at this point is to try it on a different system.

Your problem right now is entirely different. From your diagram it looks as though your sound card only works on one frequency. Of course this cannot be the case.

You will have to get the sound card working before your project can succeed. You must test the sound card with microphone input, or patch cables from a music source, etc. You must use the correct audio plug. You must use a reliable cable. Etc.

And I cannot tell what frequency your diagram shows. Since it is unchanging, I would not be surprised if it is AC mains hum.

Another thing that would help is for you to monitor the sounds going between the computers. This requires a Y-adapter, and an audio amp, and speaker.

thank you very much! BradtheRad! i tried on the diffrent computer and i got my result ! thank you very much
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top