USB Serial Adaptor

A project log for Un-Inhibiting my Microcoin QL

Let me describe how I got my Microcoin QL coin acceptor to work.

mikeMike 02/16/2024 at 16:080 Comments

 Bottom Line Up Front

Was it a $5 part? I don’t recall. It’s just a USB serial adaptor. Look mom, there’s a Tx and Rx pin. What more is there to say? Next.


My point: We should not take our systems, devices, and components for granted. It’s ok to know what they do and how they work. I take a moment to reflect on the ubiquitous (forgotten) serial adapter.

Ah, the good-old DB9 serial port of yore is long gone; won’t ever return to a computer near you. And while USB has thankfully put an end to RS-232 serial, the interface still lingers, including its use in my coin acceptor… Yeah lingers, you and I still have/use a USB serial adaptor. Truthfully, I don’t even give much it thought. When it arrived, I don’t even think it came in a bag. It was cheap and certainly did not have any instructions. Still, these little adaptors remain a part in our hack-a-day lives. Just download the driver, make sure your (Windows) device manager recognizes it, select the comms port, set the baud in your terminal program (ccTalk uses 9600 N 8), and you’re good to go. Well not exactly, if I had a dollar for each time a serial connection did not work, I’d be … 

Anyway, I’ve taken my adapter for granted. I plug it into the USB port. And let the half-inch long pins hang over the edge of the table. Connect some micro grabbers to the Tx and Rx lines, and then to the Rx and Tx lines (flipped) on the other device. (What we used to call the DTE and DCE in the old days. BTW, I like the Ponoma Micro grabbers.) I then move on with the project without much thought. Here’s a of my serial adaptor hanging over the edge. Sketchy sure. A hack, yeah:

Again, I’ve forsaken my adaptor. It’d been a long time since I looked at its waveform. So let me hookup an oscilloscope and show the transmission of an “A”:

How did I get (see) an “A”… Well, the ASCII value of “A” is 0x41, or 0b01000001 in binary. Notice that the LSB is sent first. Sent reversed. Finally, here’s a neat little trick in Python to print the reversed binary of your favorite character:

Looking at that line of code, I could have done it faster via man ascii, looked at the hex, and flip the bits in my head.

☞ And that’s when I saw a problem. The oscilloscope shows the signal is about ~3.3V. Yet, the ccTalk interface circuit and likely the coin acceptor uses 5V. I had to address this issue! More on that next.

Seems that I bought the cheapest adaptor; one that cannot switch between 3.3 and 5 volts. I should have gotten an adaptor with a selectable voltage:

OK, serial adaptors: So cheap. So cute. So ubiquitous. So forgotten