How could I automatically power off a sound board after the audio has played through?

Thread Starter

PaulHollingsworth

Joined Jan 13, 2016
20
Hi there, I am using the Adafruit sound fx board to trigger some audio using a momentary push button. I want to know if there is a way I can turn the board off once the audio has finished playing and then back on as soon as the push button is pressed again. This will save the battery life from draining too quick. Even when there is no audio being played the sound board is still drawing around 35mAh.

The simple solution would be to connect the push button to the power supply and have the user hold down the push button whilst it boots up the board and plays the audio. However, this is not very user friendly and not an option.

There is an activity pin on the board which goes low when audio is being played and then high once audio has stopped playing. Maybe I can use that to send the information of when the audio has stopped playing and now needs the board to turn off? As I am not very clued up on circuitry I cannot think of a way to do it. Somebody mentioned using a PNP transistor or a 555 timer. But I have no idea how that would actually look or work.

Any help will be greatly appreciated
Thanks
Paul
 

Alec_t

Joined Sep 17, 2013
14,280
That activity pin will be part of the solution.
What is the supply voltage of the sound fx board?
Does the push-button momentary switch ground a pin of the board?
 

Thread Starter

PaulHollingsworth

Joined Jan 13, 2016
20
That activity pin will be part of the solution.
What is the supply voltage of the sound fx board?
Does the push-button momentary switch ground a pin of the board?
Hi Alec, thanks for your reply..

The board needs 3.5-5V to be powered and draws 50mAh when playing audio and 35mAh when its just on without audio playing. The voltage that is read from ground pin to the activity pin is 0.08V (When audio is playing) and jumps to 3.29V (When audio stops playing).

Yes the momentary push button grounds a trigger pin. This trigger pin can also be permanently ground which means whenever the sound board turns on it will automatically play the audio until the board is disconnected from power.

Thanks
 

crutschow

Joined Mar 14, 2008
34,280
Here's my take on a circuit to do what you want.
When the PB is pushed, it will turn on Q2 and power the circuit.
When the Activity signal goes high, it turns off the power.
Q1 and Q3 are needed because of the undefined state of the Activity pin when the Sound Board is not powered.

upload_2016-2-15_10-47-1.png
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,280
.... and here's my take, for a 5V powered board. I see from the datasheet for that board that there are 11 trigger inputs for tune selection. I show how to connect to trigger inputs '0' and '1' only, but you get the idea. No additional switch is needed. Q1 and Q2 allow the 'Activity' output of the board to keep the supply V++ switched on, while preventing V+ supplying voltage to any part of the board when V++ is absent.
AudioTrigger.PNG
 

ebeowulf17

Joined Aug 12, 2014
3,307
Do we know how quickly this sound player turns on? If the user taps a button which activates a PFET to power the player, what are the odds that the player is powered up and ready to receive button push inputs before the button is released?
 

Thread Starter

PaulHollingsworth

Joined Jan 13, 2016
20
Do we know how quickly this sound player turns on? If the user taps a button which activates a PFET to power the player, what are the odds that the player is powered up and ready to receive button push inputs before the button is released?
Its pretty instant. I would say 1 second max and the board boots up and triggers the audio.

Cheers
 

Thread Starter

PaulHollingsworth

Joined Jan 13, 2016
20
So if the user had to hold the button for up to a second before releasing, would that work for you? Or does it need to respond to a more momentary touch?
More momentary touch is needed for this. It is going to be used mainly by children so the more user friendly and simple I can make it the better
 

Thread Starter

PaulHollingsworth

Joined Jan 13, 2016
20
Here's my take on a circuit to do what you want.
When the PB is pushed, it will turn on Q2 and power the circuit.
When the Activity signal goes high, it turns off the power.
Q1 and Q3 are needed because of the undefined state of the Activity pin when the Sound Board is not powered.

View attachment 100778
Hi, Thank you so much for taking time to look at this. Im sure you can appreciate I am very new to circuits and this looks really confusing to me. However I am keen to give it a go today and see what happens. I have to hand, 2N5060 and CDIL BC108 transistors? Would these be any good or should I get some 2N3906/04 ones ordered?
 

Thread Starter

PaulHollingsworth

Joined Jan 13, 2016
20
.... and here's my take, for a 5V powered board. I see from the datasheet for that board that there are 11 trigger inputs for tune selection. I show how to connect to trigger inputs '0' and '1' only, but you get the idea. No additional switch is needed. Q1 and Q2 allow the 'Activity' output of the board to keep the supply V++ switched on, while preventing V+ supplying voltage to any part of the board when V++ is absent.
View attachment 100782
Thank you Alec. I appreciate you taking time to look at this. As I am very new to circuits this schematic looks very daunting to me. However I would love to give it my best shot today and see how I get on. Im still working with baby images or circuits and not yet learnt all the symbols etc so i will have to do some research to translate what you have on your schematic :D Many thanks
 

ebeowulf17

Joined Aug 12, 2014
3,307
More momentary touch is needed for this. It is going to be used mainly by children so the more user friendly and simple I can make it the better
Ok. For what it's worth, I didn't mean to sound negative with regards to the two proposed circuits - both designers are way, way better at this stuff than I am, and their circuits look great.

As for my timing concern, Crutschow was on the right track asking about an oscilloscope. Short of measuring with an oscilloscope, your best bet probably is just to build the circuit and see if the response meets your needs.

If not, I think the addition of just one capacitor (along with maybe changing a resistor value) can buy you the extra on-time you need while the board wakes up. I may be overlooking a potential pitfall with such a change, so I defer to the experts on this.

Either way, have fun experimenting and keep us posted!
 

crutschow

Joined Mar 14, 2008
34,280
Hi, Thank you so much for taking time to look at this. Im sure you can appreciate I am very new to circuits and this looks really confusing to me. However I am keen to give it a go today and see what happens. I have to hand, 2N5060 and CDIL BC108 transistors? Would these be any good or should I get some 2N3906/04 ones ordered?
The BC108 will work for the NPN but you will need to buy a PNP, such as the 2N3906 or the 2N2905/2N2907.
The 2N5060 is an SCR not a transistor.
 

GetDeviceInfo

Joined Jun 7, 2009
2,192
in the factory default firmware, a momentary high on pwrbtn starts the regulators. This is acquired from a momentary contact tied high via a resistor. A further high state exceeding 2.5 secs. On pwrbtn turns off the regulators. This is aquired from your activity output via a sufficient resistance.
 
Last edited:

Thread Starter

PaulHollingsworth

Joined Jan 13, 2016
20
in the factory default firmware, a momentary high on pwrbtn starts the regulators. This is acquired from a momentary contact tied high via a resistor. A further high state exceeding 2.5 secs. On pwrbtn turns off the regulators. This is aquired from your activity output via a sufficient resistance.
Thanks for this information. As im new to all this I do not fully understand what that means. I think the power button pin is best left alone maybe?
 
Top