From nRF52 DK to 3rd party module in custom PCB

Hi,

First of all, I'm new in the field of BLE development. I have a custom PCB and some sensors. I want to send the data from these sensors to an app via BLE. These sensors use I2C and SPI protocols and digital and analog inputs.

I got myself an nRF52 DK and try a few things. The next step is using a 3rd party BLE module in my custom PCB.

I guess I have 2 options:

Working with my Atmega328p and a module with an nRF52832 or an nRF51822 as I could work with some Arduino libraries for creating a GATT profile with services and characteristics.

Use only the 3rd module and its digital inputs as the microcontroller and program it with Segger, Keil or similar. I believe this option would be more difficult for me at this stage (libraries, code, etc)

My doubts:

How to connect the BLE module to my microcontroller. 

Do I have to program the module separately with the nRF52 DK? How can I do it?

I would like to have something similar to the nRF8001 Bluefruit LE module from adafruit. (https://learn.adafruit.com/getting-started-with-the-nrf8001-bluefruit-le-breakout)

Kind Regards,

Pablo

  • Hi Pablo,

    Is there a particular reason you want a two chip solution? That will typically complicate things, and you will need to do integration yourself. If a single MCU is enough for your project, then I would suggest using only a module with a nRF.

    How to connect the BLE module to my microcontroller. 

    If you want to do this, then you would have to use a serial interface of some sort (typically UART or SPI). If you use the nRF5 SDK you can use SoftDevice serialization. If you use the nRF Connect SDK and has a host MCU that implements the Bluetooth host, you can use HCI over UART or SPI. In both cases this will typically complicate things a bit and require more work so I would try to avoid a two chip solution if possible (at least if the idea is that it would make things simpler, which it will normally not).

    Do I have to program the module separately with the nRF52 DK? How can I do it?

    Yes, modules typically ship with an empty flash. You can use the debug out port on the DK to program external ICs, such as the module.

    I would like to have something similar to the nRF8001 Bluefruit LE module from adafruit. (https://learn.adafruit.com/getting-started-with-the-nrf8001-bluefruit-le-breakout)

    This use the nRF8001 which is quite old and can only be used as a connectivity device for a host MCU. If you want something more modern I suggest looking at a nRF52 variant. Also, as stated, I suggest you consider if a two chip solution is really what you need. You can find a list of modules here.

  • Hi Einar,

    Let's say I go for a one-chip solution, as it seems less complicated than I thought. I can use a module with the nRF58323 as it's pretty common. 

    As it's the same SOC as my nRF52 DK I would just have to follow its schematic.

    In my PCB I should have a header with the same pins as p19 or p20? for programming my module with the nRF528323 and the digital outputs that I need.

    I'm sure I will need some help with this so I'll be back here if so.

    Thank you I'll take a look.

    Regards,

    Pablo

  • Hi Pablo,

    pgonzaleztrucorp said:
    As it's the same SOC as my nRF52 DK I would just have to follow its schematic.

    Yes, you can use the nRF52 DK as a reference. There are also reference schematics in the product specification.

    pgonzaleztrucorp said:
    In my PCB I should have a header with the same pins as p19 or p20? for programming my module with the nRF528323 and the digital outputs that I need.

    P19 and P20 is the debug out port. You would need something similar to the debug in port (P18). It does not have to be this full connector though, the only thing you really need to program is GND, SWDIO, SWDCLK and preferably VDD, though that is not strictly needed.

    pgonzaleztrucorp said:
    I'm sure I will need some help with this so I'll be back here if so.

    No problem, just ask. But please open new cases for new questions so that it can be handled by the most appropriate application engineer for that specific question.

    Einar

  • Thank you, Einar,

    P19 and P20 is the debug out port. You would need something similar to the debug in port (P18)

    But in the User Guide of the nRF52 DK it says (chapter 6.9): " The Debug in connector (P18) makes it possible to connect external debuggers for debugging...". Doesn't it mean that this port is for programming the SOC of the Dev kit with another debugger?

    Also, it says in chapter 6.10 that port p20 and p19 are for debugging "nRF51 and nRF52 devices mounted on external boards", and that's what I want, to debug a 3rd party BLE module in my PCB.

    So I'm confused about using port P18 instead of P19 or P20. (As I said I'm new in this field).

    Yes, you can use the nRF52 DK as a reference. There are also reference schematics in the product specification.

    I guess this would depend on the module I choose, they will be similar to these designs, right?

  • Hi,

    pgonzaleztrucorp said:
    Doesn't it mean that this port is for programming the SOC of the Dev kit with another debugger?

    Yes, that is the case. I see now that I misread your question. I though the point was to duplicate this on your board, and in that case, P18 is what you want to duplicate (though as stated you really only need 3/4 specific pins).

    pgonzaleztrucorp said:
    Also, it says in chapter 6.10 that port p20 and p19 are for debugging "nRF51 and nRF52 devices mounted on external boards", and that's what I want, to debug a 3rd party BLE module in my PCB.

    Yes, these are headers you use on the DK and connect to the custom/external board to debug/program it. Note that these do the same thing, so you do not need both.

    pgonzaleztrucorp said:
    I guess this would depend on the module I choose, they will be similar to these designs, right?

    When you use a module typically everything you need around the nRF is there, so in this case you do not need to think about the reference designs (including the DK). This is all taken care of.

Related