LowPowerLab Forum

Hardware support => General topics => Topic started by: fmms on April 17, 2017, 01:38:18 PM

Title: Problem receiving response RFM69HCW
Post by: fmms on April 17, 2017, 01:38:18 PM
Hi there, I'm currently not getting any further with my issue, I was hoping someone has ran into a similar problem, or can tell me how to best troubleshoot this..

Some information:
I created a custom pcb (I attached the schematics) with an atmega 328p and a RFM69HCW 868mhz module, and had 5 produced, which worked fine, then I proceeded to order 50 pieces.
I use the nodes to send some data to a base station, who in turn will reply with how many sleepcycles the node will need to complete before sending new data.

I have completed 12 of the 50 pcb's (soldering the wire antenna, burning atmega 8mhz avr bootloader, set the fuses correctly, upload the arduino sketch)

I'm currently testing them, and 6 work without any issues they send sensor data, receive the amount of sleepcycles, and go to sleep for that amount of time, as expected.

But the other 6 have a funky problem.. they send data to my base station but don't receive the response (The basestation tells me it is sending the response, same is with the working nodes)

While I was testing this, I was using the led on the pcb, if it blinks once with 200ms delay it received the data, if it blinks 4 times with 50ms delay I know it didn't receive the reply.
the code for this looks like this:

if (rf69.waitAvailableTimeout(500))
  {
    // Should be a reply message for us now
    if (rf69.recv(buf, &len))
    {

      sleepCycles = buf[0] <<8;
      sleepCycles |= buf[1];
      blinkLed(1, 200);
   
    }
  }
  else
  {
    blinkLed(4, 50);
   //Timeout? try again in 15 minutes
  }


so it looks like the waitAvailableTimeout is timing out, and it didn't receive the reply..

The strange part is, this only goes wrong when I use a battery, when I use the FTDI connector it works as expected.

First I thought I messed the pcb design up, but since I got 6 working (out of the 12 first) I guess that's not the problem.
For now my best guess is there is a resistor or capacitor in the battery circuit that is faulty, but it's so strange that sending data is working for these 6 pcbs..

Can anyone tell me how they would approach solving this? or has anyone had something similar with the RFM69HCW?
Title: Re: Problem receiving response RFM69HCW
Post by: Felix on April 17, 2017, 03:18:56 PM
Are you using RadioHead?
Title: Re: Problem receiving response RFM69HCW
Post by: fmms on April 17, 2017, 03:52:42 PM
Yes, I'm using the RadioHead Lib
Title: Re: Problem receiving response RFM69HW
Post by: fmms on May 09, 2017, 08:27:25 AM
One sidenote it's the RFM69HW
I have purchased a logic analyzer to compare the SPI traffic between a working rfm chip and a non working, the biggest difference I noticed is this, does anyone have any idea what this sequence is?

Non Working
(http://demo.tom-it.nl/non_working_chip.png)

Working
(http://demo.tom-it.nl/working_chip.png)
Title: Re: Problem receiving response RFM69HCW
Post by: Felix on May 09, 2017, 09:02:16 AM
If it's RFM69, you could use my library and start from working examples.
Other than that the problem might be in hardware.