• Work.
  • Blog.
  • Contact.
Menu

Jon Wolfe.

IT Professional. Photographer. Proven Geek.
  • Work.
  • Blog.
  • Contact.

ESPHome - Fine, I'll build my own IOT devices - Part 2

May 31, 2024

I outlined a desire to build an ultrasonic sensor for the garage to tell me if I’ve brought in the compost bin or not, so I decided to obsess over this for a little while, and we’re finally done!

I had a few requirements for this:

  • Somewhat professional looking finish

  • Weatherproof casing (The garage shifts humidity a lot!)

  • Custom PCB

  • Non-USB-C power

  • JST XH connectors

I first started ordering the parts, designing the layout in EasyEDA, and breadboarding the solution. I went with an M5Stamp C3U, and an HS-SR04 sensor from Digikey. A JST XH/Dupont connector kit and nicely sized project box from Amazon, and a the DC barrel jack and adapter from Aliexpress. While waiting for components I designed the layout as below and started drawing up the PCB design:

PCB Design Drawing!

I wired the thing on the breadboard using a modified USB cable as a pseudo bench power supply, knowing I was aiming for powering this using a 5V1A DC power adapter. And surprisingly, it worked first try! So with that in mind, I finalized my PCB design and placed my JLCPCB order - With a total cost of less than $5 Canadian I had 5 copies of my PCB coming to me.

EasyEDA made things really simple with the autorouting feature for the connections, and a few weeks later these beauties showed up. They probably would have came sooner but sometimes Canadian customs takes it’s time. I got to work soldering the components on board, getting my connectors attached, and testing things out. It was a big relief knowing my design was functional!

View fullsize IMG_0002.jpeg
View fullsize IMG_9994.jpeg

From there I spent some time cutting the project box to get the external connectors to fit, and other than having to 3D print a few parts to stabilize the ultrasonic sensor in the case, it was pretty straight forward!

View fullsize IMG_0049.jpeg
View fullsize IMG_0050.jpeg

One final thing left is to mount it in the garage and get automations setup, but overall I’m very happy with the results of this small project. It taught me a lot about PCB design, basic circuit design, soldering, connectors, external power to ESP32 devices, CAD software, and probably a bunch of other stuff I’m forgetting. Did I need to custom design a PCB and all that jazz for this? Absolutely not. But it was fun.

I do wish my finish was better on the final product, but overall I can’t complain too much - It’s leaps and bounds above my basement automation box, and I think my only limitation was my tools available.

← Tech Pick Ups: 11" Magic KeyboardESPHome - Fine, I'll build my own IOT devices. →

Latest Posts

Featured
Mar 26, 2025
Fujifilm X-T5: Impressions
Mar 26, 2025
Mar 26, 2025
Jan 29, 2025
New Bag: Peak Design Everyday Backpack Zip 20L
Jan 29, 2025
Jan 29, 2025
Jan 3, 2025
Fujifilm X-T5: The Return Of The Pro Kit
Jan 3, 2025
Jan 3, 2025
Sep 24, 2024
Airpods Max: First Impressions
Sep 24, 2024
Sep 24, 2024
Sep 18, 2024
Airpods Max: Alright, I'll bite
Sep 18, 2024
Sep 18, 2024