Cheap LCD Uses USB Serial

Browsing the Asian marketplaces online is always an experience. Sometimes, you see things at ridiculously low prices. Other times, you see things and wonder who is buying them and why — a shrimp pillow? But sometimes, you see something that probably could have a more useful purpose than the proposed use case.

That’s the case with the glut of “smart displays” you can find at very low prices. Ostensibly, these are being sold as system monitors. A business-card-sized LCD hooks up via USB and shows your CPU speed, temperature, and so on. Of course, this requires sketchy Windows software. I don’t run Windows, and if I did, I wouldn’t be keen to put some strange service on just so I could see tiny displays of my system information. But a 3.5-inch IPS LCD screen for $15 or less probably has some other uses. But how to drive it? Turns out, it is easier than you think and the hardware looks reasonably hackable, too.

Like a lot of this cheap stuff, these screens are sold under a variety of names, and apparently, there are some subtle differences. Two of the main makers of these screens are Turing and XuanFang, although you rarely see those names in the online listings. As you might expect, though, someone has reverse-engineered the protocol, and there is Python software that will replace the stock Windows software the devices use. Even better, there is an example of using the library for your own purposes.

Continue reading “Cheap LCD Uses USB Serial”

A small brown PCB with various components on it. There is a headphone cable and DC barrel connector cable coming out of it.

Put Your Serial Port On The Web

Today, everything from your computer to your dryer has wireless communications built in, but devices weren’t always so unencumbered by wires. What to do when you have a legacy serial device, but no serial port on the computer you want to connect? [vahidyou] designed a wireless serial dongle to solve this conundrum.

Faced with a CNC that took instructions over serial port, and not wanting to deal with the cabling involved in a serial to USB adapter, [vahidyou] turned to an ESP8266 to let his computer and device talk wirelessly. The hand-made PCB connects via a 3.5 mm headphone jack to DB9 adapter which he describes in another article. While [vahidyou] did write a small Windows program for managing the device, it is probably easier to simply access it in a web browser from any device you have handy.

Want to see another wireless serial port application? This Palm Portable Keyboard Bluetooth dongle will let you type in comfort on the go, or you can use a PiModem to get your retrocomputer online!

New Part Day: The Fifty Cent USB Chip

If you want to plug a USB cable into your next project, you’ve got a problem. USB is not UART, and UART is what every microcontroller serial port wants. To add USB to your microcontroller project, you’ll need to add a support chip, probably from FTDI, although there are a multitude of almost-FTDI clones available from the other parts of the Internet. These parts are slightly expensive, and they require some support circuitry. What you really need is a simple device that requires minimal external components, takes in serial from your microcontroller and spits out USB, and costs no more than a dollar. Bonus points if it’s hand-solderable.

The CH330 is apparently the answer to this problem (That’s a TaoBao link, this is probably going to be the best link going forward). It’s a dead simple chip with eight pins. Two are the data lines on a USB cable, and two are TX and RX for your microcontroller. The other pins are just power, ground, and an RTS line. Best of all, it only costs about fifty cents. You’ve never heard about it, because a few hours after this post is published, it will be the most information you’re going to get on this chip in the English-speaking world.

As far as we can tell, the CH330 is the smallest in a line of USB to UART converters from WCH, although the part isn’t even on the company’s website. The first reference to the phrase ‘CH330’ in reference to a USB chip appeared about a month ago, at the beginning of September. There’s a GitHub for someone who is apparently using this chip in a Pine64 board, but that’s about it. There’s no more information.

Right now, the only documentation for this chip is a single Chinese-language datasheet with an example schematic showing this chip connected to a MAX232 as a USB to RS232 converter. This is it. You’re looking at all the information that exists on this chip in the English-speaking version of the Internet.

The idea of a cheap, small chip that easily turns USB into UART would be great for thousands of projects. An FTDI chip will work, yes, but if you’re making thousands of a thing you might want to go with the fifty cent part over the two dollar part. That said, we’re in untested waters with this part, and you can’t even find it on AliExpress.

Let us know if you’ve gotten your hands on one of these devices. This has the potential to be really useful in a lot of projects and products, and we’re eager to see what the community comes up with. Thanks to [acabx] for sending this one in on the tip line.

The Cambridge Z88 Lives! (As A USB Keyboard)

What did [Clive Sinclair] do next? After his line of home computers including the iconic ZX Spectrum hit the buffers and was sold to Amstrad, that is. No longer in the home computer business, he released a portable computer for the business market. The Cambridge Z88 had a Z80 at its heart, a decent keyboard, a text-only LCD display, and ran for an impressively long time on a set of AA alkaline cells. It made a handy portable word-processor, or a serial terminal thanks to its rare-for-the-time RS232 port. And it’s that port that [Spencer Owen] made use of his Z88 in a modern setting, using it as a USB keyboard.

It’s a few years old, so he used a Minimus AVR microcontroller board to provide a serial-to-USB HID keyboard interface, and to keep things tidy he’s made a poor man’s enclosure for it using Sugru. It’s not quite an amazing hardware hack, but we’re featuring it simply for its use of a Z88. Retro computers used as keyboards are a common theme, but a Z88 is a particularly eclectic choice.

If you’re not British you may only know the name [Sinclair] through Brits on the Internet waxing lyrical about their ZX Spectrum computers, but in fact the man behind them is a serial electronics entrepreneur whose career has continued since the 1960s and has touched fields as diverse as portable television and bicycles aside from the computers he is best known for. Often his products took technology to the limit of practicality, but they were and continue to be the ones to watch. If [Clive Sinclair] is working in a field his products may not always hit the right note when released, but you can guarantee that you’ll be buying the same thing from the big boys within a few years. The Z88 is a classic Sinclair product, a little before its time in 1988 and pushing the technology a little too far, but delivering a truly portable and capable computer with a meaningful battery life a couple of decades before you’d find the same attributes from all but a few other niche manufacturers.

Not had enough USB HID devices? How about a Morse key? And if [Spencer] rings a bell, he’s the originator of the RC2014 retrocomputer we reviewed last year.

Bit Banging Through A USB Parallel Port Adapter

If you’ve ever looked into low-level parallel port access you may have learned that it only works with actual parallel port hardware, and not with USB parallel port adapters. But here’s a solution that will change your thinking. It borrows from the way printers communicate to allow USB to parallel port bit banging without a microcontroller (dead link, try Internet Archive).

Sure, adding a microcontroller would make this dead simple. All you need to do is program the chip to emulate the printer’s end of the communications scheme. But that’s not the approach taken here. Instead the USB to RS232 (serial) converter also pictured above is used as a reset signal. The strobe pin on the parallel port drives an inverter which triggers a thyristor connected to the busy pin. Thyristors are bistable switches so this solution alone will never clear the busy pin. That’s where the serial connection comes into play. By alternating the data transmitted from the computer between the bit-bang values sent to LP0 and 0xF0 sent to the serial connector the eight parallel data bits become fully addressable. See the project in action in the clip after the break.

1 Chip USB AVR Development

Wouldn’t it be nice if there was an AVR microcontroller with USB device support built in so you would not need a separate programmer or serial link? Well in fact there are quite a few of them, and this awesome tutorial (google translate) is a quick and easy crash course in using the ATMega 16/32U4 micro controllers.

These 8 bit AVR’s (16k and 32k) have the usual list of features you would expect in a Mega AVR. 26 GPIO pins and a pretty easy to solder 44 pin surface mount package, the micro controller also has a USB 2.0 Full-speed/Low Speed Device Module and allows programming though a standard bootloader.

Once you have a pretty standard board assembled you need Atmel’s FLIP RS232, USB, or CAN device programming software (Windows or Linux) and your favorite AVR IDE setup, you’re good to go!

Join us after the break for a quick video.

Continue reading “1 Chip USB AVR Development”

Serial Port JTAG Programmer

If you’re planning to do some hacking with CPLD or FPGA chips you’ll need a way to program them. JTAG is one of the options and here’s a cheap method that uses the serial port (translated).

This method requires only four signals (TDI, TMS, TCK and TDO) plus ground. But the problem is that an RS232 serial port operates with 12V logic levels and the JTAG side of the programmer needs to operate with the logic levels native to the device you’re programming. Commercial programmers use a level convert IC to take care of this for you, but that doesn’t mesh with the cheap goal of this project. Instead, [Nicholas] uses Zener diodes and voltage dividers to make the conversion. There is also an LED for each data signal to give some feedback if you’re having trouble.

You can use this along with a programming application that [Nicholas] whipped up using Visual Studio. It works well via the serial port, but he did try programming with a USB-to-Serial dongle. He found that this method slows the process down to an unbearable 5-minutes. Take a look, maybe you can help to get that sloth-like programming up to a manageable speed.

[Thanks Alex]