Build and install NodeMcu firmware on ESP8266 boards

 Author:   Posted on:    No comments

I got some ESP8266 NodeMcu boards that came with pre-installed firmware. Yet, the first thing I did was to upload the Arduino blink sketch on them using ESP8266 development kit for Arduino. Obviously, this has overwritten the default firmware. Now, I want to try NodeMcu as well. I discovered there is more than a binary that you have to flash to the development boards. In fact, you have to build this by yourself, depending on your needs. I'll overview in this post the available options for building and flashing the firmware using Linux and Windows computers.

NodeMCU is an open-source Lua based firmware for the ESP8266 WiFi SoC from Espressif and uses an on-module flash-based SPIFFS file system. NodeMCU is implemented in C and is now community-supported and compatible with any ESP module. The NodeMCU programming model is similar to that of Node.js, only in Lua. It is asynchronous and event-driven. Many functions, therefore, have parameters for callback functions.

Build and install NodeMcu firmware on ESP8266 boards

Mods and improvements to the SPF5189Z LNA board

 Author:   Posted on:    No comments

The SPF5189Z is a high-performance pseudomorphic high-electron-mobility transistor (pHEMT) monolithic microwave integrated circuit (MMIC) low noise amplifier (LNA) designed for operation from 50MHz to 4000MHz. Since the chip has a small SMD capsule and to avoid damage from improper soldering tools I bought a couple of boards based on SPF5189Z. With its large bandwidth, this LNA can be used to improve the reception of my RTL-SDR. Usage is not limited to SDR, this amplifier can boost FM radio or TV signals. TO get the best results, I had to mount it as close as possible to the antenna. By studying the datasheet and looking at the boards I have bought, I realized that design wasn't quite made for what I wanted to achieve.

First of all, power is supplied separately, not over coaxial cable. To fix this, I would have to build a bias tee circuit. But, before doing this, I took off the metal cover off only to find that to power SPF5189Z, they used a bias tee circuit. So, I would have to add another one just to redirect DC back to the RF line. Secondly, the RF input is capacitor coupled. Just that. No ESD protection. I'll have to do something with this too.

Mods and improvements to the SPF5189Z LNA board

The SPF5189Z LNA board

Hardware serial port communication monitor

 Author:   Posted on:    No comments

A serial port complying with the RS-232 standard was once a standard feature of many types of computers. Today, RS-232 has mostly been replaced in personal computers by USB for local communications which allows for faster speeds and is easier to connect and use. Despite this, the protocol used by RS-232 is still in use today, on various devices, ranging from microcontrollers to embedded systems and even computers. The original voltage levels (ranging from -15 to +15 V) have been replaced with platform specific levels (from 0 to 2.5 V, 3.3 V or 5 V). The serial port is no longer found in its original shape and pinout. Nowadays, mostly Rx and Tx signal lines are used.

There are times when serial communication needs debugging. You may use a logic analyzer to check the bitstream and determine its baudrate and if that's present, the next step is to view or record what's being sent over the port. The sniffer I will show you here is able to intercept serial communication and disable Tx lines in order to inject its own data. Since most modern devices do not use auxiliary lines, the circuit shown here is able to monitor only a single pair of Rx and Tx lines.

Hardware serial port communication monitor

Receive FT8 with WSJT-X and RTL-SDR (Windows)

 Author:   Posted on:    No comments

FT8 has become the most popular data mode for ham radio. It is a digital mode created by Joe Taylor, K1JT and Steve Franke, K9AN which uses 8-FSK modulation. A transmission lasts for exactly 12.64 seconds and occupies about 50 Hz bandwidth (8 tones at 6.25 Hz spacing). FT8 works very well even with a lot of noise and it is simple to receive and transmit using the computer soundcard and SSB transceiver.

This post will focus on receiving only. We'll decode FT8 messages using Realtek RTL2832U hardware with software defined radio (SDR) application. However, SDR tools come with support for common analog modulation. For FT8 decoding and generation there is WSJT-X software, but this one accepts only audio input. So, I'll be using a SDR application (SDR# on Windows, Gqrx on Linux) set to SSB (upper side band) demodulation and I will pipe its audio output to WSJT-X. The latter can be configured to automatically set the frequency of the SDR software. Besides configuration, a virtual audio cable is needed, as well as virtual serial ports (on Windows only).

Receive FT8 with WSJT-X and RTL-SDR

Old Prolific USB-Serial cable as programmer for Arduino

 Author:   Posted on:    No comments

I got a 3.3 V Atmega328p development board for a project. Since the board will be plugged into a PCB, I choose the Arduino Pro Mini compatible design, which is just the MCU with a few external parts that are required for proper functionality. There is no USB to serial TTL converter chip. This means that in order to program this board, I needed such a converter.

And I realized I didn't have a suitable one just when the development board arrived. All I own were CH340G with Tx and Rx lines only and the CH341A programmer locked to 5 V levels. The price of such a converter is not a problem, but having to wait for a month or so to be delivered is a problem. I remembered I had some old USB phone cables with included USB-RS232 converter so I decided to make my own adapter to program the 3.3 V Pro Mini board.

PL2303 Serial Adapter for Arduino Pro Mini

PL2303 Serial Adapter for Arduino Pro Mini

Battery charging circuit of DS3231 module

 Author:   Posted on:    1 comment

I'm working on a project which requires an RTC clock. So I decided to get a module, since my project is based on a development board with ATmega328. The cheapest and most available module is a small PCB with "ZS-042" printed on it. Besides DS3231 realtime clock IC, it also includes an I2C EEPROM (24C32). Both share the same bus lines. The module is shipped without a battery. Product description (on AliExpress) mentions only LIR2032 battery and 5V supply for the module. They even say that it does not ship with the battery and that's not a big deal since it costs only "0.01 dollars". Really?!

The reason I chose DS3231 is because I need 3.3 V compatibility. I'll be using other peripherals which support 3.3 V only and ATmega328 will run at 8 MHz. RTC datasheet confirms DS3231 is 3.3 V (and 5 V) compatible. But the module specifications say you should use 5 V. I began wondering if there is something else that made sellers say this. In this post I will answer two questions: can ZS-042 operate at 3.3 V and what type of battery should you use (CR2032 or LIR2032).

ZS-042 DS3231 Module

ZS-042 DS3231 Module