<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/custom-pcb-to-avoid-pressing-a-button-three-times-is-peak-maker-energy-gd6kd3rax" -->

---
title: Custom PCB to avoid pressing a button three times is...
description: A maker built a custom PCB with an ATtiny85 microcontroller and C firmware to automate pressing a night light button three times, integrating it with Home...
canonical: https://daily.dev/posts/custom-pcb-to-avoid-pressing-a-button-three-times-is-peak-maker-energy-gd6kd3rax
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Custom PCB to avoid pressing a button three times is peak maker energy | daily.dev
og:description: A maker built a custom PCB with an ATtiny85 microcontroller and C firmware to automate pressing a night light button three times, integrating it with Home...
og:url: https://daily.dev/posts/custom-pcb-to-avoid-pressing-a-button-three-times-is-peak-maker-energy-gd6kd3rax
og:image: https://api.daily.dev/og/posts/gD6kD3Rax.png
og:image:alt: Custom PCB to avoid pressing a button three times is peak maker energy
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom PCB to avoid pressing a button three times is peak maker energy

**[Trends](https://daily.dev/sources/trends)** · 2 min read · 2 upvotes · 1 comments

## Summary

A maker built a custom PCB with an ATtiny85 microcontroller and C firmware to automate pressing a night light button three times, integrating it with Home Assistant for automatic dimming at bedtime. The project navigated real constraints — an underpowered capacitor-drop supply, unlabeled internals, and tight physical space — using a 2N3904 transistor to physically actuate the button, a voltage regulator for stability, EasyEDA for layout, and JLCPCB for fabrication. The board wakes on power, presses the button the required number of times, then sleeps. The full project including gerbers, BOM, schematic, and C source is MIT-licensed on GitHub.

## Content

Someone built a custom PCB, wrote C firmware, and integrated Home Assistant into their bedtime routine — all to avoid pressing a night light button three times.

The project is exactly as unhinged as it sounds, and also completely reasonable if you've ever gone down this rabbit hole.

The night light in question has no labeled internals and runs off a capacitor-drop power supply that can't drive anything hungry. That ruled out the obvious choices: Arduino too power-hungry, Raspberry Pi way overkill. The builder landed on an ATtiny85, which sips enough current to survive off the light's own supply without browning it out.

From there it escalated quickly. A 2N3904 transistor physically actuates the button. A voltage regulator keeps things stable. The whole thing was laid out in EasyEDA, sent to JLCPCB for fabrication, and programmed over a Raspberry Pi's GPIO pins with avrdude. The finished board wakes on plug power, presses the button the required number of times, then goes back to sleep — all crammed inside the original enclosure.

The Home Assistant integration is the chef's kiss. The light now dims to the preferred level automatically when the owner goes to bed. No button pressing. No thinking. Just sleep.

Is this overkill? Obviously. The builder could have just pressed the button. But that's not the point. The point is that the problem was annoying, the constraints were genuinely tricky (underpowered supply, no labeled parts, tight physical space), and the solution is actually elegant once you accept the premise.

The whole thing is MIT-licensed on GitHub with gerbers, BOM, schematic, and C source. So if you also have a button you refuse to press manually, you're covered.

## Community discussion

Top comments from developers on daily.dev.

**@trevorsuna** · 0 upvotes

> This is the good kind of overengineering: tiny annoyance, real electrical constraints, and a solution that teaches several layers at once. Choosing the ATtiny85 because the existing supply could actually support it is the detail that turns the joke into solid engineering.

## Similar posts on daily.dev

- [DIY Smart Button Gets Surprisingly Complicated](https://daily.dev/posts/diy-smart-button-gets-surprisingly-complicated-2hatyrqyk) · Hackaday · 0 upvotes · 0 comments
- [A Custom Zigbee Touch Keypad](https://daily.dev/posts/a-custom-zigbee-touch-keypad-po4d64rsy) · Hackaday · 0 upvotes · 0 comments
- [This ESP32 alarm clock comes complete with a built-in night light and wake-up light](https://daily.dev/posts/this-esp32-alarm-clock-comes-complete-with-a-built-in-night-light-and-wake-up-light-lxlyjsgsj) · XDA Developers · 0 upvotes · 0 comments

---

Tags: [#hardware](https://daily.dev/tags/hardware), [#c](https://daily.dev/tags/c), [#embedded](https://daily.dev/tags/embedded)

[View this post on daily.dev](https://daily.dev/posts/custom-pcb-to-avoid-pressing-a-button-three-times-is-peak-maker-energy-gd6kd3rax)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Custom PCB to avoid pressing a button three times is peak maker energy","url":"https://daily.dev/posts/custom-pcb-to-avoid-pressing-a-button-three-times-is-peak-maker-energy-gd6kd3rax","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/custom-pcb-to-avoid-pressing-a-button-three-times-is-peak-maker-energy-gd6kd3rax"},"datePublished":"2026-08-01T00:10:36.115Z","dateModified":"2026-09-13T19:42:05.161Z","description":"A maker built a custom PCB with an ATtiny85 microcontroller and C firmware to automate pressing a night light button three times, integrating it with Home...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/34aa34ea6bb875b846fca8dc35046c66?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/34aa34ea6bb875b846fca8dc35046c66?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Trends","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Trends","logo":"https://media.daily.dev/image/upload/s--ZfSp3asX--/f_auto,q_auto/v1780996004/logos/trends?_a=BAMAMiWQ0","url":"https://daily.dev/sources/trends"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/custom-pcb-to-avoid-pressing-a-button-three-times-is-peak-maker-energy-gd6kd3rax","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"hardware,c,embedded","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Trends","item":"https://daily.dev/sources/trends"},{"@type":"ListItem","position":3,"name":"Custom PCB to avoid pressing a button three times is peak maker energy"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/custom-pcb-to-avoid-pressing-a-button-three-times-is-peak-maker-energy-gd6kd3rax","comment":[{"@type":"Comment","text":"This is the good kind of overengineering: tiny annoyance, real electrical constraints, and a solution that teaches several layers at once. Choosing the ATtiny85 because the existing supply could actually support it is the detail that turns the joke into solid engineering.","datePublished":"2026-08-01T08:41:53.833Z","url":"https://daily.dev/posts/gD6kD3Rax#c-Jd5taNDrF","author":{"@type":"Person","name":"Trevor Suna","url":"https://daily.dev/trevorsuna","image":"https://media.daily.dev/image/upload/s--dZ7gXxpp--/f_auto/v1784081551/avatars/avatar_EMoP47rpuw8DNjhp6R1b6?_a=BAMAMicg0"}}]}
```

