This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF51822 + custom board not quite working

Hi! My problem is that my code works on the devkit PCA10004(PCB antenna) but not on my own custom board. The devboard can be connected to and all characteristics can be read correctly. With my custom board I can program it, debug it, advertise but I can not connect to the nrf51822. In master control panel i can see the nrf51822, i get -44 to -70db depending on the proximity so the antenna(Tried 2450AT18A100E and a 31mm wire, both works about the same) + balun(2450BM14A0002T) seems to work. I get the address, name and so on but when i click service discovery I get


[11:21:57.3] Device discovery stopped
[11:21:58.4] GetDeviceInfo()
[11:21:58.7] ----------------------------
[11:21:58.7] Connected to device
[11:21:58.7] Role: 0
[11:21:58.7] PeerAddressType: 1
[11:21:58.7] PeerAddress (MSB): D86D1B8280D6
[11:21:58.7] Connection Interval: 20.0ms
[11:21:58.7] Connection Latency: 0
[11:21:58.7] Supervision Timeout: 3000ms
[11:21:58.7] Clock Accuracy: (1)
[11:21:58.7] ----------------------------
[11:21:58.7] Connected to address: D86D1B8280D6
[11:21:58.7] Starting a Read Information Request on the whole remote DB
[11:21:58.8] Lost connection to device. Reason: BTLE_CONN_FAILED_TO_BE_ESTABLISHED
[11:21:58.8] SERVER: Received packet <HciEvent: eventCode=0x0A> - <HciEvent: eventCode=0x0A>
[11:21:58.8] SERVER: Received Link Loss
[11:22:03.7] Discovering all attribute UUIDs
[11:22:03.7] Lost connection before service discovery was complete

I measure the VDD_PA with my scope and the RF frontend gets biased for 400µs in three bursts. But the burst looks exactly the same when i click service discovery. On the devboard they are not the same. The code does not crash, the board continues to advertise and can be when i click start discovery again. The code never reaches the app_error_handler function so no function gives any error(this function contains a while(1);. The code never reaches the ble_evt_dispatch function so no connection event nor disconnection event are generated.

So my conclution is that my custom boards can not recieve anything but only transmit.

The primary crystal starts when the nrf51822 sends data and the low power crystam(32kHz) runns always.

I have attached the PCB, it is 2 layers, 1.6mm. The top plane is basicly a solid groundplane, a few other wires runns there but not close to the RF part.

The code is a modified version of the HRS example.

I have exaclty the same code running on both the devboard and the custom board and the softdevice is loaded.

Do you guys have any clue why I can not receive anything with my custom board?

The only difference I can think of to the devboard is the balun, but i can transmitt, does not that mean that i should be able to receive?

Thanks //Victor @ pluspole.

PCB.PDF

  • Hi Victor,

    Your balun wan't designed for the nRF51822. You may want to contact Johanson for the new balun that's made for the nRF51. Or you can use the ST balun that is used in the reference design on our website.

    Although, with the 2450BM14A0002, you should still be able to receive something (with very poor range). You can try to bring the master close to the board to see if the RX packet is received.

    Secondly, the antenna should be tuned, you can find the information regarding antenna tuning here.

    But again, it's still pretty strange that you can transmit but not receive. Do you have a good range when advertising ?

    We als spot that you have some other components on the board, could you isolate them to run just the nRF51822, and make sure you have proper power supply ?

  • Thanks for your reply! I have removed all other active components and removed the DC/DC parts for the NRF51822. Still the same problem. I get perfect TX range, I can even put my hand on the antennas and still get good reception when advertiseing. So I dont think this is a balun or antenna matching problem, but the balun is basicly the only thing different from your devboards.

    I can place the master (PCA100000) 1mm from the antenna of my board and get the same problem as with 10m distance. I have 1nF, 100nF and 1uF ceramic capacitors spread over the board and a good powersupply so I dont think power is the issue.

    I will try to place the recomended balun in my footrpint on the current board to try.

  • I just tried mounting the passive components from the devkitt on to my custom board, the exact same problem is present, it can advertise but not do service discovery. Could it be different nrf51822 versions that dont work well with the s110 V6 stack?

  • Solved it! It was a problem with my crystal. I dont know what the problem was exactly, but when i mounted the one from yout devboards it works great(even with the balun). My crytal started and ran at 16MHz, so does yours so I cant get why mine did not work.

  • Hi,

    From what I can see from your schematic, you are using a Johanson balun that is not optimized for nRF51822 but for nRF24LE1. I recommend you move to the balun that has been designed to match nRF51822-QFAA/AB : BALF-NRF01D3.

    Best Rds Richard

Related