Shop OBEX P1 Docs P2 Docs Learn Events
Home brew methods to calibrate trace antenna? — Parallax Forums

Home brew methods to calibrate trace antenna?

T ChapT Chap Posts: 4,223
edited 2013-08-19 08:29 in General Discussion
I built some modules with the Nordic module:

http://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRF24L01P

All I have in my shop is a volt meter and a dual trace 30meg scope. The range on my modules is really bad, but the antenna is pure guesswork that I designed as far as the trace, the parts used were based on the Nordic example schematic. I am exploring finding a consultant that knows how to dial this in, but in the mean time I thought I would see what I can do without having to spend a fortune on test gear. If anyone has any suggestions on a crude home brew method of "seeing" the signal strength on my antenna I would appreciate any suggestions. On the same board there are 3 switching regulators, and I am told that having the switching regulators on the board may be contributing to problems. I will order some copper foil and attempt to put a shield around the power section of the board. In reading online, I understand that the trace antenna will need to be trimmed to achieve the best signal for the circuit.
640 x 478 - 160K
640 x 478 - 140K
640 x 478 - 149K

Comments

  • kwinnkwinn Posts: 8,697
    edited 2013-08-01 08:30
    IIRC there was a thread a while back about using a 2.4 GHz module and a propeller or PC to build an inexpensive 2.4GHz spectrum analyzer. That should do what you want if you can find the thread or someone can post a link to it.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-01 08:57
    There is a register to read for the signal strength in the Nordic modules. It's been on my todo list to figure out how to use this (I don't think it would be very hard). (Kwinn's post reminded me of this otherwise I would have suggested it in my email.)

    I also remember the thread kwinn mentioned. I think the person also posted code in the OBEX (though I'm not sure). I think they used one of Rayman's touchscreens for the output. I'll try to find the link.
  • T ChapT Chap Posts: 4,223
    edited 2013-08-01 09:21
    PUB GetPower
       cmdreadptr  := $09   'test read register $09
        if  nordic.CmdRead(cmdreadptr, @recbyte, 8)  > 0   'trying to get CD Carrier Detect
            bp   'beep
            ser.tx(recbyte)   ' send to PC 
        waitcnt(40000000 +cnt)
    
    

    This is a test I was trying to get the CD, so far I haven't figured this out.
  • PublisonPublison Posts: 12,366
    edited 2013-08-01 09:30
  • T ChapT Chap Posts: 4,223
    edited 2013-08-01 09:34
    Stopped counting them this week!

    In the nordic papers, the design I used is not ideal for omni, but obviously suits the smaller space. I am going to change this to an externally mounted antenna and forget the trace antenna design. If the best design requires a vertical trace or external antenna, might as well in that case go with the best option.
    To be omni-directional, the monopole antenna should be placed
    vertically.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-01 09:37
    T Chap wrote: »
    This is a test I was trying to get the CD, so far I haven't figured this out.

    I was just reading about the carrier detect register. It looks like there's only one bit that goes high. For some reason I thought the Nordic chip and a signal strength indicator similar to the XBee but I'm not seeing it in the datasheet.

    I've been looking for the spectrum analyzer. I found this in the OBEX. It doesn't use a nRF24L01+ chip though. I must have been remembering incorrectly. Still the one in the OBEX looks like it shouldn't be too expensive to make.

    It looks like with the Nordic you just get the one bit of data and it looks like it's only good for a short amount of time (I still don't understand how register 9 works).
  • T ChapT Chap Posts: 4,223
    edited 2013-08-12 08:29
    I wrote Nordic and got a response today. I asked them about trace length/width maximums if using a connector and an external antenna.

    I will get these in today:

    https://www.sparkfun.com/products/145

    https://www.sparkfun.com/products/592


    The plan is to cut the traces to my trace antenna at the closest point to the last inductor in the path to the trace antenna. The RP-SMA connector will get glued to the the board until I can have new boards made. I will solder a wire to the trace at the last inductor and run it to the RP-SMA. I assume that since in other schematics the mounting hardware is tied to GND, I should run a ground wire from some point to the SMA ground pins. The question I have is, the reply from Nordic says I should use a 50ohm transmission line or a coaxial cable instead of a jumper wire(I had inquired of them if using a simple jumper wire was ok).

    What is a 50ohm transmission line? And do I need one for not even 1/2"?

    I also asked them if since I had the switching power regulators on the same board should I attempt to put some shielding around the regulator half of the board: "No, as long it is stable with a small ripple."
  • LeonLeon Posts: 7,620
    edited 2013-08-12 08:56
    With standard FR4 a 50R transmission line is something like a 0.1" track with a ground plane on the other side. You don't really need one for a 1/2" connection.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-08-12 09:00
    The Wikipedia is your friend. Any circuit electrically interacting with the outside world either transmits some energy or receives energy and the circuit has some characteristic impedance (sort of AC resistance). When there's a mismatch of impedance between parts of the circuit, energy doesn't transfer efficiently. The greater the mismatch, the less efficient the energy transfer. There are formulas for calculating the impedance of PCB traces over a ground plane. If you run a jumper on the top surface of a PCB with a ground plane on the bottom of the PCB, you'll find that the characteristic impedance is not too far off from 50 Ohms. As the mismatch gets much beyond 2:1, the losses increase significantly. A 1/2" length jumper should be ok, better if there's a ground plane nearby.
  • T ChapT Chap Posts: 4,223
    edited 2013-08-12 09:43
    Thanks guys. On this section of the board, since it was previously just the trace antenna with no ground plane on top of bottom in that area, there is no ground plane nearby. What about using a short piece of shielded audio wire, tie the drain/foil to GND?
  • T ChapT Chap Posts: 4,223
    edited 2013-08-12 12:19
    Well on one level this is positive with the external antennas, range improved from 1' to 8'. Still pretty bad.
    640 x 478 - 131K
    640 x 478 - 123K
  • Mike GreenMike Green Posts: 23,101
    edited 2013-08-12 13:39
    I'd leave it as it is. Remember that you're not using much power and there's a lot of competition for the same bandwidth.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-08-12 21:29
    Would one of these work for this? I ask because I have several of those modules on the way and would also like to get greater distance. I have a few of the omni directional antennas around somewhere and may be worth a try.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-12 22:38
    Todd,

    Are you using a switching regulator? Have you tested the units with a linear regulator?

    If the interference is from the regulator there may be ways to reduce it. Mike Green has suggested I use some sort of metal box around the offending circuit when I complained about interference in the past. I think there may be things to do with capacitors to also reduce interference but I'm not sure.

    Another thought I've had about this issue is to use a slower bitrate for the wireless communication. I'm pretty sure the datasheet states lower transmission rates generally have better range. I seem to recall the current transmission rate of your one byte packet had some time to spare. I don't recall where the bottleneck in the speed was though and if a 1Mbps speed would put your transmit time over the limit you require.

    Didn't we have some test code to time the transmit and receive times? Or did I just quote numbers from the logic analyzer? (IIRC we used both.)

    I'll look at the equations in the datasheet to see if dropping to a slower bit rate would drastically affect the time the message takes to be both transmitted and received.

    I don't recall the bit rate I used for my various range tests I've perform. I thought it was at 2Mbps but I'm not sure. I found the cheap ebay modules would pick up the transmission from the SparkFun Nordic fob in just about any location in our home except places with a large appliance to block the signal. It really seem like you should be able to get much better range than what you're getting now.

    My mind keeps coming back to your regulator. I'm inclined to think it's causing you trouble.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-12 23:24
    I found some old logic analyzer traces. I looks like the on air time was 4.2us. This is the time from the tx enable pin going high until the interrupt pin on the rx unit goes low. The theoretical time a three byte address, one byte packet with one byte CRC is 3us. I'm guessing the extra 1.2 us is do to some overhead within the chip.

    If I'm reading the datasheet correctly (page 40) using 1Mbps instead of 2Mbps should double the 3us to 6us which, if the overhead stays the same, would make the on air time 7.2us. Even if the time doubled it would be 8.4us for the on air time. The change in on air time is a small fraction of the total time required to send the packet. The communication between the Prop and the Nordic seems to be the bottleneck.

    I doubt changing your data rate to 1Mbps would make much difference in the communication speed between the two Propeller and it may increase your range.
  • T ChapT Chap Posts: 4,223
    edited 2013-08-13 07:16
    Thanks Duane for the info. I will test today with an external LDO 3v3 connected and disable the boost switching regulator that takes the 2 AA batts up to 3v3. On the same board there are actually 3 boost regulators, 3v3, 7.25, and 4.00. I noticed that on a board with only the 3v3 enabled, versus a board with all three enabled, the reception is about the same, all poor.

    I have several other products I bought that use Nordic, these are unrelated companies, but in both cases they are putting a small metal box over the Nordic chip. Both these have incredible range.

    I meant to add, that yes I am sure reducing the rate will increase the distance, but at this point I need to learn how to get it working better as is. 8' is not even close to what this is capable of since I have other products that work well with the same chip.
    640 x 478 - 153K
  • T ChapT Chap Posts: 4,223
    edited 2013-08-15 09:42
    Duane

    I tested the difference between 2meg and 1 meg. I bought the Parallax Logic Analyzer and needed a good excuse to post a screen shot.

    At 2meg the time from the button trigger input on the master to the output pin on the receiver going low is 197uS.

    At 1meg the time is 235uS.

    The reception was only improved by foot or two, so I have some problems to solve at the board level obviously. I will redesign the boards with more effort this time, the first draft was mainly just to have something that worked to get the software up and running.
    656 x 400 - 32K
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-15 10:06
    T Chap wrote: »
    The reception was only improved by foot or two,

    That's interesting.

    I still really wonder if a linear regulator would improve the range. If it did, then you'd know you'll need to find a way to reduce the interference from the switching regulator.
  • T ChapT Chap Posts: 4,223
    edited 2013-08-15 10:14
    Linear on both TX and Receive? Or just Receive?

    On the next batch, I will include the option for RF shields over the power section as well as separate cans for the nordic, Digi has a lot of options.
    200 x 200 - 12K
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-15 10:55
    T Chap wrote: »
    Linear on both TX and Receive? Or just Receive?

    I think you'd need to try it on both to see if the switching regulator is the culprit.
  • T ChapT Chap Posts: 4,223
    edited 2013-08-15 11:05
    Duane, I pulled the batteries off the receiver, disabled the regulators, connected a well filtered 3v3 from an LDO and still get identical results. However, I did not change anything on the Master which still is using the boost from the 2 AA batts up to 3v3. I will figure out how to connect a set of wires for 3v3 to the master.
  • T ChapT Chap Posts: 4,223
    edited 2013-08-15 11:43
    BTW, I have tested today with a LDO regulator on both master and receiver with the boost switching regs disabled, there is no difference in reception.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-15 12:27
    T Chap wrote: »
    BTW, I have tested today with a LDO regulator on both master and receiver with the boost switching regs disabled, there is no difference in reception.

    Well, darn. I was pretty sure interference from the switching regulators was causing the problem.

    You don't have any backlight regulators for a LCD do you?

    I've just had so many problems with switching regulators myself, they're always the first thing I suspect when I have reception problems.
  • T ChapT Chap Posts: 4,223
    edited 2013-08-19 07:00
    For those interested in this, here is the response from Nordic.
    In RF, things work differently than in "regular" electronics.

    Due to the high frequencies (short wavelengths), the length of the transimssion lines matters. This is because the phase of the signal will vary along the transmission line, as opposed to low frequencies where wavelength >> transmission line, and this effect can be disregarded.

    Therefore, in RF, 1 mm transmission line is equivalent to 10 nH. Thus, it is important to place the components close to each other along the RF signaling line.

    For your case, I assume that the external antenna is mathced to 50 Ohm, and so is the board. However, the long wire connecting them makes "unbalance" in the system, meaning that when looking from the antenna and towards the board (through the wire), the impedance is no longer 50 Ohms. The effect of this is that the antenna will not work very well. You can change this by moving the external antenna towards the last capasitors, see attached image. By doing so, the antenna will also be grounded properly.

    For your trace antenna (PCB antenna), that you are no longer using. There should be nothing else than the antenna within the "antenna area" (the area without ground). This also includes buttons. For better performance of the antenna, try to make the antenna shorter. The length of the antenna should be approximately 25 mm. In addition, you should add a shunt tuning compoent right before the antenna, in order to be able to tune the antenna.

    I am not sure yet what they mean by shunt component, is this a cap, res, inductor, that can be swapped out? I already have the 50ohm matching network in place, I thought that was there for tuning purposes.
  • LeonLeon Posts: 7,620
    edited 2013-08-19 07:11
    The antenna needs to be resonant, which is why you might need a tuning component as well as a matching network.
  • T ChapT Chap Posts: 4,223
    edited 2013-08-19 07:12
    I think I need to stick with regular electronics...
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-19 08:01
    What if you used one of the pre made modules and just had a place on your board to plug it in?

    If I understood Leon and the Nordic people correctly, you need a thingamabob to go along with the whatjamahoozit.
  • T ChapT Chap Posts: 4,223
    edited 2013-08-19 08:29
    Well, that would be simple for a proto, but for production that is not going to be a good solution. I need to figure it out and have some understanding of tuning the thing myself. I am starting a new board with their recommendations and will try it again.
Sign In or Register to comment.