Posts

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, ...

Configuring LED Indicators on Orange Pi Zero 3

  Configuring LED Indicators on Orange Pi Zero 3 There are two indicators on the Orange Pi Zero 3: a red and a green LED. They are quite bright. While the red indicator only blinks occasionally, the green one stays on constantly after Linux boots. This doesn’t suit me, so I decided to find a way how to configure them. The first thing to do is check the available triggers and determine which one is active. This can be done using the following commands (shoulbe be executed as root): # cat /sys/class/leds/red:status/trigger none usb-gadget usb-host kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock usbport disk-activity disk-read disk-write mtd nand-disk [heartbeat] cpu cpu0 cpu1 cpu2 cpu3 activity default-on panic mmc0 mmc1 rfkill-any rfkill-none rfkill0 stmmac-0:01:link stmmac-0:01:1Gbps stmmac-0:01:100Mbps stmmac-0:01:10Mbps rfkill1 bluetooth-power hci0-power rfkill...

Orange Pi Zero 3 USB hard drive issues

Image
I have a small file server that was originally based on an Orange Pi One with an external 2.5" USB-SATA drive. The entire system is powered by an LX-2BUPS module with two 18650. The Orange Pi One only has a 100 Mbps Ethernet connection, which occasionally falls short of my needs. To address this, I decided to upgrade to the latest Orange Pi Zero 3 model, which comes equipped with both Wi-Fi and Gigabit Ethernet. However, after a few hours of operation, I encountered an issue: the external HDD disconnects whenever the OS attempts to read a large amount of data from it. The disk is 100% functional, as it has been running flawlessly with the Orange Pi One for several months. This suggests that the problem lies either with the new Orange Pi Zero 3 or the software. However, the most likely culprit is the power supply. The pinout for the Orange Pi Zero 3 is shown below: Here is my wiring diagram: On the Orange Pi One, power was supplied via a 4.4x1.7 coaxial connector. But the Orange Pi...