
PSLab
fossasia/pslab-hardware
PSLab Hardware Design and Schematics https://pslab.io

A simplicated switch for smart home devices
Rocker is an open-source printed circuit board by jcranney, from the jcranney/smart-switch repository on GitHub, published under the Unlicense licence. It is a 2-layer board with 17 parts on 15 nets.
It is built around the LM324. Its parts include 5 resistors, 1 IC and 1 connector.
Simple devices in your home like lights and garden taps can be fun and rewarding to "smartify". Setting your garden lights to come on at sunset and turn off 3 hours later is immensely satisfying, but the beauty is shattered when you are having a dinner party and the lights flick off, and to turn them back on you need to go and find your phone to switch them back on. Sensors can help aleviate the problem, but there will always be edge cases where a good old fashioned switch is the best solution.
I looked up "smart switches" online and was confused and overwhelmed by the price and complexity of the commercial off-the-shelf solutions. So, to combat this confusion, I have set out on a long and arduous mission to build a simple, cheap, and dare-I-say, pretty, solution.
A) I'm lying in bed and remember that I've left the garden lights on. The lights are controlled by an ESPHome relay and can be switched on and off by posting to a locally hosted MQTT broker on the topic /lights/garden/on and /lights/garden/off respectively. I reach to the side of my bedside table where I have a row of 4 switches and flick off the 3rd one which is labelled "garden lights".
B) I'm in the workshop and want to run the sprinklers in the vege patch for 15 minutes. I walk over to the switch panel near the door and flick the 2nd switch which has the top labelled "garden 15 min" and the bottom labelled "off". I flick the switch up, and the sprinklers run for 15 minutes. While they are running, a faint LED indicates that the switch is in the "top" state, but when the taps turn off automatically in 15 minutes time, the LED flicks back down to the bottom light, indicating that they are off.
C) I have a guest over and they walk past my array of switches in the sitting room without being offended by their sight.
1.1) An individual switch shall have a footprint of less than 25 mm x 80 mm (W x H).
3.1) The switches should have LEDs to indicate the state of the swtiches, but the brightness of the LED should be configurable via MQTT topic (or similar), with the minimum brightness being fully off. 3.2) The switches must be silent, except when actuated when they may produce a tactile click or similar.
4.1) The switch body should be made primarily of cheap materials, preferably 3d printed PLA/PETG.
5.1) The switches themselves do not need to have wifi, but they should link to a wifi device that publishes the swtich events to an MQTT broker, and subscribes to MQTT topics regarding the state of the switch LEDs.
MECH-1) all of the v0.* versions have the same mechanical design principle. Flexures are used to constrain a captured rocker switch to the nominal "centre" position, but allow enough motion for the rocker hammer to press a small tacticle switch mounted onto a PCB with a 90 degree bend. Two of these tactile switches will sit on opposite sides of the hammer.
MECH-2) the flexure springs are stiffer than I expected, so the main difference between v0.2->v0.5 is tweaks to the flexure springs.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | 880R | Resistor_SMD:R_0603_1608Metric | RB1, RLA1, RLB1, RW1, RW3 |
| 4 | 3.3kR | Resistor_SMD:R_0603_1608Metric | R1, R3, R4, RW2 |
| 2 | LED | LED_THT:LED_D1.8mm_W3.3mm_H2.4mm | DA1, DB1 |
| 2 | SW_MEC_5G | Button_Switch_THT:SW_Tactile_SKHH_Angled | SWA1, SWB1 |
| 1 | 13.2kR | Resistor_SMD:R_0603_1608Metric | R2 |
| 1 | 4.4kR | Resistor_SMD:R_0603_1608Metric | RA1 |
| 1 | LM324 | Package_SO:SOIC-14_3.9x8.7mm_P1.27mm | U1 |
| 1 | MCU | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Horizontal | J1 |
17 parts, built around the LM324. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the jcranney/smart-switch repository on GitHub, at the commit this page was made from: the board is electronic/rocker/rocker.kicad_pcb and its schematic electronic/rocker/.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the Unlicense licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

fossasia/pslab-hardware
PSLab Hardware Design and Schematics https://pslab.io

espotek-org/Labrador
EspoTek Labrador is a USB device that transforms your PC or smartphone into a fully-featured electronics lab. This repo holds all of the source code!




corygrant/dingoPDM
Hardware - dingoPDM is an open source, affordable automotive PDM (Power Distribution Module). Pre-assembled and tested units are available or the design can be used to build a DIY version.

CrashOverride85/zc95
4 channel EStim box inspired by the mk312bt, with Lua scripting support

schlae/snark-barker-mca
A Sound Blaster compatible sound card for Micro Channel bus computers