[SOLVED] 3.3V 8MHz pro mini as GW, should it work?



  • Hi all,

    I have been running a pro-mini 3.3V 8MHz as a GW for some time. I have 34800 selected for serial data, but have tried 19200 and 9600 with the same issues.

    I connect the pro mini to the pi in a serial-to-serial connection and it works, but I have a couple of issues that seem totally random.

    Firstly I sometimes get 'ghost' nodes with 'ghost' sensors appearing in the MyController dashboard. I can delete them, but yesterday when I was out 2 ghost nodes with sensors managed to register with the controller via the GW.

    The second issue is that randomly the GW seems to lock up. I suddenly see that I have no data for hours in the controller window. If I disconnect the GW and reconnect it, everything returns to normal. So should I be using only a 5V pro mini with level converter for GW funtion?

    A final annoyance is that sometimes individual nodes just randomly stop sending data, then suddenly start again. The 'outages' can last from minutes to several hours before things return to normal (without any intervention from me).

    I am using the Ebyte radios with caps, the pi has many extra caps and a ferrite on the power in cord. The pi is a pi3 with 3A power supply (tried others, no difference) and there is now no SD card as it all boots and runs from a Kingston A400 SSD drive (120Gb)....

    Today I noticed that no data had been received by the controller for 2 hours. I unplugged the pro mini GW and waited 20 seconds and then reconnected it. At that point it all started working again.

    I have replaced cables, nrf24l01+ modules, added cooling to the pi and all this had nor cured the issues.

    I have reached a dead end now unless someone can help out with an idea to try?



  • @skywatch I'd first have a look at your USB-Serial converter. Enough power @3.3V? FTDI with tesp-pin not connected to GND?

    When using nRF24, imo there's no need for a level converter (beside having a stable 3.3V source to power the nRF), so using a normal Nano should'n be an issue.



  • @rejoe2 Thank you for your thoughts on this one.

    I don't have a 'usb converter'. I use the tx/rx on the 3.3v pro mini direct to the serial tx/rx on the pi. So serial to serial. The nrf does not have a level converter, it is simply wired to the pro mini and the same 3.3V supply (taken from pi 5V rail regulated with a AMS1117 3.3) and 2x 104 and 2x 1000uF and 2x 10uF and a 47uF cap on the nrf pcb! 😉

    In the GW sketch it says it was 'written for a 5V arduino', but no warning that it won't work on a 3.3v one. Apart from the baud rate I wonder if there is another reason I don't know that would cause problems.

    If I get time this weekend I might build a 5V pro mini GW and add a level shifter to the serial input of the pi and see if that works any better. If not then I will try a usb converter as last resort.



  • It should also work on a 3.3V pro mini and as is works for some time at least, there seems not to be a general problem with the sketch.

    Some times, you might have buffer overflows in case you get really a lot of data from your network, so increading buffer size on the gw could help (no own experience, standard may be something like 20 messages).

    But as I don't have much experience on usage of PI GPIO (I preffer using Mysensors Nodes when GPIO's are needed), I may not be able to help you any further. As a general remark, drawing power from a PI is very often "the root of all evil", so I'd recommend to avoid that whenever possible. But that's personal opinion, not proofed knowledge.



  • @rejoe2 said in 3.3V 8MHz pro mini as GW, should it work?:
    Thank you for trying to help. It's always appreciated! 🙂

    As a general remark, drawing power from a PI is very often "the root of all evil", so I'd recommend to avoid that whenever possible. But that's personal opinion, not proofed knowledge.

    No problem, but if you look here you'll see that there isn't much at all going on in the pi itself.....

    https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/rpi_SCH_3b_1p2_reduced.pdf

    Just a fuse and a mosfet, nothing to cause any problems afaics. People usually get issues with cheap low quality supplies and then blame it in the pi, but that is wrong in my opinion. A good quality supply, with good regulation, low ripple and noise and plenty of current available and all is usually well......

    I'll keep at it and see how it goes....



  • Long shot, but if you suspect it's lack of processing power it's easy to try a 3.3V 16MHz Pro Mini.


  • Mod

    @maah except that running the atmega at 16MHz and 3.3V is out of spec, so the mcu might behave in strange ways. But for a test it could be ok.



  • I don 't know if it helps but i tell you my story. I had all network using nrf24l01(7or8 nodes) and i had some lost data ,random,depend day time etc... So i change all radios to rfm69 and 69hw and never had a lost packet again. Happy end🤣

    Now i have an arduino pro mini 3.3v@ 8mhz connected to raspberry by serial (usb ftdi original) managed by domoticz. Rocksolid solution until now. Its there for months (6 maybe). One of the nodes its 50 m outside,on main gate. And same node controls lights,gate open,door bell and a fence perimeter alarm(fence cutted) .Never miss a notification.

    This is my solution to not have issues with radios modules
    .



  • @tmaster Thanks for all the replies everyone.

    I hope to have some time to look into this more soon....



  • @skywatch Update

    Yesterday I changed to a 5V pro mini at 16MHz and 115200 baud rate. No change in the issues faced.

    Just waiting for a usb to ttl converter to arrive now, or maybe order a pro micro instead? What do you all think?



  • SOLVED!

    I finally reinstalled the mycontroller (1.4.0) on the rpi and everything started working again.

    I am not sure what happened, but at least it seems to be good for 48 hours now, so I am happy that the problem is gone.

    Thanks for all the help and suggestions, it's not always easy to find the problem.



  • @skywatch Actually that was only part of the story!

    It seems that the real issue is with the Rpi3. In particular the serial controller.
    It seems that the Rpi foundation 'stole' the hardware serial controller for bluetooth and put in a substitute SW serial instead. This is the issue. Under heavy load or other circumstances the timing of the serial suffers and it is enough to cause big problems for things like mysensors GW. I have conclusively proved that when the Rpi serial is taken out of the equation, it all works as expected.

    So if you are having problems with serial comms on a Rpi 3B or above, this might be the root cause. I never had such problems with pi 1 or pi 2 - I never used HW serial on pi 0, so not sure about that, but if it is a pi 0W then it might very well have the same problem.



  • @skywatch
    That was a nasty one to find the rootcause for - how did you do it?
    I don't use BT on my 3B, so it's disabled so I feel I have been lucky not to dig for this rootcause


Log in to reply
 

Suggested Topics

34
Online

11.4k
Users

11.1k
Topics

112.6k
Posts