Keeping two TPL5111's in sync

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
elnjensen
 
Posts: 4
Joined: Fri Jul 07, 2017 12:51 pm

Keeping two TPL5111's in sync

Post by elnjensen »

Hi all,

I've built a simple outdoor thermometer with indoor display. Each unit has a Feather RP2040 and an RFM69 packet radio Featherwing. The outdoor unit has a temperature / humidity sensor, and relays the info via radio to the indoor unit, which displays it on a 2.9" ePaper display. So far, so good - that's all working. (Thanks for the good docs that made that possible!)

Now I'm trying to reduce power consumption so that I don't have to charge the batteries so often. I have each unit wired to a TPL5111 breakout, so they wake up, talk to each other, and go back to sleep. That too is functioning OK, in the sense that the TPL5111 boards seem to be wired correctly, and they do indeed wake up and shut down each device.

The problem is that they have to be awake at the same time, and they slowly drift out of sync, because the resistances aren't exactly the same on the delay. I had initially assumed (incorrectly, it turns out) that the delay would be counted from the time the DONE signal was sent. If that were the case, it would work fine - no big deal if one device wakes up 5-10 seconds before the other each time. If they both power down simultaneously after exchanging and acknowledging packets, I thought they would both wake up at about the same time, even if not exactly the same time.

But it turns out that the cycle time is fixed, based on when the device starts up, independent of how long it is awake each time (i.e. independent of when the DONE signal comes in the cycle). That means that if the two cycle times are not exactly the same, one device will slowly drift with respect to the other and they will get out of phase, and either no power is saved (because they are continuously transmitting or listening while waiting for the other device) or no packets are received (if they give up too soon).

Any thoughts on how to fix this? Right now one potentiometer is at 43.5 kOhms and the other at 43.6 kOhms (as close as I could get easily get them with the screws). I could hard-wire resistors to the DELAY pins instead, but it's not clear to me that that would help - the current values I have are 0.2% apart, so it's not clear that two 1% resistors would be any closer to each other. Those values give about a 5 minute delay, with one device about 5 seconds slower than the other. But it's an additional 5 seconds every 5 minutes, so after only two hours they are out of sync by about 2 minutes, close to half a cycle.

Is there any way to do a software-controlled equivalent of pushing the reset button, to re-sync the devices? I do have a real-time clock on one of the devices, so I could keep track and try resetting periodically. But it's not clear how to do that. Or any other kind of circuit I should be thinking of here?

Thanks in advance for any ideas!

Eric

User avatar
elnjensen
 
Posts: 4
Joined: Fri Jul 07, 2017 12:51 pm

Re: Keeping two TPL5111's in sync

Post by elnjensen »

As a follow up to my own question, I’d also be interested in thoughts about ways to decrease power consumption in the event that it’s not possible to do it the way I originally planned (by having both boards switched off most of the time with the TPL5111s).

These could include:
  • - Ways to decrease power consumption during the “on” time, e.g. any settings of the boards that are configurable to help with that.

    - Efficient patterns for the radio transmit cycle, e.g. if one board is sleeping longer and the other needs to wake up more frequently and check to see if it can reach the first one, what’s the best combination of transmitting bursts vs. just waiting in between (which presumably uses less power than transmitting, even if the board is powered on).

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”