πŸ’¬ MySWeMosGWShield - WeMos Mini MySensors Gateway Shield





  • Did you check if the WeMos does have enough power on the 3.3V output to power the NRF24L01_PA+LNA module without resetting itself?


  • Hardware Contributor

    Yes, everything worked fine with a PA+LNA module or a RFM69HW using the WeMos 3.3V output.
    I only tested on a D1 mini pro, but the D1 mini V2 use the same RT9013 (3.3V, 500mA) regulator so should not matter.


  • Hardware Contributor

    Wow, thank you very much !
    I was planning to do a similar board (for D1 mini pro and nrf24 PA/lna SMD) and you are saving me lot of time.
    Possibility to solder rfm is a nice extra for when I'll want to switch to a better radio type.

    Too bad my NRF orders (standard SMD and pa/lna SMD) have both disappeared the same day 2 months ago just after they passed the Chinese customs 😞


  • Hero Member

    Great job, and great write-up too! πŸ‘ I like how you included many different radio module options onto a single shield and that the shields are stackable, so that you can "have it all" on one gateway if you wish. That makes for a nice modular approach and a good use for any extra boards that come from the fab.

    How well do the YJ-13039 modules (i.e. the amplified, high-powered version of the NRF24L01+ SMD module with the chip antenna) work? Prior to your post, I didn't know that a surface mount module of that kind even existed. It sounds quite promising! How does its range compare to the rfm69 as well as to the reglar NRF24L01+?


  • Hardware Contributor

    @Nca78 said:

    Too bad my NRF orders (standard SMD and pa/lna SMD) have both disappeared the same day 2 months ago just after they passed the Chinese customs 😞

    I had the same problem with my order of RFM modules and push buttons, took forever to be able to assemble everything for testing and taking pictures. I guess 2 months ago they were sending a lot of stuff out to be ready for Christmas in stores.

    @NeverDie said:

    I like how you included many different radio module options onto a single shield and that the shields are stackable, so that you can "have it all" on one gateway if you wish.

    I may be wrong, or did not understand you correctly, but I don't think you can "have it all" on a single gateway. You can have 4 different gateway if you want (3xRFM69 with different frequencies + NRF24) but you can't stack different radios on the same arduino/esp. But yes definitively a way to use the extra boards you get from the fab house. You can also use the WeMos as a node/repeater and ignore/disable WiFi or even better add a WiFi layer to do something else (direct http api, remote serial monitoring, webpage to update firmware, etc...). I don't really know how to do that, but I'm sure some smart people do. On a WeMos you don't have a lot of pins left when the radio is plugged, but it should be enough for many projects.

    How well do the YJ-13039 modules (i.e. the amplified, high-powered version of the NRF24L01+ SMD module with the chip antenna) work? Prior to your post, I didn't know that a surface mount module of that kind even existed. It sounds quite promising! How does its range compare to the rfm69 as well as to the reglar NRF24L01+?

    These PA+LNA SMD module work nicely. I have one of these on my current GW https://www.openhardware.io/view/116/MySRaspiGW-PALNA and so far no complaints. I really like these NRF SMD modules (regular and PA) as they fit under a pro-mini between its headers. It allows you to have a very compact device when assembled.

    Range wise, no idea. A regular NRF is already enough to cover my whole (small) apartment with cardboard walls (they don't really know what insulation is in California...). Until 2 days ago I never had / tested a RFM radio so no idea either. But maybe someone else did some tests with these modules? Else if you do let me know how it goes.


  • Hero Member

    @emc2
    Thanks. I just now ordered some of those PA+LNA SMD modules, using the link you provided in your BOM. Ironically, they cost more than the RFM69HW modules, but I thought it's worth a try anyhow.



  • I did also receive all parts today and did solder an NRF24L01+PA+LNA WiFi Gateway. Everything runs fine from the beginning. Thanks.



  • Did you test this module with a RFM69HW module?
    I don't get a connection between two modules.
    I did solder all pads of the RFM69 but I don't think this should cause me problem.


  • Hardware Contributor

    Yes and no.

    I tried with a RFM69 and I did not got any errors / complains on the serial log, but I do not have any other RFM devices to test with (still waiting for radio modules, probably lost again...)



  • Thank you for the feedback.

    I'm getting closer to a "solution".
    I did try an other library for the communication to an RFM69 and I can read the internal temperature and the register values. So the wiring of the chip is correct.

    Now I have to find out why MySensors has problems.


  • Hardware Contributor

    I answered to your other topic, but I think that's because you are not defining the IRQ and CS pins in your sketch.

    Have a try by using the provided sketch on the Gateway, or define the pins on yours, it should hopefully fix your problem.



  • Could you solve the problem that the gateway is not working with the RFM69? Is it related to the MySensors library and the ESP?


  • Hardware Contributor

    I think I did.
    Could you test by making sure you add / have the following lines in your sketch:

    #define MY_RF69_IRQ_PIN D2  // GPIO 4
    #define MY_RF69_IRQ_NUM D2  // GPIO 4
    #define MY_RF69_SPI_CS  D8  // GPIO 15
    

    It seems that the automatic definition of MY_RF69_IRQ_NUM was not working properly (I think on esp8266 platform it was supposed to be automatically defined as equal to MY_RF69_IRQ_PIN but I guess it was not the case)

    Right now I have it working, both gateway and sensor compiled with MySensors 2.1.1.

    I updated the default sketch, adding the missing line, and it's now available on github.

    Let me know how it goes for you.


  • Hardware Contributor

    @gloob Did you had time to test on your side and can confirm that everything is working correctly?



  • Currently I don't have a WeMos to test everything. I will come back to thins topic once I receive my WeMos from china. But you solution sounds good to me, as I did test the PCB with some other software and it was working without any problems. So it must be a problem related to the configuration and not to the wiring of the PCB itself.


  • Hardware Contributor

    Hello, I just ordered from PCBs.io.
    Thank you for the design @emc2 !



  • Ok, this is a really stupid question but how do I use this with for example Domoticz? Do I still need to connect it to the usb-port or do I connect using MQTT or some other way?


  • Mod

    @Cliff-Karlsson add it as an MySensors ethernet gateway.



  • Ok, I just soldered two of the shield using smd nrf-radios but I only got alot of errors from the serial monitor. Also the boards got hot as hell after a minute. The wemos was really hot and the nrf was untuchable.

    I through that had done something wrong with the first shield so I soldered another but it was also as hot as the first.

    And should I enter the SSID and password for my home wifi-network or should I use the sketch to create a new? I tried both with no success as I got some default network called aitinker or similar both times.


  • Hardware Contributor

    It should not get hot at all. The Wemos can get a few Β°C above room temperature but definitively not "hot as hell"

    It happened to me once, when I had some solder joints between 2 pins of the NRF. You may want to test with a multimeter if, when the WeMos is unplugged, you have any shorts between adjacent pins.
    A picture of the soldered board may help too.

    Best way is to edit the example sketch by adding your Wifi credentials on it before uploading them.


  • Hardware Contributor

    Hello, After soldering the radio and before connecting to power you should use a multimeter in "continuity" mode and make sure you have no contact between adjacent pins of the radio. I never connect a circuit using SMD nrf24 without having done this test.



  • @Nca78 said in πŸ’¬ MySWeMosGWShield:

    , After soldering the radio and before connecting to power you should use a multimeter in "continuity" mode and make sure you have no contact between adjacent pins of the radio. I never connect a circuit using SMD nrf24 without having done this test.

    Ok, I have tried several times now soldering/resoldreing the radio with same result. Continuity, that means direct contact? I get several hundreds of ohms between a few of the pads but it does not "beep" anywhere πŸ™‚

    Can something in my sketch cause this or is it 100% hardware issue?

    This is what I am using:

    // ** WiFi and network configuration **
    #define MY_ESP8266_SSID "My SSID"
    #define MY_ESP8266_PASSWORD "My password"
    
    // Set the hostname for the WiFi Client. This is the hostname
    // it will pass to the DHCP server if not static.
    #define MY_ESP8266_HOSTNAME "MySWeMosGWNRF"
    
    // Enable UDP communication
    //#define MY_USE_UDP
    
    // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
    //#define MY_IP_ADDRESS 192,168,178,87
    
    // If using static ip you need to define Gateway and Subnet address as well
    #define MY_IP_GATEWAY_ADDRESS 192,168,178,1
    #define MY_IP_SUBNET_ADDRESS 255,255,255,0
    
    // The port to keep open on node server mode
    #define MY_PORT 5003
    
    // How many clients should be able to connect to this gateway (default 1)
    #define MY_GATEWAY_MAX_CLIENTS 2
    
    // Controller ip address. Enables client mode (default is "server" mode).
    // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
    //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 68
    
    
    // ** OTA updates configuration **
    // Enable OTA updates for ESP8266 based gateway
    #define ESP8266_OTA
    
    // Define password for OTA updates (recommended but optional)
    //#define ESP8266_OTA_PASSWORD "MySuperSecretOTAPassword"
    
    
    // ** MySensors Radio configuration **
    // Enables and select radio type (if attached)
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    
    // RF24 settings
    // Use custom RF24 channel (default 76)
    //#define MY_RF24_CHANNEL 42
    // Decrease RF24 power transmission, useful to test in case of Tx problems.
    // If your problem is fixed consider adding the 5V to 3.3V voltage regulator
    //#define MY_RF24_PA_LEVEL RF24_PA_LOW
    // Enables RF24 encryption (all nodes and gateway must have this enabled, and all must be personalized with the same AES key)
    //#define MY_RF24_ENABLE_ENCRYPTION
    
    // RF69 settings
    // RFM69 Frequency, default = 868MHz
    #define MY_RFM69_FREQUENCY RF69_868MHZ // RFM69 frequency to use (RF69_433MHZ for 433MHz, RF69_868MHZ for 868MHz or RF69_915MHZ for 915MHz)
    // RFM69 Network ID. Use the same for all nodes that will talk to each other, default = 100
    //#define MY_RFM69_NETWORKID     42
    // Enables RFM69 encryption (all nodes and gateway must have this enabled, and all must be personalized with the same AES key)
    //#define MY_RFM69_ENABLE_ENCRYPTION
    // Disable this if you're not running the RFM69HW model (RFM69HW is recommended on the gateway for better coverage)
    #define MY_IS_RFM69HW
    
    
    // ** Mysensors additional functions **
    // Enable inclusion mode
    //#define MY_INCLUSION_MODE_FEATURE
    
    // Enable Inclusion mode button on gateway
    //#define MY_INCLUSION_BUTTON_FEATURE
    // Set inclusion mode duration (in seconds)
    //#define MY_INCLUSION_MODE_DURATION 60
    // Digital pin used for inclusion mode button
    //#define MY_INCLUSION_MODE_BUTTON_PIN  D3  // GPIO 0
    
    // Software signing settings
    //#define MY_SIGNING_SOFT
    //#define MY_SIGNING_SOFT_RANDOMSEED_PIN A0
    
    // Hardware signing settings (currently unsupported?)
    //#define MY_SIGNING_ATSHA204
    //#define MY_SIGNING_ATSHA204_PIN D0  // GPIO 16
    
    // General signing settings
    // Enable this if you want destination node to sign all messages sent to this gateway.
    //#define MY_SIGNING_REQUEST_SIGNATURES
    // Enable node whitelisting
    //#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
    
    // Flash leds on rx/tx/err
    // Set blinking period
    #define MY_DEFAULT_LED_BLINK_PERIOD 300
    
    // Led pins used if blinking feature is enabled above
    // LED_BUILTIN, the on board LED is used (D4, GPIO 2)
    #define MY_DEFAULT_ERR_LED_PIN LED_BUILTIN // Error led pin
    #define MY_DEFAULT_RX_LED_PIN  LED_BUILTIN // Receive led pin
    #define MY_DEFAULT_TX_LED_PIN  LED_BUILTIN // Transmit led pin
    
    // Enable debug prints to serial monitor
    #define MY_DEBUG
    
    
    // **************************************//
    // You probably don't need to edit below //
    // **************************************//
    ...
    

  • Hardware Contributor

    @Cliff-Karlsson said in πŸ’¬ MySWeMosGWShield:

    Ok, I have tried several times now soldering/resoldreing the radio with same result. Continuity, that means direct contact? I get several hundreds of ohms between a few of the pads but it does not "beep" anywhere πŸ™‚

    You've got your answer here. You should have MOhms especially between Vcc and GND pins where I have infinite resistance.



  • another stupid question, do I need the capacitator on the radio-side for it to work?


  • Hardware Contributor

    It should indeed "beep" between all the pins.

    NRF modules are also very fragile, once incorrectly plugged they are usually definitively toasted. So even if you desoldered and then resoldered them correctly it is unlikely they will work correctly.

    Yes you need the capacitor radio side, it's the only required component, everything else is optional. It don't have to be 4.7Β΅F, anything between 4.7 and 47Β΅F will do, as stated in the assembly instructions.



  • I have got some strange issue when using RFM69HW. I modified the sketch by chosing RFM instead of NRF, and also uncommented the line "MY_IS_RMF69HW"
    Everything looks like it is working when using the serial console, the wemos gets an ip and I can add it to domoticz. But after a couple of minutes it stops working. Same if I power it from mobile charger directly, works a while then dies. I have tried with different Wemos and it is the same. Can a faulty radio cause this or could it be something other?


  • Hardware Contributor

    Not sure. I do not have any RFM sensors, I tested the gateway for a little more than a week with a mock sensor and it was working. Maybe some logs could help?

    You can also hook up the RFM shield to a regular arduino nano to do a serial gateway, this way you can check if it's radio dependent or not.



  • Sometimes my own stupidity still amazes me. The pins of all my wemos where soldered at the oposite side as the ones in your examples. all the radios then got powered using 5v instead of 3.3v, not very suprising that the nrf radios got hot as h*ll and that nothing worked as it should.

    Suprisingly the RFM69 seams to have survived. I guess the smd nrf24 all are toast.

    Everything works perfekt now when I connected it correctly πŸ™‚


  • Hardware Contributor

    Glad to see you have it working!

    Let me know if something was unclear in the instructions or if it can be improved to prevent people to solder them flipped.



  • Is it possible to free D2 on the WEMOS, it is used on most WEMOS shields for I2C.


  • Hardware Contributor

    @Mynasru unfortunately the only other suitable pin would be D1, SCL.
    Wemos do not have enough pins to do gateway + I2C, you will need to switch to a nodeMCU or similar.

    Also keep in mind that D2 is a MySensor default for ESP8266, I tried to have it moved when support was added https://github.com/mysensors/MySensors/issues/408#issuecomment-191403862 but without success, meaning you will need to reassign CE in your code.



  • @emc2 Hmm that's a pity. I could not find why specifically it was assigned to that pin other than that it is a MySensor default, so I thought maybe it can be changed (manually).

    I wanted to use the WEMOS system for my nodes, not as the gateway. But if it is not possible to free up D1 & D2, there is no benefit in using them. This board is the best I could find, I would order them if D2 is freed for D4. Could you make it possible to use one of both (with a jumper of some sort) so it is compatible with either WEMOS shields, or the MySensor defaults?



  • Very bad result with this PCB and Ebyte NRF24 PA+LNA module.
    If the shield is distant from the Wemos D1 (not upside) it works fine. There is interference between ESP and NRF I think.


  • Hardware Contributor

    @fabien Never heard of the "Ebyte NRF24 PA+LNA module", do you have a link for it somewhere?

    So far I've been using a few of these with the "regular no name" PA+LNA from Aliexpress and did not have any problems. What are the symptoms you are observing?


  • Hardware Contributor

    I'm using EByte module with external antenna, and I have good results
    https://www.aliexpress.com/store/product/New-E01-ML01SP4-Ebyte-20dBm-1800m-2-4g-rf-module-smd-nRF24L01-PA-rf-wireless-receiver/2077046_32687064881.html

    Chip or integrated antenna with pa+lna are not efficient, I had poor radio performance with them...


  • Hardware Contributor

    Looks like a neat module indeed.
    Never tried these, but yes I guess if the external antenna and the wifi antenna are too close it may leat to some interferences.

    Would also need to check that the 3.3V is powerful enough to properly feed the esp and this chip at the same time, I guess it may depends on the antenna plugged to it too.


  • Hardware Contributor

    @emc2 said in πŸ’¬ MySWeMosGWShield - WeMos Mini MySensors Gateway Shield:

    Would also need to check that the 3.3V is powerful enough to properly feed the esp and this chip at the same time, I guess it may depends on the antenna plugged to it too.

    Yes it could be a problem too, I put the additional voltage regulator on my gateway, it costs nothing and takes 2mns to solder, so I see no reason not to put it.

    I guess @Fabien is talking about the ML01SP2 module, but with PCB antenna and no shielding there's no way it can have good performance next to a wifi module...
    Best EByte module is ML01DP5 but it's not SMD.



  • @nca78 you are right. I'm using ML01SP2 and range is not good (with PCB or IPEX antenna). I'm adding volatge regulator without success. If I put the PCB on a proto board result are far better. So it's probably interference between ESP8266 and NRF24.
    I'm waiting for ML01DP5 but do you know if someone already made a pcb for this one and ESP8266 board (Weemos or other) ?



  • What are the parameters of this radio, I could not get it to work. Suspicions that he had no speed 250.



Suggested Topics

56
Online

11.4k
Users

11.1k
Topics

112.6k
Posts