Phil's lockdown project - a 4ch propo NRF24 set

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

Re: Phil's lockdown project - a 4ch propo NRF24 set

Post by Martin »

I think when I ordered from Ali, there was the option to select soldered or not. It was a misleading box titled 'Color:' but the photos showed the alternatives with pins soldered or supplied separately.

I did select soldered, because, to begin with at least, I'll want to use them on breadboard. I would have soldered pins into at least two of them myself if they came without the pins already soldered in.
User avatar
Mike_K
Posts: 669
Joined: 16 Feb 2018, 06:35
Location: Hertfordshire

Re: Phil's lockdown project - a 4ch propo NRF24 set

Post by Mike_K »

If you use the RF-Nano for the receiver, what will you power it off?

The nRF24L01 has 5V tolerant inputs, but only to 5.25V according to the datasheet, so you can't power it directly off a 4 cell NiMH and you'd need to be careful if powering it off a BEC. You could power it directly off the LiPo if it's an electric-powered model, via the Vin terminal, using the RF-Nano voltage regulator.

You haven't had this problem before (I don't think), because you've been using 3.3V 8MHz Pro Mini, so can power them off anything above about 3.8V using its LDO regulator. Or is the nRF24L01 more "5V tolerant" than the datasheet suggests?

Mike
Tobe
Posts: 665
Joined: 16 Feb 2018, 06:19
Location: Varberg or Stockholm, Sweden

Re: Phil's lockdown project - a 4ch propo NRF24 set

Post by Tobe »

My RF-Nano Rx I'm aware of the 5 V issue so I'm running thru the VIN at around 5.4 V with no issues and yes I have swapped D9 & D10, they run amazingly well. The issue of the voltage is no problem for my GG actuators as I'm able to set the PWM in the Recoder thanks to Mike K.
RF24 radio(10, 9); from RF24 radio(9, 10);
RF-Nano A.jpg
Cheers,

Tobe
User avatar
Phil_G
Posts: 596
Joined: 15 Feb 2018, 23:32
Contact:

Re: Phil's lockdown project - a 4ch propo NRF24 set

Post by Phil_G »

Very neat Tobe :) I've ordered a few more, without headers this time. I realise I just hit 'buy now' without checking the options, and without reading the page properly as they do explain about the bootloader.
Mike_K wrote: 27 Apr 2020, 22:08 If you use the RF-Nano for the receiver, what will you power it off?
The nRF24L01 has 5V tolerant inputs, but only to 5.25V according to the datasheet
I'm using a single 18650 Li-ion cell, the 4.2v charge ones, directly to vcc with no problems so far :D
For gliders thats probably what I'll use, or a single LiPo cell, and all my powered models are lecky so its not a problem with the 5v BEC. I have run the RF-Nano on a 4-cell NiMh its been ok. The thing about a Li cell is that, yes the standing voltage is lower than NiMh, but the ESR is so low they never budge from that voltage regardless of frantic servo-waggling. The cell I've been testing on all week hasnt been charged in ages and its sitting at exactly 4v, rock steady. (We know a song about that!)

Some time back I spent weeks on ESP01's trying to make them talk to each other for an R/C set without much success (they're too WiFi client/server oriented), and now we have these, a very similar thing but better because its all familiar territory, I can imagine all sorts of home automation projects with these RFnanos :D

I've not done anything on the project today, spent all day making encoders to try to clear a few from the requests queue, made a Reeduino and three 7ch+S/C, plus the four buzzer assemblies, one Single-Channel encoder with a button harness, and two DigiSpark 4's (they take ages with all the wiring and fuse programming etc, and once wired they're very difficult to test). Last week did another animatronics controller same as the balloon guys one, some bluetooth battery monitors, and theres an RCGroups thread thats generating a lot of requests. I dont mind doing requests for one or two boards like these but lately people are asking for batches, which I dont enjoy at all - yesterday someone asked for 'eight to start with'. They seem to think its a business here, not a retired old fart in a shed :lol:

Todays highlight was a full bar of Cadburys Fruit & Nut :D



Mine arrived this morning too Martin. They're slightly bigger than my present Promini+NRF piggyback, and its a thick, heavy board - so I'm not totally convinced, but they will make things easier. Again they've soldered header pins in - I do wish they wouldnt :D
So you're doing an FHSS NRF24 system too? coolio, soon there will be no demand for DHT's :D



This is interesting:

Image

Time to put the dogs to bed, tuck em in, read em a story, lights out...
Tobe
Posts: 665
Joined: 16 Feb 2018, 06:19
Location: Varberg or Stockholm, Sweden

Re: Phil's lockdown project - a 4ch propo NRF24 set

Post by Tobe »

I just program them from the back side by just temporarily soldering 6 wires to the ICSP pad and I have issues but if I run it on the vero-progr-board it will not load! I keep the ICSP on 5 volt
Attachments
RF Nano back.JPG
Cheers,

Tobe
MaxZ
Posts: 330
Joined: 31 Jan 2019, 11:48
Location: Boskoop, Netherlands

Re: Phil's lockdown project - a 4ch propo NRF24 set

Post by MaxZ »

Hi all,
I have been broadly following this thread (or trying to, a lot goes right over my head), but I have been wondering about this pipe-out or pipeline business. From what I read, this has to be a unique number among multiple users, but the same in Tx and Rx. So does this mean it represents the "binding" between Tx/Rx, only in this case hard coded in both? And is it the number that identifies the data packets, so when several packets arrive on the current hopping channel, the Rx can pick only those that come from the Tx with a matching pipe-out number? Maybe I am simplifying things here....

Cheers,
Max.
User avatar
Phil_G
Posts: 596
Joined: 15 Feb 2018, 23:32
Contact:

Re: Phil's lockdown project - a 4ch propo NRF24 set

Post by Phil_G »

Thats exactly right Max. The pipe ID is like the GUID we're all familiar with and yes its hard coded at this stage. I'm using just one pipe but the NRF can handle up to six on each of its 126 channels. Its a 40-bit number (for the first pipe, subsequent pipes share 32 bits of the number) which can look unwieldy in hex, thats why I suggested hard-coding the last 5 digits of our phone numbers, its easier to read and in our small group its almost guaranteed to be unique.

For example my model car radio has my last 5 digits as the GUID (pipe address) and Roo's set has his last 5.
The receivers discard any mismatched packets, and whilst I also chose six different RF channels for his set, a clash of channels or even deliberate use of the same channel isnt a problem as the GUID identifies which is which.

I like the fact that if you stick to 'your' number you can use any of your transmitters with any of your receivers, its like having all your models on a favourite crystal on 35mhz, but instead of a choice of 36 different crystal numbers, you have a choice of one trillion ninety-nine billion five hundred eleven million six hundred thousand ID numbers (2^40) :D ...and (with the current 'lockdown' code) you can choose any six channels from 126 :D

Here's one of the RF-Nano receivers - so easy, its just a case of adding the servo leads, either a block like this or separate leads:


rfnano_rx.jpg


Just to reiterate, the existing 'lockdown project' code works great, where the tx hops constantly but the rx only hops when it needs to - it works really well and I'm happy to conclude the project.

Edit:
Since the topic has progressed towards a full FHSS implementation, its really a separate topic in itself. Consequently I've split the thread rather than divert the 'lockdown project'.
I'm happy that the semi-hopping 'lockdown NRF24' concept works really well in its current state, where the rx only hops when necessary, and I feel its a viable project if anyone fancies a go at a cheap homebrew set.
The hybrid hopping/scanning puts it a step up from the usual fixed channel sets you see on the net, It has good range, its solid around other transmitters, the code is simple to follow and its easy to build - even easier if you use an RFnano for the receiver - just add servos!

For interest of course it would be nice to implement full FHSS (Edit:it works!), hence the new thread: Frequency hopping experiments on the NRF24


They dont make Scalextric like they used to!
This is one of Chloe's Christmas presents from a couple of years ago, it broke on Christmas day and I only just got around to fixing it. Bad Grandad!
Then I started thinking.....




Roo amused himself by racing from next door via Skype :D :D :D

Phil
bluejets
Posts: 316
Joined: 19 Jun 2019, 04:09

Re: Phil's lockdown project - a 4ch propo NRF24 set

Post by bluejets »

Hi Phil,
Been reading through parts of your project, great work.
Have a question on one part of the code initial comments which says " Please do not use Arduino bootloader for programming, its startup delay messes things up"......

Was there an explanation on this somewhere in the project pages.
A lot to sift through.

Also, have used the NRF24L01+ on an altimeter project previously and had range problems, perhaps no more than 10 metres outdoors in clear area. Was using the power adaptor board on each tx and rx so not there.

Read many items regarding this but nothing was ever established to really identify why some of the clones acted this way. Had the data rate set at 250 same as yours here but ended up using the high power units both ends as build space was not a problem.

Banggood links to many different NRF24L01 low power units, so do you find one particular unit better or worse than others. Some reference previously made in another site said the "epoxy blob" ic versions worked best at 1 meg although haven't had time to try it as yet.

EDIT:- worked out the answer to the first query...use usbasp programmer...no worries there thanks.
User avatar
Phil_G
Posts: 596
Joined: 15 Feb 2018, 23:32
Contact:

Re: Phil's lockdown project - a 4ch propo NRF24 set

Post by Phil_G »

Hi Jeff, I avoid the epoxy blob ones as I had two that were marked '+' but wouldnt do 250k which suggests they're not plusses, but since they're so cheap I didnt investigate (the library can tell you which NRF chip it is). Real ones are cheap enough, so I use the blobs for Martins Spectrum display project. I was getting at least 50 yards between two of the genuine NRF24L01+ small PCB-aerial ones, using full power. Maybe by chance you just picked a busy channel, WiFi, cordless phones, or general hash...
Packet-loss could be quite high at 50 yards but the rate is so high that we can still have perfect control. This is quite normal, its what they're designed to do, but if link quality at range is a worry or of interest, a specific packet-counter program would reveal all - I didnt go that far.

Re bootloaders, sorry I copied this from a previous post.
Note that this is my take, others disagree with me, some of it is relevant only to my stuff (like reversing) and some (like the Corona thing) is general. Of course there is no PPM with the NRF project, but I tend to follow the same practises.

The bootloader runs on power up and waits for serial input - anything up to 5 seconds in the case of the DigiSpark. This is a Bad Thing. During this delay your encoder is doing nothing, its not producing PPM as your program doesnt run until the bootloader times out. Four reasons why this is bad:
1) All my propo & reeds encoders use 'power-up with stick thrown' for reversing. The bootloader delay means that by the time it passes control to your encoder, you may have tried a stick to check for servo movement, and so the encoder sees an unwanted 'reverse' command.
2) Powering-up some modules with no PPM present causes disastrous problems, Corona for example defaults to channel values way beyond the standard servo limits, which drives all the servos to the end stop and then strips the gearbox. In the early days a lot of us used Corona and we had a lot of stripped servos!
3) a transmitter that doesnt start transmitting until after some arbitrary delay is just a poor show. Say you catch your neck-strap and accidentally switch off during a flight. You notice and switch back on in time to save the day, but your transmitter takes unnecessary time to start up - definitely a Bad Thing.
4) in Mikes case, his encoder needs all the memory and in some cases we cant afford to waste any on unnecessary bootloaders. Changing a couple of fuses can release up to 4k of memory.

In the case of the DigiSpark, the USB connector doubles the physical size of the encoder.

A USBASP programs the chip directly via SPI and with this method your encoder code runs immediately on switch-on, with none of the above problems, and so is hugely preferable. Serial is ok for experimenting, but I would always suggest a USBASP and SPI.


As I said, this is my own take, others disagree :D

Re which low-power units to buy - I got the bunch of 10 from ebay, £11 for 10 delivered, they seem 100% ok and they're marked '+'

IMG_024.JPG

https://www.ebay.co.uk/itm/NRF24L01-2-4 ... 3138764692

...but now I just use the RF-Nanos, for £3 they're such good value and really neat.

Cheers
Phil
bluejets
Posts: 316
Joined: 19 Jun 2019, 04:09

Re: Phil's lockdown project - a 4ch propo NRF24 set

Post by bluejets »

Thanks Phil...yes I did see the epoxy blob units would not work at 250 but their experiments showed they worked really well at 1 meg.

Thanks for the link...I'll check them out

Cheers Jeff
Locked