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

Discussion in 'The Projects Forum' started by PaulHollingsworth, Feb 15, 2016.

  1. PaulHollingsworth

    Thread Starter New Member

    Jan 13, 2016
    19
    0
    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
     
  2. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,766
    1,101
    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?
     
  3. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,220
    Also, what is the voltage level of the activity pulse?
     
  4. PaulHollingsworth

    Thread Starter New Member

    Jan 13, 2016
    19
    0
    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
     
  5. PaulHollingsworth

    Thread Starter New Member

    Jan 13, 2016
    19
    0
    Hi, The voltage level of the activity pin is 0.08V when the audio is playing then it jumps back to 3.29V when the audio stops playing.
     
  6. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,220
    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: Feb 15, 2016
    Alec_t likes this.
  7. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,766
    1,101
    .... 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
     
  8. ebeowulf17

    Active Member

    Aug 12, 2014
    678
    79
    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?
     
  9. PaulHollingsworth

    Thread Starter New Member

    Jan 13, 2016
    19
    0
    Its pretty instant. I would say 1 second max and the board boots up and triggers the audio.

    Cheers
     
  10. ebeowulf17

    Active Member

    Aug 12, 2014
    678
    79
    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?
     
  11. PaulHollingsworth

    Thread Starter New Member

    Jan 13, 2016
    19
    0
    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
     
  12. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,220
    Do you have an oscilloscope to measure the time between the power being applied and the Activity signal going low?
     
  13. PaulHollingsworth

    Thread Starter New Member

    Jan 13, 2016
    19
    0
    Unfortunately not. :( Im very new to the circuit world.
     
  14. PaulHollingsworth

    Thread Starter New Member

    Jan 13, 2016
    19
    0
    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?
     
  15. PaulHollingsworth

    Thread Starter New Member

    Jan 13, 2016
    19
    0
    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
     
  16. ebeowulf17

    Active Member

    Aug 12, 2014
    678
    79
    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!
     
  17. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,766
    1,101
    The 2n5060 is an SCR, so no good. The BC108 will be fine as a substitute for the 2N3904.
     
  18. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,220
    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.
     
  19. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    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: Feb 16, 2016
  20. PaulHollingsworth

    Thread Starter New Member

    Jan 13, 2016
    19
    0
    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?
     
Loading...