A small, ESP32-Pico based wearable for everyday DIY Smart Home control
To make the experience fit your profile, pick a username and tell us what interests you.
First things first, I'm really sorry for putting this project on pause. The Bluetooth code had been giving me trouble, and with Christmas approaching I had to 3D print some dragon heads and solder up their LEDs and ... Oh, right, I still need to document that project.
In any case, I recently got a push to get back onto the Bluetooth problem now that I am starting my Lasertag Rev.3 hardware, which would benefit greatly from a BT connection to a phone!
I had already gotten Bluetooth SPP to work, but there still was a huge downside: It kept the chip at almost 50-100mA current draw, even when idle, and ... That's just unacceptable. BLE would have to do!
After a bit of fiddling around, I decided to merge my data-transmission-concept of the SPP code with my BLE code, using a single Characteristic with notifications enabled as replacement for the SPP connection.
The current system uses two bytes of ID, followed by raw data. This way, the very power-saving BLE mode can be used, without loosing the flexibility of a custom protocol. PLUS, I can now add standard BLE Services like Battery or Connectivity services in parallel!
I've been running this new BLE code for a bit, and I've discovered another huge upside of having a permanent connection: It puts your app on a higher priority for Android, meaning it is much less likely to be killed in the background.
Battery runtime is also just fine. With the ESP's APB Max Freq Lock taken the chip draws a steady 20mA, so I'm getting about ten hours with the 350mAh battery. But since Espressif want to enable Light Sleep with a running BLE connection, the current draw will definitely drop to <5mA.
It's not perfect, but much more usable now - I've already been able to control my lights with the morsecode, and am working on a smoother integration with my smart home right now.
So, the parts finally arrived!
Last Wednesday, actually. Delivery time was a week or two longer than expected, but for the price of production and shipping, I'm not complaining.
Regardless of this, the quality of the PCB and solder paste stencil was excellent, and I quickly found myself stuck behind a soldering station for a few hours to finish up a first revision.
To my very pleasant surprise, I was actually able to complete the entire solder in a single day! It's a small board, but still ... Thanks to my University for the hot air gun ;)
Booting it up was definitely an exciting moment. I don't know about you, but holding a 300°C airstream onto such a delicate chip like the ESP Pico and hoping everything aligns without ground pad shorts or such ... Stressful.
Long story short, the entire chip worked first try, and I was able to upload the test code I had prepared without problem. Within a few minutes I had the built-in WS2812b glowing in lovely colors, and it seemed more than happy to run off LiPo power too!
I noticed that the ADC reading of the battery was off though - it kept maxing out whenever I had left the USB connection on for a while. It wasn't until I checked the Charge Status pin of the LiPo charge controller that I noticed it was drawing the line up to 4V when done, not just 3.3V!!
I had to cut the trace there to prevent further damage to the ESP, but apparently it survived perfectly fine. Always a pleasant surprise!
Then, I could finally set it into the printed shell, together with its LiPo battery. Have a look - I think it turned out quite well!
I can't just give good news though. The ESP library apparently has a problem with putting the chip into light-sleep mode while the BT controller is enabled (even when it's idle), which means there's a constant ~20mA draw. This'll limit the runtime to about 10h with the 350mAh battery, but I'll try manually disabling the BT controller or forcing sleep mode.
Aside from that, we're all set for the next stage - setting up an App and a permanent BLE link!
Whew, finally I managed to complete the design of the casing for the Badge!
As one can see, it does resemble the StarTrek Mobile Holo-Emitter to a fair amount, but I had to deviate a little to keep the size somewhat small while still fitting the PCB and Battery in. It's not too bad, I hope.
I might also add an opaque front-panel to where the "electronics"-slot usually sits, in order to make the device a bit more waterproof.
There's no space for a vibration motor, but I think a small one could still be put in there with a bit of glue and some imagination, so we'll see what motor size I can find!
For now though I am really happy with how well the model pieces will fit together, and I can't wait to get the PCB and work on the real deal!
Over the past few days, I've been finalizing the rev. 1 PCB. For now it's going quite well!
The current revision will feature USB connection and auto-reset/auto-program, battery charging & protection as well as voltage regulation, a pin for touch-input, a WS2812 LED for status output, a vibration motor connection as well as a IR input and output.
Pretty neat if that all fits onto a 23x38mm board, too!
The schematics are available on the GitHub repository as of now, and you can see how the render looks in the uploaded picture.
In a few days I'll be ordering the components and PCB off of LCSC & JLCPCB. During the delivery period I'll then focus on the code, but the whole project might come to a pause ... We'll see.
Become a member to follow this project and never miss any updates