Things get funky when there's a bit more traffic


  • Hardware Contributor

    Hi,

    I hope this is the right section to post this observation. I have a sensors/actuators network which is RFM69W based(868MHz) and the gateway is the serial type. Initially I thought that it was some issue from the hardware(noise filtering/dc-dc converters, emi, bla, bla) but after reducing the network traffic things started to come to normal.

    So in the initial setup I was sending lots of status information from actuators and battery powered nodes..things that were redundant in the end so I removed them. BUT...a question still remains: is the underlying RF hw and/or software stack which takes care of the transport(collision detection/reduction) susceptible to funky behavior when the network traffic goes a little bit high? I'm asking this because at some point in time it may increase as I add more sensors/actuators. I don't use repeaters as I don't need for the moment.

    About the funky stuff that I mentioned:

    1. From time to time I get nodes with extra sensors: for example on the relay actuator node I get a temperature sensor attached from nowhere :simple_smile: which reports some value - funny thing is that I removed it and after a day or two it appeared again - same temperature sensor and with same temperature - this is strange(like ghosts stumbling across my hardware)
    2. Some light actuators were triggered randomly
    3. The above strange things happened also when network discovery was issued by the controller and/or gateway - so when BROADCASTING data

    Did anyone experienced something similar? Is it because of high collision rate so the actuators perceive something wrong going through the air?

    Note: I double checked my hardware(triple checked) and my sketches and I didn't suspect anything in there. It's not first time when I start electronics and design hw so I'm thinking is not something I did wrong. I'm using the stable release version of mysensors which is: 2.1.1


  • Mod

    @mtiutiu what controller are you using?
    It would be good to rule out either the controller or the mySensors network upfront.


  • Mod

    The rfm69 radio uses a 2 byte crc, so collisions should result in the message being discarded rather than getting garbled messages.

    Could the serial prints become interleaved if there is much traffic?


  • Mod

    Agreed, if there is too much traffic I'd expect messages to get lost. How fast did you set the baud rate on the serial port?


  • Hardware Contributor

    I'm using MyController and 115200 serial baudrate on the gw. The thing is that it's a little bit hard to debug this(at least for me) because these things happen somehow intermittent. I watched MyController logs and indeed I see that sometimes I receive values which are correct from the controller point of view but in reality are not because I don't have those extra sensors attached in hardware :simple_smile:.

    Regarding the gw and interleaved serial prints I was thinking to use a atsamd21 or any arm MCU that is supported by software in order to process things faster and maybe use a higher serial baudrate(if the MCU allows it and the baudrate error rate is acceptable). But to be honest I don't think this helps if the messages are interleaved as in that situation I'm assuming that we need some kind of arbitration right?


  • Mod

    Have you tried a more powerful gateway hw just to see if something changes?


  • Hardware Contributor

    @gohan

    Not yet as I don't have the required parts yet. But I will and post the results.


  • Hero Member

    @mtiutiu Just curious, what are you using now for the gateway?


  • Hardware Contributor

    @AWI

    I'm rolling my own(with CP2102 usb-serial converter) https://www.openhardware.io/view/316/MySensors-RFM69W-serial-GWATMEGA328P. Oh and I changed several serial GW's all based on Atmega328p of course but with different usb to serial converters like: CH340G, atmega16u2 from Arduino UNO board and I think I used arduino nano at some point in time with FTDI 232 chip.

    Results are the same. Not to mention that after 20-25 days the usb to serial connection stops working so bye-bye serial gw and no output from it. That's why I changed and tested so many usb to serial converters and different boards. But that's another issue and story not related to this tread which I'm still investigating.


  • Mod

    Have you considered to try a more standard gateway hw? Or try ethernet gateway?


  • Hardware Contributor

    @gohan

    What do you mean by a "more standard gw hw" :simple_smile: ? Isn't the serial gw the defacto? If I remember well this was the first one supported. I tried the ESP8266 based one but after a day it started to become unstable and in the end iresponsive. I used the nodemcu board to test it - maybe because of the board and/or power supply issues because I've read that esp modules are very picky regarding that part so I abandoned it.

    What I wanted to try was the orange pi board with rfm69w attached directly on the SPI port but no luck as it only supports nrf24l01 in the mysensors 2.1.1 version. Maybe I'll come back to it when switching to the new upcoming version of mysensors core.

    Next W5100 ethernet board...well I didn't had any pleasant experiences with this one either before (not mysensors related) so I think I'll skip this one too.

    Is there something else that I missed?


  • Hardware Contributor

    One other thing that I'm waiting for is the MySensors core to become fully portable and independent of Arduino framework so that I can use it for example with STM32 mcu's and libopencm3 or cmsis or cubemx hal maybe. I'm not really a software guy - still learning this part. And maybe I'll never be the software guy type :simple_smile: in the future too...but still we have now such powerful ARM mcu's and cheaper too and it's a pitty to not take advantage of them. Now it's true that in most of the cases the old plain 8bit ones are more than enough for simple tasks like reading sensors and driving some relays...so why bother with those 32bit complex beasts :simple_smile:


  • Admin

    @mtiutiu

    You might have missed it but basic STM32F1 support has already been implemented in the dev-branch.

    https://github.com/mysensors/MySensors/pull/795


  • Mod

    @mtiutiu I was referring to boards like UNO or mega and an ethernet shield


  • Admin

    @gohan,

    Hehe, @mtiutiu seems way beyond the uno stage, designing his own boards. 🙂


  • Mod

    I got that, I'm just trying to see if taking some steps back could get different results. I've learned many time that sticking too much to a certain idea is bad for troubleshooting.


  • Hardware Contributor

    Thank you all for your suggestions I appreciate. I will try the ethernet gw too and see what happens.


  • Hardware Contributor

    @mtiutiu
    There is also the Sensebender GW,
    or in case you're interested i already designed an atsam usb dongle (i'll upload my latest files though), and could send one to you if you want. i'll order some others pcb projects during the weekend (and always choose express shipping), and i'll order the new rev at same time so..it's as you wish, just tell me, no problem, it's a quick tiny board to assemble 😉


  • Hardware Contributor

    @scalz

    I saw that project - really nice btw(as all of your hw projects). I inspired a little bit from yours and I created my version using the atsamd21e variant as you can see here: https://github.com/mtiutiu/kicad/tree/master/mysensors/gw/serial_gw_ATSAMD21E.

    Waiting for the boards though...The fact is that I like to design my own boards whenever possible as you may noticed already. And the satisfaction is bigger of course when you design your own and in the end it just works :simple_smile: .

    Sensebender GW is a great project too and very well made as I studied it a little bit so big congrats to @tbowmo. But as I said I like to roll my own boards :simple_smile:.

    Thanks for the support @scalz . And to express my gratitude for the openhardware community I always try to give something back as I already did on the openhardware.io site.


  • Hardware Contributor

    @mtiutiu
    thx for the kind words, i appreciate. I understand you, same for me.
    Your designs are nice too, i've seen them 😉
    I'll upload my updated sch as i've changed a few things and routes, and it's also thinner now.

    your atsam gw looks good, i see you've simplified a few things, curious as usual.. 🙂
    no usb protection, regarding usb specs ?
    why not using the more powerful radio (HW/HCW rev) as it's a GW? Will you put the antenna wire in the enclosure, or let it go outside? however i prefer a connector for this.
    Well, just some feedbacks, i've different mcu&gw too, so i know it's fun to experiment but not interested to reinvent the wheel each time lol.

    Keep the good work 👍 , i hope you'll get your stuff working as you wish, and i should be back asap on software, put more load on my network and see what happens (still a lot entertained by hw too)


  • Hardware Contributor

    @scalz

    Thanks. Well yes...I simplified things a little bit. Your board is better designed than mine ofc regarding the antenna and other protections. But most of the time I found that those are not really necessary at least for me and in my current setup. So yes... I need to start thinking for all the worst cases and environment issues that may arise when designing hw which is not so easy btw imho. In the end is fun to experiment and learn more stuff about electronics because this is the main reason I'm doing this btw.


  • Hardware Contributor

    yep i completely agree, lot of fun, and headache too sure 😄


Log in to reply
 

Suggested Topics

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts