Mroberts
Posts: 5
Joined: Fri Dec 26, 2014 6:50 pm

Can a PI play mp3s for a week from a battery

Fri Dec 26, 2014 8:40 pm

I'm just starting to learn about rpi and the possibilities with it while researching a project I'm working on. I'm still not sure if it will work for my idea and that's why I'm here asking for some help. First my idea. I need a MP3 that I can program to play a sound for a specified period of time, then to stop playing for another, and so forth. It needs to be able to last for a few weeks battery time and have a easy to use interface. I was thinking of using the rpi and programming it to play the sounds at the different intervals, using sleepy pi to make the 12v battery work and use a touch screen for ease of use. Is this a feasible idea with rpi? I'm not afraid to learn what I need to ame see this as a long term project.
What do you guys think I need?

klricks
Posts: 7210
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Is it possible?

Sat Dec 27, 2014 2:24 am

Mroberts wrote: ........ It needs to be able to last for a few weeks battery time and have a easy to use interface......
Not even a car battery will get you weeks... unless your system is turned off most of the time... Normally you try figure a question like: How many minutes or hours of run time are needed per charge cycle.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

PiGraham
Posts: 4029
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Is it possible?

Sat Dec 27, 2014 9:17 am

There are various microcontroller mp3 options that will suit your battery requirement much better than the Pi.

Something like this

https://www.sparkfun.com/products/11013

User avatar
PeterO
Posts: 5958
Joined: Sun Jul 22, 2012 4:14 pm

Re: Is it possible?

Sat Dec 27, 2014 10:16 am

You may get better/quicker replies if you use a more informative title.....

"Can a PI play mp3s for a week from a battery" would have been a good one....

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

mikerr
Posts: 2826
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Is it possible?

Sat Dec 27, 2014 11:30 am

Can a pi on its own run for weeks off a small battery ? No.

But guys, he does mention the sleepy pi addon which is used to shutdown/wakeup the pi as needed,
so it is capable of running for weeks:

http://spellfoundry.com/products/sleepy-pi/

For the GUI you could use a piTFT:
http://www.amazon.co.uk/PiTFT-Mini-Kit- ... B00H9B1DTA
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13228
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Is it possible?

Sat Dec 27, 2014 2:37 pm

PeterO wrote:You may get better/quicker replies if you use a more informative title.....

"Can a PI play mp3s for a week from a battery" would have been a good one....

PeterO
changed title!

PiGraham
Posts: 4029
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Is it possible?

Sat Dec 27, 2014 3:13 pm

mikerr wrote:Can a pi on its own run for weeks off a small battery ? No.

But guys, he does mention the sleepy pi addon which is used to shutdown/wakeup the pi as needed,
so it is capable of running for weeks:

http://spellfoundry.com/products/sleepy-pi/

For the GUI you could use a piTFT:
http://www.amazon.co.uk/PiTFT-Mini-Kit- ... B00H9B1DTA

True, but you can do that with no expensive extras on an Arduino.If this device will spend any significant proportion of it's time awake a micro-controller is a better bet than a Pi for power consumption.

It would help to now more about the application.

For example:
1. How much active playing time is required?
2. Does response time matter? Is it OK to rely on the wakeup timer + boot time + mp3 file load to get to start of the sound?
3. Is the playback purely periodic, or should it play at specific times of day?
4. Is battery management required (battery level warning, charge control etc)?
5. What UI is required? Touch screen is mentioned, but no clue as to what user interaction is required. A few buttons and text LCD can achieve a lot.Obvious function are select sounds / times to play, which might be easilly done using a simple text menu.
6. Would connection to another device be appropriate? E.g. configure via Bluetooth from a mobile/tablet?

Mroberts
Posts: 5
Joined: Fri Dec 26, 2014 6:50 pm

Re: Can a PI play mp3s for a week from a battery

Sat Dec 27, 2014 3:46 pm

Hey guys, thanks for the great tips and replies. And for the title change! To answer some questions, active playing time, it would play a sound for maybe two minutes, then silent for 10-45 min, then play for 2min then silent for 30 and so forth. Boot time and such would be fine between sounds and it would need to be able to play only between certain times, like start a sequence at 7pm and stop at 8am. The screen doesn't have to be a touchscreen, a lcd txt screen and some buttons would work fine, as long as it's simple to use. Checking the battery level would be a nice option to know how long it would last and being able to address issues by mobile access would be nice but not necessary. Thanks again guys, I'm going to check those links out as well.

Mroberts
Posts: 5
Joined: Fri Dec 26, 2014 6:50 pm

Re: Can a PI play mp3s for a week from a battery

Sat Dec 27, 2014 3:50 pm

A little more background, this will be a device I can set the times and sounds and just leave it out running for a week or so. I work for the wildlife divison and this will be used to monitor wildlife populations in remote and dense areas.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13228
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Can a PI play mp3s for a week from a battery

Mon Dec 29, 2014 12:13 am

Sounds more like a job for an Arduino, that plays (uncompressed) .WAV samples from an external storage device (a serial EEPROM) or such. No visible need for them being in MP3 format, perhaps that is just simply what the OP knows. simple WAV files are more suitable for this application, no need for a lot of CPU power for their decoding.

Mroberts
Posts: 5
Joined: Fri Dec 26, 2014 6:50 pm

Re: Can a PI play mp3s for a week from a battery

Mon Dec 29, 2014 4:35 am

An arduino does sound like it would work better for power consumption and the task I need it to accomplish. This gives me a great starting point and direction thanks to everyone's help, thank you. Perhaps I should head on over to the arduino forum for more arduino specific help. Thanks again everyone!

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Can a PI play mp3s for a week from a battery

Mon Dec 29, 2014 5:03 am

You really never specified what kind of battery.

A Rolls Surrette 8CS25PS (8-CS-25PS / 8CS-25PS) is rated at 1156 amp Hrs. So if a Pi is drawing 1/2 amp, that battery will run the Rpi for a little over 96 days.
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

mikerr
Posts: 2826
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Can a PI play mp3s for a week from a battery

Mon Dec 29, 2014 12:44 pm

sleepy-pi (mentioned in the OP) will turn the pi OFF between playing music / every hour,
so pi constant power drain isn't that much of an issue as implied.

So on for 2 minutes / off for 30 minutes.... or average of 15x less power usage than full time pi.

A pi is better than an arduino when you start to need other things like video, or even network to an extent,
depends on how much of that flexibity you need.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

Mroberts
Posts: 5
Joined: Fri Dec 26, 2014 6:50 pm

Re: Can a PI play mp3s for a week from a battery

Mon Dec 29, 2014 3:24 pm

Ha, wow! That Rolls Surrette 8CS25PS (8-CS-25PS / 8CS-25PS is a massive battery! Impressive but a little big for my application. I should have mentioned I plan on having everything fit into a waterproof pelican case. I was thinking of a Motobatt MBTX14AU 12V 16.5Ah AGM battery, something that's still somewhat portable.

Return to “General discussion”