LowPowerLab Forum

Hardware support => Moteino => Topic started by: steveww on May 11, 2016, 06:42:42 AM

Title: Pathetic Range [SOLVED: use the right radio settings!!]
Post by: steveww on May 11, 2016, 06:42:42 AM
I have two Moteino one is in a box using an external aerial, the other is open and using a 1/4 wave bit of wire. I am not using the high power setting but I have set the power to 31. If I read the manual correctly this should give +13dBm. The RSSI at the receiver is -80, this is over a couple of feet on my desk! Of course if I move them apart more the signal is lost.

I have check the obvious, there is continuity between the moteino and the external SMA connector. I have replaced the aerial with a 1/4 wave bit of wire; no difference.

For my remote sensing project I was hoping for something further away than the end of my desk!

Any ideas?
Title: Re: Pathetic Range
Post by: emjay on May 11, 2016, 07:52:52 AM
@steveww,

You are using which ISM band, 433 or 868 MHz?  And the radio modules fitted are which band?
Title: Re: Pathetic Range
Post by: Felix on May 11, 2016, 08:09:12 AM
Using the right settings to match your hardware is essential. What you describe is very typical of settings mismatch.
Make sure you have the frequency and ISRFM69HW set correctly.
Title: Re: Pathetic Range
Post by: steveww on May 11, 2016, 11:42:05 AM
SOLVED  :)

I am using the RFM86HW modules running 868MHz.
It would appear that you have to run these in high power mode - radio.setHighPower(true);
They do not like running in a lower power mode or the set up called by radio.setHighPower(false); does not float their boat?

Now running:
radio.setHighPower(true);
radio.setPowerLevel(26);
Which should give me 15dBm about the same as a typical laptop WiFi which will get the signal in from the garden.
Title: Re: Pathetic Range
Post by: steveww on May 11, 2016, 11:49:11 AM
Looking deeper in the forum I see this is a common gotcha that has caught a few people out.
All part of the great learning process.
Title: Re: Pathetic Range
Post by: Felix on May 11, 2016, 12:52:29 PM
If only HopeRF would have used the one unconnected pin on RFM69 - to flag whether the implementation is a HW or just W (by a logical HI or LOW), then we could use that pin to figure this setting out automatically. Otherwise it's a user input. Indeed a gotcha but it's always documented in code and it's at the top in the config section so people can't miss it if they look at that config section where they should set their network,id,frequency anyway.
Title: Re: Pathetic Range
Post by: TomWS on May 11, 2016, 01:47:54 PM
Quote from: Felix on May 11, 2016, 12:52:29 PM
If only HopeRF would have used the one unconnected pin on RFM69 - to flag whether the implementation is a HW or just W (by a logical HI or LOW), then we could use that pin to figure this setting out automatically. Otherwise it's a user input. Indeed a gotcha but it's always documented in code and it's at the top in the config section so people can't miss it if they look at that config section where they should set their network,id,frequency anyway.
If only HopeRF had used the TXPOWER pin, there wouldn't be an issue.  The HW would be able to send at all power levels with the PAs turned off on the lowest ones.

Tom
Title: Re: Pathetic Range
Post by: joelucid on May 11, 2016, 02:00:31 PM
QuoteIf only HopeRF had used the TXPOWER pin, there wouldn't be an issue.  The HW would be able to send at all power levels with the PAs turned off on the lowest ones.

Tom

Which txpower pin?
Title: Re: Pathetic Range
Post by: joelucid on May 11, 2016, 02:11:10 PM
QuoteIndeed a gotcha but it's always documented in code and it's at the top in the config section so people can't miss it if they look at that config section where they should set their network,id,frequency anyway.

In my bootloader I need to know radio type, frequency etc right at boot time for obvious reasons. That makes it easy to read out that config info at app runtime and configure the radio correctly automatically. I suppose you could do something similar in the Moteinos you ship: just burn the radio type and frequency into flash and eliminate this gotcha once and for all.
Title: Re: Pathetic Range
Post by: Felix on May 11, 2016, 02:37:48 PM
Quote from: TomWS on May 11, 2016, 01:47:54 PM
If only HopeRF had used the TXPOWER pin, there wouldn't be an issue.  The HW would be able to send at all power levels with the PAs turned off on the lowest ones.
Tom

Indeed, which TXPOWER pin??

(http://i.imgur.com/7PAPZXD.png)
Title: Re: Pathetic Range
Post by: TomWS on May 11, 2016, 03:39:48 PM
@Joe,@Felix, IIRC there is a pin on the Radio chip that is supposed to disable the high power PAs (ie, disconnects PA_BOOST from the antenna network) when the internal PA (PA0) is being used.  I thought this was called TXPOWER, but obviously I'm wrong about that.  In the RFM69HW datasheet, there is an implication that PA0 can be used instead of the PA_BOOST but it is unimplemented on the module.

Tom
UPDATE:  Here is the info I was thinking about re TXPOWER pin (more like RXTX pin):
https://lowpowerlab.com/forum/index.php/topic,362.msg2044.html#msg2044

Man, the cobwebs were thick on this one!!!
Title: Re: Pathetic Range
Post by: perky on May 11, 2016, 07:54:56 PM
Actually I think RXTX simply indicates whether it's receiving or transmitting, and is used to contol the RF switch if fitted. For the W part there's no switch, RFIO is both TX and RX and goes straight to the antenna, but the HW part needs to switch PA_BOOST to the antenna when transmitting higher power. HopeRf put one RF switch on, but as it always swiches to PA_BOOST (i.e. PA1 and/or PA2) on transmit so you can't use RFIO (PA0) for transmission.

It would have been nice if the sx1231h had a register bit that allowed you to disable the RXTX pin and force it always to select RFIO regardless of transmission or reception, then you could have access to all the power range. HopeRf could, however, have used the spare IO pin to do 2 things:  First indicate whether it's a H or HW part with a  high or low, but they could also have allowed that to be overdriven externally for HW devices to overdrive the RXTX at the switch to the RFIO select state (maybe just a series resistor between the RXTX pin and the switch and the switch pinmade available on the spare IO pin, it would sink a little bit of current when overdriven but tiny compared to the transmit current). That way the MCU could control the RXTX behaviour and gain full range.

Mark.
Title: Re: Pathetic Range
Post by: Felix on May 12, 2016, 08:53:55 AM
Mark, I can confirm your observations.
Regarding improvements, here's a chance to make a better module :)
I already tried an experiment, turned out OK but 0402 is a little more challenging on my pick and place, and parts cost + time spent to make these makes it economically less ideal than just sourcing them from Hope.

(https://farm1.staticflickr.com/584/21088513486_b5e2ea546f_n.jpg) (https://flic.kr/p/y8w9m7)
Title: Re: Pathetic Range
Post by: TomWS on May 12, 2016, 09:02:36 AM
oooh!  I can see the headlines now:  "New RFM69 standard from the renowned LowPower Labs!"

Good job, Felix!  Your pick and place does a lot better job than Hope's!

Tom

Title: Re: Pathetic Range
Post by: TomWS on May 12, 2016, 09:10:04 AM
Quote from: perky on May 11, 2016, 07:54:56 PM
Actually I think RXTX simply indicates whether it's receiving or transmitting, and is used to contol the RF switch if fitted. For the W part there's no switch, RFIO is both TX and RX and goes straight to the antenna, but the HW part needs to switch PA_BOOST to the antenna when transmitting higher power. HopeRf put one RF switch on, but as it always swiches to PA_BOOST (i.e. PA1 and/or PA2) on transmit so you can't use RFIO (PA0) for transmission.

It would have been nice if the sx1231h had a register bit that allowed you to disable the RXTX pin and force it always to select RFIO regardless of transmission or reception, then you could have access to all the power range. HopeRf could, however, have used the spare IO pin to do 2 things:  First indicate whether it's a H or HW part with a  high or low, but they could also have allowed that to be overdriven externally for HW devices to overdrive the RXTX at the switch to the RFIO select state (maybe just a series resistor between the RXTX pin and the switch and the switch pinmade available on the spare IO pin, it would sink a little bit of current when overdriven but tiny compared to the transmit current). That way the MCU could control the RXTX behaviour and gain full range.

Mark.
So using a GPIO to gate off RXTX should work if the GPIO is set when the power range is within the PA0 capability.

Tom
Title: Re: Pathetic Range
Post by: perky on May 12, 2016, 09:18:41 AM
Good work Felix! Did you do it that way? Series resistor between RXTX and the switch select pin, and switch select pin on the spare IO pin?
Mark.
Title: Re: Pathetic Range
Post by: Felix on May 12, 2016, 10:53:51 AM
Quote from: TomWS on May 12, 2016, 09:02:36 AM
oooh!  I can see the headlines now:  "New RFM69 standard from the renowned LowPower Labs!"
Good job, Felix!  Your pick and place does a lot better job than Hope's!
It can do it, but the challenge with 0402 is it's a much smaller part than 0603 and it requires a special teflon pick tool ($700 from DDM). The vacuum pump barely produces enough suction to make the head distinguish (through this hair thin pipe pick nozzle) when the part is ON or OFF the nozzle. So the threshold is very narrow and has lots more retries than 0603 which has virtually none.
I think at this point there would be no advantage to mass produce these in the USA because of several factors.
Title: Re: Pathetic Range [SOLVED: use the right radio settings!!]
Post by: joelucid on May 12, 2016, 12:22:40 PM
QuoteI think at this point there would be no advantage to mass produce these in the USA because of several factors.

Also I think power consumption during TX doesn't significantly fall below 16mA for these radios. There's got to be a reason the datasheet only quotes power consumption down to -1dBm. http://blog.andrehessling.de/2015/02/07/figuring-out-the-power-level-settings-of-hoperfs-rfm69-hwhcw-modules/ demonstrates this.

So if it's free - why not shout?