CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

NRF24l01+ and GPS

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
championx



Joined: 28 Feb 2006
Posts: 151

View user's profile Send private message

NRF24l01+ and GPS
PostPosted: Mon Jul 27, 2020 9:44 pm     Reply with quote

Hi all! how are you! well, I'm writing because I developed a prototype board that has a PIC18F46k80, an NRF24L01+ and a GPS receiver (Quectel L86).

The thing is that the GPS module it seems that its interfering with the NRF.. I really don't know why. The NRF works ok if the GPS module is on sleep mode, but when it goes to tracking mode, then, the NRF couldn't receive anymore packages (it can send, but cannot receive).

I stripped down the code just to initialize the PIC, the NRF and send and receive packages and it works ok, but as soon as I wake up the GPS, then i can't receive any more packages.

I added capacitors to the NRF and GPS, but no difference. I used an oscilloscope to see the waveforms of all the signal pins and supply pins and they are fine. It's driving me crazy.


Any suggestion??
Ttelmah



Joined: 11 Mar 2010
Posts: 19219

View user's profile Send private message

PostPosted: Tue Jul 28, 2020 12:22 am     Reply with quote

This is going to involve some careful testing and design.
First 'adding capacitors'. What sort of capacitors?. Where placed?.
Then how are the antennae placed?. Important....
What is the power supply?.
Have you got the recommended ground plane below the L86 module?.
Are you using the NRF24L01 in shockburst mode?.

The 2.4GHz band is almost exactly twice the frequency of the L2 GPS band.

Now there is an old 'rule' on radio, that two antennae should
be separated by at least 1/4 the wavelength, and you should avoid
multiples of the wavelength when separating antennae.

I'd suspect that the antenna placement, is resulting in a standing wave
being induced in the NRF antenna overloading the receiver front end.
Remember that any radio receiver (including GPS), always transmits
a little. This may be being made worse if the board layout is poor.

Understand, a 'scope' is not going to see signals up over 1GHz, so the
supply looking clean on this means absolutely nothing.
temtronic



Joined: 01 Jul 2010
Posts: 9102
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Jul 28, 2020 5:43 am     Reply with quote

As Mr. T points out 'RF' is about as much fun as 'analog' ! Smile

There's a LOT to consider and while 'book smarts' helps in the basic design, it's 'on the bench' where the fun begins.
Luckily you've narrowed down the problem, that's more than 1/2 the battle. Now make a list and try several things. Though I suspect, like Mr. T. that moving the antenna should help. I'd place them as far away as practical, say a meter. Run 20-50-100 tests, at least more than when it failed. If it works, reduce the distance by half, run test again. If it doesn't fail, get closer, try again.
A sneaky problem is when the transmitted RF signal gets into the DC power cables and then into the 'box'. Ferrite beads and chokes can help eliminate this.

RF like analog is 1/2 good design, 1/2 luck and 1/2 toss of a coin if it works reliably !
Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19219

View user's profile Send private message

PostPosted: Tue Jul 28, 2020 6:06 am     Reply with quote

The other thing I was particularly 'thoughtful' of, was the type of the
capacitors tried. It is a common 'misunderstanding', that 'bigger is better'
for capacitors, but (for example), a 100uF electrolytic capacitor, will
have almost no effect at all at 2GHz. The HF performance of electrolytic's
is basically non-existent. Conversely, a 0.1uF ceramic, can have a much
larger effect at these frequencies....
championx



Joined: 28 Feb 2006
Posts: 151

View user's profile Send private message

PostPosted: Tue Jul 28, 2020 10:02 am     Reply with quote

Hi all! thanks for your answers!

The capacitors that i put on the NRF modules are one 100uF electrolytic cap and one 0.1uF ceramic type cap. My thoughts were the same, RF is getting on the NRF module but that didn't seem to help (sorry for my english).

I will try to connect the GPS module using a long cable and put on the Vcc pin a small choke to see if that can block some RF.

I know the scope cant see RF frequencies, i just used it to see if it was a voltage drop during the GPS module operation... but there is no change... So, as you pointed, mus be RF getting on the supply pins... damn.

I will keep you informed about this.


Other weird thing is that i tested this exact same board with another GPS module (SIM39) and it works perfect!
Ttelmah



Joined: 11 Mar 2010
Posts: 19219

View user's profile Send private message

PostPosted: Tue Jul 28, 2020 12:22 pm     Reply with quote

The output frequency from a GPS receiver, will depend on the IF
frequency used. Different chipset, different frequency....
championx



Joined: 28 Feb 2006
Posts: 151

View user's profile Send private message

PostPosted: Tue Jul 28, 2020 11:34 pm     Reply with quote

well... still with this problem... today I spend all day trying to find something that make sense on this board.

I stripped the board down to its minimum components. Then, I started to add filters on the GPS, the NRF24 and the PIC. Nothing seemed to work.

The board works from a 3v voltage regulator (MCP1700 3v version).

The GPS can work from 3 to 3.6 volts, the NRF from 1.9 to 3.6 volts and the PIC i think from 2.5 to 5.5 volts, so the 3v regulator was a good option because later i need to get this circuit to work from a LIPO battery.

At the end of the day I decided to try supplying the 3 volts directly from a LAB DC power supply... so i set the pot and by mistake I set the voltage to 2.9volts................... IT WORKED, GPS and NRF works..... WTF!!!!???

3volts... doesn't work.... 2.9 works..... WHY??? I'm starting to lose my mind here.

So... 3 volts is good for the GPS and not for the NRF (which should work from 1.9 to 3.6).

I added a diode in series just before the NRF VCC pin so the GPS can work from 3v and the NRF from 2.3 ish... now everything is working as expected.

But I don't know why...

I have designed several boards that use an NRF and 3.3 voltage regulators... no problem there... so I know there is something wrong with this board, but i really don't know where.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group