Hello to all, I have received the RF switches modules. I connected everything and the preliminary test reveal that system works, but I have still the same previous problem, The acknowledge messages does not activate the TX signal during the gateway acknowledge transmitting. Then the node is missing the acknowledge. But the other messages are transmitted and received by the node correctly.
Can anybody help to fix this issue in the Mysensors library? Or what can I do to fix it. Thanks in advance.
Posts made by Jimy Aguirre
-
RE: Improving RFM69 radio range by adding an external LNA
-
RE: Improving RFM69 radio range by adding an external LNA
Hello, I have received the RF amplifiers that will be the LNA and RF-PA for my project. I will use one of them as LNA and the other one as PA. It is supposed the RF switches for LNA and RF-PA control will arrive tomorrow, then I made the code implementation suggested by @mfalkvidd using the Indication Function, and for testing purposes I use some LEDs in the pins I have selected for LNA and RF-PA control signals outputs (A3 & A4, I have not too much available on that board).
The LEDs work really good, the RX signal is "ON" almost always, and the TX LED flashes "ON" on TX commands as expected, but to be sure I decided to include in the Indication function a Serial.println(*** TRANSMITTING ***); as a debug output. To be sure that TX signal is high when any TX signal is send through the radio, as well to get cached the short and fast TX... but I see come weird.#define MY_INDICATION_HANDLER // this define the event for TX function /*... ...*/ void indication( const indication_t ind ) { if (INDICATION_TX == ind) { // Switch TX signal on here digitalWrite(PA_PIN, HIGH); digitalWrite(LNA_PIN, LOW); Serial.println("***************TRANSMITTING**************"); } else { digitalWrite(PA_PIN, LOW); digitalWrite(LNA_PIN, HIGH); } }
Here it is some of the MY_DEBUG output
69551 TSF:MSG:READ,9-9-0,s=6,c=1,t=47,pt=5,l=4,sg=0:2 79246 GWT:RFC:MSG=0;0;3;0;18;PING 89252 GWT:RFC:MSG=0;0;3;0;18;PING 99260 GWT:RFC:MSG=0;0;3;0;18;PING 109267 GWT:RFC:MSG=0;0;3;0;18;PING 110900 GWT:RFC:MSG=9;7;1;0;47;SEND_ALL // This is an excecuted transmitting command ***************TRANSMITTING************** // This mean the TX signal was turned High for the RF-PA Ampllifier as Expected 110904 RFM69:SWR:SEND,TO=9,SEQ=7,RETRY=0 110912 RFM69:CSMA:RSSI=-89 110914 RFM69:CSMA:RSSI=-91
The TX signal is on when a data is send to the nodes but not always, for example to report back to the node the RSSI level or when an acknowledge is sent to the node, in these two cases de TX signal remains in OFF state (this means the RF-PA will be off and the LNA will be ON in a transmit command).
And this is the Debug output where it is transmitting but the TX signal is not turned ON.
111037 RFM69:CSMA:RSSI=-90 111040 RFM69:CSMA:RSSI=-95 111054 RFM69:SWR:ACK,FROM=9,SEQ=8,RSSI=-40 111058 TSF:MSG:SEND,0-0-9-9,s=7,c=1,t=47,pt=0,l=8,sg=0,ft=0,st=OK:SEND_ALL 119274 GWT:RFC:MSG=0;0;3;0;18;PING 128539 RFM69:SAC:SEND ACK,TO=9,RSSI=-40 // This is a SEND command but the Indication Function was not triggered :( 128543 RFM69:CSMA:RSSI=-92 128546 RFM69:CSMA:RSSI=-94 128548 RFM69:CSMA:RSSI=-91
I was checking the list of important events that trigger the Indication function but I did not find any sentence that help me to include the acknowledge and the RSSI transmissions in the way they triggers the Indication function. Sorry for my explanation I hope you understand what I mean.
To summarize not every transmission triggers the TX signal pin "ON" Any suggestions are very welcome!. Thanks in advance. -
RE: Improving RFM69 radio range by adding an external LNA
Hi to all, wow, all of your suggestions are great. Thanks for the tip/help you provided. About to cut the Rf cable in half-wavelength multiples I have to say I did not have read about it before. Thanks @Grubstake. I understand that the vertical antenna gain pattern is like a big donut in horizontal position. After read the Low Power Labs antenna reading I think if is it a good idea to put a ground plane to the antenna I have in a 5 meter mast, the antenna is about 1.6 meter (it is long for the working frequency of 915Mhz, the wave length is 0.328 meter) it mean it is almost 5 wavelength. I don't know how is the internal antenna structure, but the external appearance is like a fluorescent light tube.
I will change the antenna cable, I have the RG58 now I will use the LRM400 that I have ordered and now I am waiting it arrives. It is supposed to be more efficient (less loss). And I am figuring out how to put the gateway closer to the antenna as it is suggested by @mfalkvidd and @zboblamont. I will do all his mods I am sure they will help, I have ordered two of this LNA/PA to install in the antenna line two of the same modules. One connect as PA and the other connected as LNA, I am still looking for the RF switches in “ready to use board” but I did not find it yet.
Also as I am planing to put RF PA and LNA stages in the radio break-out PCB to be used with the RFM69HW, I am reading about the RF PA and LNA IC chips parameters and now I am defining the working parameters what I need, for example the P1dB is the point where the linearity is lost. And NF lower is better, IP3 bigger is better. Max input is defined in some data-sheets, but some data-sheets are not clear about the max output, but I think it is near the P1dB. The gain is the simplest one to understand. For now I am planning to use the TQP7M9103 for the PA that gives 29.5dB output, and for the LNA, a cascade of two SBB5089Z that gives 40dB gain, I still have to design the PCB, and define the RF switch stage. Thanks to all for your help. -
RE: Improving RFM69 radio range by adding an external LNA
Hello, Thanks for help. @mfalkvidd I have read the forum and the API instructions you mentioned, It looks like what I need to get the extra range I require now, I think I will use the MY_INDICATION_HANDLER option. When I get it working I will update the post.
@zboblamont, Thanks for your post, The gateway is in the 4th floor in a building but the nodes are around the building in different houses. I am collecting energy readings in a small area and just for few houses only, but some nodes are apart 700m. My current set-up only gives me 130m, my main purpose is to test the link range of my node devices. The orientation of the omnidirectional antenna is vertical. Then I think the best option is to install a good LNA like this, in both Gateway and node, of course a small LNA in the node because of the available space. I will try it. Anyway it is very possible I have to use repeater nodes. Thanks again to both of you. -
Improving RFM69 radio range by adding an external LNA
Hello, I am happy to work with some my sensors nodes! thanks for the graet work you do!. I need some help,
I have a Mysensors setup as follows, RFM69HW radios, an online RPI running domoticz connected to an ethernet Gateway on top a 4th floor terraze, an omnidirectinal antenna 8dB, 8 meters of antenna cable that loss 6dB including connectors, independent 3.3V low noise power supply for radio. Node's set up is Arduino promini 3.3V, RFM69HW radios, 8dB Ceramic antenna , independent power supply 3.3V regulators MIC5003 for radio and other for arduino promini. I have to increase the range. Now I have perfect link with a 130m distance, but I need to increase the range because other nodes have some walls and others are farther. I also have configured de modem mode to 4800 Tx rate and link increases the range in 10 meters more but not enoug.
My plan is to add a LNA in the gateway antenna and a LNA chip in the RFM69HW radio Break-out board I have that connect it to the Arduino, to make more sensible the link and increase the range. I see that this radio has a register containing the radio state (Tx or Rx) that can be used (the registed value) for by-passing the LNA when radio is in transmission and connect the LNA when radio is in receiving state, But I cannot figure out how to get this register in to a pin in the arduino, then I can use this arduino pin to enable or disable the LNA. I ask this because according to my quick research there is no bidirectional LNA. I hope with this arrangement to pick-up signal as low as -120dB. I cannot use repeater nodes because I have no way to supply them (unless solar, but it is expensive and ugly). I cannot use big external antennas in nodes although the nodes are in fixed position, I have tested small smd antennas but the ceramic antennas work better then I decided to is this one. I hope someone that have work in the radio library can tell me how to get the radio state (tx/rx) in an arduino pin output, or even in some of DIO pins in the RFM69HW radio that can be used to control the (external) LNA. Thanks -
RE: How to use soft SPI to connect my sensor chip while hard SPI is used for radio?
@jimy-aguirre I have contacted Tisham the ATM90E26 smart energy chip Arduino library author. He suggest to submit an issue against the library in github to request the softSPI feature support by the library, then I did it, here it is the link. If anyone can write any suggestion or constructive comment on github it is very welcome.
Of course if there is any "alternatively solution" to assign the mysensors library softSPI pins to the sensor chip and it works while the radio is connected to the SPI (hardware SPI) I will be happy to test it.
Thanks to all. -
RE: How to use soft SPI to connect my sensor chip while hard SPI is used for radio?
@mfalkvidd Thank you for answer. Yes, I am using a library for the ATM90E26A that is in github written by Tisham Dhar whatnick it support UART and SPI for this chip but not softSPI.
I was making some code experiments using other softSPI libraries trying to combine them to make the ATM90E26A works with softSPI. I tried to use also digitalIO and other for RFID using SoftSPI, no successful and probably I will have to contact to Tisham Dhar for SoftSPI implementation in the ATM90E26A library.
I was thinking (when I design the PCB) is to use the MySensors Soft_SPI feature to read the energy chip, but now as you said, I understand it need to be supported in the ATM90E26A library and not in the MySensor library. Anyway if anyone of you has any idea please let me know, I will be happy to try it. If the ATM90E26A library got softSPI support I will update this post. Many thanks. -
How to use soft SPI to connect my sensor chip while hard SPI is used for radio?
Hello, I have to say Thanks to Hek and all the MySensors team for this useful work, You are a great team guys!.
I have designed a nice PCB, I already have received this from PCBWay and I am ready to solder it. This board has a NRF24L01 connected to the SPI on Arduino pro-mini pins, same as described in “connecting radio” in the MySensors build section. The board also has an Atmel chip ATM90E26A, a smart metering chip. My intention is to make a mysensor energy smart meter. This ATM90E26 has SPI pins connected to Arduino pro-mini pins as follow:
-- MOSI to pin D5
-- MISO to pin D6
-- CLK to pin D7
-- CS to pin D8
I did these connections because I though this will prevent problems of SPI sharing and different SPI settings, (I though It can be better if I use MySensors soft_SPI for the energy chip, I though it would be easy to declare in the sketch) but now I am in trouble because I have spend a lot of time trying to make it work unsuccessfully. I cannot re assign the hardware connections pins because the PCB is now done. It is my mistake I should have tested it in a protoboard before to design the PCB. Then any hardware changes cannot be made.
I see that MySensor library can set SOFT_SPI pins but when you declare your radio type or gateway type, this SPI is assigned to the radio. My question is How to use soft SPI for my sensor chip and the hard SPI for the radio? Thank in advance, Please help me. -
Extending the Relay capabilities - Request
Hello, I have been studying a lot of time and I got sensors work with MySensors, it is a great work you did! Thanks to all for all this hard work and great forum, it is really a wiki resource. I want to request your help to create two new sketches.
1, I built the RelayActuator using six outputs, according to the instructions I change the number of relays to six and connect them to pins 3, 4, 5, 6, 7, 8, I cannot connect all the 8 relays of the board I buy. Can you create a sketch to connect 8 relays? Example using A0 to A7 as digital outputs.
2 I built the RelayWithButtonActuator and it works swimmingly and it is very useful to replace my light switches but I would like to install the double and triple versions, as the home light switches everybody can found at home. Can you modifi the sketch to create a sketches with two bottons – two relays, and three buttons – three relays versions? That will be very useful to replace all my home light switches.
Is it probably you are short of time, if so my apologies, please can you give me any idea what to modify in the sketches? Thanks in advance gracias -
RE: ERROR compiling codebender binary Switch
Thanks for answer,
yes I was talking about the Codebender. to try to keep moving, I have downloaded the API libraries and installed the Arduino IDE, I have downloaded the sketches and Arduino IDE is able to upload them without any problem. Then I go back to Codebender and deleted all the libraries in my main page (my account in codebender) then I clone the sketch with libraries but I got a compiling error, now is it different message.
Then I Clone again the sketch, I go to my account in CB and deleted de MySensors library, and return to the sketch in codebender and now it compile the sketch correctly. I was thinking it will not compile because I was deleting the MySensors library after clone and before compiling. Another trick for my Codebender Notebook.
Regards and thanks. -
ERROR compiling codebender binary Switch
Hello,
I have tried to compile the sketch for the binary switch sensor but I received the following error
/mnt/tmp/codebender_object_files/atmega328p_16000000L_arduino_eightanaloginputs_null_null______40866_cb_personal_lib_MySensors_______utility_______LowPower.o: In function
__vector_6': LowPower.cpp:(.text.__vector_6+0x0): multiple definition of
__vector_6'
/mnt/tmp/codebender_object_files/atmega328p_16000000L_arduino_eightanaloginputs_null_null______40866_cb_personal_lib_MySensors_______MyHwATMega328.o:MyHwATMega328.cpp:(.text.__vector_6+0x0): first defined hereI have tried in different PC and cloning the sketch and libraries, and correcting the code for the pull up resistor but it was not success with it. I tried WIN8 and Win10 and chrome and IE but no success. any Idea how to solve that?
Regards. -
RE: Fresh install compiling issues (NOOB)
Thanks hek, you send me in the right way, now i [solved] my issue, I will explain for anyone who have the same problem, what I do to compile the serial gateway without problem is to go to the window where the code is (the codeblender window) and click in "clone" then appear a message where you can choose to clone the sketch or to clone the sketch and libraries, then I click clone Sketch and Libraries, then I click "Run on arduino" and it works, then I go tho the homepage at codeblender and start the serial monitor choose the speed to 115200, click on connect and then I see the message "Serial gateway initialized". Now the serial gateway is working and I can see that in the serial monitor. Thanks
-
RE: Fresh install compiling issues (NOOB)
Hello,
I have the same problem, (and I am a noob too) I ran the basic blinking sketh using codeblender and the Arduino Nano and this sketch works fine, but I try to run the SerialGateway.ino and codeblender returns the error "there was an error compliling" just above the "Run on arduino" button, but no more details about what the problem is. I am not an expert but can some one give a check is is everything OK? this is my first contact with my sensors project and thanks in advance for any help.