Contents
- 1 Pin Definitions
- 2 Use with arduino
- 2.1 Demo Code
- 2.2 Result
- 3 R2 Pin Definition and Dimension
- 4 Module Reference Schematic
- 5 Embedded Note
- 6 Documents
Pin Definitions
Number | Pins | Description |
---|---|---|
1 | GND | N/A |
2 | GPIO0 | Internal has connected the receiving control module feet |
3 | GPIO1 | Internal has connected the receiving control module feet |
4 | GPIO2 | Connect the the chip GPIO2 pins directly |
5 | VCC | Connect power positive 3.3 V |
6 | SDO | 0 ~ VDDV digital output, provide the internal control of the register serial back to read function |
7 | SDI | Serial data input. 0 ~ VDD V digital input. The pins for the 4 wire serial data serial data flow bus. |
8 | SCLK | A serial clock input. 0 ~ VDDV digital input. The pins provides the 4 wire serial data clock function |
9 | nSEL | Serial interface choice input pins. 0 ~ VDDV digital input. The pins for the 4 wire serial data bus provides the choice/make can function, this signal is used to indicate a read/write mode |
10 | nIRQ | Interrupt output pins |
11 | SDN | Close input pins. 0 ~ VDDV digital input. In addition to shut down all the mode mode SDN = 0. When SDN = 1 chip will be completely shut down and the content of the register will be lost. |
12 | GND | N/A |
13 | ANT | Pick up the coaxial antenna 50 |
14 | GND | N/A |
Use with arduino
Arduino 3V3 | SI4432 |
---|---|
VCC | VCC |
GND | GND & SDN |
D13- SCK | SCK |
D12- MISO | SDI (or SDO pin, may be wrong and need reversed) |
D11- MOSI | SDO (or SDI pin, may be wrong and need reversed) |
D10- CS | NSEL |
D2 | NIRQ |
- Pro mini 8M/3V3 provide direct 3v3 power and logic level output, can connect directly with this SI4432
- Easy to avoid "init failed" issue caused by wiring with CD4050
- Wiring Si4432 with 5v arduino communication needs with a cd4050 level conversion
Wiring physically
Wiring physically
Wiring physically
Demo Code
Two arduino uno were burned into the following code (ie RF22 library comes with client / server example in):
client:
// rf22_client.pde// -*- mode: C++ -*-// Example sketch showing how to create a simple messageing client// with the RF22 class. RF22 class does not provide for addressing or reliability.// It is designed to work with the other example rf22_server#include <SPI.h>#include <RF22.h>// Singleton instance of the radioRF22 rf22;void setup() { Serial.begin(9600); if (!rf22.init()) Serial.println("RF22 init failed"); // Defaults after init are 434.0MHz, 0.05MHz AFC pull-in, modulation FSK_Rb2_4Fd36}void loop(){ while (1) { Serial.println("Sending to rf22_server"); // Send a message to rf22_server uint8_t data[] = "Hello World!"; rf22.send(data, sizeof(data)); rf22.waitPacketSent(); // Now wait for a reply uint8_t buf[RF22_MAX_MESSAGE_LEN]; uint8_t len = sizeof(buf); if (rf22.waitAvailableTimeout(500)) { // Should be a message for us now if (rf22.recv(buf, &len)) { Serial.print("got reply: "); Serial.println((char*)buf); } else { Serial.println("recv failed"); } } else { Serial.println("No reply, is rf22_server running?"); } }}
server:
// rf22_server.pde// -*- mode: C++ -*-// Example sketch showing how to create a simple messageing server// with the RF22 class. RF22 class does not provide for addressing or reliability.// It is designed to work with the other example rf22_client#include <SPI.h>#include <RF22.h>// Singleton instance of the radioRF22 rf22;void setup() { Serial.begin(9600); if (!rf22.init()) Serial.println("RF22 init failed"); // Defaults after init are 434.0MHz, 0.05MHz AFC pull-in, modulation FSK_Rb2_4Fd36}void loop(){ while (1) { rf22.waitAvailable(); // Should be a message for us now uint8_t buf[RF22_MAX_MESSAGE_LEN]; uint8_t len = sizeof(buf); if (rf22.recv(buf, &len)) { Serial.print("got request: "); Serial.println((char*)buf); // Send a reply uint8_t data[] = "And hello back to you"; rf22.send(data, sizeof(data)); rf22.waitPacketSent(); Serial.println("Sent a reply"); } else { Serial.println("recv failed"); } }}
Result
Through the serial output, you can see two arduino uno are communicating with si4432 modules:
Note - An arduino uno can actually take two si4432 module simultaneously, these two modules nSEL pin need to be connected to different pins on arduino, nIRQ pins are connected to the arduino the D2 (interrupt 0) and D3 (interrupt 1), then initialize RF22 objects need to manually specify slaveSelectPin and interrupt two parameters
R2 Pin Definition and Dimension
Pin out
Dimension
Module Reference Schematic
Embedded Note
- Around the antenna must be open, away from the battery, metal, etc., around the antenna PCB copper ban, when necessary, PCB and antenna overlap or be hollowed out punch.
- When designing products in a metal case, metal cabinet, the antenna must feed the signal from the antenna lead out or external SMA antenna sucker antenna, otherwise the signal is greatly reduced from the metal shield leaving the required distance, you can use high gain antenna.
- Power supply design. Power is the heart of the system, the design should be specially considered. si4432 wireless module Recommended operating voltage 3.3V, the transient current can provide more than 200mA.
- Using DCDC, LDO buck, but also consider the impact of the ripple and surge current. Ripple can use LC network processing power at the local access module; inrush current process can take large capacitors.
- If the battery-powered, the battery should be considered a transient current is sufficient, we recommend using lithium batteries nickel hydrogen batteries batteries are not recommended.
- Software design, should try to use packet communications, the lower the communication speed setting, the greater the distance.
- When using the communication rate communication DEMO program other than the application parameters calculation tool, recalculate the communication parameters. And products according to their communication requirements, appropriate adjustments.
- Do mass-produced product, consider products such as testability, maintainability, interchangeability, should maximize the use of the company's DIP interface module. Consider it as a small volume with stamp holes Interface module.
Documents
Demo Code
- STC C51 - Demo code
- STC C51 - Demo code 02
- STC C51 - Demo code 03
- PIC - demo code
- AVR - demo code
- MSP430 - demo code
- SI4432 STM32 - demo code
- File:STM8-AS4432-SMD.zip
- Arduino Library - Use RF22 library
(The library applicable Hope-RF RF22B module is actually si4432 module)
Datasheet
- SI4432 module datasheet - File:DRF4432F20.pdf
Register setting
- register setting v7
Retrieved from ""