Skip to main content

Posts

Cooling mod for the X96 Air #2

Previously, I added a USB cooling fan to the X96 Air TV box . The problem with this mod is that the fan is always running, and it runs at full speed. Ideally, the fan should kick in only when the CPU temperature is above a certain threshold. It would be even better if there is a way to control the fan speed. Dan McDonald left me a comment pointing to his project on Github . He basically connected the fan to a USB relay that can be controlled by Python script. His project inspired me to make a similar mod that would make use of the spare D1 Mini boards I have lying around. The plan is to hook up the fan to a MOSFET (2N7000) and control it via PWM. Here's the very simple circuit: The code simply reads a single character from the serial port (0 - 9). 0 will turn the fan off, while 1 - 9 will generate a proportional PWM to drive the fan, with 1 being the lowest and 9 being the highest. Here's the Arduino code: #include <Arduino.h> void setup () { Serial . begin ( 9600 ...

DC-DC Buck Stepdown Converter for ESP8266

I am working on a project that requires a step-down converter from 12V to 5V, that will then power a WeMOS D1 Mini. I saw this new mini buck converter based on the usual LM2596 MP2307 , so I thought I'd give it a try. Unfortunately, it didn't work. Although it is supposed to be able to supply up to 1.8A, the D1 Mini was not able to boot up. The 5V pin was being properly supplied, but the 3.3V pin measures at only ~1.3V. So I had to go back to my usual LM2596 module, which is much larger, but works to power the D1 Mini with a 12V source. Here's a great review of the mini buck converter I found while trying to figure out how to make it work. The fact that it has high quiescent current (~60mA) is also mentioned in a few other sources.

Cooling mod for the X96 Air

I realized after my Ugoos box died that overheating is a big problem with cheap Android TV boxes. A teardown of the Ugoos box shows that it does not have any heatsink or fan at all!  The X96 Air does have a heatsink, but the heatsink is located at the bottom of the casing with no ventilation. In this default configuration, with the ambient room temperature at 25c and playing a 1080p video, I was seeing the CPU temperature at 67c. I drilled a couple of holes at the bottom of the casing. The CPU temperature fell to 59c with the box raised about 2cm with plastic blocks. I retrieved an old 5V laptop fan: Then cut and strip away a spare USB cable: Solder the red and black wires on the fan and the cable: Secure the fan to the bottom of the casing with double-sided tape, then plug the fan into the box's USB connector. Here's a view of the box with some 3D-printed risers installed at the bottom to give the mounted fan sufficient clearance: The CPU now runs at 43c, a huge drop from the ...

Installing and customizing CoreELEC in X96 Air

I previously installed CoreELEC on another TV Box ( Ugoos X3 Pro ), which unfortunately died after only 9 months during the summer (due to the unit overheating, which I learned is a common problem for cheap Android TV boxes). So this time I purchased a X96 Air  (4GB/32Gb) and had to do the whole thing again. So this is a note-to-self in case I ever have to install CoreELEC again on some other device. Installation of CoreELEC is simple enough by following this guide . Basically, it involves downloading and writing the firmware to a microSD card using usbimager . Then insert the microSD card, reset the unit and hold the reset until the logo appears. The unit will then proceed to boot into CoreELEC. First thing is to connect to WiFi, then enable SSH. This allows me to login via ssh and execute: ceemmc -x from the terminal. This writes CoreELEC to the built-in eMMC storage, after which I am able to remove the microSD card and reboot the unit into CoreELEC via the built-in sto...

Automating split aircon units with Tasmota + Home Assistant

The task is to automate the control of 6 split aircon units in my house. For historical reasons, they are a wild mix of different makes and ages - Panasonic, Fujitsu, Kelvinator, Stirling and MHI. The goal is to control these units via a home automation system that is hosted locally (instead of cloud-based). Hardware Components I use the ESP8266-based WeMos D1 Mini, which is hooked up with a IR transmitter and receiver to emulate the aircon remote control.  For the firmware, I settled on Tasmota , since it was able to support all the makes of aircon units in my house (via IRRemote8266 ). I also played around with ESPHome , but its IR Remote Climate component has more limited aircon support (eg. no Panasonic support).  Building the hardware is pretty straightforward. I bought the stock IR transmitter and receiver boards from AliExpress, thinking it would make my job easier (wrong).  I also bought a bunch of TSOP34838 IR receivers for comparison. Turns out you don't real...

Home-made Bakkwa (肉干)

This post is about making Singapore/Malaysia style bakkwa (肉干), or savory pork slices, at home. There are numerous recipes for this online, but none of them hit the mark for me. It took many attempts over several years, going through different recipes and techniques, before I put together a recipe that can be easily made at home, which I feel closely resembles the commercial product. Commercial products are priced upwards of $50/kg in Singapore, and even up to $100/kg when they are exported to places like Australia. Yet, making it at home only cost $10+/kg in terms of ingredients, so it is something that is definitely worthwhile making at home. Also the process for making it is not really complicated. First the main ingredient, pork. Most online recipe will use minced pork, but I like to use thinly sliced pork (1mm thickness). The texture of the final product is different. The former is softer, while the latter is more chewy. Both types are sold commercially: 切片 (sliced) and 碎肉 (minced...

ESPCLOCK4 - Implementation

I have uploaded the final code for ESPCLOCK4 to GitHub . Full details and schematic at the repository. I have also created 2 prototypes, 25cm and 38cm clocks:  I am quite happy with this version. It is much easier to debug (by using a dev board with the UART intact during development, and switching to one with the UART removed to save power for production), and very straightforward to implement on a prototype board. It also uses very few external components, but is equally power efficient. Future enhancements will include: - Adding an external clock crystal to eliminate the RTC_SLOW_CLK drift. - Using C to write the ULP code. Assembly code is tedious and error-prone. ESPCLOCK1  /  ESPCLOCK2  /  ESPCLOCK3  /  ESPCLOCK4