I thought I'd share a tinkering project I threw together on the weekend: A standalone remote power button.
I have players all through the house, and use 'the 'group players' addon to run most of the synchronised a lot of the time. So I thought I'd make some simple little on/off buttons to turn them all on/off around the house. I've previously been using 2 hacked Amazon Dash buttons, but as these are no longer available and were always hard to get in NZ, I thought I'd build some.
The unit is pretty simple, hit the button and it powers up, toggles the players on/off and then powers off again.
These buttons will be used to make my setup '4 year old friendly' for tuning the music on/off in the house.
Parts List
Small Wooden Box
Wemos D1 Mini Arduino
LED Buttons
PN Mosfet, Transistors and some resistors/diodes.
Battery from a CX10 Drone
Assembly
Putting it all together I followed this circuit diagram for a latching/self collapsing power circuit. I connected the LED of the button to the end power trigger, between the existing diode shown and GPIO pin 2:
.
I had to sand out the inside of the box slightly to make it big enough for the board to fit flat. From there the power circuit and battery just squeeze in with very little room to spare (although my soldering approach has much to be desired (so I'm sure some of you could minimise things much better).
Fitting it all in the box is tight:
The Result
Once assembled, a press of the button turns on power to the Arduino. The Arduino runs it's boot up process, connects to the network, and then initiates a web call to turn the squeezebox on/off (url commands here). Following that is waits a second, just to be safe, then turns the GPIO pins to low collapsing all of the power circuit. This approach takes longer to action (as the board has to boot) but it means no electricity is being used when not pressed, so the battery should last ages despite it's small size.
Code:
I'm using the standard ESP8266WiFi.h library and a basic 'get' script as per the examples. I won't post my code here unless there is demand as I've also included a bunch of OTA code update functionality into my script.
I have players all through the house, and use 'the 'group players' addon to run most of the synchronised a lot of the time. So I thought I'd make some simple little on/off buttons to turn them all on/off around the house. I've previously been using 2 hacked Amazon Dash buttons, but as these are no longer available and were always hard to get in NZ, I thought I'd build some.
The unit is pretty simple, hit the button and it powers up, toggles the players on/off and then powers off again.
These buttons will be used to make my setup '4 year old friendly' for tuning the music on/off in the house.
Parts List
Small Wooden Box
Wemos D1 Mini Arduino
LED Buttons
PN Mosfet, Transistors and some resistors/diodes.
Battery from a CX10 Drone
Assembly
Putting it all together I followed this circuit diagram for a latching/self collapsing power circuit. I connected the LED of the button to the end power trigger, between the existing diode shown and GPIO pin 2:
.
I had to sand out the inside of the box slightly to make it big enough for the board to fit flat. From there the power circuit and battery just squeeze in with very little room to spare (although my soldering approach has much to be desired (so I'm sure some of you could minimise things much better).
Fitting it all in the box is tight:
The Result
Once assembled, a press of the button turns on power to the Arduino. The Arduino runs it's boot up process, connects to the network, and then initiates a web call to turn the squeezebox on/off (url commands here). Following that is waits a second, just to be safe, then turns the GPIO pins to low collapsing all of the power circuit. This approach takes longer to action (as the board has to boot) but it means no electricity is being used when not pressed, so the battery should last ages despite it's small size.
Code:
I'm using the standard ESP8266WiFi.h library and a basic 'get' script as per the examples. I won't post my code here unless there is demand as I've also included a bunch of OTA code update functionality into my script.
Comment