Hello this is my first project and I chose home automation to get started. I'm just looking for confirmation. Can I connect an rfm69hw directly to the 3v pin on an arduino uno or do I have to level shift the 5v pin?
There is an assumption that we know what a rfm69hw is, or that we will google it for you. Not likely that that assumption is even remotely valid (especially the second part).
Hi, what I think he is looking for, is the same as I have been trawling the web after but not found anywhere.
I have lend some pictures to explain what the problem is and part of the solution.
Hopeful one of you guys know how to "connect the dots".
The case is that the Arduino uno R3 or clones often runs on 5v, but the RFM69HW is a module running at 3.3v.
And then it cant just be connected to the arduino (5v version) with out a "logic level converter" in between.
(just learned this)
The RFM69HW uses SPI... not 100% sure what it is but apparently its important.
Now the big question is how should it be connected according to this attached picture.
I dont think the red wire should be connected to the 3.3v when using the LLC.
Edit:
cant attach image so uploaded to:
Its all based in this home automation tutorial
See reply #2 for a complete Arduino+RFM69HW solution.
Thats not a solution for me, I already have 9 pcs of the rfm69hw modules.
could this be the way to connect it?
Or did I misunderstood MISO and MOSI?
and what about SCK and NSS should they go direct or through the LLC?
There is plenty of useful information, including working code and schematic wiring diagrams, at the anarduino site.
Oh boy.....
Thought it was just a misunderstanding that you guys was so rude to Hazetek.
But hey, you guys are so arrogant and must be sick of all us newbies joining and asking questions.
I thought by making drawings would make it a qualified question and easier to understand the question, even if you dont want to google rfm69hw. But instead you just say, hey we properly have a tutorial somewhere that explains it, so go look around the corner and you might stumble upon it at some point.
it's sad.
But hey, you guys are so arrogant and must be sick of all us newbies joining and asking questions.
Why did you butt in on Hazetek's question?
anybody got the rf69hw working?
Mine is transmitting symbols instead of words
Hello,
I'll try to explain a bit about the RFM69 (or RFM69HW) and the connection to the Arduino Uno (5V). Bear in mind that, when you're working with devices a bit more complex than simple LEDs, you need to spend some time understanding the basics... for that reason posting a simple drawing about how you should connect it won't help much.
RFM69 is not 5V Compatible
First of all, the reason why you can't connect a RFM69 directly to the Arduino is because the RFM69 is a 3.3V device only. It's not 5V compatible (period). Many people will think: so it's just a matter of powering it from the 3.3V pin on the Arduino and connect everything else, right?! WRONG!
People forget that the communication data (in this case SPI), happens in a binary way... yes, 0s and 1s. Those are represented by the MCU and RFM69 using voltage levels. In other words a "zero" will be 0V and an "one", guess what, it'll be 5V when written by an Arduino Uno!
SPI
Now that I've mentioned SPI, it's important to understand it, at least the basics of what it is or does... take that as home-work. In short SPI is a serial protocol, where you need to have at least 2 "lines": "Clock" and "Data"... the Clock is produced by the Master and the Data will "flow" according to this clock... on every "beat" of this clock the Master can send or receive data. On the real world you normally have 4 lines and those are normally called: SCK, MISO, MOSI and CS.
SCK - Clock (Generated by the Master)
MISO - Master "IN", Slave "OUT" (Slave Talks, Master Listens)
MOSI - Master "OUT", Slave "IN" (Master Talks, Slave Listens)
CS/NSS - Chip Select (Controlled by the Master)
Now, just by reading the "lines" names above you might be able to see which pins the Arduino MCU will be "writing" zeros and ones and which pins the "RFM69" - the slave - will be "writing" zeros and ones.
Level Shifer
In practical terms what needs to happen, is that all "lines" where the Arduino MCU will be writing to, or in other words, delivering 0V and 5V pulses, they need to be converted to 0V and 3.3V pulses before hit the RFM69.... and believe or not, this is a very common situation in electronics and it's solved using a "Level Shifter" or "Level Converter".
There are plenty of chips to do that, one very common is the "4050" (just Google it). Here the datasheet link for a 4050 from NXP: http://www.nxp.com/documents/data_sheet/74HC4050.pdf
Another "cheap" way of archiving something similar is using voltage-dividers (resistor dividers) - also a home work if you never heard about. The problem is that you would need more connections, more space, more chances of things going wrong.
Now, I said I wouldn't draw anything but if you read up to here it might help you getting there... you need have an Arduino Uno (5V), a RFM69 3.3V and a 74HC4050 Level Shifter, and your connections will look like it:
Arduino GND ---------------------------------------------- RFM69 GND
Arduino 3.3V ---------------------------------------------- RFM69 VCC
Arduino 3.3V ----------- 74HC4050 3.3V
Arduino GND ----------- 74HC4050 GND
Arduino PIN 10 SS -----> 74HC4050 PIN3 / 74HC4050 PIN2 ---> RFM69 NSS
Arduino PIN 11 MOSI ---> 74HC4050 PIN5 / 74HC4050 PIN4 ---> RFM69 MOSI
Arduino PIN 12 MISO <-------------------------------------- RFM69 MISO
Arduino PIN 13 SCK ---> 74HC4050 PIN7 / 74HC4050 PIN6 ---> RFM69 SCK
Arduino PIN 2 INT <-------------------------------------- RFM69 DIO0
The little diagram above is how you should connect your 5V Arduino to the RFM69.
Note that the "lines" where the communication flows from the RFM69 to the Arduino you don't need a level-shifter. That's because the RFM69 will "write" 3.3V as being an "one" and that's enough voltage to the Arduino to understand as a "one". Now, if you would be doing the same with a 1.8V device, that would be a different scenario and would required level-shifting form both sides.
If you are not sure about how to connect your "Level Shifter", you can easily test it using a simple voltmeter at the "Output". For the INPUT signal, use a 5V supply.
3.3V Supply
│
│
┌───────┴────────┐
0V/5V Signal ───[IN]───┤ "Level Shifter"├───[OUT]─── 0V/3.3V Signal
└───────┬────────┘
│
│
GND
Better Solution
As mentioned by @jremington, I also suggest getting something ready-to-use. There are a few boards on the market and the costs-benefit is well worth it. If you already have a few RFM69s, just fine, play with it... but for a real-life solution you should consider:
ATMega328p, 4Mbits Flash, Runs on a single AA: Whisper Node - AVR - Wisen
ATMega328p, RTC: Anarduino MiniWireless Details
ARM Controller: http://www.rocketscream.com/blog/product/mini-ultra-pro-with-radio/