Skip to the content
2 layers68.3 × 57.7 mmSdmux4, the printed circuit board in 3D

SD CARD and eMMC Device Multiplexer with Infrared Remote Controller

Size
68.3 × 57.7 mm
Copper layers
2
Thickness
1.6 mm
Parts
115
Nets
117
Pads
443
Tracks, vias
1,088, 192
Pours
2
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
9 Jul 2023
Updated
9 May 2024

Overview

Sdmux4 is an open-source printed circuit board by hnz1102, from the hnz1102/sdcdmux-emmc repository on GitHub, published under the MIT licence. It is a 2-layer board of 68.3 × 57.7 mm with 115 parts on 117 nets, routed with 1,088 tracks and 192 vias.

It is built around the USB2640-HZH-02, 74AHC1G14GV and AT24MAC402-STUM-T, with the FT232HL, SPX3819M5-L and 0.1UF 50V 5*11 among its other parts. Its parts include 46 capacitors, 34 resistors, 9 ICs, 8 diodes and 8 transistors.

Main components

9

README

README.md

SDCDMUX

SDCDMUX : SD Card and eMMC Device Multiplexsor with Infrared Remote Control

The SDCDMUX provides a convenient and quick change of a SW image of a device that has an SD Card interface from a remote.

When I am developing by booting from an SD memory card on a device such as the Raspberry Pi, it is not easy to rewrite the SD card image and replace it by hand. Remove the SD card, insert it into the host PC, and take a dozen minutes rewriting the SW image, after that, return the SD card to the device and turn on the power... But, This tool can change the image of the eMMC directly from the host PC, and the device can be booted as an SD card with the new image.

Usually, To boot with the new SW image, the device must be reset, but this tool can learn the ON/OFF command of the infrared power controller and outputs that command to turn the device on and off.

This tool frees me from the tedious SW image rewriting and resetting process.

https://github.com/hnz1102/sdcdmux-emmc/assets/111413646/edf4297e-6da3-4eba-aacd-01ee126e1040

[2023.8.15] USB Type-C version Added.

USB Type-C The Schematic is hardware/emmc-type-c-version/ directory.

Features

  • Fast. SDCDMUX can write an image to the eMMC device (32GB) instead of SD Memory Card via High-Speed USB. It is 4 times faster than an SD card.

  • Remote Control. SDCDMUX has an infrared interface that can receive an infrared remote control command and send it to power control devices. If you want to turn on a device, you can type the command "on" on the PC console.

  • Use Fast Switch. When I used the prototype, Sometimes Rasbery Pi4 could not boot by read error. I tried to change faster switching devices in this tool. Then, Raspberry Pi always can boot correctly.

Tested Devices

I have checked the following devices that can boot from this tool.

Only 3 devices because I have my own now.

Infrared Remote Power Switch

The Infrared Remote Contorol Power Swtich I used is OCR-05W OHM ELECTRIC INC.. But I think other switch devices that can control by the infrared LED may be able to work too.

How to build the control SW.

This software (sdcdmux) is for Linux.

The following example is for Ubuntu Linux Ubuntu 22.04.2 LTS.

  1. Install build tools
text
$ sudo apt -y install build-essential libftdi-dev
  1. Build the software.
text
$ cd sdcdmux
$ make
$ sudo cp sdcdmux /usr/local/bin/ 
  1. Add a udev rule. /etc/udev/rules.d/99-ft232h.rules
text
$ sudo su
# echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014",  MODE=
"0666"' > /etc/udev/rules.d/99-ft232h.rules
# udevadm control --reload-rules
# udevadm trigger

How to use SDCDMUX.

  1. Connect to SDCDMUX via the USB cable with your PC. Power USB cable connect to the target device and USB adoptor. Please refer to the figure. cable connect fig1

  2. Use SDCDMUX

  • Display current status.
text
$ sdcdmux
Memory Device is connected to : HOST.
  • Capture infrared ON command.
text
$ sdcdmux -c on
Capture Start.. 
"Push ON button on your Infrared Remote Controller"
Recieve IFR data (18245B)
Captured command for on

capture command

After capture the command, you can see the 'if-on' file in the current directory.

  • Capture infrared OFF command.
text
$ sdcdmux -c off
Capture Start.. 
"Push OFF button on your Infrared Remote Controller"
Recieve IFR data (11449B)
Captured command for off
  • Select eMMC memory to host PC side.
text
$ sdcdmux -s host
Memory Device is connected to : HOST.

You can see eMMC disk drive on your PC.

text
$ lsblk
:
sdb           8:16   1  29.1G  0 disk 
:

In my case, I can see the new disk drive as 'sdb'.

  • Download the Raspberry Pi boot image and Write it to eMMC.

** !WARNING! ** DO NOT OVERWRITE YOUR SYSTEM DISK DRIVE! BE CAREFUL THE WRITING DISK DRIVE NAME.

text
$ wget https://downloads.raspberrypi.org/raspios_armhf/images/raspios_armhf-2023-05-03/2023-05-03-raspios-bullseye-armhf.img.xz
$ xzcat 2023-05-03-raspios-bullseye-armhf.img.xz | sudo dd of=/dev/sdb bs=1M status=progress
4125163520 bytes (4.1 GB, 3.8 GiB) copied, 94 s, 43.9 MB/s
0+491118 records in
0+491118 records out
4143972352 bytes (4.1 GB, 3.9 GiB) copied, 126.121 s, 32.9 MB/s
$ lsblk
sdb           8:16   1  29.1G  0 disk 
├─sdb1        8:17   1   256M  0 part 
└─sdb2        8:18   1   3.6G  0 part 
  • Select eMMC memory to target (Raspberry Pi) device.
text
$ sdcdmux -s target
Memory Device is connected to : TARGET.

You can see the blue LED is turn on.

  • Turn on the device using infrared on command.
text
$ sdcdmux -x on
  • Turn off the device using infrared on command.
text
$ sdcdmux -x off
  • Another devices control.

I also use the SDCDMUX as a controller to turn ceiling lights on and off.

text
$ sdcdmux -c lightson
Capture Start.. 
"Press ON on the remote controller of the ceiling light to make it learn the command."
Recieve IFR data (8498B)
Captured command for lightson

$ sdcdmux -c lightsoff
Capture Start.. 
"Press OFF on the remote controller of the ceiling light to make it learn the command."
Recieve IFR data (10701B)
Captured command for lightsoff

$ sdcdmux -x lightson
"Seiling lights turn on."

$ sdcdmux -x lightsoff
"Seiling lights turn off."

Performance

I created an SD card type and an eMMC type. I compared their writing times.

4.2GB Image Writing Time (Average of 3 times)

SD card (*1)eMMC (*2)
482.3 sec (8.7MB/s)134.7 sec (31.3MB/s)

*1 San Disk Ultla 32GB HC1 SD CARD

*2 Delkin Devices EM32VSUKN 32GB eMMC

SDCDMUX Board

SDCDMUX Board Schematic and a PCB layout are placed in the hardware directory. There are 2 types emmc-version and sdcard-version. This emmc-version uses an eMMC device instead of a SD memory card. Schematic data is created by KidCad 7.0.

Block Diagram

PCB Layout

If you order a PCB board from a PCB maker, it must be 0.8mm thick. Otherwise, it will not fit in the SD card slot.

PCB

After building the board, It has to configure EEPROMs of the USB Media Controller and USB FIFO Interface.

The USB Media Controller has an EEPROM. It is programmed with the parameters by USBDM tool.

  • Manufacture String
  • Serial Number String

Single Channel HiSpeed USB to Multipurpose UART/FIFO IC (FT232H) has an EEPROM too. It is programmed the parameters by FT_Prog.

  • FT EEPROM - HARDWARE Specific IO Controls - C5, C6, C8 and C9 ports are I/O Mode set.

CASE

I created the case for SDCDMUX type-C version by 3D printer. There are STL data in the hardware/emmc-type-c-version/case directory.

case

LICENSE

This Software is licensed under MIT. Other Hardware Schematic documents are licensed under CC-BY-SA V4.0.

Parts

115
QtyValueFootprintReferences
250.1uF/50vCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC101, C102, C105, C301, C303, C305, C405, C406, C407, C408, C501, C502, C503, C506, C507, C508 +9
1610Ktbctl:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR101, R102, R201, R204, R304, R403, R404, R502, R503, R507, R601, R602, R603, R605, R607, R608
51Ktbctl:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR202, R301, R604, R606, R609
51uF/10vtbctl:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC103, C401, C402, C409, C410
410uF/16vCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC201, C302, C304, C609
42N7002KPackage_TO_SOT_SMD:SOT-23Q201, Q602, Q603, Q606
4IRF7606PBFPackage_SO:MSOP-8_3x3mm_P0.65mmQ601, Q604, Q605, Q607
4LED REDtbctl:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolderD201, D301, D302, D401
312K 1%tbctl:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR303, R402, R501
34.7uF/50vCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC512, C513, C514
34.7uF/50vtbctl:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC104, C411, C412
22.2uF/16vCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC605, C608
2220tbctl:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR508, R509
227RResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR504, R505
227pF/50vCapacitor_SMD:C_0603_1608MetricC403, C404
227pF/50vCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC504, C505
2BK2125HS601-TInductor_SMD:L_0805_2012Metric_Pad1.15x1.40mm_HandSolderFB501, FB502
2TMUX1574PWRPackage_SO:TSSOP-16_4.4x5mm_P0.65mmU602, U603
112MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY501
11Mtbctl:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR401
120K 1%tbctl:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR302
124MHztbctl:Crystal_SMD_2016-4Pin_2.0x1.6mmY401
12Ktbctl:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR506
1330tbctl:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR305
1330Rtbctl:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR405
133RResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR203
174AHC1G14Package_TO_SOT_SMD:SOT-23-5_HandSolderingU601
193LCxxBxxOTPackage_TO_SOT_SMD:SOT-23-6U501
1AT24MAC402-STUMPackage_TO_SOT_SMD:SOT-23-5_HandSolderingU401
1BK2125HS601-Ttbctl:L_0603_1608Metric_Pad1.05x0.95mm_HandSolderFB301
1BLM18RK102SN1tbctl:L_0603_1608Metric_Pad1.05x0.95mm_HandSolderFB401
1FT232HLPackage_QFP:LQFP-48_7x7mm_P0.5mmU502
1IND-1 LED GRNtbctl:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolderD501
1IND-2 LED GRNtbctl:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolderD502
1Micro_SD_Card_Det_Hirose_DM3AT-SF-PEJM5Connector_Card:microSD_HC_Hirose_DM3AT-SF-PEJM5J103
1OSI5LA5113ALED_THT:LED_D5.0mmD202
1RESET SWtbctl:WS-TASV SMT Tact SwitchSW301
1SPS-445tbctl:SPS445 3pinU201
1SPX3819M5-LPackage_TO_SOT_SMD:SOT-23-5U301
1TGT SEL LED REDtbctl:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolderD601
1USB2640-HZH-02tbctl:QFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mmU402
1USB_B_Minitbctl:usb mini B connector c2235 dim 2J101
1uSD-CARD-PADtbctl:uSD Card PadJ102

More from hnz1102/sdcdmux-emmc

2
  • 2 layers68.3 × 57.8 mmSdcdmuxemmc, the printed circuit board in 3D

    Sdcdmuxemmc

    hnz1102/sdcdmux-emmc

    SD CARD and eMMC Device Multiplexer with Infrared Remote Controller

    107 parts16MIT
  • 2 layers68.3 × 57.8 mmSdcdmuxemmc, the printed circuit board in 3D

    Sdcdmuxemmc

    hnz1102/sdcdmux-emmc

    SD CARD and eMMC Device Multiplexer with Infrared Remote Controller

    101 parts16MIT

Similar boards

  • 2 layers50 × 30 mmPower, the printed circuit board in 3D

    Power

    hnz1102/ft232hbrkout

    FT232HL BREAKOUT BOARD

    52 parts5
  • 2 layers50 × 70 mmTemp logger, the printed circuit board in 3D

    Temp logger

    hnz1102/temp-logger

    Logging Thermocouple Temperature and Send Data to InfluxDB system.

    52 parts5
  • 2 layers50 × 40 mmShareusbdisk2, the printed circuit board in 3D

    Shareusbdisk2

    hnz1102/shared-usb-memory

    USB Memory with One-touch Switching Between Two Device Connections

    83 parts2
  • 4 layers21.6 × 48.4 mmSDWire, the printed circuit board in 3D

    SDWire

    3mdeb/sd-mux

    Control application for SD Wire imported from: https://git.tizen.org/cgit/tools/testlab/sd-mux/

    83 parts8Apache-2.0
  • 4 layers21.6 × 48.4 mmSDWire, the printed circuit board in 3D

    SDWire

    bitsy-ai/printnanny-sdwire

    A modified version of Tizen SDWire https://wiki.tizen.org/SDWire

    88 parts7Apache-2.0
  • 2 layers91.7 × 70 mmCurrent logger, the printed circuit board in 3D

    Current logger

    hnz1102/current-logger

    This tool provides a logging function that gets data on voltage, current and power consumption. Voltage input range is from 0 to 85V, Maximum current input is 15A.

    64 parts18
  • 2 layers100 × 60 mmLoadCell Logger, the printed circuit board in 3D

    LoadCell Logger

    yosihisa/LoadCell-Logger

    4ch load cell logger board using Raspberry Pi Pico and HX711. (Wakame Edition)

    68 partsMIT
  • 2 layers185 × 98 mmMosfetload, the printed circuit board in 3D

    Mosfetload

    hnz1102/electricload

    Electric Load and Logger

    96 parts5

Questions

How big is the Sdmux4 PCB?

It measures 68.3 × 57.7 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Sdmux4 use?

115 parts, built around the USB2640-HZH-02, 74AHC1G14GV, AT24MAC402-STUM-T and FT232HL. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Sdmux4 KiCad files?

From the hnz1102/sdcdmux-emmc repository on GitHub, at the commit this page was made from: the board is hardware/sdcard-version/sdmux4.kicad_pcb and its schematic hardware/emmc-type-c-version/power.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Sdmux4 design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).