Page 21 of 24

Re: Frequency hopping experiments on the NRF24

Posted: 17 Jun 2022, 10:34
by Flynn
Ummm..the plot thickens then... It is entirely possible (indeed, most likely after your comments on USBasp) that I used the usb com port to program the device for the first time, however it is now not greeted with the usual 'ding ding dong' when plugged in to windows, so no more programming.. at least that is what I thought... but it turns out, after your prompting, and after inspecting under the microscope, I had managed to short one side of the CH340 xtal to ground when soldering in a 100uF smt cap to the 3v3..
100uf.jpg
Now the serial ship is running again I can re-program the device.. :roll:

The nrf24l01+ is internally connected to the 3v3 line so I can't have damaged it with the usbasp.
It is stamped nRF24l01+ on the device.

It is supposed to be CE=D9 but now I can re flash it I am going to try t'other way around coz it ain't listening to the Tx at the mo.

Thanks for the offer....it may still come to it. First off I think I will wire up a vanilla Nano and a mini nrf24l01+ with the rx sketch with my variables to unequivocally prove the TX

More after this brief interlude!

Re: Frequency hopping experiments on the NRF24

Posted: 17 Jun 2022, 12:21
by Phil_G
According to https://github.com/nulllaborg/lgt-rf-nano BUT this has 9 & 10 swapped wrt the Keywish we've been using so far...

lgt8f328p_nrf24.jpg

I'd try the isplus test too = this will confirm its a plus and that the 328 is talking to it...
viewtopic.php?p=8890#p8890 you'll need to swap 9 & 10 tho if its different to the Keywish which is:
RF24 radio(10, 9); // RF-NANO and new builds, ce=10, csn=9

On the Tstars I had to physically buzz it out from the NRF legs to D7/8 as the docs were wrong!

Re: Frequency hopping experiments on the NRF24

Posted: 17 Jun 2022, 15:11
by Flynn
so...... the vanilla MiniPro and mini nrf24l01+ works, the LGT8F328P doesn't. The TX is working.

I tried adding the analogueReadResolution(10); to void setup() ..... no difference.

I can see the sck pulses, I can see CE goes +5V, I can see a 18kHz +5v square wave on CSN, I can see a clock pulse on SCK, if I touch MOSI with my scope probe the servos jitter (+5v but only a crappy 25mhz analogue scope) and I see 0v on MISO unless the servos are jittering then I see a noisy signal. No amount of stick stirring alters any of the signals........ the nrf24l01+ isn't seeing the incoming signal.


[about 2 hours later]

OK....mystery solved.... after reflowing and then replacing both the nrf24l01+ and the 16MHz crystal to no avail I have tracked the 'problem' down.....
yup..self inflicted! In order to get the veroboard servo connector pins installed I had to relieve the side of the RF-Nano board a touch, well... it turned out to be a touch too much as it removed the traces for CD, CSN and MISO between the NRF and the LGT8F328P.... dang those things are close to the edge of the board, I only needed 0.25mm or so......

Anyhow, I guess I am done with this, I have proved the TX conversion works and was thinking of asking Tobe if he has any PCB's spare to make a working radio set.

Re: Frequency hopping experiments on the NRF24

Posted: 17 Jun 2022, 15:17
by Flynn
Phil_G wrote: 17 Jun 2022, 12:21

On the Tstars I had to physically buzz it out from the NRF legs to D7/8 as the docs were wrong!
I think the docs here will be right as the examples that come with the IDE download also have RF24 radio(9, 10); and I have found the reason
why my board doesn't work, thanks anyway Phil. I have come to the conclusion you were right.... tobes Rx is the nicest solution!

Re: Frequency hopping experiments on the NRF24

Posted: 30 Jun 2022, 14:10
by Flynn
New LGT8F328P rf-nano arrived today and.... it doesn't work. I have buzzed out the CE and CSN lines and they are as per the schematic CE=D9, CSN=D10.
I get -
D2 (yellow) D3 (green)
D2_D3.jpg
D4 (yellow) and D5 (green)
D4_D5.jpg
Which look to me like good servo control pulses (I have 3 channels wired together in the Tx as it is a 2 channel steerwheel)

I see the LED coming on after a couple of seconds,

I see -

D9=5v (CE)

D10 (CSN) yellow trace and D11(MOSI) green trace
D10_D11.jpg
D12 (MISO) yellow trace and D13 (SCK) green trace
D12_D13.jpg
not sure what I should see on D13 but I expected a more uniform clock signal.. ?

Anybody got one of these LGT8F328p's to work?

I'm going to have to solder some access pins on the vanilla nano/nrf24l01+ combo to compare signals. (that combo works)

Re: Frequency hopping experiments on the NRF24

Posted: 30 Jun 2022, 17:20
by Phil_G
Not much help Flynn but all I can suggest is that it's a problem with the onboard NRF24 since LED 'on' and good servo pulses is the correct failsafe response with no signal received... therefore suggests that the processor is running ok but not the RF bit.
Did you try the 'isplus' test to check it's a plus variant?
I expect it is, but maybe try 1mhz bitrate test since a non-plus chip cant do 250k (tx & rx)

Meanwhile,


Re: Frequency hopping experiments on the NRF24

Posted: 30 Jun 2022, 18:16
by Martin
I've just run isplus.ino on my LGT8F-RF-NANO, using the RF library bundled with Phil's project (opening post of this thread).
CE pin is 9 and CSN pin 10. Here's the whole sketch:

Code: Select all

// Simple test for plus/nonplus NRF24L01 on the Keywish RF-Nano, Phil_G 27/08/2020
// Load the sketch into your RF-Nano via the USB & bootloader, when its finished loading 
// open the IDE serial monitor which will need setting to 115200 baud. 
// Opening the serial monitor will cause a reset and after a second or so the result 
// should pop up. During this second its important that you cross your fingers :D

#include <SPI.h>
#include "RF24.h"
RF24 radio(9, 10);  // CE & CSN pins on the Keywish RF-Nano. Use (7, 8) for the Tstar Tech red
/********************************************************************************************/

void setup() {
  Serial.begin(115200);
  radio.begin();
  bool isplus = radio.isPVariant();
  Serial.print("Version test result =  ");
  Serial.print(isplus);
  if(isplus) Serial.println(", this is a PLUS");
  else Serial.println(", this is NOT a plus");
}

void loop() {
} 
The output is "Version test result = 1, this is a PLUS" 8-)

I'll run some other tests on the 2.4GHz part of the LGT8F-RF-NANO now, but I'll post them in the other thread (in Arduino Stuff) specific to that board. I'll post in this one if and when I get Phil's code, or a variant of it, running on the LGT8F - I don't want to spam this thread with stuff that only applies to the LGT8F variant.

Re: Frequency hopping experiments on the NRF24

Posted: 30 Jun 2022, 22:27
by Martin
I just tested PhilG's transmitter sketch for the first time on my LGT8F RF-NANO, and it's definitely transmitting something (as viewed on my band scanner). All I did was put in my random pipeOut[] number at line 47, my random channels at line 48, and altered line 55 to RF24 radio(9, 10);

Most importantly, used the Nulllab board manager and set the EEROM Size: [sic] option in the tools menu to 1KB before uploading.

I've not wired up any pots or switches yet, and I've not set up a matching receiver; so I don't know yet if it's actually working properly...

Re: Frequency hopping experiments on the NRF24

Posted: 02 Jul 2022, 00:09
by Martin
I just connected up a second LGT8F RF-NANO as a receiver, and Phil's sketches are working straight out of the box. :D

No changes at all to Phil's sketches, other than (as recommended by Phil) setting up the pipeIn[], and pipeOut[] to match each other, and the same random 16 myChannels[] in both the tx and rx sketches. And I had to change the RF24 line to RF24 radio(9, 10); in both the tx and rx sketches, of course.
Then just compile and upload in the ususal way, with EEROM Size set to 1KB.

Have you done the radio calibration on the transmitter, Flynn? You need to short D8 to GND, power up the transmitter RF-NANO and move the transmitter pots over their full range, then remove the short without powering down. That learns the pot travel limits and writes the values to (pseudo) EEPROM.

Not checked the range yet. Not expecting great things without a power amplifier on the transmitter, but the LGT8F RF-NANOs do have the option to move a link and fit an external antenna instead of using the PCB one.

Re: Frequency hopping experiments on the NRF24

Posted: 02 Jul 2022, 15:13
by Flynn
SNAP Martin!

"Version test result = 1, this is a PLUS"

those are the only changes I've made to Phil's sketch (pipeIn & pipeOut and the 16 channels and the RF24 radio(9, 10) , programmed with
settings.jpg
I have calibrated the Tx.

I have tested the LGT8F328p RF-nano with Martins carrier sweep sketch and that works fine, so the MCU is talking to the nrf24l01+ ok and the only difference that I can see between Martins TxRx combo and mine is my combo uses a vanilla nano328p & mini nrf24l01+ for the Tx (which works with a vanilla328p/mini nrf24l01+ receiver) and a LGT8F328p RF-nano in the receiver.

The only other pointer I have is Martins eepromTest.ino doesn't seem to work on my LGT either, which would seem to indicate there is a problem with the pseudo eeprom on my board...

The schematics I have for the LGT_RF-Nano show it having a 16MHz MCU xtal...... I spent a minute or two under the microscope but... to no avail.... oh well! probably saved $0.02 there.