Take The Minimal Pain Out Of ESP32 Programming

Perhaps without many of us realising it, our single board computers perform the task of making programming their processor or SoC a lot easier. They take care of setting the right lines or commands to put the chip in programming mode, they deal with timings, such that we simply fire our code from our dev environment without having to expend much thought. It’s not as though it’s difficult to program most microcontrollers, but there is usually a procedure to set the chip in programming mode. Tired of pressing buttons to achieve this with the ESP32, [DoganM95] took the time to create an all-in-one USB ESP32 programming board.

It’s a straightforward enough CH340C design that also has a USBC-PD chip on-board allowing powering of an attached ESP32 from PD sources. It’s all the stuff you’d find incorporated on a little dev board, without the ESP32, so while it’s nothing earth-shattering it’s also a neat and useful little addition to your arsenal. Unsurprisingly it’s not the first time someone’s created a similar board for a commercially available ESP32 module.

an image of maketime showing the current time

Unique Clock Doubles As A Development Board

Most clocks these days have ditched the round face and instead prefer to tell time through the medium of 7-segment displays. [mihai.cuciuc] is bringing the round face to digital clocks with his time-keeping piece, MakeTime.

MakeTime's custom PCBMakeTime serves two purposes, the first and most obvious one is as a clock. Rather than displaying the time with digits, MakeTime harkens back to round dial clocks by illuminating RGB LEDs along its perimeter to show the position of the minute and hour “hands”. By using 24 LEDs, MakeTime achieves a timing granularity of 2.5 minutes.

The second purpose is as a development platform. [mihai.cuciuc] designed the clock with hacking in mind, opting to build it with components that many are already familiar with, such as a DS3231 RTC and WS2812 LEDs. To make the entire thing Arduino compatible, the microcontroller is an AtMega 328P, that can be connected to through the micro-USB port and CH340 USB-UART IC. If MakeTime outlives its time as a clock, all of the unused GPIO of the 328P are broken out to a single pin header, allowing it to be repurposed in other projects for years to come.

It seems like everyone is making their own unique timekeeping device these days. Check out the clock made out of ammeters we covered last week.

Linux Adds CH341 GPIO

There was a time when USB to serial hardware meant one company: FTDI. But today there are quite a few to choose from and one of the most common ones is the WCH CH341. There’s been support for these chips in Linux for a while, but only for use as a communication port. The device actually has RS232, I2C, SPI, and 8 general purpose I/O (GPIO) pins. [ZooBaB] took an out-of-tree driver that exposes the GPIO, and got it working with some frightening-looking CH341 boards.

He had to make a slight mod to the driver to get six GPIOs in /sys/class/gpio. Once there though, it is easy to manipulate the pins using a shell script or anything that can write to the virtual files corresponding to the GPIO pins.

Continue reading “Linux Adds CH341 GPIO”

Finding A Cheaper USB To Serial Chips

FTDI-gate wasn’t great for anybody, and now with hardware hobbyists and technological tinkerers moving away from the most popular USB to serial adapter, some other chip has to fill the void. The cheapest USB to serial chip on the market appears to be the CH340G, available for 20-40 cents apiece from the usual retailers. There is, however, almost no English documentation, and the datasheet for the CH340 family doesn’t include this chip. [Ian]’s here to help you out. He got his mitts on a few of these chips and managed to figure out the pinout and a few reference schematics. He even made an Eagle part for you. Isn’t that nice?

The CH340 series of chips do exactly what you would expect them to do: a full-speed USB device that emulates a standard serial interface, with speeds from 50bps to 2Mpbs. The chip supports 5V and 3.3V, and all the weird modem lines are supported. This chip even has an IrDA mode, because wireless communication in the 90s was exactly as rad as you remember.

With [Ian]’s help, we now have a cheap source of USB to serial chips. If you need the datasheet, here you go. The driver is a bit more difficult to find, but what you’re looking for is the CH341 family of chips. That can be found with a little bit of Google fu.