Frequency hopping experiments on the NRF24

Any old or new electronic projects on the go
Post Reply
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: Frequency hopping experiments on the NRF24

Post by Martin »

I've used some of the LGT8F328P chips (not the RF-Nano ones - just the regular non-RF ones) and found they perform exactly the same as the regular Atmel (Microchip) 328Ps unless and until you muck around with the special register that makes them run at double speed. But I've not tried the analogue-inputs on them yet: those are supposed to have increased resolution, but I guess that may not appear until the chips are switched into 'enhanced' mode.

Got to be worth a try. I suspect Phil's code will run on them unaltered, or maybe with just a few minor edits. The nRF24L01+ tends to be connected slightly differently on PCBs from different manufacturers, so that might also need a tweak. Why don't you (Flynn) try it and report back? :D
User avatar
Phil_G
Posts: 597
Joined: 15 Feb 2018, 23:32
Contact:

Re: Frequency hopping experiments on the NRF24

Post by Phil_G »

Hi all, to be honest things have progressed since the RF Nanos, they do work just fine but Tobes PCBs are so incredibly neat thats all I use now!
Consequently I've not tried the LGT8F variants, I suspect they were born of the 328P supply problems?
Aliexpress went through a stage where the RF Nanos I bought were not as sensitive as the original batch, though later ones seem ok.
As Martin says, if an RF Nano looks in any way 'different' then its as well to trace CE & CSN as there's no 'standard'.
The 'good' Keywish ones are ce=D10, csn=D9.
Also check that it has an NRF24L01+ ie a 'plus'. Avoid the red TStar RF Nanos, they were junk :)
A pair of RF Nanos is very convenient for experimenting at close range (30 -50 yards), as theres no wiring to do!
But better still, have a whisper in Tobes ear... :)
Cheers
Phil

PS when the receiver-configuration thing is finalised (it works fine but I have more ideas) I'll be NRF'ing the Reeduino if anyone is interested ;)
User avatar
Flynn
Posts: 64
Joined: 17 Feb 2018, 14:48

Re: Frequency hopping experiments on the NRF24

Post by Flynn »

Martin wrote: 05 Jun 2022, 13:46 Why don't you (Flynn) try it and report back? :D
They are already on order..... I have had a really old Robbe FP-T2F steerwheel set for some time now.... this is a good opportunity to put it back in service...

I watched a youtube video https://www.youtube.com/watch?v=Myfeqrl3QP0 about getting the thing into 32Mhz without screwing up all the millis and delay timings, perhaps that is what you are referring to as 'problems' in enhanced mode Martin?
You only ever need two tools....WD40 and duct tape.
If it doesn't move when it should use the WD40 and if it moves and it shouldn't use the tape.
Tobe
Posts: 665
Joined: 16 Feb 2018, 06:19
Location: Varberg or Stockholm, Sweden

Re: Frequency hopping experiments on the NRF24

Post by Tobe »

One important point in this discussion is that we don't always need a 328P for our projects I.e. we don't need that amount of memory and a 168P works as good and it's cheaper and believe it or not also available at a more sensible price. I often order my PCB's with everything on except the processor and solder by hand what ever I need for the purpouse.
A 328P had times when the price tag was well above $ 50 and not always available, last time I checked it was around $32 but available.
Skärmbild 2022-06-05 192152.png
168P is available in the range of $ 2-3 as also the 48P.
Skärmbild 2022-06-05 192228.png
Skärmbild 2022-06-05 192309.png
In the nRF24 Rx the 168P does the job as the 48P in the servo amplifier.
I have a few Rx with the nRF24 module available so if, please PM.
Cheers,

Tobe
User avatar
Flynn
Posts: 64
Joined: 17 Feb 2018, 14:48

Re: Frequency hopping experiments on the NRF24

Post by Flynn »

Phil_G wrote: 05 Jun 2022, 15:08
.....then its as well to trace CE & CSN as there's no 'standard'.
The 'good' Keywish ones are ce=D10, csn=D9.
The support info from the nulllab site quoted in the advert has a schematic which shows CE=D9 and csn= D10.... changes made to firmware accordingly!.

Phil_G wrote: 05 Jun 2022, 15:08
Also check that it has an NRF24L01+ ie a 'plus'. Avoid the red TStar RF Nanos, they were junk :)
It say's they are nRF24l01+'s ( or Si24R1's) so we shall see!

Tobe's Rx modules look superb and if I was planning to actually use this TxRx then I would be interested in possibly acquiring a sample ;) but as I am doing this conversion just for the pleasure of doing it I think I would prefer to put it together myself (recognising I am 'standing' on yours, and many others, shoulders)

Before getting too carried away with this LGT chip, is there going to be a problem with the 12bit ADC in the Rx Phil? I'm hoping the calibration routine will just accept 4096 steps instead of 1024.

I notice -

Code: Select all

if (F_CPU==16000000) {int5ms=78;int6ms=94;} else {int5ms=39;int6ms=47;} 
will cause problems if I tried operating the thing at 32Mhz so probably left well alone at 16Mhz (not sure there would be any benefit at 32 anyway)

Roll on the postie!
You only ever need two tools....WD40 and duct tape.
If it doesn't move when it should use the WD40 and if it moves and it shouldn't use the tape.
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: Frequency hopping experiments on the NRF24

Post by Martin »

I've not tested it (yet) but I read that you can set the resolution of the analog-to-digital converter using the command:

analogReadResolution(10); // compatible with 'normal' Arduino: 10-bit resolution: range 0 to 1023

analogReadResolution(12); // enhanced 12-bit resolution: range 0 to 4095

I guess you could use other values (below 12)? There may be a speed tradeoff: lower resolution but faster conversions.

I'm guessing it defaults to 10-bit, to make it as compatible as possible, but if not, you only need to add one line to make it 10-bit compatible.

I ordered some of the RF-LGT-chip Nanos, using your link. They'll add to my ever-growing pile of microcontroller boards :lol: I'll probably be able to help if you get stuck, but my postie will probably be a few days behind yours!
User avatar
Flynn
Posts: 64
Joined: 17 Feb 2018, 14:48

Re: Frequency hopping experiments on the NRF24

Post by Flynn »

👍 Thanks Martin..
You only ever need two tools....WD40 and duct tape.
If it doesn't move when it should use the WD40 and if it moves and it shouldn't use the tape.
User avatar
Phil_G
Posts: 597
Joined: 15 Feb 2018, 23:32
Contact:

Re: Frequency hopping experiments on the NRF24

Post by Phil_G »

Slope Soaring on a budget!
Eight quid for a Lidl Glider, and homebrew radio costing maybe a tenner!
In complete contrast to last time out, the wind was a strong SSW, 25-30 depending on whose anemometer you trusted,
our identical HK windspeed indicators differed by 10mph!!!
Shaun hung his out of his car window on the way home and concluded his was reading low, maybe mines a bit high but theres no doubt it was blowing a hoolie with intermittent rain showers to dodge. At least its a short walk to the cars!

Shaun has flown his Lidl Wing before but it was first time out for his Wildthing, both models using the homebrew NRF FHSS radio built on Tobes excellent PCBs which make a really neat job, tidier than many commercial sets. The case is a World Engines "Digit Migit" 3ch which I believe Mick Wilshire marketed specifically for pylon racing.

Shaun left about 6pm, I stayed for tea - MOD ration Chilli Con Carne & rice, which was excellent :-)
A great day out, and very good for the old mojo :-)
Cheers
Phil

You need to watch this on a PC screen really, the camera makes the models look small... too small for a phone screen!
I'm using a 90-degree lens which I expected to be much better than the usual 170-degree action cams. In practise, you still have to fly really close if the model is to be anything more than a dot... :)

User avatar
Flynn
Posts: 64
Joined: 17 Feb 2018, 14:48

Re: Frequency hopping experiments on the NRF24

Post by Flynn »

postie has been. LGT8F328P rx built and.............not working :-(

Story so far..... it looks like it is going to work - the failsafe seems to work, the manual failsafe jumper seems to work, the rx enters failsafe after a second or so, the servos track to their correct positions (the output pulses are there).... it just doesn't respond to the Tx. The Tx seems to be working according to one of Martins 2.4G scanners (two actually). HOWEVER... I think I managed to use a 5v USBASP somewhere along the line and now the FR-Nano doesn't respond to the programmer, nor the serial port so...... potentially stuffed.

I never tried the analogReadResolution setting.....and now I can't anyway.

Perhaps Martin will have better luck when his postie arrives.!
You only ever need two tools....WD40 and duct tape.
If it doesn't move when it should use the WD40 and if it moves and it shouldn't use the tape.
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: Frequency hopping experiments on the NRF24

Post by Martin »

Sorry to hear that, Flynn. :(

Mine haven't come yet. I'll post here when they do arrive - but it might be quite a time: there are other AliExpress orders I placed weeks earlier than these LGT8F328P NRFs that haven't arrived yet. :?

A 5V USBasp shouldn't have killed the LGT8F328P - though it could have killed the nRF24L01+ part. But you can't program the LGT8F328P with a USBasp as far as I know - the programmer you need is a JTAG/SWD unit. The chips come with a serial bootloader which works with the Arduino IDE, but if you somehow manage to erase the bootloader, then you need a JTAG/SWD programmer to restore it. I have a such a programmer. :ugeek:

I forget where you're based, but if the return postage from you to Warwickshire UK, isn't too astronomical, you could send the 'dead' unit(s) to me and I can try to resurrect it/them. Wait for mine to arrive first anyway though, in case I can't get mine working either!
Post Reply