Photon with PIR Motion Sensor powered by USB powerbank

Hi all

I like to say that this tutorial is great! [Webhooks] Super Simple Motion Activated Push Notifications

But I was trying to get Photon with PIR motion sensor to work with a USB power bank with on/off switch but it seems that it will be turned off after five minutes.

However, it works well with a USB power bank without any on/off switch.

Does anyone has this same experience as me?

I was thinking that it might be an issue where the USB power bank is not giving enough power to both photon and PIR motion sensor.

There are the specs of the items used:

PIR motion sensor - GH718C: Input Voltage: DC 4.5-20V http://www.emartee.com/product/41877/

Power bank 16000mAh with on/off switch: Output: 5.1v (Not working)

Power bank 1000mAh without switch: Output: 5.1v (Working)

I am trying to put both Photon with PIR motion sensor outside my doorstep which does not have any power supply and I am hoping USB power bank can help to power Photon for at least 3-4 weeks if that is possible.

Also, is there any coding needed to help to reduce the power consumption?

Meanwhile, I am trying to figure out how to switch off Photon when it is not needed.

Any comments on this will be great.

Edit: Answer to my question.

Thank you.

Source:






I had the same “issue” on one of my power banks, when the load drops below 50-100mA the bank will disconnect the load completely.

So I dont think its a issue of the photon not getting enough power, but the bank “thinking” that the charging is done and shutting off, you should get the same effect if you put a low power LED on the bank output.

Hi @MORA

I have tried another USB powerbank (20,000mAh) but it just switches off so it makes it a total of three power banks acting the same way.

So did you managed to get the Power bank with on/off switch to work?

Guys: How do you all handle Photon’s load dropping below 50-100mA that causes the bank will disconnect the load completely

Pinging @peekay123 if he has any experience with this. :smile:

Please note that those power banks are branded products such as Sony and etc.

Thank you.

I didnt manage to get it working, I tried with 3xAA instead, but theres not really enough energy in that solution.

Hi @MORA

Thanks for the reply.

Then I was thinking how does the battery last after each charge for Electron GPS tracking tookit? I assume that it can last for 2 to 3 days?

It seems like a good idea to have solar powered panel to charge the Photon or Electron but I am not sure if it is able to work indoors?

Thanks.

Some thoughts;
I don’t think the presence of a button has anything to do with the power management. It’s neat that it’s on there, but shouldn’t affect performance. Like @mora mentioned, the battery is probably shutting off because it thinks it’s done. The fact that’s they’re branded batteries makes this even more likely since they’ve got quality protections, whereas brand-less one might not integrate this.

By using a power source that doesn’t turn off ;)?

Well, unless you get solar energy to come it, it’s probably not going to work. But if it’s indoors, can you find a permanent power source, since that might be easier?

As for conserving energy, you probably want to sleep your photon until the PIR is triggered, after which you can have it wake up on the respective interrupt.

Hi @Moors7

Thanks for your comments.

I should look for a power bank that can’t be switched off unless it is not plugged to any devices.

I am living in an apartment so there is no power socket at my home’s doorstep. In fact, I was trying to hide it in my shoe rack so no one notice it and steals it. ha!

That’s interesting… I will check it out on how can I code it on Photon.

Thanks again.

Hi all

It seems that there is an existing issue with sleep mode. You can refer to here: Sleep mode problems on latest firmware (4.7)

Probably I will wait for the next firmware, 0.4.8 to fix it.

I need to look for a suitable USB powerbank with no switch or I can get Lipo Rider Pro with solar kit.

Can anyone tell me what is the brand of battery shield in Electron Solar Kit?

Thanks.

@jonkho I just tested the Photon’s power consumption today and it consumes 30mA from a 13v battery.

At 5v thats around 78mA and that is low enough to make the portable USB power banks to think the charging of the connected device is done so it cuts off the power output to keep from constantly draining the battery. That’s probably your problem, it has happened to me in the past also.

To find out for sure try plugging the Photon into your phones AC wall USB charger and see if you get the same problem.

1 Like

I have had this issue before, i pulled apart the battery bank and connected straight to the battery. only issue is there is no under voltage cutout to protect the battery. so i changed to the sparkfun battery shield

Hi @RWB
Thank you for the explanation and it makes sense now with the numbers. Probably, I need to get a Digital Multimeter to do some testing at my end.

Hi @Hootie81 Can you explain more about your comment about ‘no under voltage cutout to protect the battery’? I was thinking if the battery does not damage the Photon device then I am ok with it. Thanks

With the photon running the battery could be drained too low and wont recharge. it depends on the type of usb power bank, there may be some protection near/built into the top of the cell, but some dont.

and there is also a few cases where the photon gets corrupted eeprom when under-voltage occurs.

1 Like

Thanks for the explanation @hootie81

I happen to saw this thread about getting 5V out of batteries, Using a 5V sensor with battery powered Photon

So I was thinking is it possible to ‘trick’ the USB powerbank to keep producing 5v? Again, it will be easier getting a ‘dumb’ USB powerbank or sparkfun battery shield with lipo battery that has high amount of mAh.

Or even using Lipo Rider Pro

I am thinking to use one of the mobile phone batteries to use it as LiPo battery.

Hi guys.

I think the answer is found thanks to the guys comment here so I will deem this thread as ‘Solved’.

What is next for me. I am waiting for the next firmware, 0.4.8 to fix the sleep mode issue. So I can work on the codes to save more battery.

I am not sure if I can start to do the coding now for this. Maybe I can create another thread to ask people about it.

Once the coding is done. Probably I will use a power bank without switch or a powerbank with Lipo Rider v1.3 (I guess that it will help to prevent the powerbank from switching off.) as Photon’s power source.

Thanks.

You can get battery holders for a few 18650 batteries combined with a small dcdc converter and power the photon from that.

The problem is then making a charge circuit, and a protection circuit (you cant discharge these batteries too low or they will be permanently damaged).
Some cells come with builtin protection in them to prevent the low discharge and short circuit though.

Hi @MORA

Thanks for the comment.

I am thinking to get LiPo device here, http://www.seeedstudio.com/depot/LiPo-Rider-v13-p-2403.html or this one, http://www.seeedstudio.com/depot/LiPo-Rider-Pro-p-992.html

It seems that it would not damage for either the battery or Photon(I read that low voltage does not cause any problems, but someone commented that it corrupts the ROM).

Did anyone managed to try and test either one of the LiPo devices?

Thanks.

Hi there, something occurs to me which might be of help here in choosing USB powerbanks.

In my experience, oftentimes the Ah rating is for the LiPo not the 5.1V output. So when the 3.7V is DC-DC converted to 5.1V, Ah rating at 5.1V is less than 0.725 * the mAH quoted. (Less than the theoretical 0.725 because the DC-DC is at best 90% efficient, and the control electronics may limit maximum level of discharge of the LipO).

e.g. 2200mAH Powerbank referring to 3.7V => 8140 mWH (to LiPo complete discharge)
8140mAH / 5.1V = 1596mAH, at 90% efficiency conversion = 1436mAH

USB powerbanks are really convenient though, and I like them. :blush:
Wishing you all the best and continued progress with your project.

Cheers,
Eclectica.