Upload files from Arduino IDE to ESP SPIFFS

 Author:   Posted on:    No comments

ESP8266 and ESP32 development boards have SPI flash memory used mainly for program storage. But, if there is enough space, the flash memory can be "partitioned" and used for other purposes. Making a SPIFFS (SPI Flash Filesystem) partition has some advantages. Even though file system is stored on the same flash chip as the program, programming new sketch will not modify file system contents. Since ESP development boards have WiFi connectivity it's easy to think of something useful to do with SPIFFS. For example a web server can store images, scripts, styles and even HTML files that will be used to create the web interface. Another usage would be to create a data log that can be downloaded via a web interface.

Obviously SPIFFS data can be read/written from other interfaces, including serial monitor. If you're developing a web server on ESP8266/ESP32 you'll want an easy way to upload server files to SPIFFS. Fortunately, there are plugins for Arduino IDE that handle this process. We will see how to do this and then check for the existence of files on the SPIFFS partition.

Upload files from Arduino IDE to ESP SPIFFS

Audio Card Infrared Receiver

 Author:   Posted on:    No comments

Looking back at an old post where I described how to view, record and decode infrared remote protocol with no more than an integrated receiver, a few parts and your computer with the right software, I decided to make a PCB for such a circuit. Back then I used the breadboard to quickly connect the required parts. I also made some other tests. There is an inconvenient of a soundcard IR receiver. It requires power to operate, but there's no usable power output through the audio input of the computer. At first, I believed I could use the bias voltage for electret microphones that is present only on microphone input. But the IR receiver requires a minimum of 2.5 V. And my card only supplied 2 V. This voltage output cannot provide enough current to drive a DC-DC converter, therefore I had to find an alternative.

One option is to provide voltage from USB port. I didn't like this. If I'm using the USB port, I could as well use a microcontroller and send IR data over the same USB port without using an additional cable. Obviously, the second option is to use a battery. I used for this circuit a CR2032 cell, but this may not be the best option. The rechargeable type LIR2032 may as well be used.

Audio Card Infrared Receiver

Infrared receiver built on PCB

Receive FT8 with WSJT-X and Gqrx (Linux)

 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 HackRF 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 (Gqrx) 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.

Receive FT8 with WSJT-X and RTL-SDR

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