Module NRF24L01 not change power consuming, 17ma on
radio.setPALevel(RF24_PA_MAX); or radio.setPALevel(RF24_PA_LOW);
Way not change power in ma?
//Once again, begin and radio configuration
radio.begin();
radio.setAutoAck(false);
radio.setPALevel(RF24_PA_MAX);
radio.setDataRate(RF24_250KBPS);
radio.openReadingPipe(1,pipeIn);
radio.openWritingPipe(pipeOut);//d
//We start the radio comunication
resetData();//D
radio.startListening();
}
Looks like from the small snippet you revealed that the NRF24 is only ever in receive mode, so you would not expect changes in the setPALevel() to have any affect until you actually transmit something.
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(9, 10); // CE, CSN
const byte address[6] = "00001"; //Byte of array representing the address. This is the address where we will send the data. This should be same on the receiving side.
int button_pin = 2;
boolean button_state = 0;
void setup() {
pinMode(button_pin, INPUT);
radio.begin(); //Starting the Wireless communication
radio.openWritingPipe(address); //Setting the address where we will send the data
radio.setPALevel(RF24_PA_MIN); //You can set it as minimum or maximum depending on the distance between the transmitter and receiver.
radio.stopListening(); //This sets the module as transmitter
}
void loop()
{
button_state = digitalRead(button_pin);
if(button_state == HIGH)
{
const char text[] = "Your Button State is HIGH";
radio.write(&text, sizeof(text)); //Sending the message to receiver
}
else
{
const char text[] = "Your Button State is LOW";
radio.write(&text, sizeof(text)); //Sending the message to receiver
}
radio.write(&button_state, sizeof(button_state)); //Sending the message to receiver
delay(1000);
}
The Power Profiler Kit II (PPK2) is a standalone unit, which can measure and optionally supply currents all the way from sub-uA and as high as 1A on all Nordic DKs, in addition to external hardware.
The PPK2 is powered via a standard 5V USB cable, which can supply up to 500mA of current. In order to supply up to 1A of current, two USB cables are required.
An ampere meter only mode, as well as a source mode (shown as AMP and source measure unit (SMU) respectively on the PCB) are supported. For the ampere meter mode, an external power supply must source VCC levels between 0.8 and 5V to the device under test (DUT). For the source mode, the PPK2 supplies VCC levels between 0.8 and 5V and the on-board regulator supplies up to 1A of current to external applications. It is possible to measure low sleep currents, the higher active currents, as well as short current peaks on all Nordic DKs, in addition to external hardware.
Range not good, antenna is checked and 100% ok. i buy modules from aliexpress and sometimes they have a range of about 500 sometimes 800 but sometimes barely 150m. All settings are always the same. The same electronics. nrf modules not same, number on chip is ok, range not.
You have answered you own question. Always buy from a reputable source and buy in bulk and require the seller to ensure all those you are buying are from the SAME production run.
Paul
Ok, everything is clear but i have about 90 modules, i have to measure everyone's range, i made a circuit from this link so i will test all the modules tomorrow.
There is little point in measuring the transmit current then, for range testing\conformation you need to know the actual transmit power.
You can measure the actual RF power on the LNAPA modules and then use that to compare the range of the modules with the PCB trace antennas, but its not an easy task.
If a 'good' module has a range of 500m to 800m and another has a range of 150m, assume its bad, there are unlikley to be magic voodoo settings that will make a bad module good.
If its important that you have a reliable long range, then dont use 'cheap' modules.