LowPowerLab Forum

Hardware support => Moteino => Topic started by: mitchese on December 01, 2013, 01:17:41 PM

Title: Poor range out of the box [SOLVED]
Post by: mitchese on December 01, 2013, 01:17:41 PM
Hi Everyone,

I am having a range issue out of the box with a Motino R4 that I received.  I purchased three with RFM69HW @ 433mhz, and soldered the piece of wire into the ANT slot.

After programming with the struct_send and struct_receive example codes from github, they do work and communicate, however the range is around 30cm.  Anything beyond 30cm and it loses connectivity.

According to what I ordered, it was supposed to be R3, but I received R4 (no big deal though).  In case something got mixed up with the frequencies, I also tried setting the frequency to 868 and 915mhz, just to see if that helped improve the range.  All frequencies work equally poorly.  Is there any way to confirm the receiver I have is the one I ordered, 433mhz?

I have tested to ensure I don't have a short between the ANT and ground - multimeter shows this as an open circuit.

On the serial console of the receiver, when the antennae are within 5cm of one another I can see:
Listening at 433 Mhz...
SPI Flash Init OK!
[99]  [RX_RSSI:-74] nodeId=99 uptime=16200 temp=91.23 - ACK sent. Pinging node 99 - ACK...ok!
[99]  [RX_RSSI:-74] nodeId=99 uptime=16500 temp=91.23 - ACK sent.
[99]  [RX_RSSI:-75] nodeId=99 uptime=16800 temp=91.23 - ACK sent.
[99]  [RX_RSSI:-75] nodeId=99 uptime=17100 temp=91.23 - ACK sent. Pinging node 99 - ACK...ok!
[99]  [RX_RSSI:-76] nodeId=99 uptime=17400 temp=91.23 - ACK sent.
[99]  [RX_RSSI:-75] nodeId=99 uptime=17700 temp=91.23 - ACK sent.


If I move it to 30cm, the RX_RSSI increases to high 90s then drops:
[99]  [RX_RSSI:-90] nodeId=99 uptime=103200 temp=91.23 - ACK sent.
[99]  [RX_RSSI:-88] nodeId=99 uptime=103500 temp=91.23 - ACK sent. Pinging node 99 - ACK...ok!
[99]  [RX_RSSI:-90] nodeId=99 uptime=103800 temp=91.23 - ACK sent.
[99]  [RX_RSSI:-87] nodeId=99 uptime=104100 temp=91.23 - ACK sent.
[99]  [RX_RSSI:-92] nodeId=99 uptime=104400 temp=91.23 - ACK sent. Pinging node 99 - ACK...nothing

What can I do to increase the range?  My range requirement is not great, the project is a pair of suits for a costume that need to communicate with one another.  The people wont be more than a few meters away from one another, with some potential objects between them.
Title: Re: Help diagnosing poor range out of the box
Post by: Felix on December 01, 2013, 01:30:39 PM
White dot on the radio is 433 mhz, grey dot is 868/915mhz. Match the settings in the sketch with your hardware.
Make sure you are using radio.setHighPower() if you got the HW version.
If you have everything right, the HW will give you several hundred meters in open air.
Title: Re: Help diagnosing poor range out of the box
Post by: jbeale on December 02, 2013, 12:45:56 PM
I got several feet of range with a 915 MHz module programmed for 433 MHz.  Sounds to me like wrong frequency or no antenna connection.  Might be worth posting a photo of your module just to confirm the antenna placement, and the actual Tx and Rx code you are using.
Title: Re: Help diagnosing poor range out of the box
Post by: mitchese on December 03, 2013, 02:59:49 PM
Hi Guys,

Thanks for the replies, it turns out I was not enabling the highpower mode (missed that line in the setup - reading has a big advantage).  After adding range has increased significantly (more than what I need it for)
Title: Re: [SOLVED] Poor range out of the box
Post by: KanyonKris on December 10, 2013, 02:29:07 AM
This is a gotcha. When I started with Moteino, looking at code examples, I assumed if I had a RFM69HW I could choose to use the high power mode or not. Luckily, I turned it on just because I thought I might as well use high power while I setup my Moteinos. Otherwise I would have run into this same problem.

At the very least the comments in the code should make it clear that you must use high power mode if you have the RFM69HW radio module.

A better solution would be if the HW69 library auto-probed the radio module to find out if it's a W or HW, and if HW set the PA1 and PA2 on. I looked at the HW69 code but I'm not sure if I can make it work. I'll keep tinkering and see if I can come up with something.
Title: Re: [SOLVED] Poor range out of the box
Post by: Felix on December 10, 2013, 08:12:17 AM
The amplifier is implemented in hardware, and is not a firmware switch, so you have to know what you have. Sometimes lunch is not exactly free ...
Title: Re: [SOLVED] Poor range out of the box
Post by: KanyonKris on December 10, 2013, 05:13:31 PM
Bummer. So if you turn PA2 on (0x11 bit5=1) and read it back, both the RFM69W and RFM69HW will report that it's on even though the RFM69W doesn't have a PA2? Same with RegTestPa2 (0x5C)? Ugh.

Could RegVersion (0x10) be used? Does it report a different version for RFM69W and RFM69HW? But then what if they revise one of the parts and it changes? Again, ugh.

Felix, reading into your reply are you saying that these two modules are register identical, thus there's no way to tell them apart from software? Triple ugh.

Well, I guess the HopeRF folks thought most customers would use one or the other module. BTW, is there any downside to dropping the RFM69W and just use the RFM69HW? Seems like there's always the option to turn down the RFM69HW power, and thus make it the same as the RFM69W? Well, hats off to you for making both available so customers can choose, I just hope the support questions don't drive you crazy.

P.S. Those HopeRF datasheets are, um, NOT the best I've seen.
Title: Re: [SOLVED] Poor range out of the box
Post by: jbeale on December 10, 2013, 06:10:16 PM
Maybe the code could do auto-sensing simply by trying both settings of the power switch, and see which one works?  But if the power amp is simply not stuffed in the -W version, is there any harm in turning on the high-power setting anyway?
Title: Re: [SOLVED] Poor range out of the box
Post by: Felix on December 10, 2013, 07:28:40 PM
Unfortunately if you use the W with high power turned ON or the HW with high power OFF, they will simply not work at all.
I think physically the difference is obvious. So I guess blind people would have somewhat of a better case on this...

The RF chip is supposedly a Semtech SX1232, which has the ability to drive high power amps to get to +20dBm output. HopeRF implemented that on the RFM69HW.
I take that as a benefit rather than a nuisance. I'd rather deal with the same chip, same format, same pinout, same registers, same lib, 1 line difference, than having 2 different libraries with 2 different sets of code and 2 different everything else.

See page 23 in this doc where it explains some about the different possible RF amp circuits that are implementable: http://www.semtech.com/images/datasheet/sx1232.pdf
HopeRF's RFM69 datasheets like pretty much all other datasheets are just copycats of the original chip makers, branded with their own logos and deleting the extra amp stuff for radios like the 69W.

I think the HW is nice to have when needing the extra power and can certainly substitute an upgrade or replace the W altogether with a minor difference in price.
However I'm finding the W is sufficient for all around my property - my mailbox notifier being the farthest and still kicking at around 85dBm below grade in my basement where the receiver is. So I could not be happier. The RFM12B was struggling to get that far and half the time would not make it.
Title: Re: [SOLVED] Poor range out of the box
Post by: jbeale on December 10, 2013, 08:15:11 PM
If you want some extra signal margin you might also consider putting the receiver somewhere besides the basement :-)  But it's impressive that it works even there.
Title: Re: [SOLVED] Poor range out of the box
Post by: john k2ox on December 10, 2013, 11:19:19 PM
I have defined the first 31 locations in Moteino eeprom to store individual radio info.  The info includes the radio ID, freq adjustment coef., temp cal factor, ... and options.

The option byte has a bit for external ram an another for the high pwr version.

After I init the radio I read in the "state" from eeprom. This way my sketches work with any combination of hardware without modification.

If anyone is interested I can share the structure and the editor.

john
Title: Re: [SOLVED] Poor range out of the box
Post by: Felix on December 10, 2013, 11:42:12 PM
I keep all the brains in my lab in the basement so it's easy to monitor everything when I'm working here. Also keeps the house nice and tidy without wires and power adaptors somewhere in a closet.
The mailbox notifier is out there in bitter cold transmitting every half minute, I get every packet and the signal is strong at -80-90dBm, so I'm happy. It's a RFM69W by the way, not HW.
The original 9V battery died mid November so I changed it to a fresh 9V and upgraded to RFM69W. The battery voltage drops significantly in the cold winter and rises when it's hot. A 6x9V batt pack is $13 at HD, so $2 gets you 10 months of mailbox notifier service .. not bad I think.
Title: Re: [SOLVED] Poor range out of the box
Post by: KanyonKris on December 10, 2013, 11:57:31 PM
Quote from: Felix on December 10, 2013, 07:28:40 PM
Unfortunately if you use the W with high power turned ON or the HW with high power OFF, they will simply not work at all.
I think physically the difference is obvious. So I guess blind people would have somewhat of a better case on this...

But being new to Moteino, I didn't know what differences to look for, or even that I MUST know which RF module I have and use the correct mode in software or it wouldn't work.

Here's the define from MotionMote:

//#define IS_RFM69HW    //uncomment only for RFM69HW! Leave out if you have RFM69W!

I suggest:

//#define IS_RFM69HW    // Must be set correctly or radio will not work! Uncomment for RFM69HW, comment out for RFM69W.

Thank you for the link to the Semtech datasheet. It is clearer than the HopeRF cut and paste job.
Title: Re: [SOLVED] Poor range out of the box
Post by: KanyonKris on December 11, 2013, 12:05:58 AM
John, that's a very good way to address this issue. Yes, please share.

Quote from: john k2ox on December 10, 2013, 11:19:19 PM
I have defined the first 31 locations in Moteino eeprom to store individual radio info.  The info includes the radio ID, freq adjustment coef., temp cal factor, ... and options.

The option byte has a bit for external ram an another for the high pwr version.

After I init the radio I read in the "state" from eeprom. This way my sketches work with any combination of hardware without modification.

If anyone is interested I can share the structure and the editor.

john
Title: Re: [SOLVED] Poor range out of the box
Post by: ssmall on December 12, 2013, 01:44:38 PM
Does the RFM69HW use significantly more power than the RFM69W?
Title: Re: [SOLVED] Poor range out of the box
Post by: Felix on December 12, 2013, 05:33:24 PM
In TX mode HW will probably draw significantly more, in short bursts. But the radio spends most time in RX which is around 15mA, according to my own measurements.
See datasheets for more details, links at bottom of product page:

http://lowpowerlab.com/shop/RFM69W
http://lowpowerlab.com/shop/RFM69HW
Title: Re: [SOLVED] Poor range out of the box
Post by: KanyonKris on December 22, 2013, 04:34:57 PM
John, I'd still like to see your code for storing configuration data in EEPROM. I'd like to start doing this with my Moteinos. I have a few questions:

How do you get the frequency adjustment? Do you use another Moteino or some instrument like a frequency analyzer?

Is the temperature calibration factor used with a temperature reading to adjust the transmit frequency? So it's set only once? Do you use the temperature value from the radio module or from a different sensor?

Quote from: john k2ox on December 10, 2013, 11:19:19 PM
I have defined the first 31 locations in Moteino eeprom to store individual radio info.  The info includes the radio ID, freq adjustment coef., temp cal factor, ... and options.

The option byte has a bit for external ram an another for the high pwr version.

After I init the radio I read in the "state" from eeprom. This way my sketches work with any combination of hardware without modification.

If anyone is interested I can share the structure and the editor.

john
Title: Re: [SOLVED] Poor range out of the box
Post by: wheato22 on May 27, 2015, 05:03:35 PM
I too just fell into the HW #define comment nomenclature using Felix's latex revision of the Water Meter mote sketch. I failed to understand correctly and had the Pulse Counter Mote set as W vs HW. 

#define IS_RFM69HW    //uncomment only for RFM69HW! Leave out if you have RFM69W!

   Larry

Quote from: KanyonKris on December 10, 2013, 11:57:31 PM
Quote from: Felix on December 10, 2013, 07:28:40 PM
Unfortunately if you use the W with high power turned ON or the HW with high power OFF, they will simply not work at all.
I think physically the difference is obvious. So I guess blind people would have somewhat of a better case on this...

But being new to Moteino, I didn't know what differences to look for, or even that I MUST know which RF module I have and use the correct mode in software or it wouldn't work.

Here's the define from MotionMote:

#define IS_RFM69HW    //uncomment only for RFM69HW! Leave out if you have RFM69W!

I suggest:

//#define IS_RFM69HW    // Must be set correctly or radio will not work! Uncomment for RFM69HW, comment out for RFM69W.

Thank you for the link to the Semtech datasheet. It is clearer than the HopeRF cut and paste job.
Title: Re: Poor range out of the box [SOLVED]
Post by: pumpmck on March 13, 2016, 10:26:43 PM
I have had these for a while and am just getting around to testing them. I seem to be having similar range issues. I have read thru the descriptions and tried to figure out why the range is so poor. I am getting about 15' and as soon as I move the node into the doorway of my office where it would need to transmit thru a wall I loose the connection.  The dot you refer too could be grey or white, (looks white to me) I really can't tell, but the wire that came with it is 3.28" long and that is what I have soldiered to each node so I assume I have the 915mz version. Just to see if would make a difference  I tried a longer antenna and changed the frequency to 433 and it was actually much worse. Also checked voltage to both modules and they both read just under the 3.3 so don't think I have a power problem. I am using the gateway and node sketches from the RFM69 library to test. I have verified that the define for HW is commented out and the proper frequency is selected.
Anyone have any ideas?
Title: Re: Poor range out of the box [SOLVED]
Post by: Felix on March 13, 2016, 11:06:21 PM
If you've run the module with a mismatched IS_RFM69HW setting long enough, it's possible you may have damaged it. There are others who've seem to have confirmed this is possible.
Please see this thread (https://lowpowerlab.com/forum/index.php/topic,1707.0.html) for a recent discussion and the details of such a scenario.
Silver dot is 915mhz. Gold dot is 433mhz.
Title: Re: Poor range out of the box [SOLVED]
Post by: WhiteHare on March 13, 2016, 11:57:55 PM
Quote from: Felix on March 13, 2016, 11:06:21 PM
If you've run the module with a mismatched IS_RFM69HW setting long enough, it's possible you may have damaged it. There are others who've seem to have confirmed this is possible.
Please see this thread (https://lowpowerlab.com/forum/index.php/topic,1707.0.html) for a recent discussion and the details of such a scenario.
Silver dot is 915mhz. Gold dot is 433mhz.

@Felix: For the benefit of beginners, I wonder whether having the library monitor the chip temperature would safeguard against the problem, as well as allow the chip to indirectly self-disclose what type it is if IS_RFM69HW happens to be set.  i.e. the temperature probably rises slower on a RFM69HW than on the other types at the high settings.  The example sketches could have a BEGINNER_MODE set as the default so that people wouldn't ruin their gear by accident before they know what they are doing.
Title: Re: Poor range out of the box [SOLVED]
Post by: Felix on March 14, 2016, 08:14:02 AM
Somewhat funny, how about a RFM69 for dummies mode? I doubt that will help though. What happens when they load their own code or some other sketch or use a lib without the DUMMY MODE?
In the end folks should know what they are getting and visit the settings section, which is at the very top of every sketch. That's like putting on your seatbelt and looking both ways.
In all fairness I have loaded wrong settings and ran the radios like that, on at least a few occasions, while figuring out what I did wrong. Same radios ran fine upon fixing the settings. It's hard to pinpoint such a mistake and give the verdict that internal reflections actually have done the damage, although plausible and possible.
Title: Re: Poor range out of the box
Post by: pumpmck on March 14, 2016, 04:07:12 PM
I just ordered another for testing. I have never run these with high power enabled, but there is a possibility that I plugged one into the FTDI with the switch in 5Volts positions.  I guess the only way to find out if I damaged one is to try another. So we will see if a new one makes a difference.   I did check my original order and it was 915 version so I guess the dot is silver, not white or grey.
Title: Re: Poor range out of the box [SOLVED]
Post by: letcher on September 12, 2017, 08:09:24 PM
I have 20 or so moteinos working around my homestead.  Some are 300 meters apart and I've used the HW versions exclusively.  The last batch I ordered from Felix I mistakenly ordered the W version and didn't notice.  I soldered them up and set them aside for future projects.

Developing some software for a new device I simply could not make the motenio talk to a gateway.  Reviewing everything I couldn't find the problem.  I switched to one of my older motenios and everything worked as expected.  Looking at the two motenios with a magnifying glass I noticed little differences in the transceivers.  After correcting the transceiver definition and except of a slightly weaker signal W version worked fine.

When a motenio is inserted in a circuit the transceiver isn't normally visible and even if it were my 80 year old eyes would need a magnifying glass.  It would be nice if the motenios were clearly marked so the transceiver type would be easily known.  Maybe on a future revision?
Title: Re: Poor range out of the box [SOLVED]
Post by: TomWS on September 13, 2017, 08:46:16 AM
Quote from: letcher on September 12, 2017, 08:09:24 PM
I have 20 or so moteinos working around my homestead.  Some are 300 meters apart and I've used the HW versions exclusively.  The last batch I ordered from Felix I mistakenly ordered the W version and didn't notice.  I soldered them up and set them aside for future projects.

Developing some software for a new device I simply could not make the motenio talk to a gateway.  Reviewing everything I couldn't find the problem.  I switched to one of my older motenios and everything worked as expected. 
...
Did you comment the line:
//#define IS_RFM69HW    //uncomment only for RFM69HW! Leave out if you have RFM69W!

You NEED to do this if you're not using an HW radio.

Tom
Title: Re: Poor range out of the box [SOLVED]
Post by: Felix on September 13, 2017, 09:24:44 AM
Quote from: letcher on September 12, 2017, 08:09:24 PM
It would be nice if the motenios were clearly marked so the transceiver type would be easily known.  Maybe on a future revision?

I created this guide page (https://lowpowerlab.com/guide/moteino/transceivers/) where the different types of transceivers are magnified and the differences are made more obvious.
I agree the radios are small, but not sure how better they could be marked on the PCB itself, which is pretty small already and there is not a lot of space to add more markings.
I am open to suggestions. In your case it sounds like you just assumed you got the HW and only looked closer after nothing worked. In this case even a marking would not do much good. Maybe a a font 72 label warning this is a HW/W/HCW/CW would solve that case :)

Would be cool if HopeRF would make the soldermask different colors for the 13dBm vs 20dBm boards, would be a little even more obvious. For Moteino, doing that is not practical.

By the way on the latest Moteino R6, the differences are even more obvious. The radios are now only the HCW/CW and their mounting position as well as physical appearance are both different.

(https://lowpowerlab.com/wp-content/uploads/2016/09/DSC_0909_variants.jpg)

And the other types of radios:

(https://farm1.staticflickr.com/563/20328459340_9a2a3559ce_o.jpg)
Title: Re: Poor range out of the box [SOLVED]
Post by: ChemE on September 13, 2017, 12:53:45 PM
Felix,

Thanks for posting the query and the graphic of the different solder locations together in the same post.  The obvious solution now that I'm seeing both together is some text on the bottom silk that is still visible after you solder the appropriate transceiver module onto the correct footprint.  So in the case of the HCW, you need some text between pins 0, 1, 4, 5 that says "HIGH POWER" and between pins A2, A3, 10, and 11 that says "LOW POWER".