Using INTOSC 32Mhz as RF Radio Control and Data Communication


Closed Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    Nov 2009
    Location
    DFW area of Texas
    Posts
    24

    Lightbulb Using INTOSC 32Mhz as RF Radio Control and Data Communication

    I'm attempting to generate some simple & low cost ($2 + PIC) RF radio control and data comm' by taking advantage of the 32Mhz INTOSC found on some of the PIC's (16F1826 is on the bench now). It would be nice to get 3kbps.

    I'm trying a few circuits(op-amp & RLC filters) now without success by outputting the clock (32Mhz) on a pin.

    Am I crazy to think this is possible?

    Any ideas or anyone interested?
    -ray
    "Imagination is more important than knowledge", Albert.E.

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Some things to consider if you have not.

    A quarter wave length antenna for 32Mhz is around 7 feet long.

    But if I am not mistaken you will only be able to output 1/4 of that.
    8Mhz = 29 foot antenna
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,796


    Did you find this post helpful? Yes | No

    Default

    I think yes, that you are ...

    The OSC power is too litle to make a good transmission, plus at 32MHz you need a long long antenna.

    Ioannis
    Last edited by Ioannis; - 29th December 2010 at 11:40.

  4. #4
    Join Date
    Nov 2009
    Location
    DFW area of Texas
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    OSCCON = %11110000
    '32Mhz intosc use
    CLKRCON = %11010000
    'Turn on ref clock output BE SURE TO DISABLE "CLOCK OUT" IN MEPROGRAMMER
    With these statements, I see the 32Mhz on the 'clkout' pin. On a 5v pwr supply, the waveform looks like a sawtooth ~1volt peak to peak that is offset by 2v from zero.

    Most low cost radio control toys are 27Mhz or 40Mhz. I tested one that is 27Mhz using Tx antenna length of just 4inches and receiver antenna length of 8inches; the toy car worked for over 40feet.
    -ray
    "Imagination is more important than knowledge", Albert.E.

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Most low cost radio control toys are 27Mhz or 40Mhz. I tested one that is 27Mhz using Tx antenna length of just 4inches and receiver antenna length of 8inches; the toy car worked for over 40feet.
    And they have a loading coil before the antenna. Giving an electrical length of well over 4 inches. A straight wire for an antenna will need to be the lengths given above.

    I will suggest you pick up a book about antennas and wave propagation. Then start on a project like this.

    Here is a good place to start
    http://www.arrl.org/
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,796


    Did you find this post helpful? Yes | No

    Default

    See post #3 about power.

    Also if you use a loaded coil with short antenna, much of the RF power will be spent in the coil and mismatches.

    With picowatt I think you can go a few mm away...

    Unless you are going to amplify the signal. Maybe a MAR-1 or more in series can help.

    Look here for data: http://www.minicircuits.com/pdfs/MAR-1+.pdf

    Ioannis

  7. #7
    Join Date
    Nov 2009
    Location
    DFW area of Texas
    Posts
    24


    Did you find this post helpful? Yes | No

    Talking

    Thanks.
    I tried a few simple (perhaps stupid) experiment setups such as...
    Transmitters tried:
    a. 8" wire soldered straight to the clk out pin (with a 5v supply to PIC, this pin shows 1.5v p-p 32mhz waveform that is 2v offset above zero)
    b. tried modulating the full 5v using RF transistors and amps unsuccessfully (likely due to impedance issues of clk pin feed).
    c. successfully modulated the full 5v supply onto a wire(antenna) using a Schmitt trigger, triggered by clk(clock) out pin, and powered by 5v supply, unfortunately my received signal strength did not go up as this idiot(me) expected.

    Receiver: ~5" wire feeding a bandpass filter (series R & L then parallel to gnd R & L) that worked great, feeding a RF amp (Avago ADA-4543).

    The above gave an output of 45mv p-p centered on zero before the RF amp, and about 190mv p-p after the amp. This was at a distance of about 6" apart. My application needs about 36" (~1meter) apart maximum (for a rotating equipment sensor).

    I modultated the 32mhz clk output either (both ways worked great):
    a. through a NPN transistor where the data pin from PIC(controls if 32mhz is on/off) feeding the base directly(no resistor), collector connected to clk out pin, and emitter hooked to a 8" wire(antenna).
    b. through software by turning on or off the Clock output on the clk out pin using the CLKRCON register and placing pausues statements inbetween. To send data out this way, one could(no start and/or stop bits shown here):
    Data var BYTE
    code....(setting a value to Data)
    For x= 0 to 7
    if data.x=0 then
    CLKRCON = %00010000
    'Turn off ref clock output BE SURE TO DISABLE "CLOCK OUT" IN MEPROGRAMMER
    pauseus=300
    if data.x=1 then
    CLKRCON = %11010000
    'Turn on ref clock output BE SURE TO DISABLE "CLOCK OUT" IN MEPROGRAMMER
    pauseus=300
    next x
    ...
    I need to work on the receiver a bit more, just need to amplify it a bit more to ~50% of receiver supply voltage, then I can use a Schmitt trigger to send it to the +V rail so the PIC can see good data coming into a receive (SERIN2) pin.
    ...
    If anyone has good ideas, pls pass them along.
    -ray
    "Imagination is more important than knowledge", Albert.E.

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,796


    Did you find this post helpful? Yes | No

    Default

    Why not put 2 MARs in series to amplify the Transmitter signal?

    Ioannis

  9. #9
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    Why not put 2 MARs in series to amplify the Transmitter signal?
    I've tested with 3 MAR-6 on the receiver end just to see if it would work. It did, but you can easily overwhelm some receivers.

    At much higher frequencies (~300MHz), many people have reported this tip http://davehouston.org/passive.htm worked for them. One fellow with access to a lab, measured 10dB gain in all directions. Most small battery powered transmitters have very inefficient loop antennas formed by a PCB trace. Their range is frequently poor and this can make quite a difference. I have no idea whether it might work (or be at all practical) at longer wavelengths.

  10. #10
    Join Date
    Nov 2009
    Location
    DFW area of Texas
    Posts
    24


    Did you find this post helpful? Yes | No

    Default

    hi Dave, what do you mean 'but you can easily overwhelm some receivers' ?

    I would guess one would do this for the receiver:
    Ant -> Filter -> Amp -> Filter -> Amp -> Filter -> Amp -> Schmitt Trigger ->Data input Pin on a PIC.

    The amp i tried as mentioned above (Avago) is very similar to the 'MAR' amps.
    (BTW, I've given up on testing this at the moment and resorted to using the 'Radiotronix' low cost modules to move forward with my project).

    What is important here is to get a good SNR (signal to noise ratio)...where both are the ~32Mhz frequency but one is the 'intended signal' and the other is 'unwanted background noise' (sometimes called the noise floor).
    One can do this several ways...
    a. make a really hi power transmitter and weak reciever.
    b. use AGC algorithm/control on reciever or on both reciever & transmitter.
    c. both the above.
    d. others...

    I am trading several methods, but i normally gravitate towards the LOWEST COST options, especially when i can replace hardware with code techniques or algorithms.
    -ray
    "Imagination is more important than knowledge", Albert.E.

  11. #11
    Join Date
    Nov 2009
    Location
    DFW area of Texas
    Posts
    24


    Did you find this post helpful? Yes | No

    Unhappy

    I did try the amp on the transmitter side, it did not work.
    Clk out pin -> capacitor -> amp -> wire antenna

    BUT, i got a Schmitt trigger to generate the full 5v supply swing the 32Mhz about a wire antenna by just Clk out pin -> Schmitt trigger -> wire antenna... only problem was that i did not see a stronger (higher voltage) reception.

    There is some impedance matching (or decoupling) that needs to be done from Clk Out Pin to the radiating Antenna.
    I need help with this part.

    thanks.
    -ray
    "Imagination is more important than knowledge", Albert.E.

  12. #12
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rayzrocket View Post
    hi Dave, what do you mean 'but you can easily overwhelm some receivers' ?
    My experience has mostly been with 300-434MHz where there are dozens of suppliers of small, inexpensive superregenerative receivers (http://davehouston.org/modules.htm ) and somewhat more costly superhet or hybrid receivers. I cascaded 3 MAR-6 amps between ANT & RCVR (w/o any filtering). This worked fine with the superhet & hybrid receivers and with most of the superregenerative receivers. However, there was one manufacturer whose superregenerative receiver had much wider bandwidth than most and it did not deal well with the higher signal levels. This was disappointing as the wider bamdwidth was a desirable trait as several devices of interest (automation & security) to me were in the 308-320MHz range. http://www.e-madeinchn.com/ReceiverModules.html And, they were dirt cheap, costing about $1 each even with some requested mods and in relatively modest (~100 pcs) quantities.

    Noise is not much of a problem as most of these receivers employ a data slicer circuit (a simple comparator) that gives an extremely noise free data output. http://davehouston.org/rf-noise.htm.

    As it's against FCC rules to futz with the transmitters (or TX antenna) but not with the receiver, I always use better antennas (http://davehouston.org/eggbeater.htm) and MAR-6 based preamps on the receiver side.

    Most of the superregenerative receivers also have an analog output which is merely the raw signal at the comparator input. You can measure the modulation depth and get a rough measure of the signal level (rough, because the AGC circuits also affect this amplitude) which you can use for comparing before/after (antenna, preamp) scenarios.

    I have no idea what might be available at 27MHz. I did look at this briefly a few years ago as it was/is(?) used by one of the audio receiver makers for remote control. (It's been too long for my ancient gray cells to remember details.)
    Last edited by dhouston; - 13th January 2011 at 13:20.

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts