Author Topic: RF69HCW module issues in my own PCB board  (Read 15416 times)

gussabina

  • NewMember
  • *
  • Posts: 42
  • Country: us
RF69HCW module issues in my own PCB board
« on: October 05, 2016, 04:20:32 PM »
Hello All:

I'm creating my own board with an mcu and the RF69HCW module on it. I have developed the software using a prototype where the radio module was connected via wires in a breadboard and everything worked fine. 
Now, testing the software with my own board (the module and mcu in the same PCB), I see sometimes the radio doesn't transmit as usual. Actually it transmit once or twice and stops after that...The code continues running in the mcu but there are no packets going out from the radio....
I suspect the problem is in the layout...Although I took care of having ground planes far from the Antenna pin in the module.

Did someone experience similar problems? I checked some of the Moiteno PCB layout, but the module is always in the back (saving space or may be similar issue?) while in my case both the module and mcu are at the top of the board.

I would appreciate any help.
Thanks
Gus

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #1 on: October 05, 2016, 04:35:10 PM »
What are you powering it with?

gussabina

  • NewMember
  • *
  • Posts: 42
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #2 on: October 05, 2016, 04:59:12 PM »
Hi:
I power with 3.3V...

Gus

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: RF69HCW module issues in my own PCB board
« Reply #3 on: October 05, 2016, 05:34:15 PM »
Can you post the gerbers and a pdf of the schematics, it's really difficult to know what's going on with a 'it doesn't work' type post ;-)
Mark.

captcha

  • Full Member
  • ***
  • Posts: 108
  • Country: au
Re: RF69HCW module issues in my own PCB board
« Reply #4 on: October 05, 2016, 06:41:44 PM »
Inspired by Felix' designs, I'm currently developing custom circuit boards for a wireless sensor network. At present they are based on the RFM12B / RFM69CW form factor, but I am very aware of higher power transmitters and any possible rf that can cause to either upset other parts of the board or simply draw too much current when transmitting.

Things you can try:

* tell the radio module to transmit at the lower power levels

* power the radio / mcu directly off a more capable power source (bypassing any linear voltage regulators you may have)

* check/add bypass capacitors around parts

* As perky suggests: post schematic and circuit board layout



gussabina

  • NewMember
  • *
  • Posts: 42
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #5 on: October 05, 2016, 06:44:03 PM »
Sure. Thanks for the reply.
Here is the layout. Green color is top layer.

Thanks for the review.
Gus

gussabina

  • NewMember
  • *
  • Posts: 42
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #6 on: October 05, 2016, 06:50:04 PM »
Here is the schematic

gussabina

  • NewMember
  • *
  • Posts: 42
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #7 on: October 05, 2016, 06:58:21 PM »
I'm now attaching a previous layout with ground plane, which it was also failing same way. Then I decided to remove ground plane underneath the RF module, just in case, but it didn't work either.

So,following captcha comments, I think it makes sense to check 3.3V line and power directly from a more robust power supply, in case this is the problem...

john4444

  • Jr. Member
  • **
  • Posts: 71
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #8 on: October 05, 2016, 07:18:51 PM »
Hi Gus,

ISTM you won't have much luck without the ground-plane.
The first thing that I see is that you will need to increase the gap
from the antenna-trace to the ground-traces.
Such a narrow gap will add lots of capacitance and shunt
some power to ground. It also may overload the transmitter.

Felix's MCU/RFM69 work well. Why not use Moteinos?

John
John AE5HQ

gussabina

  • NewMember
  • *
  • Posts: 42
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #9 on: October 05, 2016, 07:30:23 PM »
Hi John:
Thanks for the comments.

I have a lot of app code developed for ARM-M0 device so I wanted to use this mcu rather than AVR.

I was looking at Moteino R4 design, but it seems the Antenna pad from the module is also very close to the ground plane... I tried to find what a safe value would be, but I couldn't get anything like this in the Datasheet.

Gus

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #10 on: October 05, 2016, 07:35:18 PM »
I'm by no means an expert, but is it really necessary to have the ground pads etched around them as they are?  I'm referring to the image that has the ground plane on it.  I guess you have them that way to give them some definition to their shape as pads, but maybe you want to eliminate that?  Don't know if it would make any difference, but those ground pad etches just seem like an unnecessary obstruction to current flow.
« Last Edit: October 05, 2016, 07:43:53 PM by WhiteHare »

john4444

  • Jr. Member
  • **
  • Posts: 71
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #11 on: October 05, 2016, 07:43:35 PM »
Gus,
ARM. That makes more sense.
Regarding the antenna; line length and spacing are factors.
In addition, your example appears to have the ground-plane
on the same layer as the radio. Felix uses a different layer.
I'm not criticizing, just noting that there are significant differences.
How do you prevent the radio shorting out on the GP?
Or, am I seeing that wrong?

John
John AE5HQ

gussabina

  • NewMember
  • *
  • Posts: 42
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #12 on: October 05, 2016, 07:54:24 PM »
Hi John:

I can't put the radio at the bottom because I want to create a module to sit on other boards eventually. I think putting the radio at the bottom wouldn't have these issues...

Anyway, the layout with the ground plane was the first attempt, and I agree the ground is too close to the antenna pad. That's why the second version (without ground plane) as the first one didn't work, but now it seems the ground plane is necessary...but a good spacing with the antenna is necessary.

I'm not sure if these ground plane issues are the main problem here but definitely is something to consider for a good design.
I will try to improve the power supply in case this is the main issue, or try something else until I get it working as in the prototype. I will keep you updated for the results.

Thanks
Gus

gussabina

  • NewMember
  • *
  • Posts: 42
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #13 on: October 05, 2016, 07:56:46 PM »
I'm by no means an expert, but is it really necessary to have the ground pads etched around them as they are?  I'm referring to the image that has the ground plane on it.  I guess you have them that way to give them some definition to their shape as pads, but maybe you want to eliminate that?  Don't know if it would make any difference, but those ground pad etches just seem like an unnecessary obstruction to current flow.

The pads are not etched. I think it's an issue with the gerber viewer tool...
Yes, this wouldn't make any sense to have. I agree.

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: RF69HCW module issues in my own PCB board
« Reply #14 on: October 05, 2016, 08:43:14 PM »
Can you check that the ground on the MCU (U1.23) and the ground on the capacitor are actually really connected to ground? This looks to me to be a floating net due to the ground plane being cut up (unless there are some vias not shown linking the pours together). BTW the 100nF decoupling capacitor should really be closer to the MCU.
Mark.
Edit: In fact I suggest you use a multimeter and check that every ground pin is connected properly. Do this with a bare PCB if you have a spare one as in-circuit measurements might give a strange result.
« Last Edit: October 05, 2016, 09:04:39 PM by perky »

gussabina

  • NewMember
  • *
  • Posts: 42
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #15 on: October 05, 2016, 09:38:50 PM »
Hello Perky:

I checked the grounds in a spare PCB (no components), but they are all connected together...
I also powered the board from a robust power supply and soldered cables to the radio module (in case traces were too weak), but this doesn't change the behavior.

I will continue investigating.
Thanks for the comments.

Gus

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #16 on: October 05, 2016, 10:07:14 PM »
If you're looking for ideas, a next step might be to logic probe the mosi, miso, system clock, D00, and chip select lines to see if you're getting the expected communication between mcu and rfm69 or whether something's hanging that up.  There's a weird thing on the moteino where one of those lines (I think it was mosi or miso) needed a very weak externally applied pull-up or pull-down (I'm forgetting which) in order to wakeup the winbond memory after sleeping it, and it was never explained why.  I think maybe Felix couldn't reproduce it, but a few people ran into some anomalies like that.  I'm sure a search of the archive would turn it up.

I generally try to narrow down exactly where and when a failure occurs, and that often leads to why.
« Last Edit: October 05, 2016, 11:01:20 PM by WhiteHare »

gussabina

  • NewMember
  • *
  • Posts: 42
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #17 on: October 06, 2016, 12:23:00 AM »
Hello WhiteHare:

This is exactly what I'm doing now, although I was trying to avoid it  because of the pain....
May be, I'm focus too much in the RF module and the problem are in the mcu lines communicating with it....

Thanks
Gus

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #18 on: October 08, 2016, 04:00:18 PM »
Gus,

Sounds like you were making good progress.  Did you ever figure it out?

gussabina

  • NewMember
  • *
  • Posts: 42
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #19 on: October 09, 2016, 03:48:43 PM »
Hello WhiteHare:
Thanks for asking...

Actually no... As you can see in the below picture, at the right, I soldered wires to access the SPI and checked and I found no differences with the prototype working (at the left). Everything is fine, meaning loading data in the fifo, etc., except for when switching to TX mode, it just doesn't transmit.... Nothing on the air...
So basically, it transmits one or two packets and then it dies...SPI responds but no packets are being transmitted.
As you can see in the picture, I'm now powering directly to the module (tried with 3 different power supplies, including 2xAA batteries), added Caps (10uF and 100nA) directly to the module, but everything continues the same...
What I discovered is in code, when using sleep mode or switching to RX mode, the failure occurs. If only TX, then no failure... However, the prototype in the left, where the module is far from the mcu board, everything works perfect.....

My plan now is to create few boards with different layouts, like rotate the module 90 degrees, or putting the module underneath, and also try the RF69HW module (different form factor that the RFM69HCW I'm using) to see if something changes...

I don't understand what is wrong..Layout shouldn't be that complicated...I'm not sure what is going on...

Let's see how it goes.
Thanks
Gus

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #20 on: October 09, 2016, 05:22:11 PM »
Interesting.  So, something about changing modes might be a factor.  Does it transmit first before ever going into Rx mode?  Would that explain why you get at least the first couple of packets? 

Have you tried testing using Felix's code just to see if that might make it work?  If using your own code, do you have the RFM69's sequencer enabled?

On the other hand, that wouldn't explain why it works on your prototype but not your pcb.
« Last Edit: October 09, 2016, 05:30:32 PM by WhiteHare »

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: RF69HCW module issues in my own PCB board
« Reply #21 on: October 09, 2016, 05:26:39 PM »
Also, are there vias between ground pours that are not shown on your layout? If there aren't any vias I can't see how the MCU ground pin is connected...
Mark.

gussabina

  • NewMember
  • *
  • Posts: 42
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #22 on: October 09, 2016, 06:53:39 PM »
Hello Perky:

Yes, there are vias connecting the grounds. I tested it and all ground pins are connected together.

Regards;
Gus

gussabina

  • NewMember
  • *
  • Posts: 42
  • Country: us
Re: RF69HCW module issues in my own PCB board
« Reply #23 on: October 09, 2016, 06:57:23 PM »
Hello WhiteHare:

Since I'm not using Arduino, I adapted this forum's libs but the code is doing basically the same...

I agree it seems problem is when switching between modes, but at then end, the same code works without any problem in the prototype, so I'm not sure if it's worth to go deeper in the code side...

Gus