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”

USB To Quad Serial Port Adapter Offers TTL, Isolated Ports

[Felipe Navarro] wanted to add a few serial ports to his computer, but couldn’t find an adapter that suited his needs. So, he built his own.

His Quad Serial device is a nicely designed converter that offers four serial ports, two of which are isolated to avoid blowing up too much stuff if things go wrong. The other two are TTL ports, but with an interesting twist: feed them any voltage between 1.8 V and 5 V, and they will happily work with it, which is a lot easier than messing about with TTL to RS-232 converters.

It’s all built around an FTDI FT4232H chip, which has drivers available for most OSes, so it should work with pretty much anything. And, as [Felipe] notes, this chip has not been cloned, so you won’t have to worry about the FTDI drivers disabling your device without warning.  Well, not at the moment, anyway. We did cover a similar quad serial port adapter last year, but this one is a bit more developed, with both DE-9 and screw terminal connectors available.

Hacking A Sonoff WiFi Switch

The ESP8266 platform has become so popular that it isn’t just being used in hobby and one-off projects anymore. Companies like Sonoff are basing entire home automation product lines around the inexpensive WiFi card. What this means for most of us is that there’s now an easily hackable and readily available product on the market that’s easily reprogrammed and used with tools that we’ve known about for years now, as [Dan] shows in his latest project.

[Dan] has an aquaponics setup in his home, and needs some automation to run the lights. Reaching for a Sonoff was an easy way to get this done, but the out-of-the-box device can only be programmed in the simplest of ways. To get more control over the unit, he wired a USB-to-Serial UART to the female headers on the board and got to programming it.

The upgraded devices are fully programmable and customizable now, and this would be a great hack for anyone looking to get more out of a Sonoff switch. A lot of the work is already done, like building a safe enclosure, wiring it, and getting it to look halfway decent. All that needs to be done is a little bit of programming. Of course, if you’d like to roll out your own home automation setup from scratch that can do everything from opening the garage door to alerting you when your dog barks, that’s doable too. You’ll just need a little more hardware.

Pogo Pin Serial Adapter Thing

A few weeks ago, I was working on a small project of mine, and I faced a rather large problem. I had to program nearly five hundred badges in a week. I needed a small programming adapter that would allow me to stab a few pads on a badge with six pogo pins, press a button, and move onto the next badge.

While not true for all things in life, sometimes you need to trade quality for expediency. This is how I built a terrible but completely functional USB to serial adapter to program hundreds of badges in just a few hours.

Continue reading “Pogo Pin Serial Adapter Thing”

KeyMouSerial Solves Your Raspberry Pi Keyboard Problems

All laptops have a working keyboard and mouse built into them, the only problem is that you can’t use these tools on other computers that don’t have them. At least, until now. [Peter] has created the KeyMouSerial in order to use his laptop’s keyboard and mouse as physical devices on his Raspberry Pi, finally freeing the bonds holding our laptops’ human interface devices back.

The software for KeyMouSerial copies keystroke and mouse information and sends this out via a serial port on his laptop (using a USB to serial adapter). From there the information is translated by an Arduino into HID commands which are sent via USB to the target computer, in this case a Raspberry Pi. It’s a pretty elegant solution to carrying a bulky keyboard and mouse along just for a Raspberry Pi, or for any computer that might not have access to a network and SSH.

[Peter] has also been working on using his iPod as a serial-to-USB converter, so if you’re a Rockbox developer and want to help out then drop him a line. All of the software is available (for Windows, Mac, or Linux) including the Arduino sketch if you want to try this software out for yourself. And, if you don’t want to turn a computer into a keyboard and want to go the other direction and turn a keyboard into a computer, that is also an option.

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.

kickstarter notifications

Kickstarter Monitor Will Brighten Your Day

Keeping up with a kickstarter campaign can be quite a task, especially if your project is real (looking at you, Scribble Pen!) and you’re trying to keep up with product fabrication and all the other logistics involved in bringing a product to market. [macetech] are currently in the middle of a campaign themselves and built a loud, bright alert system to notify them of any new kickstarter backers.

The project uses a LED marquee to display the current number of backers, but every time a new backer contributes to the project, a blindingly bright green arrow traffic signal is illuminated and a piezo speaker plays a celebration tune. All of these devices are controlled by an Arduino Yun which, with its built-in Atheros chipset, easily connects to the network and monitors the kickstarter page for changes.

[macetech] used some interesting hardware to get everything to work together. They used a USB-to-RS232 cable with and FTDI chip to drive the LED marquee and a PowerSwitchTail 2 from Adafruit to drive the power-hungry traffic signal. Everything was put together in a presentable way for their workshop and works great! All of the source code is available on their project page, and you can check out their RGB LED Shades kickstarter campaign too.