Continuing along the theme of one of my last projects, I built a nRF52832 into a 328p Pro Mini footprint. Made two versions: One with some edge SMA or U.Fl pads and another with a PCB trace antenna:
I wanted to start getting into using 32-bit microcontrollers (ARM Cortex varieties like nRF5x, SAMDs, STMs, etc.) for some more complex HA and other electronics projects and am trying to ease the learning curve from all my 8-bit ATMEGA experience.
Keeping the 328p pin-compatible footprint and PCB size means I can still reuse most of my other Pro Mini project boards to get going. An added bonus is the nRF52's ability to remap (almost) any pins, which will no doubt come in handy.
They’re both two layer boards and I get pretty decent range out of the PCB trace antenna - ever so slightly better RSSI than EByte’s E73-2G4M04S1B, which was surprising since I didn’t really do anything different (that I’m aware of) and their module is shielded too.
Since there’s no need for a separate nRF24 board and other associated components, like external SRAM or ATSHA, it’ll possibly save me a few $ too! Power pins next to the (remappable) I2C pins make some of the sensor modules (like SI7021) pluggable.
I also gain 16x the program memory (512K vs. 32K) and 8x the speed (64MHz vs. 8MHz) which is no small increment!
Some of the project boards I have made use of the Pro Mini 328p’s FTDI pins, so I added a few components to enable the use of an FTDI programmer with custom DFU serial bootloader.
Basically, a DTR pin toggle from the FTDI will reset the nRF52 into a state where it’ll briefly listen for a new program - similar to Adafruit’s Feather. You can also force that state for a longer period with a combination button press like Nordic and SparkFun’s development boards.
I’m unfamiliar with SWD/JTAG programming/debugging and all things GDB/OCD, so I built myself a black magic probe out of a STM32 blue pill and am going to have a play with all of that, along with VS Code and PlatformIO and probably one or two others.
MySensors nRF52 support worked out of the box (!) - so a huge thanks to all the hard work of the folks round here for getting that up and running. If there’s anything I can help with there, please let me know and if I’m able, I’ll try to take a stab at it (OTA maybe?). Like I said, I’ve got quite a steep learning curve here though.
On the low power end, I added the DCDC components Nordic recommend too and managed to get the MySensors smartSleep() current down to around 0.7uA - as per the datasheet, I think. However, I found that with a couple more code tweaks and grounding the SWDCLK, I would get into the nA region. This seems a bit out of spec to me and perhaps it’s just a measuring error, but it was repeatable and the board still happily sending data/heartbeat again each time it woke up. (It’s fluctuating around 1.6nA below - no sensors connected though, but it’s a start…)
One other project in the back of my mind is using this board as the basis for a quadcopter, but that’ll probably have to wait until the summer holidays…!