Go Down

Topic: RFM69HW - another "not working" thread :( (Read 98 times) previous topic - next topic

AdeV

Feb 14, 2017, 10:41 pm Last Edit: Feb 14, 2017, 10:52 pm by AdeV
Hi all,

I bought a handful of RFM69H (not HW as it turns out...) modules cheep off t'bay, and now I'm trying to get them to talk to each other. Nothing doing so far...

My setup is as follows: On either end of one large breadboard, I have 2-off Arduino Nano boards (I also tried Mini-Pros, but only have one FTDI cable handy for programming).

On each Arduino, the MOSI/MISO/SCK/NSS lines are connected via a bi-directional level shifter (looks identical to this one: http://www.kitsguru.com/index.php?route=product/product&product_id=904 although I didn't buy it from there) to the correct pins on the modules. (So - to clarify, I have 2x 4-way level shifters, one for each Arduino. I have NOT put 5v anywhere near either module)

External power is supplied by a 2-amp 5v wall wart onto one side of the breadboard (my 5v/gnd rails). I have a 3v step-down power supply connected to the rails on the other side of the breadboard, this is powered from the 5v line. Each Arduino & HV side of the level shifter is powered from the shared 5v rail. Each RFM69H and LV side of the level shifter is powered from the shared 3v rail.

The interrupt pin DI00 on each RFM69H is attached directly to pin 2 of the relevant Arduino. The reset pin of each RFM69H is left floating. I've soldered a 10cm piece of wire to the Antenna connection of each module, They end up being about 18" apart on the bench.

Wiring is as per the Sparkfun diagram (https://cdn.sparkfun.com/assets/f/1/0/e/9/fritzing-redboard.png) except I've powered my level shifter & module directly from the appropriate power rails on the breadboard.

Next step - load the Sparkfun example application. No comms.
Next I tried the TNode/TGateway examples at Anarduino - also no joy.

Adding various debugging showed the TNode code hanging when it tried to read the RFM69H temperature.
The Sparkfun code didn't crash, but didn't work either.

I have both Arduinos plugged into the same computer via USB ports, so I can see both serial outputs. The initialization text comes up OK, but nothing thereafter. The Sparkfun code shows it attempting to transmit (and I can see LED13 flashing on the Nano boards), but nothing else back.

I also added a "readAllRegs()" call to the Sparkfun code, and enabled debug (#DEFINE REGISTER_DETAIL) in the RFM69.cpp library; the results of this appeared to be garbage (absolutely everything set to "1"). Including the write-only register...


Some questions:
1) Is it likely I've got a batch of duff modules? I got 3x 915mhz and 2x 434mhz. So far I've only tested with 2 of the 915mhzs. These came direct from China (hence not having the "W" designation) and cost buttons, so no real loss if they're toast.

2) Is sharing the power supply between the two Arduinos likely to cause any problems?

3) When I put a multimeter reading mA into the power line, it never read more than 40-50mA, even when a module was supposedly transmitting. Which given these are the high power modules, seems wrong?

4) I've read somewhere that pulling Reset up for 100uS may be required. I presume this would require another level shifter... (I've got one somewhere); has anyone else tried this & had any success with otherwise non-functioning modules?

Lastly... I soldered moderately long flying leads to the module (about 10-12cm). As I only had female-female leads available, I've then used standard jumper leads to plug these into the board. Is THIS likely to cause issues? Should I reduce the "flying leads" to a minimum so the module's up-close and personal to the Arduino?

Many thanks in advance for any assistance. I can take a photo of the breadboard if you want the gory details...

AdeV

Anyone?

Sorry to ping this back to the top... I do have a few more modules to try, if there's anything anyone can suggest (even if it's "buy from a more reliable source...") would be much appreciated, thanks.

musskopf

My suggestion is to simplify all your circuit. Make your Arduino run at 3.3V and remove the Level converter. Also double check all connections.

If you can't get rid of the level shift, disconnect the RFM69 and make a very simple sketch to write "0" and "1" to each OUTBOUND pin. With a multimeter go and measure the voltage on the other side to make sure all is fine. Do the same on the other way around with the INBOUND pins, making sure if you raise the voltage to 3.3V your Arduino can read it as "1".

Once you checked all lines, reconnect the SPI lines and try to read the RFM69 registers. If still doesn't work, you'll need a logic analyzer/oscilloscope o make sure the SPI is working.

Btw, which library are you using? have you tested the simplest example provided?
http://talk2.wisen.com.au

YTWally

#3
Feb 16, 2017, 04:01 pm Last Edit: Feb 16, 2017, 05:40 pm by YTWally
Quote
The reset pin of each RFM69H is left floating.
This is not usually a good idea as inputs float and can assume an unknown logic state, and even change with time. The Adafruit breakout and example uses the reset in the setup() routine. Try connecting it to ground through a low value resistor or 3v3 and see if it fixes the problem. There is a discrepancy in the Adafruit literature as to the reset logic level. The PDF says to pull low to reset but the example code shows high to reset. Mine works using the example code.

PS
The RFM69 module data sheet shows that high is reset. See section "7.2.2. Manual Reset" of the data sheet PDF file for details.

AdeV

Thanks for the suggestions chaps, much appreciated :)

So... I checked the level shifters as suggested - all good.
Double-checked the wiring... doh! I'd got MISO and MOSI back-to-front..... guess who feels like a right muppet now?

Anyway, now I'm getting sensible results from the register read.

I also added (via a 2nd level shifter) the reset line. That seems to help the board to some extent...

Next up I modified the Sparkfun example to auto-send every few seconds, so I could try the board with the computer disconnected.. it's still misbehaving though. I put my multimeter on 200 mA range and inserted it into the power line to the RFM69H board.

It seems to do one of four things:
 - Works fine, except it's not transmitting (power draw doesn't exceed 16mA)
 - Appears to transmit once, then the SPI "jams" (pin 13 sticks HIGH, power draw constant at around 130mA)
 - Goes into an infinite loop of resetting the board (I get the "Node 1 ready" message repeatedly. 16mA draw)
 - Occasionally it goes off completely (0mA draw)

I think the last one might be the battery failing in my multimeter, I'm not sure. I don't have a spare here, naturally.

What's the maximum permissable draw through the USB port? The circuit will power up via the USB connector, and the radio can apparently draw 130mA according to the multimeter, without ill effect. My 5v (high voltage) side is connected to Vin on the Ardino (a Nano clone). It behaves the same whether the computer is plugged in, or if it's powered via a wall wart (which can definitely supply enough juice).

Tomorrow I can stick an oscilloscope on it, but what to look for? I do have a Logic Analyzer (an old HP thing), but have no idea how to use it yet.

AdeV

PS: Tomorrow I'll try the Adafruit example, I haven't used that one yet, just the Sparkfun one and the Anarduino one.

YTWally

Continual resetting is often caused by sag in the voltage at the Vcc pin. The current draw is in bursts so meter readings may not be telling the whole story.



Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy