Thanks again @PCBWay for sponsoring my project. PCBWay You can have your PCB boards produced for 10$. And it provides all kinds of printing and assembly services.
PCBWay: https://www.pcbway.com/
PCBWay+ my profile: https://www.pcbway.com/project/member/?bmbno=188E1A91-204D-49
#PCBWay
#NRF24
#ArduinoProMicro
#PCB
Arduino Pro Micro and NRF24 modules are a great option for wireless communication. These modules offer many advantages such as low power consumption, high data rate and long distance communication.
Before you start, you need to connect Arduino Pro Micro and NRF24 modules. To connect the NRF24 module to Arduino Pro Micro, you need to make the pin connections of the module as follows:
* NRF24_CE - Arduino Pro Micro Pin 8
* NRF24_CSN - Arduino Pro Micro Pin 10
* NRF24_SCK - Arduino Pro Micro Pin 15
* NRF24_MOSI - Arduino Pro Micro Pin 16
* NRF24_MISO - Arduino Pro Micro Pin 14
* NRF24_VCC - Arduino Pro Micro 3.3V Pin
* NRF24_GND - Arduino Pro Micro GND Pin
Next, you must load the necessary libraries for NRF24 on the Arduino Pro Micro. To do this, you can use the "Add Libraries" option of the Arduino IDE and search for the "RF24" library.
After the Arduino Pro Micro and NRF24 modules are connected and the necessary libraries are loaded, you can start writing the codes. First, you must introduce the necessary libraries and pin connections.
#include <SPI.h>
#include <RF24.h>
const uint64_t pipe = 0xE8E8F0F0E1LL;
RF24 radio(8, 10);
void setup() {
Serial.begin(9600);
radio.begin();
radio.openWritingPipe(pipe);
radio.setPALevel(RF24_PA_LOW);
radio.stopListening();
}
This code makes the necessary settings to start the NRF24 module and initiates serial communication. Then you can use the following code to communicate:
void loop() {
const char text[] = "Hello, World!";
radio.write(&text, sizeof(text));
1.Project:ReceiverCircuitSetupwithNRF24andArduinoProMicro
The receiver circuit is the circuit used to receive the data sent to the transmitter circuit. You can build a receiver circuit using NRF24 and Arduino Pro Micro by following the steps below:
1. Connection: First, you need to connect the NRF24 module to Arduino Pro Micro. You can use the following pin connections for connection:
* NRF24_CE - Arduino Pro Micro Pin 8
* NRF24_CSN - Arduino Pro Micro Pin 10
* NRF24_SCK - Arduino Pro Micro Pin 15
* NRF24_MOSI - Arduino Pro Micro Pin 16
* NRF24_MISO - Arduino Pro Micro Pin 14
* NRF24_VCC - Arduino Pro Micro 3.3V Pin
* NRF24_GND - Arduino Pro Micro GND Pin
2. Libraries: Next, load the "RF24" library using the "Add Libraries" option of the Arduino IDE.
3. Code: You can write the required code for the receiver circuit as follows:
#include <SPI.h>
#include <RF24.h>
const uint64_t pipe = 0xE8E8F0F0E1LL;
RF24 radio(8, 10);
void setup() {
Serial.begin(9600);
radio.begin();
radio.openReadingPipe(1, pipe);
radio.startListening();
}
void loop() {
if (radio.available()) {
char text[32];
radio.read(&text, sizeof(text));
Serial.println(text);
}
}
This code will receive the data from the transmitter connected to the NRF24 module and display it on the Serial Monitor.
4. Upload: Finally, upload the code to Arduino Pro Micro and view the data from the transmitter on the Serial Monitor.
2.Project:Transmitter Circuit Setup with NRF24 and Arduino Pro Micro
The transmitter circuit is the circuit used to send data to the receiving circuit. You can build a transmitter circuit using NRF24 and Arduino Pro Micro by following the steps below:
1. Connection: First, you need to connect the NRF24 module to Arduino Pro Micro. You can use the following pin connections for connection:
* NRF24_CE - Arduino Pro Micro Pin 8
* NRF24_CSN - Arduino Pro Micro Pin 10
* NRF24_SCK - Arduino Pro Micro Pin 13
* NRF24_MOSI - Arduino Pro Micro Pin 11
* NRF24_MISO - Arduino Pro Micro Pin 12
* NRF24_VCC - Arduino Pro Micro 3.3V Pin
* NRF24_GND - Arduino Pro Micro GND Pin
2. Libraries: Next, load the "RF24" library using the "Add Libraries" option of the Arduino IDE.
3. Code: You can write the required code for the transmitter circuit as follows:
#include <SPI.h>
#include <RF24.h>
const uint64_t pipe = 0xE8E8F0F0E1LL;
RF24 radio(8, 10);
char data[] = "Hello World!";
void setup() {
radio.begin();
radio.openWritingPipe(pipe);
}
void loop() {
radio.write(data, sizeof(data));
delay(1000);
}
This code sends "Hello World!" to the receiver connected to the NRF24 module. It will send data continuously.
4. Upload: Finally, upload the code to Arduino Pro Micro and view the data sent to the receiving circuit.
3.Project:This project allows you to send the data collected via 2 joysticks to the receiver circuit with the NRF24 module.
You can create your project by following the steps below:
1. Ingredients:
* 2 joysticks
* 1 pc Arduino Pro Micro
* 1 NRF24 module
* Breadboard and jump wires
2. Joystick connection: X and Y axis of each joystick are connected to an analog pin.
3. Emitter circuit: Load the NRF24 and RF24 libraries for the emitter circuit in Arduino IDE and write a code like this:
#include <SPI.h>
#include <RF24.h>
const uint64_t pipe = 0xE8E8F0F0E1LL;
RF24 radio(8, 10);
int x, y;
void setup() {
radio.begin();
radio.openWritingPipe(pipe);
radio.setDataRate(RF24_250KBPS);
radio.setChannel(100);
radio.setAutoAck(false);
radio.setRetries(0, 15);
4. Receiver circuit: Load the same libraries for the receiver circuit and write the code as below:
#include <SPI.h>
#include <RF24.h>
const uint64_t pipe = 0xE8E8F0F0E1LL;
RF24 radio(8, 10);
int x, y;
void setup() {
radio.begin();
radio.openReadingPipe(1, pipe);
radio.startListening();
Serial.begin(9600);
}
void loop() {
if (radio.available()) {
int data[2];
radio.read(data, sizeof(data));
x = data[0];
y = data[1];
Serial.print("X: ");
Serial.print(x);
Serial.print(" Y: ");
Serial.println(y);
}
}
5. Upload: After uploading the codes, open the transmitter and receiver circuits and check whether the data reaches the receiver with the serial port.
What is NRF24?
NRF24 are low-cost, low-power wireless transceiver modules operating in the 2.4GHz ISM band. NRF24 is manufactured by Nordic Semiconductor and can be used with Arduino, Raspberry Pi, and other microcontrollers.
Among the features of NRF24:
* Operation in 2.4GHz ISM band
* Power saving
* Low cost
* High speed data transfer
* Energy-saving modes
* Availability of open source libraries
NRF24 is suitable for many different uses such as IoT projects, sensor networks, and wireless data transmission.
NRF24 also offers the following features:
* Three different data rate options: 250Kbps, 1Mbps, and 2Mbps
* Data packet sizes regardless of power source: 32 bytes to 32 kilobytes
* AES encryption support
* Intelligent streamlined data package structure
* Direct mode (point-to-point) and distributed mode (multi-point) communication support
* Support 6 channels dynamic frequency selection
NRF24 is also useful when transferring data between many different systems and devices is required. For example, NRF24 modules can be used to create a sensor network. Sensors can send the data they measure to a central system via NRF24 modules. The central system can also process the data and use it to make decisions when necessary.
What is PCBWay:
PCBWAY is a professional Printed Circuit Board Manufacturer (PCB) company. Founded in 2003, the company was established to support its designers during the design and production stages.
PCBWAY provides versatile PCB design and manufacturing services for simple and complex projects. The quality, speed and reasonable prices of their products work to help meet their customers' needs.
The most important features of PCBWAY are:
1. PCB Design Support: PCBWAY offers designers professional design support to help you realize your design.
2. Low Prices: PCBWAY offers lower prices compared to its competitors and offers its customers the best price-performance ratio.
3. Fast Production: PCBWAY offers fast production times to meet customers' expectations.
4. Quality Products: PCBWAY takes care to comply with the highest quality standards during the production phase and offers its customers the best quality products.
5. Global Supplier: PCBWAY serves many customers around the world and provides fast and reliable service to customers in different geographical regions.
PCBWAY is a reliable and professional option providing professional PCB services for your electronics projects. As a company that appeals to everyone from beginner level designers to professionals, it distinguishes itself from other competitors with the quality, speed and price advantages of its products.
How to order?
The process of ordering a printed circuit on PCBWAY consists of these steps:
1. Registration: To become a member of PCBWAY, go to https://www.pcbway.com and click "Register". Fill in your e-mail address, password and other necessary information to become a member.
2. Design Upload: Click "Order" of PCBWAY and upload your design files. Files should be like Gerber files, BOM file, design file.
3. Order Customization: Fill in the order form and choose customization options, for example PCB thickness, color, coating etc.
4. Payment: Pay after confirming your order. PCBWAY offers many payment methods such as credit card, PayPal, bank transfer.
5. Production and Delivery: Once your order is confirmed, PCBWAY goes into production and is prepared for delivery. You can always observe your order status and get information about the production process.
PCBWAY offers an easy and fast ordering process and strives to provide the best service to its customers. At the end of the ordering process, PCBWAY will work to deliver your products as soon as possible and with the highest quality.
PCBphotos:
Comments
Please log in or sign up to comment.