nRF5 action!
-
By the way, the nRF52840-DK is even easier to program thant the nRF52832-DK. When you attach it to your PC, it shows as an additional drive in your directory. Any hex file that you copy to that drive gets uploaded and programmed onto the nRF52840. Easy. :)
-
By the way, the nRF52840-DK is even easier to program thant the nRF52832-DK. When you attach it to your PC, it shows as an additional drive in your directory. Any hex file that you copy to that drive gets uploaded and programmed onto the nRF52840. Easy. :)
-
Luckily, it looks as though I can manually set any GPIO pin I want as the UART TX pin for debugging output from an nRF52840 by setting PSEL.TXD. That means I can probably re-use my PCB's from nRF52832 for the nRF52840 with just a few software adjustments even if I use mbed without the convenient pin mapping afforded by the mysensors code. So, this is starting to look more and more feasible. :)
-
@NeverDie How do I know which nRF52832 board I should use?
Does the CFsunbird-nRF52832 has the DC/DC inductors?
Or can I use nRF51822?Want a cheap chip, easy to solder (Have a couple of Ebyte e-73 but they take some time to solder :( and if I understand correctly, the DC / DC inductors are missing?)
-
@NeverDie How do I know which nRF52832 board I should use?
Does the CFsunbird-nRF52832 has the DC/DC inductors?
Or can I use nRF51822?Want a cheap chip, easy to solder (Have a couple of Ebyte e-73 but they take some time to solder :( and if I understand correctly, the DC / DC inductors are missing?)
@smilvert It really depends on what you want to do, but if you want a blanket recommendation, I would recommend the Fanstel modules. For one thing, they're FCC approved, and most of what you'll find on aliexpress isn't and probably wouldn't pass if it tried.
Also, the Fanstel F series has superior range compared to anything I've ever found on Aliexpress.
-
Even better, it turns out mbed solves the problem of handling multiple different interrupts, which no one here could figure out with the sandeep build. With mbed, it looks pretty simple in fact:
InterruptIn button1(P0_11);//(USER_BUTTON nRF52840 DK); InterruptIn button2(P0_12); InterruptIn button3(P0_24); InterruptIn button4(P0_25); void button1_pressed() { led1 = led2 =led3 =led4 = 1; led1 = 0; } void button1_released() { led1 = led2 =led3 =led4 = 1; //led1 = 0; } void button2_pressed() { led1 = led2 =led3 =led4 = 1; led2 = 0; } void button2_released() { led1 = led2 =led3 =led4 = 1; //led1 = 0; } void button3_pressed() { led1 = led2 =led3 =led4 = 1; led3 = 0; // wait(0.1); } void button3_released() { led1 = led2 =led3 =led4 = 1; //led1 = 0; } void button4_pressed() { led1 = led2 =led3 =led4 = 1; led4 = 0; } void button4_released() { led1 = led2 =led3 =led4 = 1; //led1 = 0; } int main() { led1 = led2 =led3 =led4 = 0; button1.fall(&button1_pressed); button1.rise(&button1_released); button2.fall(&button2_pressed); button2.rise(&button2_released); button3.fall(&button3_pressed); button3.rise(&button3_released); button4.fall(&button4_pressed); button4.rise(&button4_released); while (true) {} } -
By the way, the nRF52840-DK is even easier to program thant the nRF52832-DK. When you attach it to your PC, it shows as an additional drive in your directory. Any hex file that you copy to that drive gets uploaded and programmed onto the nRF52840. Easy. :)
@neverdie said in nRF5 action!:
By the way, the nRF52840-DK is even easier to program thant the nRF52832-DK. When you attach it to your PC, it shows as an additional drive in your directory. Any hex file that you copy to that drive gets uploaded and programmed onto the nRF52840. Easy. :)
That's exactly what I'm doing with the NRF52832-DK already. How do you program yours ?
-
@neverdie said in nRF5 action!:
By the way, the nRF52840-DK is even easier to program thant the nRF52832-DK. When you attach it to your PC, it shows as an additional drive in your directory. Any hex file that you copy to that drive gets uploaded and programmed onto the nRF52840. Easy. :)
That's exactly what I'm doing with the NRF52832-DK already. How do you program yours ?
-
@neverdie Im guessing that the BT832 dosen't have the 32.768 khz crystal but the inductors?
The datasheet says
Standby current consumption is important for battery-powered product. We suggest adding a 32.768 kHz crystal and 2 capacitors as shown in the upper left corner of the evaluation board schematics. The 32MHz main clock won’t be active at idle state to save power. Two inductors required for DCDC converter are inside BT832 module. You can enable DCDC to lower power consumption. -
@NeverDie
cool. already tried it too. and i agree with you on this, arduino is fun at the beginning, but then you discover its limits. compatible with lot of things but incomplete ;) That said, then you may end up converting some of your arduino libs/stuff to the new toolchain. On my side I like TI toolchain (free, tailored for iot with lot of nice tools, for debugging etc), not using it for nrf of course..
On other side, arduino is maybe "easier" to read for someone discovering coding. -
@NeverDie
cool. already tried it too. and i agree with you on this, arduino is fun at the beginning, but then you discover its limits. compatible with lot of things but incomplete ;) That said, then you may end up converting some of your arduino libs/stuff to the new toolchain. On my side I like TI toolchain (free, tailored for iot with lot of nice tools, for debugging etc), not using it for nrf of course..
On other side, arduino is maybe "easier" to read for someone discovering coding.@scalz said in nRF5 action!:
@NeverDie
cool. already tried it too. and i agree with you on this, arduino is fun at the beginning, but then you discover its limits. compatible with lot of things but incomplete ;) That said, then you may end up converting some of your arduino libs/stuff to the new toolchain. On my side I like TI toolchain (free, tailored for iot with lot of nice tools, for debugging etc), not using it for nrf of course..
On other side, arduino is maybe "easier" to read for someone discovering coding.Interesting! Does that mean you're using TI's' MSP430 as your primary mcu now?
-
@neverdie Im guessing that the BT832 dosen't have the 32.768 khz crystal but the inductors?
The datasheet says
Standby current consumption is important for battery-powered product. We suggest adding a 32.768 kHz crystal and 2 capacitors as shown in the upper left corner of the evaluation board schematics. The 32MHz main clock won’t be active at idle state to save power. Two inductors required for DCDC converter are inside BT832 module. You can enable DCDC to lower power consumption.@smilvert said in nRF5 action!:
@neverdie Im guessing that the BT832 dosen't have the 32.768 khz crystal but the inductors?
The datasheet says
Standby current consumption is important for battery-powered product. We suggest adding a 32.768 kHz crystal and 2 capacitors as shown in the upper left corner of the evaluation board schematics. The 32MHz main clock won’t be active at idle state to save power. Two inductors required for DCDC converter are inside BT832 module. You can enable DCDC to lower power consumption.yup
-
@scalz said in nRF5 action!:
@NeverDie
cool. already tried it too. and i agree with you on this, arduino is fun at the beginning, but then you discover its limits. compatible with lot of things but incomplete ;) That said, then you may end up converting some of your arduino libs/stuff to the new toolchain. On my side I like TI toolchain (free, tailored for iot with lot of nice tools, for debugging etc), not using it for nrf of course..
On other side, arduino is maybe "easier" to read for someone discovering coding.Interesting! Does that mean you're using TI's' MSP430 as your primary mcu now?
@neverdie said in nRF5 action!:
Interesting! Does that mean you're using TI's' MSP430 as your primary mcu now?
nope, as usual I prefer the very best ;) 430 isn't rf.
But I don't want to make OT (nrf, mysensors). just said this to say, you can usually get all power of a mcu by using the right tools like you noticed (pros&cons) -
Unfortunately, the problemm with mbed is that it provides no real support for using the nRF52 radio in proprietary modes. I would have to code all of that from scratch.
-
Good news. I hadn't bricked the dongle after all. Yesterday I wrote some rather primitive code to send packets using the Nordic proprietary code and this morning I loaded it onto the dongle using its USB connector and USB Bootloader. I'm now receiving the packets on the nRF52840-DK, so that satisfies proof of concept. i.e. it works! :)
-
Even better news! The range is quite good. Not as awesome as my LoRa modules, but at 1mbps (I haven't yet tried 2mbps) and 8db Tx power, it easily beats the range of the nRF52832 for a comparable setup. So, to be fair, the LoRa's can use quite a bit more Tx power, and the LoRa datarate is far slower, so the nRF52840's seem likely to be quite a bit more energy efficient than LoRa for a home environment.
There is a 250Kbps speed available if using the 802.11.15 mode (which I haven't yet explored), and it should have even better range than the regular Nordic proprietary modes (of which there are only two: 1mbps, and 2mbps). IIRC, 802.11.15 can automatically handle retransmits and the like, and it's a proven standard. It likely handles a lot of the drudgery.
Then there's Thread, which is new to me but which it also supports and which is intended for home automation.
It has built in hardware acceleration for SHA256, which is pretty cool. CRC is handled by hardware too. Also, lots of crypto stuff for those who are into that.
So, although these are just early results, so far I'm liking it. :) :) In contrast, I was rather disappointed in the range of the nRF52832's (even though they were better than the range of an unamplified nRF24L01).
-
Now if they could put it in a maker friendly package..
-
Now if they could put it in a maker friendly package..
@alowhum I don't think Nordic ever will, though for the $10 price the dongle comes pretty close, except for the limited castellated pinout, which is inconvenient though nicely small. I'm quite sure Adafruit and Sparkfun and maybe some others will though. I think from a purely hardware point of view it pretty much blows away the Arduinos since it includes an integrated radio and is low power and has the huge flash and memory and all the other goodies.
-
I've started a new thread for everything related to nRF52840: https://forum.mysensors.org/topic/9717/everything-nrf52840
So, going forward, I'll mostly be posting there, unless it's for earlier products like the nRF52832 or the nRF51.
-
This company has the cheapest arduino-ish board I've found.
It consists of a dev board..
https://www.aliexpress.com/item/NRF51822-2-4G-Wireless-Module-Wireless-Communication-Module-Bluetooth-module-zigbee-module-DMX512/32726191346.html...and the little module you place in it:
https://www.aliexpress.com/item/NRF51822-2-4G-Wireless-Module-Wireless-Communication-Module-Bluetooth-module-zigbee-module-DMX512/32726191346.htmlTotal cost: about 13 euros.