Posts

ESP32-C3 WiFi signal issue

Image
In one of my projects, I decided to use a board that was new to me - the ESP32-C3. Previously, I had used the standard dual-core ESP32s, but I needed something compact, and the C3 Supermini was a perfect fit. I took a new module and immediately soldered it onto a breadboard. Then I started porting my code—some issues came up, but fixing them didn’t take much time. And only after all this, I noticed a significant issue: the Wi-Fi access point (AP) wouldn’t start. The code executed without any errors, but no device could see the network from the ESP Supermini.   “Okay,” I thought, “maybe the module is damaged.” I took a new one out of the package - and it worked as expected.   Well, I figured I must have killed the first module with static electricity or overheated it while soldering. I desoldered it from the breadboard and, just in case, powered it on one more time. And surprisingly, it also worked! Just like the new one.   I investigated various factors that could...

ESP8266 module with OLED screen (HW-364A)

Image
I received a few of these modules. They come with the older ESP8266. No problem, there’s always a use for it. A major plus is that the module has a built-in 0.91” 128x64 pixel OLED screen, which is connected via an SSD1306 controller. You can also find ESP32s with OLEDs, though they are pricier. Out of the box, the test firmware demonstrated its OLED display working perfectly. But when I tried the samples from the seller, I just got a black screen. According to the documentation, the display is connected via software I2C with SDA on D6 and SCL on D5. However, when I uploaded a test project with these specified display settings, I got nothing. No signs of life on screen. I started looking for something similar and found many analogous modules from Wemos or with the ESP32. But they all had completely different I2C display connections. At some moment, while trying different libraries for the SSD1306, I made a mistake in the configuration. I set the pins in reverse: SDA - D5, SCL - D...

YD-RP2040 Module

Image
I want to tell you about the rather inexpensive YD-RP2040 module and show some examples of working with it. Photos and Schematics Top view: Bottom view: The module’s electrical schematic can be found here https://github.com/initdc/YD-RP2040/blob/master/YD-2040-2022-V1.1-SCH.pdf Differences from the original Raspberry Pi Pico This board has several key hardware differences from the standard Raspberry Pi Pico module. Key changes:  - Flash memory : The module can be fitted with a larger Flash memory capacity — 4MB (32Mbit) or even 16MB (128Mbit) instead of the 2MB in the original.  - Voltage regulator : The DC-DC step-down converter is replaced with a cheaper and less efficient linear regulator. This has freed up pin GPIO23, which was used to control the DC-DC converter in the original Pico.  - RGB LED : A WS2812 addressable LED (Neo-pixel) is connected to the freed GPIO23 pin. Unlike the original Pico, this board has two additional buttons:  - RESET — for a ...

Chromecast: What You Can Do With It

Image
Chromecast is both a small media player from Google and a protocol for building media applications. Many TVs (Sony, Philips, TCL) and other players (Mi Box) support this protocol. Let’s look at the basics of this architectural solution: Device Discovery — Implemented via mDNS, using the _googlecast._tcp namespace. $ avahi-browse -r _googlecast._tcp = wlp0s20f3 IPv6 Chromecast-8483c593f9fe704813a5fd6d1e330e19 _googlecast._tcp local hostname = [8483c593-f9fe-7048-13a5-fd6d1e330e19.local] address = [fe80::e9e6:e06:54b5:ad52] port = [8009] txt = ["rs=CpuLoad" "ct=243D5A" "nf=1" "bs=FA8FCA5A3BCC" "st=1" "ca=463365" "fn=Chromecast" "ic=/setup/icon.png" "md=Chromecast" "ve=05" "rm=63F5EA264E7C9F1B" "cd=34D0CB70278B5433B344012D67742914" "id=8483c593f9fe704813a5fd6d1e330e19"] Sender — Chromecast uses a standard client-server architecture...

Sega Genesis2 / MD2 clone

Image
Recently, I acquired an old Sega Genesis 2 (Mega Drive 2) clone. Top view: Bottom view: This particular unit has a few issues:  - The power indicator doesn’t light up, even though the console powers on.  - The Start button on the main gamepad doesn’t work. Moreover, the problem is definitely not with the gamepad itself – I’ve connected as many as four different ones, and none of them worked properly. It’s something with the ports or the electronics. Time to disassemble the console – let’s see what’s inside and try to fix it. First, I’m removing the top cover: The original Sega console had a single board with a large number of microchips, but this clone is significantly simpler in design: two boards with external interfaces and one with the processor and memory. Interfaces Board Equipped with a DC power connector, a 9-pin mini-DIN connector with audio-video outputs, and two switches. These switches allow changing the region (Japan/Other) and the video output type (PAL...

How to Connect a DSI Display to Raspberry Pi 5

Image
Raspberry Pi 5 has two MIPI connectors for connecting a camera or display. Both connectors are universal – they can be used for CSI cameras as well as DSI displays. To connect the display module, a flexible ribbon cable is used. The contacts on the cable are located only on one side, while the other side has insulation. This acts as a protection against incorrect insertion: if the cable is inserted the wrong way, nothing will happen because the insulation prevents an electrical connection. Open the connector lock – gently pull it upward. Align the ribbon cable so that its contacts match the connector’s contact group. Insert the ribbon cable and secure it by pressing the lock back down. On the display module, the contact group is located on the side of the board, so the ribbon cable should be inserted with the insulated side facing up. Finally, connect the power – and within 30 seconds, the login screen will appear on the display.

How to use SPIFFS for ESP32 with Platform.IO

Image
One of my pet projects is a controllable power supply based on the ESP32 with a web interface (GitHub repository: https://github.com/vshcryabets/Esp32AdjPsu ). Previously, I created simple web pages directly in the code using C++. However, in this project, I realized that working this way is not usable — I should separate the firmware code from the web application code. Most often, the SPI Flash File System (SPIFFS) is used for this (official documentation here - https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/storage/spiffs.html ). SPIFFS allows to store data as separate files that can be both read and written. What is the size of SPIFFS? Let’s take a look at the typical flash memory layout in the case of a 4 MB flash ( https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/default.csv ): # Name, Type, SubType, Offset, Size, Flags nvs, data, nvs, 0x9000, 0x5000, otadata, data, ota, 0xe000, 0x2000, app0, app, ota_0, ...