Shop OBEX P1 Docs P2 Docs Learn Events
Bell202 Modem frequency change — Parallax Forums

Bell202 Modem frequency change

Robert SchadeRobert Schade Posts: 27
edited 2010-09-17 05:19 in Propeller 1
I have been using Phil Pilgrims very useful Bell202_modem object in a very noisy point to point application and I need to increase the frequencies to get out of the noise band.

On first look there appears to be a simple change that will do the job. The "delay" variable which is set in spin before the modem cog is started sets the frequency of outputting and sampling.

I tried this and changed the spot frequencies (1200Hz and 2200Hz) up by a factor of three.

The output looks good but the receiver doesn't decode the signal.

Any pointers as to what I am missing would be great.

Thanks

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-09-15 08:24
    A 3X increase is probably a bit radical as a first step. I would try smaller steps first to see where performance begins to fall off. Then it might be easier to discern the reasons for it and a possible solution.

    -Phil
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-09-15 11:56
    What are you using this on?

    3x 2200Hz = 6600Hz and maybe out of the band. Telephone lines restrict the band to 4KHz.
  • Robert SchadeRobert Schade Posts: 27
    edited 2010-09-15 23:19
    It's being used to communicate command signals over a 30,000ft e-line which is used in the oil industry. The commands control 2 video cameras with sensors for temperature and a couple of accelerometers along with lights for the videos.

    The e-line is a standard cable used in the oil industry and is not much better than a wet piece of string.

    I'm using the prop to capture the video (with an adc) and send up the frames at upto 5fps (or so). It also communicates to other boards via rs485 and on board i2c peripherals. All the cogs are used so I really need the modem to work at this higher frequency.

    I tried at 10% faster and it failed but the tx signal was clean as a whistle and the rx level was just the same as before.

    I'm not sending this over the e-line during testing, only over a foot long piece of screened cable.

    @phil is the delay variable the only one I need to change? From looking at the code I can't see anything else (in the pasm) that would need to be changed.

    Maybe the waitcnt delays in the spin may need to be adjusted slightly for end of tx or rx buffers but that's it OR have I missed something????

    Again, thanks for any help

    Rob
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-09-16 00:21
    I will have to look up the circuits, of Phill's, to see the way that the audio is formed by the Prop, is it a pure sinewave or just a rounded off squarewave?

    Back in the old days the computer interface with an audio cassette was very basic at best. It was made to work and that was that, stuff like group delay wasn't even worked on. Then the cassette would mangle it all up as well.

    I know that the signals are only audio, but 30,000 ft is a fair lenth. Do you know its characteristic impedance so that matching its ins and outs could be tried. Preferably using good old transformers to get some balance and galvanic isolation at the same time (I love transformers as a line feed).

    Otherwise perhaps the noise frequency, as long as it was away from the wanted pass band, could be tackled.
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-09-16 00:28
    Wow. That is about 6 miles or 10km. Is it twisted solid core like a telephone wire or something else? I am wondering whether something like RS485 wouldn't be better? Or you could use line driver/receiver pairs that run from RS232 (premade black boxes).
  • Robert SchadeRobert Schade Posts: 27
    edited 2010-09-16 01:09
    The e-line is like a very bad coaxial cable. The outer is SWA (steel wire armour) with a small inner, that's it!

    I transfer the video via a varying frequency square wave at upto 35KHz. The modem is only used for sending commands from the surface and there is quite a bit of circuitry to get the signal down and to recover a nice clean sinewave.

    Phil's object just sets the duty cycle for each sine value needed to create the signal and relies on a low pass filter to integrate this to get a sine wave. I've used a quad opamp to do this and provide a bit of amplification to feed into the power driver.

    As mentioned before, the signals are just the same as before in amplitude and quality, it's just the frequency that's changed.

    I'm thinking there may be some tweaking needed in the spin because of the receive/transmit buffers and it missing the next byte.

    I have a checksum which kicks out any corruption and at the standard frequencies I get 100% reception over the 25,000ft we have on site for testing.

    The tool that goes down the well is very narrow and the pcb with the prop is only 30mm x 150mm, there's no more room! I have to do it this way OR I'll have to try and use a totally different comms method down to the encoder/camera unit
  • Robert SchadeRobert Schade Posts: 27
    edited 2010-09-16 05:15
    Update:

    I've connected up a test system using the monitor program and found some interesting results.

    The power as seen by the Bell202 object decreases with frequency even though the signal is the same amplitude.

    The most I've been able to push it is just over 2KHz from 1.2KHz and 3.8KHz from 2.2KHz so about a 72% increase.

    If any have any pointers as to why I'm seeing this decreasing measured power it would be helpful

    Thanks

    Rob
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-09-16 10:33
    The transmitter outputs a sine wave using the DUTY mode output from a counter. The DUTY doody is filtered via an RC low-pass filter. To operate at higher frequencies, you will need to shorten the filter's time constant or suffer the loss in amplitude that you are experiencing.

    Also, the only parameter you should change to alter the speed is delay. It represents the time required for 1/16th of a cycle at the lower output frequency (thus 1/16th of a transmitted or received bit). Lowering the value will raise both frequencies proportionately, along with the baud rate. frq1200 and frq2200 should not be altered. There will be a point, however, beyond which lowering delay will not leave enough time during a 1/16th cycle for the PASM routine to encode and/or decode the signal.

    It may be possible to get by with only eight samples per bit, but I have not tried it.

    -Phil
  • Robert SchadeRobert Schade Posts: 27
    edited 2010-09-16 22:59
    @Phil. Thanks for the pointers Phil.

    The signal level on the receiver is exactly the same as before so I don't understand why the modem monitor program is showing a much reduced power level.

    How do you sample the signal on the pin?

    Thanks for all your help.

    Rob
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-09-16 23:09
    The receiver uses a delta-sigma ADC to convert the analog input to digital levels. The integration interval for each sample is delay. So, as delay becomes shorter, the number of counts accumulated in the phase register becomes comparatively smaller. Hence, the apparent amplitudes that it reads will be diminished.

    -Phil
  • Robert SchadeRobert Schade Posts: 27
    edited 2010-09-17 05:19
    @Phil

    Thanks Phil. I think I'm getting to the point where it will not go any higher in frequency.

    Appreciate all your help.

    Rob
Sign In or Register to comment.