Author Topic: Circuit that will wake battery + activate ATXRaspi?  (Read 673 times)

Cannikin

  • Newbie
  • *
  • Posts: 4
Circuit that will wake battery + activate ATXRaspi?
« on: December 18, 2017, 11:04:34 PM »
 Love the ATXRaspi, I've bought 4 of them now. I have an interesting project that I'm hoping someone can help me with.

I've got a Pi mounted in an enclosure. I have an external power button that goes to the ATXRaspi to turn the Pi on and off. So far so good.

The problem is that the enclosure also contains a battery pack https://www.amazon.com/Anker-PowerCore-Ultra-Portable-VoltageBoost-Technology/dp/B00Z9QVE4Q which cuts its USB power outputs once something doesn't draw any power for an extended period of time (let's say 5 minutes). Once this happens, pressing the power button to the ATXRaspi does nothing. I need to "wake up" the battery pack. There's a button on the side that does this, but since the battery will be fully enclosed I won't have access to that button.

I hoped that maybe I could cheat and run both the battery pack "wake up" switch to the same power button as the ATXRaspi in parallel: pressing the button would wake up the battery, provide power to the ATXRaspi and then it would start the Pi. But, its not working.

The ATXRaspi can't get a reboot/shutdown signal from the switch any longer. When I listen for continuity at the battery pack switch's contacts (or the ATXRaspi's BTN contacts) when the button is held it just chirps at a very high frequency instead of a constant tone. I assume there's something on the battery's control board or the ATXRaspi that's causing this to happen when they're connected in parallel.

Any help would be greatly appreciated! My worst case scenario is that I'll actually have TWO buttons for power: a smaller one to wake up the battery and the big beautiful one for turning on the Pi, but that's gross.

Cannikin

  • Newbie
  • *
  • Posts: 4
Re: Circuit that will wake battery + activate ATXRaspi?
« Reply #1 on: December 19, 2017, 12:01:13 PM »
I had a realization that I can probably solve this much more simply with a DPST switch. Gonna try that. :)

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6019
  • Country: us
    • LowPowerLab
Re: Circuit that will wake battery + activate ATXRaspi?
« Reply #2 on: December 19, 2017, 01:45:44 PM »
ATXRaspi does draw a few mA of power itself even with the Pi/target off, so it's not "nothing", I guess the battery pack might not be accurate.

Upon powering the ATXRaspi, if the button is in "pressed" position, it will automatically power the Pi/target (ie it does not need a LOW - HIGH transition, just a HIGH). You could perhaps leverage this feature to your advantage, but sounds like you tried and it didn't work?

Anyway your other switch suggestion might work.

FWIW the MightyBoost+Moteino is a more complex solution that might solve this issue. It can run on a LiPo battery as backup, while be controlled by the Moteino to basically do the same as the ATXRaspi (control power to a 5V Pi/target).

Cannikin

  • Newbie
  • *
  • Posts: 4
Re: Circuit that will wake battery + activate ATXRaspi?
« Reply #3 on: December 23, 2017, 12:21:00 PM »
Thanks for the reply Felix! So I got my DPST switch and it ALMOST works. When the battery is the mode where it'll give power instantly, everything is great. However, when the batter goes into "sleep" mode, something strange happens:

Closing the switch wakes up the battery and the ATXRaspi. However, the ATXRaspi only provides power to the Pi for 6 seconds, then shuts off! Every time I press the button this happens. And during that 6 second window, if I press the button again, I get another 6 seconds, until I stop pressing the button and then it shuts off again (6 seconds after the last press). If I pull power from the ATXRaspi and plug it back in, it works as expected (press to start, long press to shutdown, etc).

I made a video to show it happening:



I also tried (but don't show in the video) unplugging the ATXRaspi from the battery and then holding the power button down while plugging in the ATXRaspi—the same thing happens (power for 6 seconds only)! It's also stuck in the same mode where now every time the switch is closed it only powers for 6 seconds. I have to unplug the ATXRaspi to "reset" it. It seems like your description below of the ATXRaspi only needing a HIGH should account for this scenario, but something isn't right...

Maybe there's a simple circuit I can put between the switch and the ATXRaspi to delay that start signal by a half a second or something?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6019
  • Country: us
    • LowPowerLab
Re: Circuit that will wake battery + activate ATXRaspi?
« Reply #4 on: December 26, 2017, 09:10:02 PM »
There is a forced shutdown mode where the ATXRaspi will cut power to the Pi/target, if the button is pressed for ~6seconds (this will ignore anything else and just cut power regardless of BOOTOK signal etc). I wonder if and why this condition is satisfied. Maybe a glitch during startup from your battery? Perhaps a dip in the boosted voltage or something like that...

I would be curious what the status LED (in your video there is nothing attached to it) does. You can simply attach an LED on those 2 pins next to the power button pins. That gives pretty good status of what's going on. It's also illustrated in the main demo video of ATXRaspi.

Besides that, I would need to probe the voltages on your battery output into ATXRaspi, or scope around to see what's causing this behavior. Do you have a scope? Or at least a fast updating DMM to show you the voltage rails of the input and perhaps output from ATXRaspi?

I am not sure if adding a "delay" would improve things in your case since we're not sure what's going on in the first place. I would like to understand the root cause first.

Cannikin

  • Newbie
  • *
  • Posts: 4
Re: Circuit that will wake battery + activate ATXRaspi?
« Reply #5 on: December 27, 2017, 01:44:49 PM »
I'll try hooking up the LED first and see what that does. And I do have a scope! If we don't get any hints from the LED I'll pull that out...