HDMI to CSI Adapter

From Waveshare Wiki
Jump to: navigation, search
HDMI to CSI Adapter
HDMI to CSI

HDMI To CSI Adapter For Raspberry Pi Series, 1080p@30fps Support
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

Introduction

This is an HDMI to CSI camera port adapter designed for Raspberry Pi with up to 1080p@30fps support from HDMI input, backward compatible. It allows you to use HDMI cameras just as the standard Raspberry Pi CSI cameras, all versions of Raspberry Pi series boards are supported.

Parameters

  • Controller: TC358743XBG
  • Input signal:
    • Video: HDMI1.4, RGB888, up to 1080p@30fps support
    • Audio: HDMI
  • Output signal:
    • Video: 2-lane MIP CSI-2
    • Audio: I2S audio output, LPCM audio stream format
  • OS: Raspberry Pi OS 32bit
  • Working voltage: 3.3V
  • Working temperature: -30° ~ 70°C

Connection

Video
HDMI-to-CSI-Adapter-details-3.jpg

Connect the FPC cable of Raspberry Pi to the CSI interface of Raspberry Pi. The CSI interface of Pi 2B, 3B, and 3B+ is located between the LAN port and HDMI port. The CSI interface of Pi 4 is placed between the HDMI1 interface and the audio jack. If you use Pi zero, the CSI interface is beside the Power port. Here is the diagram of Pi 4. 4B.
HDMI-to-CSI-Adapter-details-7.jpg
Note that the silver side (metal side) should be toward the HDMI interface. Release the black buckle, align the FPC cable, and insert it tightly, then close the black buckle.

Audio

To use the audio, you need to jumper wire the following GPIO to the I2S pins of the Raspberry Pi board.

HDMI to CSI Raspberry Pi
WFS (PIN35) GPIO19
SCK (PIN12) GPIO18
SD (PIN38) GPIO20
GND GND

Software Setup

Note: HDMI to CSI camera does not support Libcamera driver.

  • Modify config.txt file:
sudo nano /boot/config.txt

Add the following sentences to the end of the file.

dtoverlay=tc358743
dtoverlay=tc358743-audio

Save the file.

  • Modify cmdline.txt:
sudo nano /boot/cmdline.txt

Add the following content to the file.

cma=96M
  • Download and install the driver demo.
cd
wget https://files.waveshare.com/upload/8/89/TC358743-Driver.zip
unzip TC358743-Driver.zip
cd ~/TC358743-Driver
sudo sh set_edid.sh
  • Reboot the system.
sudo reboot

Test the video

yavta

cd ~/TC358743-Driver/yavta/yavta/
./yavta --capture=1000 -n 3 --encode-to=file.h264 -f UYVY –m -T /dev/video0
The codes will capture 100 framerates and save them to the "file.h264" file, you can use vlc tool to play the file.

gstreamer

  • Install the tool.
sudo apt install gstreamer1.0-tools -y
  • Collect video:
gst-launch-1.0 -vvv v4l2src ! "video/x-raw,framerate=30/1,format=UYVY" ! v4l2h264enc extra-controls="controls,h264_profile=4,h264_level=13,video_bitrate=256000;" ! "video/x-h264,profile=high, level=(string)4.2" ! h264parse ! queue ! matroskamux name=mux ! filesink location=file.mkv

Extend Computer Screen to Raspberry Pi

If you use this function, you need to delete the driver file, delete the configuration of dtoverlay, and only do the following configuration.

  • Modify the cmdline.txt file:
sudo nano /boot/cmdline.txt

Add the following to the end of the first line of the file:

cma=96M

Save.

  • Then open "legacy camera" by the following steps:
sudo raspi-config

Select Interface Options -> Legacy Camera -> Yes, exit, and then reboot.

  • Boot terminal to operate:
raspistill -t 0

Recording

  • Check the audio devices with arecord -l command.
**** List of CAPTURE Hardware Devices ****
card 2: tc358743 [tc358743], device 0: bcm2835-i2s-dir-hifi dir-hifi-0
[bcm2835-i2s-dir-hifi dir-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0 
Note: Card 2 is the ID of the sound card.
  • Record the audio and save it as a wav file.
arecord -D hw:2 -d 25 -f cd test1.wav

Note: where hw:2 is to set the sound card device, it needs to match the actual sound card number, otherwise the audio information cannot be collected normally.

FAQ

 Answer:

Currently, it does not support Raspberry Pi 5.

{{{5}}}



 Answer:

The consumption of the adapter is about 260mA.

{{{5}}}


Resources

Driver

Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)