nRF5 action!


  • Hardware Contributor

    @rmtucker

    Even if you're not using the regulator and the CP2102 usb-serial converter there are some leakage currents which are caused by the output stages of those IC's. For example the output stage of the voltage regulator can draw some even if it's not powered. The CP2102 can draw also through the TXD1/RXD1/SUSPEND1 LEDs and the associated GPIO pins P0.11, P0.09, etc.

    So to prove and test that the above it's true you need to:

    1. Desolder the RT9193-33 or at least its output pin(Vout pin 5)
    2. Desolder R6, R7, R10

    This is what I can conclude by looking at that schematic. Any other opinions?


  • Hero Member

    @mtiutiu said in nRF5 Bluetooth action!:

    Any other opinions?

    Yes. If it really matters that much, RMTucker should buy or make a uCurrent Gold. Otherwise, he'll find hmself chasing phantoms. I have a Fluke 87V, and I don't trust it to do these types of measurements (I've tried, and the results are just wrong when compared to a uCurrent Gold). I would trust a crappy multimeter even less. Been there and tried that already.

    Just my two cents.


  • Hero Member

    BTW, uCurrent Gold is open source. I have an original, but you can buy clones. For instance, LowPowerLab sells a clone. You might get it faster than ordering from Australia.... unless you live in Australia. Dave Jones did a video for me once, and so I thought he deserved the profit instead of somebody else. 🙂


  • Hardware Contributor

    @NeverDie said in nRF5 Bluetooth action!:

    @mtiutiu said in nRF5 Bluetooth action!:

    Any other opinions?

    Yes. If it really matters that much, RMTucker should buy or make a uCurrent Gold. Otherwise, he'll find hmself chasing phantoms. I have a Fluke 87V, and I don't trust it to do these types of measurements (I've tried, and the results are just wrong when compared to a uCurrent Gold). I would trust a crappy multimeter even less. Been there and tried that already.

    Just my two cents.

    It just depends on the burden voltage, no ? It's proportional to current in the circuit so in sleep mode when measuring around 10 uA it should be negligible.
    Anyway I measure when powered with 3.3V so I'm sure what I measure is higher than what I will get in reality when circuit is powered with a 3V battery.


  • Hardware Contributor

    For measuring small currents I'm using Texas Instruments EnergyTrace piece of technology and it works pretty well. You just need one of their development boards with energytrace special microcontroller embedded which is very cheap. More infos here: http://43oh.com/2015/09/how-to-measure-an-energia-applications-power-usage-with-energytrace/

    It can be used to measure other boards power usage also - you just need to take of some jumpers and plug in your external board.

    It gives you real time energy measurements and with plotting too(and battery life estimation is displayed real time too). No need to worry about burden voltage and other external factors which affect the measurements.


  • Hero Member

    @mtiutiu
    I think maybe the nRF52 DK also has some energy measurement capability, but I haven't looked into it.




  • Hero Member

    Looks like I was wrong earlier about the voltage reference being Vcc when doing an analog read on a pin. Instead, it seems to be a fixed reference. In any case, I'm getting better results with an expression like this, which is independent of Vcc:

    millivolts = (analogRead(PIN)*3000/4095)

    What are others here doing in this case?



  • @NeverDie
    As mentioned earlier by someone the nrf52 is preset to 0.6v internal ref and a 1/5 divider so 0 - 3v is the max input so your calculation is correct.
    The nrf51 is different because the ref can be set to a few different settings but the default is vdd.



  • Is RSSI reporting implemented in the NRF5 setup yet?
    If so how is it done?


  • Hardware Contributor

    I don't think sendSignalStrength function is implemented yet, but you should be able to get this info with:

    int16_t transportGetSendingRSSI(void)
    int16_t transportGetReceivingRSSI(void)
    


  • How can I redefine UART pins in nrf51822? For example, if I want to have p13 as uart tx?


  • Hardware Contributor

    @Toyman
    it has been explained above in the topic 😉
    you have to follow



  • @scalz
    Rssi works really well.
    Thank you.



  • So range test.
    Using esp8266 with standard nrf24 not amplified gateway at one end of the house.
    Nrf51822 node in garage which is not fastened to house so at a guess 15m through 3 brick walls is reporting -86db.
    I think that is quite respectable.;-)



  • @scalz thx.



  • Regarding the PCB/KiCad comments.
    I was trying out KiCad and copied the NRF52832 DC/DC schematic from the datasheet.

    It might be of help for someone.
    https://github.com/Omemanti/KiCAD/tree/master/NRF52832

    PS. been at KiCad for a couple of hours, been used to Eagle, so please double check.


  • Hero Member

    @rmtucker said in nRF5 Bluetooth action!:

    @NeverDie
    As mentioned earlier by someone the nrf52 is preset to 0.6v internal ref and a 1/5 divider so 0 - 3v is the max input so your calculation is correct.
    The nrf51 is different because the ref can be set to a few different settings but the default is vdd.

    I've lately found that I seem to get a more accurate measurement if I multiply by 3131 instead of 3000. Just an empirical result with no real theory behind it.


  • Mod

    I don't know if it is actually related, but I'll post the link to this programmer 🙂
    adafruit.com/product/3571


  • Hero Member

    What's going to be the best way to reduce the sleep current and Tx current on the nRF52? Since I'm feeding off a supercap for power, it's noticeably worse (by an order of magnitude) on the same task than the atmega328p+rfm69 combo. I've already increased the datarate to 2mbps, and it's inherently lower Tx current should give it a natural advantage.

    I guess I'll try reducing Tx power and see if that makes much of a dent....

    I suppose reducing 3 separate packets to one single packet, and maybe turning off ACK requests might also help. Then, maybe all of the LONG_WAIT's can be eliminated. Is the radio still awake even if the CPU is sleeping during a "wait" period? If so, that might be a large chunk of the wasted power.

    I wonder if the mysensors mesh networking (which I don't intend to use) might be getting in the way, and possibly keeping it awake longer than it otherwise would be? Can I disable the mysensors meshnetworking just to be sure?

    Sorry for the shotgun blast of questions, but I'm trying to get a sense of what will yield the highest payoff.


  • Hero Member

    Since I'll be reducing Tx power in an attempt to reduce current consumption, I'll be using a scanner program to try to find empty channels. The only one I know of is: https://github.com/nRF24/RF24/tree/master/examples/scanner
    for the nRF24L01, but it seems to work well enough if you let it run awhile. Anyone else using one that they like?


  • Hero Member

    @NeverDie said in nRF5 Bluetooth action!:

    Since I'll be reducing Tx power in an attempt to reduce current consumption, I'll be using a scanner program to try to find empty channels. The only one I know of is: https://github.com/nRF24/RF24/tree/master/examples/scanner
    for the nRF24L01, but it seems to work well enough if you let it run awhile. Anyone else using one that they like?

    Nevermind. I see now that there's an entire entry on it:
    https://forum.mysensors.org/topic/2454/node-cant-see-gateway-less-than-10m-away/11


  • Hardware Contributor

    @gohan said in nRF5 Bluetooth action!:

    I don't know if it is actually related, but I'll post the link to this programmer 🙂
    adafruit.com/product/3571

    Not sure it's even legal to use this if you ever plan to sell PCBs on openhardware.io ...

    You may use the J-Link EDU for non profit educational purposes only! Non-profit educational purposes means that you >may not use the J-Link EDU and its J-Link software.

    • direct or indirect in or for a profit organization or business purposes or other undertaking intended for profit
    • direct or indirect in any other commercial environment (e.g. office)
    • to develop, debug, program or manufacturer a commercial product (or parts thereof)
    • to use it to either earn money or reasonably anticipate the receipt of monetary gain from it.

  • Mod

    @Nca78 Educational versions of many things can not be used for commercial purposes, maybe they got an agreement as it will be sold primarily to hobbyists.


  • Hero Member

    In my testing, NRF5_PA_LOW did offer some modest reduction in overall current consumption, but it's no silver bullet.

    The range with NRF5_PA_MIN is just a few feet, so I don't consider it practical for the vast majority of use cases.

    So, further reductions in current consumption will have to come from somewhere (?) else.

    I suppose the next step is to turn-off auto ACK's and any listening for ACK's by the mote. Hopefully (?) there's a switch in myconfig which does that.


  • Contest Winner

    I have checked the current with my nRF52 board with integrated shunt. I have measured 6.5µA while sleeping until timeout or sleeping until interrupt. It doesn't matter if RX/TX are connected but after flashing the firmware a reset by removing the voltage is required.

    There was an bug, with any type of sleep(0) which is fixed by this PR https://github.com/mysensors/MySensors/pull/909


  • Hero Member

    Unless I'm doing it unwittingly, I'm not doing any sleep(0)'s at present.


  • Hero Member

    I'm finding that having a very simple adapter board, such as that in the photo here, is quite convenient both for programming and for powering the nRF52832, and for wiring-up prototypes. I made my breakout board for breadboards, but those connections are always just too flakey. Maybe I need to use better breadboards? Anyhow, this meets the requirement for reliable, solid connections.
    0_1502636407342_nRF52_adapter.jpg


  • Hero Member

    I removed this useless block of code from the main loop, which, with its long waits, may have been what was draining the power:

    	Serial.println("");
    	Serial.println("");
    	Serial.println("");
    	Serial.println("#########################");
    	randNumber=random(0,101);
    
    	Serial.print("RandomNumber:");
    	Serial.println(randNumber);
    	// Send fake battery level
    	Serial.println("Send Battery Level");
    	sendBatteryLevel(randNumber);
    	wait(LONG_WAIT);
    
    	// Request time
    	Serial.println("Request Time");
    	requestTime();
    	wait(LONG_WAIT);
    


  • @NeverDie
    When you are comparing the atmega 328 and the nrf52 what sketch are you using to come to your conclusions?.


  • Hero Member

    @rmtucker said in nRF5 Bluetooth action!:

    @NeverDie
    When you are comparing the atmega 328 and the nrf52 what sketch are you using to come to your conclusions?.

    A solar mote which reports the voltage on the supercap and the unloaded voltage on the solar panel.

    The goal is to get the mote to be a solar powered remote, where it will wake up and listen for a packet once every 100ms and then go back to sleep if it doesn't receive one inside a very narrow window of time. That window can be a lot narrower on the nRF52302, because it supports 2Mbps, whereas the RFM69 can support at most 300kbps. I got the atmega328p+rfm69 to do that (although it required a larger than 10F supercap to get through the night), and it worked. At the present moment, though, I don't think the nrf52 can do it, unless I were to use an even bigger supercap and more than one mini solar panel. The potential to do it is there though. I just need to drive it better.

    I think a high priority is to get the DCDC working on the nRF52.
    That should cut the higher currents (such as during Tx and Rx) by about half, as discussed earlier in this thread.

    BTW, removing the above block of code did help appreciably.


  • Contest Winner

    @NeverDie said in nRF5 Bluetooth action!:

    I think a high priority is to get the DCDC working on the nRF52.

    You can try to do this:
    #include <nrf.h>

    ...in before()

    NRF_POWER->DCDCEN = 1;


  • Hero Member

    I haven't yet touched DCDC, but having stripped the example code down a bit, my 10F capacitor is now losing only about 18mv per hour, which is much better than when I began. Some of that is even self-discharge. Whew! Another bullet dodged. Of course, it needs to go lower still, but at least this is meaningful progress for minimal effort.


  • Hero Member

    Removing ACK's is the next easy step, and I found the entry in myconfig.h that will do it:

    /**
     * @def MY_PASSIVE_NODE
     * @brief If enabled, the node operates fully autonomously, i.e. messages are sent without ACKing.
     *
     * @note All transport-related checks and safety-mechanisms are disabled.
     * @note Requires that @ref MY_NODE_ID is set, @ref MY_PARENT_NODE_ID and
     *       @ref MY_PARENT_NODE_IS_STATIC are optional.
     * @note Singing, registration, and OTA FW update are disabled.
     */
    //#define MY_PASSIVE_NODE
    

  • Hardware Contributor

    @NeverDie
    in case.. it's better to make the config changes inside your sketch instead of the MyConfig file, especially if you want to use MySensors for others nodes (else each time you'll have to struggle with MyConfig)


  • Hero Member

    @NeverDie said in nRF5 Bluetooth action!:

    #define MY_PASSIVE_NODE

    Not sure, but I may have run into a bug. I've defined MY_PASSIVE_NODE, and in the main loop I send two different packets once every 5 minutes. The first one never arrives. The second one always arrives. Prior to defining MY_PASSIVE_NODE, both would always arrive. This is on an nRF52832.


  • Hero Member

    @NeverDie said in nRF5 Bluetooth action!:

    @NeverDie said in nRF5 Bluetooth action!:

    #define MY_PASSIVE_NODE

    Not sure, but I may have run into a bug. I've defined MY_PASSIVE_NODE, and in the main loop I send two different packets once every 5 minutes. The first one never arrives. The second one always arrives. Prior to defining MY_PASSIVE_NODE, both would always arrive. This is on an nRF52832.

    Of course, within a minute of posting the above, the first one suddenly decided to arrive. Maybe it's not a bug after all.


  • Hero Member

    On the other hand, it really does seem to receive the second packet (solar panel voltage) far more often than the first (supercap voltage):

    2017-08-14 12:17:45.613 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 12:22:45.866 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 12:22:45.887 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 12:27:46.121 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 12:27:46.152 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 12:32:46.399 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 12:32:46.431 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 12:37:46.661 (nRF52 DK Gateway) General/Barometer (SuperCap Voltage)
    2017-08-14 12:37:46.708 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 12:42:46.928 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 12:42:46.975 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 12:47:47.207 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 12:47:47.254 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 12:52:47.474 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 12:52:47.493 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 12:57:47.736 (nRF52 DK Gateway) General/Barometer (SuperCap Voltage)
    2017-08-14 12:57:47.767 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:02:48.006 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:02:48.051 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:07:48.279 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:07:48.310 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:12:48.556 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:12:48.587 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:17:48.843 (nRF52 DK Gateway) General/Barometer (SuperCap Voltage)
    2017-08-14 13:17:48.882 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:22:49.085 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:22:49.116 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:27:49.371 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:27:49.402 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:32:49.624 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:32:49.655 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:37:49.896 (nRF52 DK Gateway) General/Barometer (SuperCap Voltage)
    2017-08-14 13:37:49.942 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:42:50.169 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:42:50.215 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:47:50.450 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)
    2017-08-14 13:47:50.481 (nRF52 DK Gateway) General/Barometer (Solar Panel Voltage)

    Also, I hadn't realized until now that it was sending them multiple times. I had wanted each packet to be sent only once.


  • Hero Member

    It looks as though it's a bug in Domoticz. If I open up the serial monitor to the gateway, I can see that it is receiving both packets. However, Domoticz isn't displaying them or even logging them. However, if I don't turn on MY_PASSIVE_NODE, then it does correctly display them. So, Bye-bye Domoticz. I hopee the other controllers don't have the same problem.


  • Hero Member

    Maybe nobody uses MY_PASSIVE_NODE? I just did a search of the forum, and nobody but me ever mentions it.


  • Hardware Contributor

    @NeverDie I don't think many people know about it, I didn't know this define existed. But sounds like a good mode for things like temperature sensors with tiny batteries, so thank you for pointing it out.



  • At the moment i am range testing.
    I have the nrf51822 sending v_status true then false every second.
    The esp8266 gateway recieves it and sends it back to the nrf8122 which turns an led on and off accordingly.
    I have the nrf8122 running from a usb powerbank so i can walk around my house.
    There are a few deadspots around the house with the unamplified nrf24l01 on the gateway.
    I tried my nrf24l01 pa lna sma but it seemed to be only working every now and again so waiting on a new one being delivered.


  • Hero Member

    @rmtucker said in nRF5 Bluetooth action!:

    I tried my nrf24l01 pa lna sma but it seemed to be only working every now and again so waiting on a new one being delivered.

    According to hackaday, there's a certain very common model which doesn't perform well unless you wrap it first in saran wrap (as an electrical insulator) and then in aluminum foil (except for the antenna, obviously).


  • Hero Member

    @Nca78 said in nRF5 Bluetooth action!:

    sounds like a good mode for things like temperature sensors with tiny batteries

    Exactly. If you're updating every 5 minutes (which is typical) or less, then it doesn't matter too much if you occasionally lose a packet, because there will be another one coming along in just a few minutes. So, if you can greatly increase your battery life as recompense, most people would

    I'm shocked it's not more prevalent here on the mysensors forum.


  • Mod

    @NeverDie I guess people are happy with 10 years of battery life. I am, so I haven't seen a need for increasing it further.


  • Hero Member

    @mfalkvidd said in nRF5 Bluetooth action!:

    @NeverDie I guess people are happy with 10 years of battery life. I am, so I haven't seen a need for increasing it further.

    Fair enough. How about smaller then? The battery may be the single biggest component. You could trade-off longer battery life for a smaller size.mote i.e. If it's a more energy efficient mote, it can use a smaller battery (or a smaller solar panel and a smaller supercap).



  • @d00616 said in nRF5 Bluetooth action!:

    I have checked the current with my nRF52 board with integrated shunt. I have measured 6.5µA while sleeping until timeout or sleeping until interrupt. It doesn't matter if RX/TX are connected but after flashing the firmware a reset by removing the voltage is required.

    Does the onboard regulator on this board not draw any current when not being used?
    ie when feeding the board with 3.3v and bypassing the regulator?


  • Hero Member

    I should be receiving my nRF51 modules a few days from now. Since they lack a 32K oscillator on the module, which "board" should I program it as?

    https://www.aliexpress.com/store/product/NRF51822-04-BLE4-0-Wireless-Bluetooth-Module-TTL-Low-Power-Consumption-3-3V-New/2174074_32821044213.html?spm=2114.12010612.0.0.5bdadf47Dp5sL1


  • Contest Winner

    @NeverDie said in nRF5 Bluetooth action!:

    I should be receiving my nRF51 modules a few days from now. Since they lack a 32K oscillator on the module, which "board" should I program it as?

    With the Generic nRF51822 or the MySensors nRF5 boards, you can switch the oscillator via the tools menu. You have to choose the RC oscillator.


  • Hero Member

    @d00616 said in nRF5 Bluetooth action!:

    @NeverDie said in nRF5 Bluetooth action!:

    I should be receiving my nRF51 modules a few days from now. Since they lack a 32K oscillator on the module, which "board" should I program it as?

    With the Generic nRF51822 or the MySensors nRF5 boards, you can switch the oscillator via the tools menu. You have to choose the RC oscillator.

    If I were to choose RC oscillator in a case where the module (such as the Ebyte nRF52832 module) actually does have an external oscillator, will it no longer spend any power on the external oscillator?


  • Hero Member

    @NeverDie said in nRF5 Bluetooth action!:

    MY_PASSIVE_NODE,

    I found a shlocky workaround for the current problems with MY_PASSIVE_NODE. It turns out that if you have the gateway up and running before the passive node power up, then the passive node often gets stuck in a loop trying to register itself. However, for whatever reason, if you first power up the passive node, let it run for a bit trying to register and failing, and then power on the gateway, the loop is avoided. Then the passive node will broadcast one packet per cycle and the gateway will receive it and send it to the serial port.

    Unfortunately, Domoticz can't really deal with it.

    Soooooo... For now, I'm using Termite on the serial port to capture the packets and time stamp them. That at least allows me to continue with measurements as to whether MY_PASSIVE_NODE saves significant energy or not. It also has 1 second resolution, not the 5 minute time resoluton of Domoticz.


  • Hero Member

    @d00616

    The specification for the nRF52832 advertises: "Fast wake-up using 64 MHz internal oscillator."

    However, there's not a menu item in the tool menu to set that. So, how is it done?


  • Hero Member

    @NeverDie said in nRF5 Bluetooth action!:

    @NeverDie said in nRF5 Bluetooth action!:

    MY_PASSIVE_NODE,

    I found a shlocky workaround for the current problems with MY_PASSIVE_NODE. It turns out that if you have the gateway up and running before the passive node power up, then the passive node often gets stuck in a loop trying to register itself. However, for whatever reason, if you first power up the passive node, let it run for a bit trying to register and failing, and then power on the gateway, the loop is avoided. Then the passive node will broadcast one packet per cycle and the gateway will receive it and send it to the serial port.

    Unfortunately, Domoticz can't really deal with it.

    Soooooo... For now, I'm using Termite on the serial port to capture the packets and time stamp them. That at least allows me to continue with measurements as to whether MY_PASSIVE_NODE saves significant energy or not. It also has 1 second resolution, not the 5 minute time resoluton of Domoticz.

    Good news! Using the above method, I've established that the EByte nRF52832 module consumes an order of magnitude less current if "MY_PASSIVE_NODE" is defined. 🙂 🙂 🙂


  • Hardware Contributor

    @NeverDie said in nRF5 Bluetooth action!:

    Good news! Using the above method, I've established that the EByte nRF52832 module consumes an order of magnitude less current if "MY_PASSIVE_NODE" is defined. 🙂 🙂 🙂

    Does that mean you are reaching consumption levels as low as atmega+nrf24 ?


  • Hero Member

    @Nca78 said in nRF5 Bluetooth action!:

    @NeverDie said in nRF5 Bluetooth action!:

    Good news! Using the above method, I've established that the EByte nRF52832 module consumes an order of magnitude less current if "MY_PASSIVE_NODE" is defined. 🙂 🙂 🙂

    Does that mean you are reaching consumption levels as low as atmega+nrf24 ?

    Not for all cases, but maybe for this case, provided I can run it off of both of its internal resonators (the 32Khz and the 64Mhz). The datasheet promises a "fast wakeup" if run off the internal 64mHz resonator, and its access to the radio should be a lot faster through DMA, which is automatic.

    Presently, running it all night long (12 hours), it lost less than 50mv off the supercap, and some of that is probably just self-discharge by the supercap.

    Also, getting the DCDC to work would no doubt help...


  • Hero Member

    Maybe using the internal oscillator doesn't matter. Thge datasheet says, "The HFXO must be running to use the RADIO..."

    i.e. without the external 64Mhz oscillator, the radio can't be used. So, if that's true, then I guess from my point of view the 64Mhz external oscillator isn't optional after all. Perhaps that explains why there is one on literaly every module I've seen so far.


  • Hero Member

    I'm ordering today some AVX supercaps with smaller Farad values so that I can get more resolution on the amount of energy (at least relatively) being consumed in different configurations.


  • Hero Member

    I received the nRF51822 modules I had ordered (center of photograph):
    0_1502986163619_nRF51822.jpg
    Small enough to fit almost anywhere!


  • Hero Member

    @Nca78
    Did you ever figure out how to reset the MCU on the Ebyte module?



  • @NeverDie
    I connected a new amplified nrf24 to the gateway with the tin foil as mentioned and it is reading -60dB compared to -89dB with the non amplified version.
    Now lets see how far it goes past the original test.😉



  • @rmtucker
    Well outside of the garden now no problem.😊
    On to supercaps now i think.😉


  • Hero Member

    @rmtucker said in nRF5 Bluetooth action!:

    @NeverDie
    I connected a new amplified nrf24 to the gateway with the tin foil as mentioned and it is reading -60dB compared to -89dB with the non amplified version.

    Did the tin foil make a difference? Hackaday seemed to think it made a big difference. I haven't tried it yet.



  • @NeverDie said in nRF5 Bluetooth action!:

    @rmtucker said in nRF5 Bluetooth action!:

    @NeverDie
    I connected a new amplified nrf24 to the gateway with the tin foil as mentioned and it is reading -60dB compared to -89dB with the non amplified version.

    Did the tin foil make a difference? Hackaday seemed to think it made a big difference. I haven't tried it yet.

    I think it did but what do you have to lose😉


  • Hero Member


  • Hardware Contributor

    @NeverDie said in nRF5 Bluetooth action!:

    @Nca78
    Did you ever figure out how to reset the MCU on the Ebyte module?

    Sorry didn't touch my NRF5 in the last weeks. A bit busy on other things...


  • Hero Member

    What's the best way to make a "receive only" gateway? i.e. one that cannot transmit? Then I wouldn't need to worry about whether the gateway is turned on before powering up a MY_PASSIVE_NODE sensor mote. Is there a way to do it simply in hardware, or do I have to sabotage the gateway library code?


  • Hero Member

    It's getting too baroque. What I'd really like to have is a short nRF5 library of just the bare essentials (like the MIRF library is for the RF24).


  • Hero Member

    Hmmm... it looks like radiohead may be such a library: http://www.airspayce.com/mikem/arduino/RadioHead/classRH__NRF52.html


  • Contest Winner

    @NeverDie said in nRF5 Bluetooth action!:

    It's getting too baroque. What I'd really like to have is a short nRF5 library of just the bare essentials (like the MIRF library is for the RF24).

    You can take a look into the actual Nordic NRF SDK. There are the ESB library for nRF24 compatible communication.


  • Hero Member

    @d00616 said in nRF5 Bluetooth action!:

    @NeverDie said in nRF5 Bluetooth action!:

    It's getting too baroque. What I'd really like to have is a short nRF5 library of just the bare essentials (like the MIRF library is for the RF24).

    You can take a look into the actual Nordic NRF SDK. There are the ESB library for nRF24 compatible communication.

    The RadioHead library seems very easy to pickup and start using. Maybe it's me, but I can't say the same for the Nordic SDK.

    Interestingly, it looks as though @Yveaux may (?) have written the nRF51 part of the RadioHead library.


  • Hero Member

    I was able to program the tiny nRF51822 (earlier photograph above) by programming it as an xxaa Generic nRF51 with an RC oscillator.

    Nice!


  • Hero Member

    Here's a close-up photo:
    0_1503098146155_tinynRF51.jpg


  • Hero Member

    FWIW, range on the tiny nRF51822 does seem compromised when compared against larger sized nRF52832 modules. Not really surprising, but I had hoped it might be a little better than it is.


  • Contest Winner

    @NeverDie said in nRF5 Bluetooth action!:

    FWIW, range on the tiny nRF51822 does seem compromised when compared against larger sized nRF52832 modules. Not really surprising, but I had hoped it might be a little better than it is.

    This is an idea, I don't know if this helps. The two pins near the antenna are GND. Try to solder an 3cm isolated wire to the pin near your PCB and route it parallel of your pcb away from the nRF51 board. The extends the GND pane size.



  • Just in case anyone uses the waveshare ble400 board.
    The board was consuming 150uA when fed with 3.3v bypassing the regulator.
    I have cut through one of the tracks and now it is only consuming 4-5uA and it can still be used normally with the usb lead 5v as long as i place a dupont link across 2 pins.
    If anyone needs photo's let me know.


  • Hero Member

    @d00616 said in nRF5 Bluetooth action!:

    @NeverDie said in nRF5 Bluetooth action!:

    FWIW, range on the tiny nRF51822 does seem compromised when compared against larger sized nRF52832 modules. Not really surprising, but I had hoped it might be a little better than it is.

    This is an idea, I don't know if this helps. The two pins near the antenna are GND. Try to solder an 3cm isolated wire to the pin near your PCB and route it parallel of your pcb away from the nRF51 board. The extends the GND pane size.

    I'll give it a try. Is your idea to make it like a dipole antenna?


  • Hero Member

    @d00616
    Is this what you had in mind?
    0_1503148850641_bipolar.jpg


  • Hero Member

    Also, there are a couple of what look like large solder pads on the back of the PCB. I have no idea what they're for. Anyone know or care to guess?
    0_1503149224079_pads.jpg



  • @scalz said in nRF5 Bluetooth action!:

    I don't think sendSignalStrength function is implemented yet, but you should be able to get this info with:

    int16_t transportGetSendingRSSI(void)
    int16_t transportGetReceivingRSSI(void)
    

    Just wondering what both of these mean?
    I assumed the transportGetReceivingRSSI(void) was the strength of signal from my Gateway ?
    But what is the transportGetSendingRSSI(void)?


  • Contest Winner

    @rmtucker said in nRF5 Bluetooth action!:

    But what is the transportGetSendingRSSI(void)?

    This is the RSSI of the receiver. With nRF5 it's part of the ACK payload.



  • Out of curiosity i stuck a cake tin over the top of the node and it just carried on transmitting,so i put it behind 4 walls and 1 floor down then behind the fuse box and consumer unit and eventually got it to drop to -68dB for received rssi but send rssi stayed at -45dB so it seems to be booming out and in.😉


  • Hero Member

    0_1503148850641_bipolar.jpg

    Results: I don't think it made the link worse, but it's not obvious that it made the link better either. Range seems about the same.

    Even more surprising: prior to adding this piece of wire, I didn't notice much improvement when I went from 2Mbps at Tx 0db to 250kbps at Tx 4db either. I had really thought it would be a tangible improvement in range, but if there was any improvement (and I'm not sure that there was), it seemed like only a modest amount.

    Conclusions/recommendations/suggestions/comments?


  • Mod

    @NeverDie I don't know how much work is needed to make this work with nrf5, but @Yveaux has created a range tester that might be useful. https://github.com/Yveaux/MySensorsRangeTest

    It does use MySensors though, so it might provide more overhead than the bare-bone functionality you are looking for.


  • Hardware Contributor

    @NeverDie is your wire soldered to gnd?? if so, i would have soldered it to the antenna transmission line, as a monopole, with taking care of disabling the pcb antenna. i guess you're trying sort of dipole, but one branch is meandered/"coiled" so not sure if that would improve a lot like you noticed..


  • Hero Member

    @scalz said in nRF5 Bluetooth action!:

    @NeverDie is your wire soldered to gnd?? if so, i would have soldered it to the antenna transmission line, as a monopole, with taking care of disabling the pcb antenna. i guess you're trying sort of dipole, but one branch is meandered/"coiled" so not sure if that would improve a lot like you noticed..

    In this instance, I don't see a way to attach to the actual antenna. On some boards I see a little hole where a wire can be attached. On this one, I guess maybe it could be done by carefully scraping off the solder mask and then soldering to the trace.... Its a gamble though: t would be all too easy to scrape off the trace in the process.

    Anyhow, enlarging the footprint of the board kinda defeats the purpose of its small size. I think maybe it just is what it is, and the relatively poor performance explains its relatively low price.

    Maybe what would rescue it is an adequate ground plane on whatever PCB it attaches to. For instance, I'm thinking it might be a nice match for a "Chirp" soil moisture sensor, which maybe (I'd have to look) has a long--though narrow--ground plane. Making the Chirp wireless would be a nice upgrade. 🙂 It has an attiny MCU, which (unless someone knows differently) isn't enough to control, say, an SMD nRF24l01. I suppose it could be redesigned to use an atmega328p (which would be preferable), but you can already buy cheap pre-made attiny Chirps from China, so there's an argument for leveraging that instead by attaching maybe this cheap wireless module to it.


  • Hero Member

    Interesting discovery! Despite what you would think from the look of them (especially the one on the left), the two large solder pads both have continuity to ground.

    So, I'm hypothesizing that both are meant to be soldered to a larger ground plane on whatever PCB the module is soldered to.

    0_1503149224079_pads.jpg


  • Hardware Contributor

    @NeverDie
    i would have unsoldered the last pad of the passive before the antenna feed point to disable it, and would have soldered the wire antenna to passive, so without scratching anything 😉 but i have no idea about nrf51 range, i'm not using this mcu :simple_smile:
    I have my own design for soil moisture..not really interested by "chirp" like sensors, but i agree nrf52 are nice mcu.


  • Hero Member

    @scalz said in nRF5 Bluetooth action!:

    @NeverDie
    i would have unsoldered the last pad of the passive before the antenna feed point to disable it, and would have soldered the wire antenna to passive, so without scratching anything 😉 but i have no idea about nrf51 range, i'm not using this mcu :simple_smile:
    I have my own design for soil moisture..not really interested by "chirp" like sensors, but i agree nrf52 are nice mcu.

    If you feel like posting it, I'd certainly be interested in a good soil moisture sensor. 🙂

    This is the only nRF51 I've tried, but @rmtucker seems to be getting good range (beyond his garden) with his nRF51. I previously drank the Kool-aid and thought the nRF52 generally performs better, but I'm not I'm not really sure anymore.



  • @NeverDie
    What are you using at the other end,just a standard nrf24 or the amplified version.
    I switched to rfm69 some time ago because of poor range/coverage.
    But i am astounded with the nrf51 and wemos/nrf24 pa setup.
    Maybe it is the tin foil wrapping Lol.😃



  • @rmtucker
    I did eventually manage to stop it by putting it in the fridge.
    My other half has never laughed so much.😃😃


  • Hero Member

    @rmtucker said in nRF5 Bluetooth action!:

    @rmtucker
    I did eventually manage to stop it by putting it in the fridge.
    My other half has never laughed so much.😃😃

    If you switch to Lithium batteries (I'm partial to the Energizer AA's because they have good datasheets), your node should still work even in the freezer.


  • Hero Member

    @rmtucker said in nRF5 Bluetooth action!:

    @NeverDie
    What are you using at the other end,just a standard nrf24 or the amplified version.
    I switched to rfm69 some time ago because of poor range/coverage.
    But i am astounded with the nrf51 and wemos/nrf24 pa setup.
    Maybe it is the tin foil wrapping Lol.😃

    I did it both ways when with datarates of 250kbps and 1Mbps, but when I upgraded the nRF52832 to 2Mbps, the connection stopped working. For expediency, I switched to an nRF52 DK as the gateway, rather than debug the nRF24 just then. Eventually I'll circle back and try to figure out what the problem is/was with the 2Mbps on the nRF24's. So, the nRF52 DK is what I'm presently using.



  • @rmtucker
    On the supercapacitor subject.
    Nick Gammon used a 0.47uf 5.5v capacitor and you have been trying a 10uf 2.7v.
    So i was going to try a 4uf 5.5v super cap and an mcp1700-33 to power the nrf at 3.3v.
    I was going to charge the supercap initially with an adjustable dc-dc converter set to 5v while experimenting,anyone see a problem?


  • Hero Member

    @rmtucker said in nRF5 Bluetooth action!:

    @rmtucker
    On the supercapacitor subject.
    Nick Gammon used a 0.47uf 5.5v capacitor and you have been trying a 10uf 2.7v.
    So i was going to try a 4uf 5.5v super cap and an mcp1700-33 to power the nrf at 3.3v.
    I was going to charge the supercap initially with an adjustable dc-dc converter set to 5v while experimenting,anyone see a problem?

    I'm assuming Nick Gammon was using not an Nordic radio but just an atmega chip? I don't think you'll get much runtime on a 0.47uF supercap, nor a 4uF supercap, because of the radio.

    On the plus side, it should charge up almost instantly. 🙂

    On the other hand, 100uF should be enough to send at least one packet. I haven't tried that low an amount on the nrf52, but I have done it with a 100uF (charged to 2.7v) powering an atmega328p+RFM69 combo.



  • @NeverDie
    I think he was using an nrf24 just the same as us.
    He was getting 32hours without re-charging and transmitting every 5mins.


  • Hero Member

    @rmtucker said in nRF5 Bluetooth action!:

    mcp1700-33

    It appears to be just an LDO. So, you won't get any advantage to charging your capacitor to greater than 3.3v.


  • Hero Member

    @rmtucker said in nRF5 Bluetooth action!:

    @NeverDie
    I think he was using an nrf24 just the same as us.
    He was getting 32hours without re-charging and transmitting every 5mins.

    Really? Wow. That I'd like to see. I don't see how it's even possible. Do you have a link?




  • Hero Member

    @rmtucker said in nRF5 Bluetooth action!:

    Nick Gammon used a 0.47uf 5.5v capacitor

    Re-read your link. He used a 0.47F capacitor, not a 0.47uF capacitor. That's a million times difference.

    0.47F works. I arrived at 10F because it seems to be a sweet spot in the way that supercaps are priced. You can get a lot of Farads for just $2.



  • @NeverDie
    My Mistake but his results were impressive don't you think?
    Anyway i was just going to use 4f because i can get one.
    How are you charging your Cap?


Log in to reply
 

Suggested Topics

  • 8
  • 5
  • 1
  • 90
  • 1
  • 7

2
Online

11.4k
Users

11.1k
Topics

112.7k
Posts