Author Topic: MoteinoMEGA-USB + RFM69HCW  (Read 2660 times)

DenisJ

  • NewMember
  • *
  • Posts: 18
  • Country: it
MoteinoMEGA-USB + RFM69HCW
« on: January 15, 2017, 06:49:36 AM »
Hi there all,
I just wont to ask if is possible to make a communication between
MoteinoMEGA-USB+RFM69HCW and Arduino Mega+RFM69HCW

I'm sure that the MoteinoMEGA will work :-)
But how about the Arduino Mega+RFM69HCW please ?

I so in this page that cab be connected
https://learn.sparkfun.com/tutorials/rfm69hcw-hookup-guide

But I don't understand well the remark about INT0 request for the RFM69.h lib:
// INT0 on AVRs should be connected to RFM69's DIO0 (ex on ATmega328 it's D2, on ATmega644/1284 it's D2)

I so the pinout of the Ardiono Mega that D2 have the INT4 and not INT0 (that is on D21)

So is there possibility to make work the Arduino Mega 2560 with RFM69HCW ?

Thanks a lot
Denis

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: MoteinoMEGA-USB + RFM69HCW
« Reply #1 on: January 16, 2017, 04:20:11 PM »
Yes I think others did it. The interrupt has to be a hardware interrupt.

DenisJ

  • NewMember
  • *
  • Posts: 18
  • Country: it
Re: MoteinoMEGA-USB + RFM69HCW
« Reply #2 on: January 17, 2017, 01:19:49 AM »
Thanks for the help Felix,
I just read your answer here in the forum

"For the DIO0 .. that's the interrupt INPUT. So if you plan to wire it to the SCL then that might be an issue since SCL is a clock .. which is an OUTPUT. So I'd say that won't work."

So I could use a pin 19 in this case ? I don't understand if is a hardware interrupt.
I can try to code the RFM69.h with this ?
Code: [Select]
#elif defined(__AVR_ATmega2560__) // IRQ schimbat
  #define RF69_IRQ_PIN          19
  #define RF69_IRQ_NUM          4

...but I don't know if is a hardware irq.

Thanks again
Denis

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: MoteinoMEGA-USB + RFM69HCW
« Reply #3 on: January 17, 2017, 07:57:45 AM »
According to this official ArduinoMEGA (2560) spec the INT0 is D2 so you should not need any changes as long as you wire it correctly.

DenisJ

  • NewMember
  • *
  • Posts: 18
  • Country: it
Re: MoteinoMEGA-USB + RFM69HCW
« Reply #4 on: January 17, 2017, 08:18:22 AM »
Yes ...but there is a lot of confusing diagram on web
My mega 2560 is an R3 model, so I don't understand yet if is the one with SCL or not.

Where do you exactly see the D2 on this page please ?

Another think that I want to ask... do you think that I need some other piece in order to make it work ?
or I can simply attach the RFM69HCW to the mega board please ?

Thanks again
Denis

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: MoteinoMEGA-USB + RFM69HCW
« Reply #5 on: January 17, 2017, 08:26:07 AM »
Arduinos are 5V, the RFM is 3.3v you will need buffering, lots of threads for that in the forum, please search.
You don't need to mess with SCL, that's an entirely different signal. You need SPI and the interrupt (INT0, D2).

DenisJ

  • NewMember
  • *
  • Posts: 18
  • Country: it
Re: MoteinoMEGA-USB + RFM69HCW
« Reply #6 on: January 17, 2017, 08:29:11 AM »
On my arduino mega 2560 I have a 3,3v output
In fact I linked the RFM69HCW to that port
..I am wrong ?

Thanks again
Denis

Jay

  • NewMember
  • *
  • Posts: 2
  • Country: de
Re: MoteinoMEGA-USB + RFM69HCW
« Reply #7 on: January 20, 2017, 05:16:46 PM »
Hi,

i have successfully connect a Arduino Mega R3 with Adafruit´s RFM69HCW breakout board for level shifting 3,3V <--> 5V
and it works awesome as PiGateway.

The RFM69 library is untouched. I have only customized the PiGateway Sketch to drive breakout board and add a TFT Display for additional information about my nodes.

Here is my wiring:
//////////////////////////////////////////////////////////////////////
//  Arduino Mega 2560     <-->    RFM69HCW Breakout
//      5V                                         VIN
//      GND                                      GND
//      --                                           EN
//      D2                                         G0
//      D52 (SCK)                             SCK
//      D50 (MISO)                           MISO
//      D51 (MOSI)                           MOSI
//      D6                                         CS
//      D7                                         RST
//////////////////////////////////////////////////////////////////////

Please have regards for my school-english ;-)

Jay

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: MoteinoMEGA-USB + RFM69HCW
« Reply #8 on: January 20, 2017, 06:31:43 PM »
Cool, and where's the MoteinoMEGA you were talking about?

Jay

  • NewMember
  • *
  • Posts: 2
  • Country: de
Re: MoteinoMEGA-USB + RFM69HCW
« Reply #9 on: January 21, 2017, 04:00:24 AM »
I use MoteinoMEGA´s only on my WeatherNodes.
My PiGateway is a Arduino MEGA R3 Board not MoteinoMEGA.

My post here should DenisJ show about his question:
" So is there possibility to make work the Arduino Mega 2560 with RFM69HCW ? "
and yes, that is easy possible to bring the Arduino MEGA 2560 R3 Board run with the wiring show above with untouched RFM69lib.

regards
Jay

DenisJ

  • NewMember
  • *
  • Posts: 18
  • Country: it
Re: MoteinoMEGA-USB + RFM69HCW
« Reply #10 on: January 21, 2017, 05:57:18 AM »
Thanks a lot Jay,
I now talk between MoteinoMEGA-USB+RFM69HCW and Arduino Mega+RFM69HCW
I had just some problem to settins some pin of arduino mega
But at the end the DIO0 of rf module go to the Pin2 of Mega 2560 R3 version
And it's work :-)

Thanks again
Denis