About the nRF5x category

(custom made and market available nRF boards including nRF51, nRF52 and nRF53 chips, software includes old Nordic SDK as well as recent Zephyr environment)

This category is for :

  • new idea of a project based on nRF5x chip
  • support related to existing sample code
  • Want to share a new protocol performance analysis

Although this category is not restricted to a set of projects, Home Smart Mesh community can provide a more reliable support for topics related to the projects documented in the Home Smart Mesh nRF projects
https://www.homesmartmesh.com/docs/microcontrollers/nrf52/

how does the nrf dongle interface with a computer through the usb port? it is just AT commands? do u need a special driver? I’m thinking about building a ble usb-hid device, maybe a freedeck, or a custom usb controller for photo/video editing, or augmented 3d modeling using bluetooth. maybe i can build a cheaper dongle interfacing an nrf chip with an atmega32u4. which make it possible to build ur own custom wireless mouse, keyboard, or any kind of wireless usb controllers.

the nRF52840 dongle has native USB support, which means USB is a peripheral among others. On top of the USB Phy, you need a driver that defines a USB profile matching your operating systems expectation, e.g. windows, linux, most are cross os.

You can use USB under different environments, here a getting started with micro python page, micro Python | Home Smart Mesh
once micropython is on your target up and running, using micro python ready examples for USB HID like mouse or other is very easy.
USB HID Keyboard mode example a password dongle

This is an example using the native usb with Zephyr, I use it as a simple mesh sniffer

Note that, USB is independent from Bluetooth, if you use BT on your uC, then you don’t need USB at all. I don’t think it’s worth it to use nRF to develop your own USB to BT, for that very cheap dongles exsit and they’re even based on nRF, as example I bought many of this very cheap dongle, but this one is using an external USB to UART converter, I opened it and re-flashed it with custom fw

have u try these. they are $8.70. i’m very tempted. that’s even cheaper than if i get the module itself.

i think will make the move. by the time the rnf52 get here, i may hav some thing setup for the nrf51 already. The price is pretty good at this point. I can get the usb stick for $7.70. and this ebyte E73 is only $5.95

Not sure about you, but for me when I check in € the aliexpress is 0.15€ more expensive than the official dev kit dongle from Nordic and I every time get a free delivery.
This dongle is already supported in all Zephyr samples and schematics are available, I also developed a pogo pin adapter to flash it without boot loader, you have to think about all that, the software is more important than the HW without it your HW is as good as a stone.

oh, i hav been missing out then. i hav always look on ali and the same thing would cost $16-$20 instead of just $10 from the link u showed me. That’s price is good for me so i will certainly considering it. i though Zephyr support is at the chip level n not the hardware design. it can’t be flash from the usb port? is the usb port only use for serial communication?

if I can get it to work, i may design and build an adapter board for this one. right now i’m less concern with the power consumption of the chip but more of quick prototyping.

  1. Zephyr needs a board .dts file that declares pins usage, same as arduino or any other framework that has a board concept, unless you use wrong or generic and start hard coding board specific in your app, that makes your app compatible only with one board. With Zephyr, any app can run on all boards without modification.
  2. Both come with bootloader preflashed that allows update from usb. But that is not practical for development as it’s slow and you cannot debug, it also needs a different config not to overwrite the bootloader.
    If you have the schematics, check if it has swd, maybe you would want a different bootloader, then you need swd flashing too.

i see. like OTA im guessing. the way it works on the esp chip is that the flash splits in half or something like that. so when the new software is loaded, it loads it in the free half while the other half is running the application. Therefore there is a lot less memory to work with.

The reason why i can’t use json parsing on the esp8266 is that if i import the ArduinoJson6 library, the space it takes would exceed 50% of the flash usage and thus OTA is disabled. This was very challenging so right now i have to work with bytes of data.

True, like OTA you have a flashed bootloader that manages the flash through any medium in this case native USB instead of RF. OTA has in addition the restriction to impose a double app buffer to avoid the case of loosing the connection or power and ending up with a useless device, but in principle you could take the risk and use OTA with a single partition (which I do not recommend).
Unlike the ESP32 which bootloader is in the ROM, the bootloader from Nordic comes preflashed when delivered then you can get rid of it and replace it if needed, which adds flexibility but also risk as once removed you can only flash with SWD.

have u use the nRF52811? is it any good?

I did not use it but it’ the same generation as the nRF52840 just with +4dBm, supports Thread but with tiny memory so not Full Thread Device just Minimal Thread Device.
Let me know if you can have any significant cost saving with it, for the sensorTag budget, the difference was insignificant.

it costs as much as the nRF51 as far as I can see. I just want to use it to make remote controllers. I rather use this one or even the nRF52810 instead of the nrf51 bc the price is the same. it comes with BT5.1, probably has better range and lower power consumption. did u ever play with ANT?

As an alternative to nRF51, yes definitely. Just keep in mind the rom and ram needs of your application, that’s very important. Usually such SoC decision is made once the firmware is ready. Or start with one dev prototype with bigger mem, then optimize cost with a smaller one.