Close
0%
0%

nTerm-S

A terminal emulator of my own liking. Using an ESP32, connecting to a VGA screen, and having sound. Based on the uTerm2-S and FabGL.

Similar projects worth following
0 followers
This is a terminal emulator board using an ESP32 with emulator software based on the FabGL library. It can connect to a VGA screen, uses a PS/2 keyboard (and mouse), and has an RS232-V24 compatible serial port. It also features an option to switch between a normal connection or a null-modem connection, eliminating the need to find that null-modem cable that is never where you last left it, or that patch box of which a few wires always seem to have come loose by themselves since the last time you patched it to works as a null-modem converter.

Some time ago I was working on a Minato 1866 Eprom Programmer, and a SYM-1 single-board computer. Both can only communicate with the operator through a keypad and 6 digits of LED displays.

Or... RS-232 V24.

I found myself having either one laptop connected to it and annoyingly having to switch back and forth between a terminal emulator and the web browser, or two laptops where one was talking to the device and the other showing docs. Not optimal. So I started thinking if there was something better.

After looking around, I found out about the uTerm2-S and FabGL. That looked exactly what I was looking for, and I almost bought a uTerm2-S board.

However... I was also looking for a worthwhile hardware project to brush up on my long-unused hardware development skills, or more honestly: my long-unused PCB design skills.

So I decided to make my own board based off the FabGL Serial Terminal board and the uTerm2-S:

The nTerm2-S!

  • v0.1

    Retep Van hour ago 0 comments

    With my requirements and stretch goals set out, I fired up Kicad and started to pull in components until I had basically more or less replicated a mix between the FabGL Serial Terminal and the uTerm2-S. However, I wanted to have a way of switching the serial connection between normal and null-modem.

    I found that real crossbar ICs that could handle 12V were extremely expensive. I considered the venerable 4066 analog switch, and other analog switches. But then stumbled on a post that was talking about a circuit controlling a bistable relay with only one GPIO port. That was interesting enough for me to try out, and after buying some relays and prototyping, I got it working quite stable within parameters. The relays were surprisingly cheap, and I was up for experimenting. So I chose to use relays.

    But relays use a lot of current when they are being powered. So I chose to use latching relays. But that had yet another problem. The small ones are single-coil latching relays and are set one way by applying a pules with a specific polarity, while they are set the other way by applying a similar pulse, but with reverse polarity. That requires two GPIO pins, and I did not have enough.

    Another option would be to use a circuit built around two comparators, and use one GPIO pin in tristate mode.

    But then I stumbled upon a really simple circuit, once patented by Omron, that could do the same with one GPIO pin, but not using tristate mode, built around a transistor, two diodes, a resistor and a large capacitor. It can be seen here on page 12, section 2.2.24.

    I started experimenting with the circuit on the breadboard, and it worked fine. I measured currents, and it all seemed within specs of the ESP32's GPIO port, so I went for it.

    I designed the PCB fully, and sent it off to JLCPCB for the ridiculously low price of €11.01.

    After a few days the boards arrived, and I started soldering! Everything went smooth, except for soldering that pesky CP2102 . USB worked, I could program the firmware, got VGA out, keyboard and mouse were working, and after programming some lines to switch the relays... No clicks, no switching.

    :(

    So that led to taking out the oscilloscope and trying to find out what was the problem. That is described in the Github entry of the nTerm2-S, and I would refer you to there if it interests you.

    After a while, my beautiful board turned into a Frankenstein. Not helped by the fact that I only had ESP32s that were soldered onto a carrier board, decided to desolder one, ripped of an important pad, and had to perform microsurgery to solder a wire onto it :D).

    In any case, a few more redesign steps had to be taken, and at some point I reached v0.6.

  • First prototype

    Retep V3 hours ago 0 comments

    Everything began with the first prototype I made. In the previous post I mentioned that many of my projects stranded in the phase where everything was held together with strings. Well, this prototype is one of those. As far as 'being held together with strings', while still doing its work, is something to be proud of, I am extremely proud of this one! Let me show you. ;)

    The parts.

    The result. Working!

    That it was actually speaking with my SYM-1 was motivating enough to dive headlong into the project.

    I also want to note that I had started out writing a few blog posts about the process, and hope they will be somewhat entertaining for you. :)

    To be honest, in the - On Terminals - blog post I mention 13 requirements and 3 stretch goals. ;)

  • Introduction

    Retep V3 hours ago 0 comments

    As the project is already close to being finished, and I basically used Github's README.md to record my progress, I am writing this page on Hackaday.io as a way to 'release' the device, and as a way to get feedback on it.

    This was a project that I did for myself, to prove I could do it and to learn, and so I did.

    I set out with a list of requirements, which I carefully curated. And I was determined to implement no less, but also no more of those requirements. The reason being that I have many unfinished projects, and many of those projects are unfinished because I set either unrealistic requirements, or ended up spending much time on feature creep instead of taking time to finish off something that was well rounded and not tied together with strings.

    • The nTerm2-S would be basically using Fabrizio's FabGL library, and should be fully compatible with it. The objective being to run Fabrizio's excellent ANSI terminal example.
    • It should be small, made with SMD components, and still be hand-solderable. The objective being to learn to use Kicad and make PCBs through JLCPCB or the like.
    • It should feature a real RS-232/V24 port, meaning that it should be able to communicate RS-232 with +/-12V (or so).
    • It should feature an on-board amplifier so I could simply connect a speaker.
    • It should feature a way to, in software, switch between normal communications and null-modem.

    I more or less succeeded in all of that, and come to a rounded, finished, project, which I am proud of. :)

    But still, I had missed one important requirement that I want to name here.

    • It should have an on-board RTC with battery backup.

    In this blog, I'll highlight a few of the most interesting challenges I had, in the hopes that it is a bit educational. Also, I am thinking of making a new version with more or less the same requirements, but using HDMI. And I'd really like to hear some feedback too.

    You can read all the details (really, there are a lot, I like to write ;)) of my development process on the corresponding Github pages.

    One thing I want to clarify up front is why there are 2 versions of nTerm2-S: nTerm2-S and nTerm2-S-FT231.

    I started out designing the nTerm2-S using a CP2102 USB to Serial bridge IC. It is a great IC, supported out-of-the-box by all major Operating Systems without having to install any drivers. I love it, and it was working great in the nTerm2-S. However... When I made my first prototype, I found that it's really hard to hand-solder reliably. I had to resort to hot air and a lot of fiddling to get it properly soldered down. I thought it might be me, having a bit of shaky hands. But with my second prototype it was all the same misery. So after long deliberation, I decided to switch to a different USB to Serial bridge. After careful looking around, I found the FT231, basically archived the nTerm2-S with CP2102, and made a new Github project nTerm2-S-FT231. And that is the version that I brought to completion.

View all 3 project logs

Enjoy this project?

Share

Discussions

Does this project spark your interest?

Become a member to follow this project and never miss any updates