Hive Helper

by CosmicBee in Circuits > Electronics

1407 Views, 20 Favorites, 0 Comments

Hive Helper

Hive Helper - Xiao ESP32C3 powered WeAct 2.9 inch epaper home assistant display

Hive Helper is a small home assistant based device. The device itself is setup to list local weather information from an onboard temperature sensor (AHT21) and daily weather predictions via home assistant's API.

The device has a button to toggle different views allowing for additional sensor information to be displayed. The device has three Grove inputs two of which are i2c making it extensible for various home related projects. I've set things up to work with a multichannel gas sensor and flame sensor for the purpose of a demo application. This can be further configured for personal use.

The main element of this project is the custom PCB to allow the epaper display to connect to the ESP32C3 microcontroller in an effective format. I've created spacers and standoffs to help put the enclosure together. The steps in this guide will assist with getting the enclosure together, ESPHome configured, and setting up Home Assistant for acting as the datasource for the weather information. I've used met.no for the data source there but additional weather providers could be used with some effort to adjust the Home Assistant sensor configuration.

Some features of the PCB:

  1. 2 i2c Grove connectors
  2. Serial Grove connector
  3. AHT21 onboard sensor
  4. WeAct 2.9" EPaper display


Thank you PCBWay for sponsoring this project. I came up with the idea as I had several of these epaper displays available and wanted to utilize them in a way that wouldn't require constant updates but could still provide useful information at a glance.

Supplies

hive-helper-schematic.jpg
hive-helper-empty.jpg

To solder the board I used a heat gun and a solder iron. A heat gun would likely be the easiest approach for the smaller SMD components but a solder iron likely could be used alone. Solder paste and/or solder wire depending upon the approach will be needed as well.

You'll need the components for the PCB as listed in the attached build of materials.

The PCB gerber itself can be found via the PCBWay Project page listed here.

In addition to the BOM the following components are used for assembly:

  1. Xiao ESP32C3 (https://www.seeedstudio.com/Seeed-XIAO-ESP32C3-p-5431.html)
  2. WeAct 2.9" epaper B&W display (https://www.aliexpress.us/item/3256804458201128.html)
  3. Heat-set inserts (https://www.adafruit.com/product/4255)
  4. 4x 20mm m3 screws

Solder Components to PCB

hive-helper-soldered.jpg
hive-helper-spacers.jpg
hive-helper-render-2.jpg
hive-helper-render.jpg
  1. Solder passive components to PCB
  2. Solder connectors
  3. Solder remaining components
  4. Solder ESP32C3 microcontroller
  5. Attach spacers, utilize temporary screws to hold in place, and solder epaper display, nuts can be used (as shown in the photo to hold the standoffs in place until the enclosure is ready for assemble)

I used angular cutters to ensure the pins were short at this point to avoid any potential problems. I used temporary screws and nuts to hold the spacers in place are later removed during the enclosure install process.

Assemble Enclosure

hive-helper-enclosure-step-1.jpg
hive-helper-enclosure-step-2.jpg
hive-helper-heat-inserts.jpg

You'll need 4x for the standoffs (used between PCB and epaper display) and 4x the spacers for the back of the device.

After you have the parts printed and ready the next step is to prepare the screen for the enclosure. To do this remove the nuts from the screws, push the PCB to the front side of the enclosure which should show the ends of the screws sticking through the front.

You can now insert the 3m 20mm screws into these holes pushing out the screws in there now allowing the screws to hang out the back of the PCB. You'll want to attach the spacers you printed now to those screws. These help keep the PCB from being pushed inward when utilizing the button. You may need to reinsert the standoffs if they fall out while doing this. It's an unfortunate element of the setup but it only needs to be done once during setup unless you disassemble the device.

There are holes on the back plate to allow heat-set inserts to be added. You'll want to add these next to allow the device to get a hold on the back. To insert you simply use your soldering iron and put pressure on the insert as you push it down into the existing holes.

Now you just need to align the back plate with the screws hanging out from the front and screw them in. I suggest screwing a little at a time until you have a good hold on all of the screws. That's it the device is assembled.

ESPHome Setup

home-assistant-new-device.jpg
home-assistant-yaml.jpg
home-assistant-setup.jpg
home-assistant-ephome-install.jpg
home-assistant-option.jpg

First you'll need to source the fonts I used for this project. They can be found here:

  1. Bebas Neue font
  2. Material Design Icons font

You'll need to place them somewhere accessible for ESPHome to use. I place them in a fonts folder under my ESPHome install on Home Assistant.

From the ESPHome submenu of Home Assistant as shown in the screenshot, create a new device. Insert the ESPHome yaml configuration making changes as needed for your own setup. With that in place you'll need to setup new secrets set in the yaml file. For my own projects I rarely use secrets here and just rely on it in the yaml but opted to do such for this public one. You'll then need to install your ESPHome firmware. In Home Assistant you can configure your ESPHome devices and choose the option to "Install".

The first time may want to run "Manual download" as you'll need to get the device programmed. My home assistant install is in another room so I usually do that as my option to make things easier. You can visit https://web.esphome.io/ in Chrome or Edge to then install this download. Connect and install your downloaded file. After this you should be able to update the device OTA without any issues.

Add the ESPHome device to your devices and using its UI configure the option to allow the device to communicate with Home Assistant.

Note: you'll need to have the associated sensors I used hooked up to get the full experience or they may show empty content on your epaper display. The fire alert and four gas sensors and the second page of the display can be altered as needed for personal use depending upon what you want to show.

Home Assistant Setup

home-assistant-weather-sensors.jpg
home-assistant-weather.jpg

You'll need the met.no add-on for fetching weather information if fully following my tutorial.

You can follow the configuration steps outlined in the home assistant page for the add-on to get this fully setup.

Once the weather data is setup install and use the Home Assistant "File editor" add-on you are able to modify your configuration to add the new sensors. Copy the yaml contents to this location to begin fetching the weather data.

Demo Application

hive-helper-demo.jpg

To best test this application I decided to go the practical route and include sensors I'd want in my children's room. Namely I included logic in the demo for the multichannel gas sensor from Seeed Studios and their Grove flame sensor.

The sensor values are shown in the home assistant UI updating every 10 seconds (as set by the yaml). In addition the button presses and flame status are kept in sync here as they are triggered.

Special Thanks


Again, I'd like to thank PCBWay for sponsoring the PCB

wifwucite for providing the ESPHome component for the multigas sensor I used, MIT License

Ryoichi Tsunekawa for the Bebas Neue font, SIL Open Font License

Pictogrammers for the Material Design Icons font, Apache 2.0 License