nRF5 action!
-
I was really keen to try the nrf52832, in lieu of the nRF52840 until it became available, because of the OTA wireless update capability. Then I dug a bit further, and on the Adafruit website (https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide/using-the-bootloader) it says "This option is not actively support nor recommended by Adafruit, and we are still working on making this as safe as possible for users via our Bluefruit LE Connect application. Use OTA DFU at your own risk knowing you can brick your device and may need a Segger J-Link or similar device to regain control of it!"
-
I have the Adafruit Feather M0 RFM69 nominally working doing Blink plus a little more. Adafruit appears to provide zero demo code for the LowPowerLab library, though it does for the RadioHead library. Therefore, I haven't yet figured out what I need to change in my code to make it talk to the Radio, but that's next.
So far I'm not at all liking the "two in one" usb connection: one for programming it and one for the serial console. The transition and sharing between them only rarely goes smoothly. Not sure if that will ever get ironed out over time or whether two physically different usb connections (as some of the other arduino boards provide) would be better.
-
OK, I've got the Adafruit Feather M0 RFM69 radio working now. To make it work with the LowPowerLab library, you need to delete the following from the RFM69.h file:
#elif defined(__arm__)//Use pin 10 or any pin you want #define RF69_IRQ_PIN 10 #define RF69_IRQ_NUM 10and replace it with:
#elif defined(ARDUINO_SAMD_FEATHER_M0) // Feather M0 w/Radio #define RF69_SPI_CS 8 #define RF69_IRQ_PIN 3 #define RF69_IRQ_NUM 3 #define LED 13That's all there is to it! :)
-
@NeverDie
all you have to do is set your defines for mysensors and this should work out of the box :)
about the usb, weird, i've no problem here. what problem do you have? here it works smoothly (with custom board, but i have also an adafruit m0 proto, worked well too) -
@NeverDie
all you have to do is set your defines for mysensors and this should work out of the box :)
about the usb, weird, i've no problem here. what problem do you have? here it works smoothly (with custom board, but i have also an adafruit m0 proto, worked well too)@scalz
Well, first, for the benefit of others who may be reading this but who aren't familiar with the two USB paradigm, this is how it looks on the Arduino Due:

There are two physically distinct USB connections, but you can have both connected to your computer at the same time. The "Native USB Port" lets you read the console output, and the "Programming port" is for uploading new sketches. It works fine. I like it.So, with that as background, on both the Adafruit Feather M0 SamD21 and the Sparkfun M0 SamD21, there is the same concept, but only one physical USB port. So, let's say I just uploaded a sketch and then want to immediately switch to the "Native USB Port" so that I can read debugging information. Well, that doesn't happen automatically (as it should really). Instead, I get an error message which reads, "Couldn't find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload.
processing.app.SerialException: Error opening serial port 'COM45'."
Then, I have to go to the Tool menu and manually select Com44 and then open the serial console. Well, by then, the debug info would have already passed by, because it doesn't reboot upon opening the serial console. So, I've added a delay countdown to give me time to do this.And, by the way, every single time I upload a new sketch, it always reports, "An error occured while uploading the sketch," even though if I look at the details, it shows that it uploaded and even verified the upload, and even--sure enough--it really did upload. So, that part is really beginning to bother me, even though maybe it shouldn't. It's true for both the Adafruit and the Sparkfun Samd21 boards.
Anyhow, it looks like the Hackaday guy did a board with two physical USBs, and maybe that's a good idea?
Or maybe it's still just one USB connection and three different connector types? Not really sure. -
Anyhow, I guess what I could do is simply write my serial debug output to a pair of Rx and Tx pins, and then I could side-step the whole mess without getting entangled in it. Not very elegant, but it would serve the purpose until I learn the ins-and-outs better.
-
You will always have the issue of USB connection, when using a native USB device, because it will re-enumerate on the USB bus whenever you reset the device.
That's also why you have to put the following code
while(Serial) {}In the setup routine of sketches with native usb devices, if you expect to catch all debug messages from the start. This behavior does not change if you have both native and a programming port.
-
By the way (and it's just an as yet an unverified first impression), but it seems like the RSSI received on the Feather RFM69 is much better than on an atmega328p RFM69 combo. If that bears out, then all by itself it might be reason to switch. Anyone else get this impression, or not?
-
You will always have the issue of USB connection, when using a native USB device, because it will re-enumerate on the USB bus whenever you reset the device.
That's also why you have to put the following code
while(Serial) {}In the setup routine of sketches with native usb devices, if you expect to catch all debug messages from the start. This behavior does not change if you have both native and a programming port.
@tbowmo said in Minimalist SAMD21 TQFP32 Pro Mini:
while(Serial) {}
Cool. I just tried it. It turns out it's actually
while(!Serial) {}but it works great. Thanks!
-
about rfm69 and better rssi, it could also be related to ground plane size of the board.
and for mcu, yep no need of the programming port. native is enough if there is the bootloader. -
@NeverDie
all you have to do is set your defines for mysensors and this should work out of the box :)
about the usb, weird, i've no problem here. what problem do you have? here it works smoothly (with custom board, but i have also an adafruit m0 proto, worked well too)@scalz said in Minimalist SAMD21 TQFP32 Pro Mini:
@NeverDie
all you have to do is set your defines for mysensors and this should work out of the box :)I just now noticed that @Sweeman already did: https://forum.mysensors.org/topic/6908/adafruit-feather-m0-rfm69hcw-with-mysensors/6
-
I hadn't noticed it before, but it looks like even Arduino will have an NRF52 board: http://www.arduino.org/products/boards/arduino-primo
Of course, that's a very good thing! Unfortunately, they don't seem to be in stock anywhere, even though they were first released in March, 2016. What's up with that?
So, I've ordered a couple of these to try out:
https://www.amazon.com/Adafruit-Feather-nRF52-Bluefruit-nRF52832/dp/B06XXSVYLC/ref=sr_1_1?ie=UTF8&qid=1498743679&sr=8-1&keywords=nrf52The good news is that NRF52 modules don't seem to require many external parts, and for self-assembly that's a real advantage.
-
Looks like a fully integrated board can be had for <$9, including e-packet delivery:
https://www.aliexpress.com/item/nRF52832-Bluetooth-4-1-BLE-Module-M4-Transparent-Transmission-SMA-512K-FLASH-64K-RAM-pass-through/32798522093.html?spm=2114.01010208.3.17.YON8eD&ws_ab_test=searchweb0_0,searchweb201602_5_10152_10065_10151_10130_10068_5210015_10136_10137_10060_10155_10062_437_10154_10056_10055_10054_10059_303_100031_10099_10103_10102_5290015_10096_5320015_10052_10053_10107_10050_10142_10051_5280015_10084_10083_5250016_10119_10080_10082_10081_10178_10110_519_10111_10112_10113_5240015_10114_5230016_10182_10078_10079_5260014_10073_10123_10120_10189_5270015_142-10120,searchweb201603_49,ppcSwitch_4&btsid=02e4720e-a974-4d92-a890-0cd0f6510022&algo_expid=87b18aca-7c4a-43a5-8995-4d45694a7044-2&algo_pvid=87b18aca-7c4a-43a5-8995-4d45694a7044 -
I hadn't noticed it before, but it looks like even Arduino will have an NRF52 board: http://www.arduino.org/products/boards/arduino-primo
Of course, that's a very good thing! Unfortunately, they don't seem to be in stock anywhere, even though they were first released in March, 2016. What's up with that?
So, I've ordered a couple of these to try out:
https://www.amazon.com/Adafruit-Feather-nRF52-Bluefruit-nRF52832/dp/B06XXSVYLC/ref=sr_1_1?ie=UTF8&qid=1498743679&sr=8-1&keywords=nrf52The good news is that NRF52 modules don't seem to require many external parts, and for self-assembly that's a real advantage.
@NeverDie I was about to pull the trigger on some of those, but I can't seem to get my mind off of the potential long distance of the 840. I wonder when the world will be blessed with those modules?
Looking forward to your experience with the Adafruit BLE boards.
-
@NeverDie I was about to pull the trigger on some of those, but I can't seem to get my mind off of the potential long distance of the 840. I wonder when the world will be blessed with those modules?
Looking forward to your experience with the Adafruit BLE boards.
-
@Terrence said in Minimalist SAMD21 TQFP32 Pro Mini:
I wonder when the world will be blessed with those modules?
I wouldn't wait for them. Will probably take at least half a year or so (according to Nordic)
-
@NeverDie I was about to pull the trigger on some of those, but I can't seem to get my mind off of the potential long distance of the 840. I wonder when the world will be blessed with those modules?
Looking forward to your experience with the Adafruit BLE boards.
@Terrence said in Minimalist SAMD21 TQFP32 Pro Mini:
@NeverDie I was about to pull the trigger on some of those, but I can't seem to get my mind off of the potential long distance of the 840.
Same here, but hopefully (?) most of what I learn with the 832 will be applicable to the 840. The 840 is clearly more desirable, and I probably wouldn't have pulled the trigger on the 832 if I didn't know the 840 was coming.
-
@Terrence said in Minimalist SAMD21 TQFP32 Pro Mini:
@NeverDie I was about to pull the trigger on some of those, but I can't seem to get my mind off of the potential long distance of the 840.
Same here, but hopefully (?) most of what I learn with the 832 will be applicable to the 840. The 840 is clearly more desirable, and I probably wouldn't have pulled the trigger on the 832 if I didn't know the 840 was coming.
-
Looks as though the 52 Thingy might be a good starting point for some people:
http://www.mouser.com/new/nordicsemiconductor/nordic-thingy-52/ -
What I'm not sure about is whether the NRF52832 will have truly adequate indoor range. Max tx power is 4db, which is better than the 0db of the NRF24L01. Will that be enough? I can only guess. That's why I ordered two of the Adafruit NRF52832 feathers: to see for myself. If they disappoint, then I may shelve them until the 840 becomes more available, and then try again using the 840. On the other hand, if the 832 turns out to be "good enough", then the 840 may not matter so much.
I do like that it apparently is programmable from within the Arduino IDE. That will make trying it out a lot easier. If the OTA uploads are easy to do, then I'll be really happy. :)