Most pins are in use

Most pins are in use

The ESP8266 is an interesting chip, I mentioned it here several times (sorry: mostly german). In a short description, it’s a freely programmable microcontroller. Compared to Arduino & Co., it’s a real number cruncher. The ESP is faster, has more memory, and the best thing: it has builtin WiFi. You’ll find more information all over the network, a basic overview is contained in Wikipedia.

I tested several boards when playing with this chip. Today, I want to describe one that goes with the name Witty Cloud.

Basically, it’s a board with an ESP-12-F, a USB connector that delivers power, a little pushbutton, a LDR (Photoresistor) and a RGB-LED. So there’s plenty of hardware to play with. When you buy the module, you receive a stack of two PCBs. The lower one has a second USB connector, which is equipped with a serial converter. So it’s not only used as a power source, but also as a programming and debugging interface. Furthermore, there’s a reset- and a flash-button on the lower board. After programming, you just need the upper board, and you can even send newer firmware versions to it over the air (OTA).

The  lower board is only used for programming

The lower board is only used for programming

Stacked like this, the module costs less than three Euro, you just need a USB cord and a compiler to start programming. I suggest using the Arduino IDE, it’s very easy to use, even for beginners. After installation of the ESP8266 extensions, it’s best to select WeMos D1-Mini in the board manager, this way everything works fine.

Unfortunately, it’s not easy to find proper documentation for the Witty. So i scribbled the picture above, at first to have some kind of reminder for myself. So the pin labeled GPIO13 is connected to the blue channel of the RGB-LED, in the Arduino environment it’s called D7.

Label Pin (Arduino) Purpose
REST Reset
ADC A0 Analog input, connected to LDR
CH_PD Chip Power-Down
GPIO16 D0 GPIO, freely usable
GPIO14 D5 GPIO, freely usable
GPIO12 D6 GPIO, green channel of RGB-LED
GPIO13 D7 GPIO, blue channel of RGB-LED
VCC +5V power
TXD TX Serial interface
RXD RX Serial interface
GPIO5 D1 GPIO, freely usable
GPIO4 D2 GPIO, connected to pushbutton
GPIO0 D3 GPIO, connected to flash-button, not really freely usable
GPIO2 D4 GPIO, connected to blue LED on the ESP-Module
GPIO15 D8 GPIO, red channel of RGB-LED
GND Ground

I would be highly interested in a circuit of the board, and if you have any corrections or suggestions: just let me know.

Mein Fazit: ein echt interessantes Board. Wer mehr GPIO braucht sucht vielleicht lieber nach einem NodeMCU, wer sowieso einen LDR oder eine RGB-LED braucht sollte zugreifen. Ich habe mittlerweile einige davon hier, und eine Firmware mit der ich die Dinger hier im Haus verteilen möchte ist auch fast fertig.

Oh, das Bild habe ich übrigens mit einer Grafik aus diesem Projekt gemacht, das ist die Witty Cloud für Fritzing.

The completed controller

The completed controller

This is a project from 2004. I had it covered extensively on my old homepage, including some more pictures, circuit diagrams and a description on how I analyzed the keyboard controller.

Nowadays, PCs don’t have a PS/2-interface anymore. I’d base a project like this on microcontrollers if I would do it again, and interface the computer via USB. So I leave the details in the past and give just a short description of the project.

At that time, I was interested in MAME, the Multi Arcade Machine Emulator. You can play all the old arcade game classics with that. A PC keyboard is not the ideal interface for thos games, so I started building my own controllers.

Ratsnest

Ratsnest

Originally, the joysticks were sold to fit a Sega Dreamcast console. I threw out the electronics and implanted a PC keyboard controller instead. I had to find out the keyboard matrix layout and interface all the joysticks microswitches to the right contacts on the controller board. Not too complicated.

The second player’s contacts were connected to a second unit with an old serial cable. Additionally, I built a Y-adapter for the PS/2-interface, so I was able to control the PC outside of MAME.

The result surely wasn’t a pretty build, but: it worked. :-D

Nowadays, I don’t have a PC with a PS/2-interface anymore. I already dismantled one of the joysticks and built something else. But that’s a different story…

See also…