This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Reason for no Bluetooth signal?

I'm trying to finish a handmade custom board I started. I had previous problems with the crystals, and a few others, but right the thing seems to be working ok. At least I checked with UART that the board is running the hole code. I'm trying a simple Beacon example. But with the nRF Beacon application for Android I'm not seeing any signal. Even with the telephone touching the board. The board has a nRF51822FAAG0 with the balun BAL-NRF01D3, and a Johanson 2450AT43A100 chip antenna. I'm really lost here, I have a series of reasons in mind why the Bluetooth signal it's measing:

  1. A soldering problem with the balun. I had resolder the compoment a couple of times, I'm almost sure that it's in his right position, but it's very tricky to solder.
  2. The shunt capacitor of the antenna. I have a 1.5pF capacitor there, when the recommended it's 0.8pF. I'm trying to get the 0.8pF one.
  3. The 16Mhz crystal. I have this crystal with 18pF capacitors with 5% tolerance (the crystal load capacitance is CL = 12pF). The frecuency tolerance it's ok? Really don't sure because the datasheet it's not very clear.
  4. The design of the board and the code used it's from the OpenBeacon proyect. So, it's suppose to be a working proyect.

Can you help to understand where can be the problem? What can I try next? Thank you so much.

I leave here the schematics of the board, and a Photo of the proyect. image description image description

Update: And also the scope of the VDD_PA I got. image description

OpenBeacon.PDF OpenBeacon2.PDF

UPDATE: This is the code of my advertisment function.

static void radio_send_advertisment(void)
{
	const TMapping *map;
	int My_tasks_txen;

	/* transmit beacon on all advertisment channels */
	map = &g_advertisment[g_advertisment_index];

	/* switch frequency & whitening */
	NRF_RADIO->FREQUENCY = map->frequency;
	NRF_RADIO->DATAWHITEIV = map->channel;

	/* BLE header */
	g_pkt_buffer[0] = 0x42;

	/* add MAC address */
	g_pkt_buffer[2] = (uint8_t)(g_uid>>24);
	g_pkt_buffer[3] = (uint8_t)(g_uid>>16);
	g_pkt_buffer[4] = (uint8_t)(g_uid>> 8);
	g_pkt_buffer[5] = (uint8_t)(g_uid>> 0);
	g_pkt_buffer[6] = 0;
	g_pkt_buffer[7] = 0;

	/* No BT/EDR - Tx only */
	g_pkt_buffer[8] = 2;
	g_pkt_buffer[9] = 0x01;
	g_pkt_buffer[10]= 0x04;

	/* append beacon packet */
	g_pkt_buffer[1]= BLE_PREFIX_SIZE+g_beacon_pkt_len;
	if(g_beacon_pkt_len)
		memcpy(
			&g_pkt_buffer[BLE_POSTFIX],
			g_beacon_pkt,
			g_beacon_pkt_len
		);

	/* set packet pointer */
	NRF_RADIO->PACKETPTR = (uint32_t)&g_pkt_buffer;

	NRF_RADIO->EVENTS_END = 0;

	/* start tracker TX */
	NRF_RADIO->TASKS_TXEN = 1;
	My_tasks_txen = NRF_RADIO->TASKS_TXEN;
	debug_printf("\n\rTasks_TXEN = %d\n\r", My_tasks_txen);
}

void POWER_CLOCK_IRQ_Handler(void)
{
	/* always transmit proximity packet */
	if(NRF_CLOCK->EVENTS_HFCLKSTARTED)
	{
		/* acknowledge event */
		NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;

		/* start advertising */
		radio_send_advertisment();
	}
}
Parents
  • Hi Daniel,

    Your loading caps on the 16M looks to be correct.

    Cload = 2*CL - Cpcb - Cpin = 2*12 - 4 - 2 = 18 pF
    

    The frequency tolerance is also given to 30 ppm in room temperature, but it might be out-of-spec for a wider temperature range. However; this should not give you huge problems with using the radio, it's more of a problem if/when you bluetooth certify the product.

    You can easily test if the nRF has issues starting up the 16M xtal by running this loop:

    NRF_CLOCK->TASKS_HFCLKSTART = 1;
    while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0); // add a breakpoint after this
    

    The same procedure can be done for your 32k XTAL as well. Note that all BLE examples uses an external 32kHz source by default. You can change this to using the internal RC by calling:

    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, NULL);
    

    Have you checked if your code is running? Can you set breakpoints etc.? Even though your BALUN is not properly soldered, you should get some centimeters of range. Try placing your phone close to the beacon and see if you pick up something.

    Cheers, Håkon

  • You cannot read any TASKS_X register, as this is a write-only register. Instead, you should check the NRF_RADIO->STATE register to see if the radio is running. Do you have any other boards to test on, and see if the behavior is equal?

Reply Children
No Data
Related