Skip to main content

Posts

Showing posts from June, 2021

ESP32 D1 Mini with CH9102X UART

I noticed recently that there is a ESP32 D1 Mini board with a CH9102X UART, so I bought one to try. The CH9102X appears to be a Chinese clone of the CP2102 . Unfortunately, I couldn't get it to work. Connected via USB, and at a baudrate of 115200bps, I could only successfully upload a program 2/10 times. Other times, I get the " Failed to connect to ESP32: Timed out waiting for packet header ". I could program it without issue by plugging it into the FTDI programmer. It could deal with an upload speed of 912600bps 100% of the time. I found this webpage that talks about fixing the timeout error by adding a small capacitor between EN and GND , but I don't really have the need to try it because I am going to remove the UART module anyway for the ESPCLOCK4 project. Anyway, I will just stick with the CP2104 UART for future purchases. Update: I found that I could make it work by connecting GPIO0 to GND, and setting an upload speed of no greater than 115200. Terrible.

ESPCLOCK4 - Reduce operating current by removing UART module

The ESP32 Mini uses a CP2104 UART module to drive the USB port.  The CP2104 is configured in self-powered mode, which means that even if nothing is plugged into the USB port and the board is powered by a 3.3V source, it is still drawing ~100uA of current. I wanted to see the effect of removing this module on the power consumption of my test circuit. Removing the UART module means losing access to the USB port. However, I should still be able to program it using a standard FTDI programmer, which I wanted to verify. So I took out the same FTDI programmer that was used for programming the ESP8266, and built a custom holder for the ESP32 Mini. I started with the same connections as used with the ESP8266: ESP32 VIN <-> FTDI 3.3V ESP32 GND <-> FTDI GND ESP32 TX <-> FTDI RX ESP32 RX <-> FTDI TX However, I could not get it to work. After some fiddling around, I discovered I could only get it to work by connecting RX - RX and TX - TX. Not sure why. But now I am conf...

Arduino control of PTX4 remote

I wanted to control the opening and closing of my front gate using the ESP8266. The gate uses a standard PTX4 remote, which is readily available at many hardware stores. To my surprise, I couldn't find a hardware module that I can buy off-the-shelf and interface with the ESP8266. So I bought an extra remote, paired it with the gate receiver and proceeded to take it apart to see how I can use the circuitry inside. SW4 is the button I press to open/close the gate. Points (1) and (2) are the junctions I need to short using a relay to simulate a button press. I measured point (1) to be 12V, so I need a 12V relay for this to work. The one that's readily available to me is SY4032 . Since the operating voltage is 12V, I also need to use a MOSFET (the good ol' 2N7000) to drive the relay. The gate pin needs to be grounded with a resistor, otherwise a spurious signal might be sent to the relay when the MCU is first powered on. Another thing I did was to get rid of the A23 battery by ...

Link dump: Auto-ranging current measuring instrument for IoT devices

With more research, I am beginning to understand more about burden voltage, the difficulty of measuring the dynamic power draw of a circuit with a wide range of current consumption (a few uA all the way to hundreds of mA), as well as the limitations of the LTC4150 coulomb counter in dealing with this. Here are a list of devices that are designed to do just that, and that are not too expensive (<$200). I hope to acquire one of them to tinker with in the future: Power Profiler Kit 2 RocketLogger BattLab-One mikroAmpMeter

Update: Line adapter for Ozito Blade Trimmer

Update (Dec 2021): If you access to a 3D printer, I would now recommend this solution , which makes it super easy to replace the trimmer line. I have been using it for a few months now with zero issue.