The RFM12B Board is a compact breakout board for HopeRF's RFM12B radio module.
The board works with a whole range of Arduino (compatible) boards. For ease of use, the header pins are labeled with signal names as well as Arduino pin numbers.
The supply voltage (Vdd) for normal operations of the RFM12B radio module is limited to 3.8V. When connecting to a 5V context (e.g. Duemilanove), there is provision for a voltage regulator circuit and voltage level converters for the signal pins.
An antenna must be connected to the module - see the discussion below.
See the RF12 library for source code and examples.
For use at 3.3V: (the signal logic levels and the power supply voltage level already match)
- Omit R4, R5, R6. Omit R1, R2, R3 and bridge across the respective topside solder jumpers SJ1, SJ2, SJ3. This disables the voltage-level converters.
- Omit the voltage regulator (VR) and supply 3.3V into the connector pin marked '3V3'.
- Insert C2, C3 to improve decoupling of the 3.3V supply.
For use at 5V:
- Include all the components (C1, C2, C3, VR, R1, R2, R3, R4, R5, R6) to activate the signal voltage-level converters and the voltage regulator (VR).
The VR reduces the 5V supply to 3.3V for the RFM12B module. A regulated 3.3V output is available from the connector pin marked '3V3' for light loads from other circuits needing 3.3V.
For the Arduino world:
Most classic Arduino variants use 5V for power and signal level, so configure the regulator as described above. More recent Arduino designs are dual-voltage (5V and 3.3V) - check the specs and decide about configuring the radio board regulator or not. If battery powered, remember that the overall power consumption is lower a 3.3V.
An 8pin female header lines up to the Arduino connector if you bend up the outer pins to avoid connecting to the header. The signal names are marked on the PCB. Add two jumper wires to connect up the IRQ line and power feed selected.
These pictures show using 5V power (the 3.3V pin is left floating).
Hello World example with two Arduinos¶
Using two RFM12B boards to communicate between two Arduinos or clones is easy.
- Build two boards and install them as shown above and in the connection diagrams above
- Install jeelib [[https://github.com/jcw/jeelib ]] in your documents/Arduino/libraries folder or wherever your libraries folder is located.
- Unzip the file, then, rename jeelib-master-xx to jeelib
- In the Arduino IDE, run the sketch: Examples->jeelib->RF12->RF12 demo
- Open the serial monitor, and set the baud rate for 57000 baud in the bottom right corner.
- If all goes well you should see the RF12demo screen
- To set the proper radio frequency, sending the following characters from the top of the serial monitor:
- "4b" for 434 radios with a green dot
- "8b" for 868 radios with a yellow dot
- "9b" for 915 radios with a red dot
- The monitor should respond as shown below
A i1 g212 @ 433 MHz // for 434 radios with a green dot
A i1 g212 @ 868 MHz // for 868 radios with a yellow dot
A i1 g212 @ 915 MHz // for 915 radios with a red dot
- You will need to do this for both of the radios/boards
*Now send a 't' and the monitor should respond as seen below.
*You are off and running at this point if you see the "OK" (acknowledge) on screen.
The radio message has made a round trip from one radio to another.
Dimensions: 21.1 x 38 mm
CadSoft EAGLE design files: see below.
Construction hints - RFM12B module¶
You will see in the picture below that some RFM12B module pins are left unsoldered. This is because those pins are for signals that are not used in this design. For example, the module can output a clock signal to be used with an MPU lacking its own clock generator - that does not apply here. If you look at the zoomed false-color snapshot below, only pads with red traces need soldering (hard to see but this includes ANT and GND). If you want to count the pins carefully, then this method is fine. But soldering them all is fine as well.
An antenna is required and can be a simple 1/4-wavelength piece of wire soldered at the Ant. position:
- for 433 MHz, use a 165 mm wire
- for 868 MHz, use a 82 mm wire
- for 915 MHz, use a 78 mm wire
The wire supplied with the kit is a little longer to allow for trimming - simply bend a few mm back on itself at the floating end of the wire and cut to length only when adjustment is complete.
Without access to some measurement system, simply trim to the length for the corresponding Band entry shown above - that is close enough for most systems.
If you have access to a field strength meter, or are using the soft NRfMon-nano Spectrum Analyzer, you can adjust this temporary "shortening" for maximum effective output power (take care to not disturb the aerial position between tests for consistency - the radiation pattern is affected by all conductors within about one wavelength of any part of the aerial including hands!)
The ground (GND) connection is not required when using a simple, single wire aerial. The GND pad is reserved for when the aerial is mounted remotely through a length of co-axial cable. Solder the outer sheath of the coax here, leaving the shortest length of unshielded inner white insulation that is practical.
How to Get It¶
Related Weblog Posts¶
- 2011-02-02 - Meet the RFM12B Board
Other Information Sources¶
A good presentation from Texas Instruments on some basics of Radio Communications. Helpful for understanding terminology such as band, sideband, channel, modulation etc.