The I2C/TWI Communication shield module is mainly use and made for nRF24l01 transceiver module, dedicated to provide a reliable performance and to reduce the possibility of data lost in the communication process there are three stages to process a communicate on this module.
How it works?
- This module use I2C/TWI Communication protocol which simplifies the nRF24l01 communication process stable, thus users no need to understand the communication process of nRF24l01, it improves the efficiency of project development.
- This module will be use as a slave of I2C/2WI at the address 35
- It has a smooth bidirectional communication and no discernable at the slave or the master.
- It has maximum transmission distance can reach to 70m it defends on the module you use.
- nRF24l01 communication protocol will reduce the signal lost.
- 12C/TWI protocol simplifies the communication line.
- Perfectly compatible on Arduino.
- This module can be use in Robot Control System, Remote Control. Etc, this device is not recommended for life protection, it is using wireless radio communication may provide a radiation.
- This device operates on 5v and it has no short-circuit protection, so you must be careful with polarity.
- Hold time of module receiving data: 2s
- Hold time of module transmitting data: 300s
- Transfer Rate: 50Byte / S (Theoretical Value)
- I2C/TWI Address: 0x47 (decimal 35)
- nRF24l01 Address: 0x34,0x43,0x10,0x01 – from low to high
Tested Modules
nRF24l01 Version 1 / Communication range up to: 70 meter at open space
nRF24l01 Version 2 / Communication Range up to : 100 meter at open space
nRF24l01 Version 2 Plus 2.4 GHz SMA (SubMiniature version A) Antenna / Communication Range up to : 300 meter at open space
Testing on progress : nRF24l01 Version 2 with On board Signal Amplifier Plus 2.4 GHz SMA (SubMiniature version A) Antenna / Communication Range up to : 1100 meter at open space.
Setup & Implemetation Guide
- The Microcontroller reads the data, It means the MCU reads the data of the module, after the module receives the from nRF24l01 it will be save and process by the master module to read the status led will shown in module.
- Free mode ( MCU writes the data or NRF24l01 write the data) if the nRF24l01 module and the master I2C/TWI cannot do any operation when the Led Out / In is OFF.
There possible for the module operate to Free Mode:
- The clock of module data send reaches to maximum.
- Module sent data successfully.
- MCU receives data from the module.
- Free status is beyond the hold time.
- Module Status is Busy Mode : When module receives the data which has sent from master then jumps intro the “BUSY STATUS”, and send a data to another module periodically while waiting for a response signal to another module. After a period of time the (module transmit data host time there is still no answer module will jump to free mode automatically if its has received the response signal, it can also jump to a free mode( LED OUT light of module is on)
nRF24l01 Communication Diagram
MCU sends address to the module, and the module will response a signal if returned data is 0x47, indicating that reading data is successful. The MCU can read a data with 1 byte size every time.
The Microcontroller will send the address of 1byte data to the module will become busy mode state then the stop bit occur. if the process is busy mode automatically it will send the data again. When the module is in IDLE the address which is read by the master transceiver is always 0x47 and when Microcontroller receives the data we need to filter the 0x47 at decimal number 71, otherwise it will encounter an error.
The nRF24l01 Communication Module Shield
Master / Transmitter Arduino Sketch Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
/* Guide how to use Arduino Wire.h(Wire Library) with 24l01 i2c Module Shield Reads the data from an I2C/TWI slave module device */ unsigned char ppt =0; #include <Wire.h> //Import the Arduino wire library void setup() { Wire.begin(); // I2c Bus (address optional for master) Serial.begin(9600); // Opening Serial Communication for Reading the Output } unsigned char judge = 0,good; void loop() { // Reads Wire Master if(judge == 0) { Wire.requestFrom(35, 1); // Requesting 6 bytes from the slave device #2 if(Wire.available()) { good = Wire.read(); // bytes as character if(good !=0x47){ //Serial.println(Good) ; // Optional //Serial.println("Receive") ; // Optional judge = 1; } } } // Write Wire Master if(judge == 1) { Wire.beginTransmission(35); // Send data to device #35 //Wire.write(7); // Optional sends 5 bytes Wire.write(14Core); // transfer character 1 save display "14core" Wire.endTransmission(); // stop sending Serial.println(14Core) ; judge = 0; } delay(100); //Delay } |
Slave / Receiver Arduino Sketch Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
/* Tutorial how to use of the Wire library using I2C/TWI & Writes data to an I2C/TWI slave device Refer to the "Wire Slave Receiver" */ #include <Wire.h> //import Arduino Wire Library void setup() { Wire.begin(); // Bind i2c bus (address is optional for master) Serial.begin(9600); // Opening Serial Communication for reading the output } unsigned char judge = 0; char scan; void loop() { if(judge == 0) { Wire.beginTransmission(35); // Send to device #35 //Wire.write(7); // Optional for testing sends five bytes Wire.write(scan); Wire.endTransmission(); // Stop the Transmission judge = 1; } delay(100); if(judge == 1) { Wire.requestFrom(35, 1); // Wire start request 1 byte from the slave module device #35 if(Wire.available()) { unsigned char c = Wire.read(); // Receive byte as Character display Say Hello to www.14core.com if(c !=0x47){ Serial.println(c); ++scan; if(scan == 8) scan = 0; // Scan addresses judge = 0; } } } } |
Download the Source Codes Here | Zip
How do I download to the I2C module?
It has an Atmega 48V processor, is not USB compatible, and I cannot find examples of how to download programs.
Any help would be appreciated. Robert
Flashing / Programming ATMEGA48V