News for hackers. Stuff that matters.
Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by kpc on Monday June 26, 2023 @02:11AM (#36476287)
I have about 20 nRF52840 boards deployed around my house for various automations.

Personally I've found that for casual experimenting and software development, the official nRF52840 DK board is your best bet. Here in the US it only costs around $50, and all of the samples in the nRF Connect SDK support it natively. It's also pre-wired for power measurement.

My first board was the nRF52840 MDK from makerdiary. I ordered it from Amazon because it was cheap and it had one-day delivery. Most of the NCS samples do not support the makerdiary boards as-is. You can usually add a dts .overlay file to the sample to get it working, but it will take a bit of extra effort. Having to tweak device trees right off the bat adds another step to the learning curve and makes it harder to try out random sample apps.

Over time I migrated to using the DK for development (the integrated debugger + serial interfaces are super handy) and then using the USD $10 nRF52840 Dongle boards for deployment. I program the dongle boards using a knockoff J-Link probe from Aliexpress and run them off battery power. I eventually stopped using the makerdiary MDK since it didn't really fill a niche for me. But YMMV.

One nice thing about the board in this article is that it has an external SPI flash, which could be useful if the nRF52840's 1MB onchip flash isn't large enough for your application. I use A/B partitions to support OTA updates and it's pretty easy to run over 512kB per image if your use case is moderately complex.

Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by makerdiary on Monday June 26, 2023 @02:39AM (#36476467)
Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by kpc on Monday June 26, 2023 @03:07PM (#36484337)
Hi, nice to see the vendor participating in the HN discussion (and hopefully gathering feedback from users) :-)

One of the main factors driving me back to the DK board was the fact that many NCS samples take advantage of the 4 switches + 4 LEDs on the DK board. Even the light_switch sample uses all 4 buttons to trigger different functionality.

The smaller boards don't have room for these switches and LEDs, so you'd have to tweak the program to work around the hardware differences. And that's a big investment if you just wanted to play around with the stock sample code for a few minutes.

A more general critique of the NCS samples is that many of them require a great deal of "polishing" before you can use them in a real project. It would actually be helpful if NCS shipped ready-made overlays that allowed them to run on smaller boards like the MDK and Dongle, in a configuration that's closer to what a shippable product would look like. As it stands, a company that wants to ship a Zigbee bulb or switch has to do a lot of work to convert the samples into something usable.

Maybe this is worth filing some PRs on the sdk-nrf github.

Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by ChuckNorris89 on Monday June 26, 2023 @03:22AM (#36476717)
>I have about 20 nRF52840 boards deployed around my house for various automations.

Is there an advantage of using the NRF boards over ESP ones for home automation?

Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by grawp on Monday June 26, 2023 @03:30AM (#36476775)
Non-obscure architecture, one of the most used Core in the world (Cortex M4), true Floating point coprocessor, non-chinese firmware for BLE, if are not afraid of doing full certification it can also be non-proprietary Wonderfull documentation. Ready made modules can be obtained at the same price as ESP32. You support EU chipmaker.
Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by grawp on Monday June 26, 2023 @03:31AM (#36476783)
Also absolutely wonderful documentation directly from Nordic Semi (for the peripheries) and from ARM (for the basic core).
Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by vardump on Monday June 26, 2023 @04:23AM (#36477132)
Power consumption might be one major advantage.
Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by tomn on Monday June 26, 2023 @08:30AM (#36478866)
this is the big one for battery-powered applications

NRF52840 is specified to use 1.5uA when deep sleeping with RTC wake-up, while esp32-c3 is 5uA, which sounds ok, but is not the whole story.

If you try to build something low-power with ESP32 you'll find that it takes a lot of time and energy to go from deep sleep to being able to transmit, while the NRF SDK is designed with that in mind.

The NRF current consumption also includes the built-in voltage regulators -- this works from 1.7v to 5.5v, with a regulated output for peripherals, so all it needs is a battery and some passives.

On the other hand the ESP32 is much more awkward -- it needs 3-3.6v, so you're going to need an external regulator, and a LDO with the required 500mA output current is going to have a significant quiescent current, and even then the voltages are awkward for lithium batteries once you consider the drop-out voltage.

The tl;dr is that it's easy to get multiple years out of a coin cell with an NRF-based sensor, and that's just not happening with any ESP32.

Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by 5d41402abc4b on Monday June 26, 2023 @05:17AM (#36477493)
I have an old wemos ESP32 board that for some reason, the CP2102 IC heats up if connected to a USB charger, but works fine when connected to a PC. Probably some design flaw? Also that specific board is no longer available so if you 3D print an enclosure or make your PCB around it, it becomes useless. Compare that with boards from nRF or ST or Pico which will be available for a minimum of 10 years. Pico W is the same price as a ESP32 board.
Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by drekipus on Monday June 26, 2023 @06:26AM (#36477898)
PC is regulated to provide 500mA,

Cheap Chargers are hard wired to deliver up to 2A.

As long as CP2102 can handle it, it's fine, but you can get a 500mA charger.

Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by DannyBee on Monday June 26, 2023 @08:05AM (#36478625)
power consumption, ecosystem.

The non-RISCV ESP's are a very wonky architecture, and while there is lots of ESP code out there, finding stuff that just works is harder than one may think. Meanwhile, pretty much all NRF52840 stuff you will run into just works, and works reliably.

The toolchains and underlying pieces are also basically only supported by EspressIf (yes some work is upstream, but unlike ARM Cortex, you won't find a lot of help from others on Xtensa).

Real debugging of NRF52840 stuff is also easier to do because of this - lots and lots of debug tools work.

You will also get much better documentation out of Nordic.

Now, this is mostly about Xtensa, and almost certainly one of the reasons that they are moving the ESP's toward RISC-V.

I don't have enough experience with the newer RISC-V ones to give you a view there.

Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by haberlerm on Monday June 26, 2023 @08:54AM (#36479098)
debugging actually works.

I thought the ESP3-S3 with USB integrated serial+soft JTAG adapter would be a big step forward

well turns out the situation with openocd/gdb/flaky USB stack/resetting issues after upload is IMO untenable

if you have a lot of time on your hands, every now and then debugging might work

Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by DannyBee on Monday June 26, 2023 @10:36AM (#36480161)
Yes, this is the joy of xtensa.
Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by sitzkrieg on Monday June 26, 2023 @01:04PM (#36482545)
the docs and toolchains alone are worth it. i have a few of. their cell devkits and its a nice change
Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by kpc on Monday June 26, 2023 @02:57PM (#36484183)
For my use case, Zigbee was vastly preferable to WiFi (or BLE). IP stacks are complex, buggy, and require a lot of configuration -- even moreso if you add encryption into the mix. Zigbee was the simplest tool for the job.

Some of the newer ESP32 boards do support Zigbee but I don't think they were available yet when I started my project. Might be worth looking into ESP32-C6 now.

As others have mentioned, power consumption is also a consideration. My battery powered devices consume about 25uA and should theoretically last 5+ years on two lithium AAA cells.

Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by zh3 on Monday June 26, 2023 @07:52AM (#36478519)
The Adafruit nrf52940 feather is a great companion to the DK, since it has the 10 pin header on it for SWD programming. When the cable is connected, the DK switches to programming the offboard (Adafruit) nrf52840 so it's pretty much transparent. So easy to develop on the DK and deploy on the Adafruit.
Re:NRF52840 Connect Kit – Rapid prototyping kit for your nex... by moffkalast on Monday June 26, 2023 @10:50AM (#36480334)
> it only costs around $50

"only"

One could buy at least like a dozen ESP32 boards for that price and probably get better support as well.