NeonHorizon / lipopi

Guide to setting up LiPo batteries on the Raspberry Pi
GNU General Public License v3.0
416 stars 62 forks source link

Shutting straight down #16

Closed urban2015 closed 7 years ago

urban2015 commented 7 years ago

I have followed the writing diagram and i have followed the installation of the software but my pi zero keeps shutting down when i let go of the power button. I do press and hold the button for at least 2 seconds.

I have the Pi Zero with the 500 charger board.

Any ideas ?

NeonHorizon commented 7 years ago

When you power it up, what voltage is on GPIO14?

urban2015 commented 7 years ago

When i hold the power button down and measure the voltage on the that pin it is 3.4

craic commented 7 years ago

Have you Run sudo raspi-config and under "Advanced Options" select "Serial" followed by No. This prevents the Pi using GPIO 14 for the console (which would shut off the power). That step is essential (except on the Pi3!)

Also you might want to add a 0.1 uF capacitors between GPIO26 and ground

Take a look at https://github.com/craic/pi_power which I based on the LiPoPi circuit - look for where I talk about the capacitors - I had a couple of issues when working on a breadboard with relatively long leads, probably due to interference. Adding the capacitor helped there.

--Rob

On Wed, Feb 15, 2017 at 7:41 AM, urban2015 notifications@github.com wrote:

I have followed the writing diagram and i have followed the installation of the software but my pi zero keeps shutting down when i let go of the power button. I do press and hold the button for at least 2 seconds.

I have the Pi Zero with the 500 charger board.

Any ideas ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NeonHorizon/lipopi/issues/16, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAqOToz4GDcYUkJVnYhu04WzPv3O5o6ks5rcxyTgaJpZM4MB3ri .

urban2015 commented 7 years ago

I have run the command to disable the serial. I will look at that link you have sent as well.

NeonHorizon commented 7 years ago

Silly question but its worth checking, is it 3.4v on the 500 board enable pin as well?

urban2015 commented 7 years ago

Its 3.43 on the enable pin

NeonHorizon commented 7 years ago

Thats odd... I guess it could have data on it which might be causing the problem. Before we go further though is your battery OK? What voltage is on the batt pin?

urban2015 commented 7 years ago

There is 2.2v on the batt pin on the charger.

urban2015 commented 7 years ago

I am just looking at the advanced options in the config and the serial option is missing. I am now running an update on it.

If i goto interfacing options i can see the serial option there and i have chosen to disbale logging in via serial... Says serial disabled.

I think it was disabled before though.

craic commented 7 years ago

2.2V ? That doesn't sound right - You are using a 3.7V LiPo battery right ?

I'm not sure how you get down to 2.2... must be completely drained

If it is not a 3.7V LiPo then it won't work

If it is, then charge it up fully and see how that works

The circuit should be working, but even a Pi Zero sucks quite a bit of current - you might want to upgrade to PowerBoost 1000C

--Rob

On Wed, Feb 15, 2017 at 8:09 AM, urban2015 notifications@github.com wrote:

There is 2.2v on the batt pin on the charger.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NeonHorizon/lipopi/issues/16#issuecomment-280054469, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAqOW4K2dqaqBQF1guA4nZWqPcOMc5yks5rcyNNgaJpZM4MB3ri .

craic commented 7 years ago

That jpg didn't come through - perhaps you sent the email before it had fully uploaded - try it again

On Wed, Feb 15, 2017 at 8:41 AM, urban2015 notifications@github.com wrote:

Here is my set up

[image: Uploading lipo.jpg…]

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NeonHorizon/lipopi/issues/16#issuecomment-280064205, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAqOYemcSHRQDJDZTEZ9BgJTjIgj0Lnks5rcyq8gaJpZM4MB3ri .

urban2015 commented 7 years ago

lipo

urban2015 commented 7 years ago

I will leave the battery on the charge for a while but without the wires in place only connecting it to from the pi to the charger with the + - the pi will run fine on battery. But i need it to work with the battery and other stuff so i need the wires back :)

craic commented 7 years ago

If you have a 0.1uF capacitor, try putting it between GPIO18 and ground (I gave you the wrong pin number earlier). Your wires are pretty long and I've run into interference issues with that in other projects - worth a try...

NeonHorizon commented 7 years ago

2.2V on that LiPo pack is really really low. I wouldn't leave it unattended when you are charging it. Also its definitely the reason why your LiPoPi isn't working. At 2.2v you might not even be able to charge it.

urban2015 commented 7 years ago

I will check the battery voltage without it connected to the charger 500.

urban2015 commented 7 years ago

Its 4.0v when its not connected to the charger 500 and 4.00 when its connected to the 500 board on the bat pin. i will plug the rest of the wires in and see when it drops.. I guess it should be 4.0 volts when its all connected ?

urban2015 commented 7 years ago

OK i have it all connected and at the battery connecter at the back it measures 4volts.

And at the battery pin on the 500 it is at 4v. but it still powers off.

urban2015 commented 7 years ago

I have got a 0.1 capactor when you say pin 18 and ground do you mean ground on the pi zero pin out and pin 18 on the pi zero ?

craic commented 7 years ago

correct - GPIO18 and Pi Ground

On Wed, Feb 15, 2017 at 9:52 AM, urban2015 notifications@github.com wrote:

I have got a 0.1 capactor when you say pin 18 and ground do you mean ground on the pi zero pin out and pin 18 on the pi zero ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NeonHorizon/lipopi/issues/16#issuecomment-280085713, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAqOdlvjWaxGdwdy-xCM9vyxFBzHmEhks5rczthgaJpZM4MB3ri .

urban2015 commented 7 years ago

When I install the lipopi.service script should the pi keep shutting down without the bread board connected ?

And does this command need the . at the end ? $ sudo cp lipopi.service /etc/systemd/system/.

urban2015 commented 7 years ago

Now i install the this service my pi keeps shutting down without the bread board connected

NeonHorizon commented 7 years ago

Yes thats correct.

urban2015 commented 7 years ago

ok now when i connect my bread board and boot up the pi by holding the power button the pi boots up and i can see that the lipopi.service is runnning ok. I keep my finger on the power button till the login comes up and i let go of the power button and the power goes from the pi.

Can you help any more as i have now re done the bread board and measured the resistors to make sure i have 2x 10ks and 100k.

I am running the raspbian lite jessie With the serial disabled.

I would love to get this working.

NeonHorizon commented 7 years ago

As far as I can tell from looking at your photo its wired up correctly. As long as that breadboard doesn't have any dodgy connections. Does it stay running if you try it with the service disabled?

urban2015 commented 7 years ago

Here is new photos.

img_0309 img_0310 img_0311 img_0312

urban2015 commented 7 years ago

ok i have disabled the lipopi.service and without the breadboard connected the pi stays on. With the bread board connected the pi turns off when i let go of the button.

urban2015 commented 7 years ago

I have noticed though when i do the apt update and go to the config page the serial is no longer in the advanced section. But the serial is still disabled.

NeonHorizon commented 7 years ago

With the service disabled and the board disconnected you are definitely seeing 3v3 on GPIO 14 right? Because what you are describing sounds like GPIO14 is not going high on power on.

urban2015 commented 7 years ago

OK with the bread board disconnected and running from the battery the GPio 14 is 0 all the time.

NeonHorizon commented 7 years ago

Something is wrong with GPIO14 then. It should go high whenever the Pi is running even when its booting.

urban2015 commented 7 years ago

ok if i enable the serial from the config page in the inconectable options i get the 3.3 voltage back

Should i try with the bread board now ?

NeonHorizon commented 7 years ago

You shouldn't need serial enabled but if you do use the data as the high signal you might need the capacitor mod, try it without and see.

urban2015 commented 7 years ago

What do you mean by use the data as the high signal ?

urban2015 commented 7 years ago

So without the script running the pi will stay on if i let go of the power button when i get the login screen. If i enable the script the pi continues to go off straight way. If i run the lipopi.py script when the service is disabled then i can shut the pi down with the power button.

NeonHorizon commented 7 years ago

If you turn on the serial port then there will be data on it. This can be used to simulate a high signal.

I'll let Rob get back to you about the scripts.

urban2015 commented 7 years ago

I am wondering if the latest version of the config is different and creating problems. I will try later with the old version of the cofig and see if that changes anything. Thanks for your help so far.

urban2015 commented 7 years ago

OK i think i have it working :) The config file on the serial had 2 settings first one turn off data to the serial and second one actaully turn of the serial hardware. I had turned both off duh !

OK it seams to work nicely now.

NeonHorizon commented 7 years ago

Oh thats really interesting! Which settings did you use, we should clarify on the main pages.

tommcintyre commented 7 years ago

I can confirm - looks like there have been some changes to raspi-config menu layout. The settings are now located under "5 - Interfacing Options" / "P6 Serial". It is then necessary to answer as follows: "Would you like a login shell to be accessible over serial?" - No "Would you like the serial port hardware to be enabled?" - Yes

(This is on a Raspberry Pi Zero. I also added the 0.1uF capacitor between GPIO 18 and Pi Ground for good measure, although it didn't seem to be necessary. :) )

NeonHorizon commented 7 years ago

Thanks Tom, I've added your details to the readme and put your name in the credits.

Does anyone know if this solves the issue with the RaspberryPi 3?

Rob I'll leave you to update the pi_power documentation

craic commented 7 years ago

I see the changes to raspi-config... I wish they included a version number in that...

I'll try and test this out with my circuit sometime in the next week - can't get to it sooner, unfortunately