How to Create a Raspberry Pi Day/Night Streaming Live Camera

How to Create a Raspberry Pi Day/Night Streaming Live Camera

MAKER:WalterK26/ Translation: Fun Without End

Regarding camera cases, we have previously published articles such as “Using Raspberry Pi as an RTMP Live Streaming Server to Push to Douyu Live“, “180-degree Small Ball Tracking Camera“, and “Raspberry Pi Photography Cloud Platform Controlled by Local Network“.

Today, we will introduce a camera that can do live streaming. It actually packages the camera and Raspberry Pi Zero W into a compact 3D printed shell, supports hotspot access, and can easily connect to the camera for viewing on any mobile phone or tablet, bringing integration a step closer!

Let’s take a look at the specific implementation!

Materials List

How to Create a Raspberry Pi Day/Night Streaming Live Camera

Raspberry Pi (Raspberry Pi) Zero W Kit × 1 Night Vision Fish-Eye Wide Angle Camera 5 Megapixels 1080P with 2 Infrared Lights × 116cm FFC Soft Flat Cable × 1 Micro SD Card × 1 DC Battery-Free Circuit 5V × 1 DC Power Plug × 12x1mm Wire (10cm long black and red) × 1 M3x6mm Hexagon Screws × 8 M2.5x3mm Hexagon Screws × 443D Printed Front Plate × 13D Printed Shell × 13D Printed Back Plate × 112x12x3mm Aluminum Plate × 140x20x3mm Aluminum Plate × 12 Female Dupont Connectors × 21mm Heat Shrink Tubing (4cm long) × 1 This project also requires printing a spare back plate.

3D Printed Parts

How to Create a Raspberry Pi Day/Night Streaming Live Camera

The front plate and shell are printed with PLA, and the back plate is printed with PETG, as the aluminum plate can get very hot. Download the 3D STL files from Thingiverse. 1. First print the file “front_txt.stl” in black, then change the filament to white.2. Then print the “front.stl” file.

Printer settings: Front plate: 100% fill, Accessories: 50% fill, Back plate: 100% fill

3D STL files can be downloaded from the project file library at the end. Note: Printing speed and temperature depend on your 3D printer and filament.

Installing Raspberry Pi Zero W

1. Burn the Raspberry Pi system and configure it Windows refers to this article, macOS refers to this one. For reference article links, please click the original text to view.

2. Configure the camera Refer to this article to enable the camera and ensure Raspberry Pi correctly recognizes the camera.

3. Install the uv4l core and server

curl http://www.linux-projects.org/listing/uv4l_repo/lrkey.asc | sudo apt-key add -
# Add the following line to /etc/apt/sources.list and save

deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch main

sudo apt-get update
sudo apt-get install uv4l-server uv4l-raspicam uv4l-raspicam-extras
sudo service uv4l_raspicam restart
sudo rpi-update

For source links, please click the original text to view.

4. Create a webpage

# Uncomment the following lines
server-option = --enable-www-server=yes
server-option = --www-root-path=/usr/share/uv4l/www/
server-option = --www-port=80

sudo mkdir /usr/share/uv4l/www
cd /usr/share/uv4l/www
sudo nano index.html

Copy the content from the project file into index.html and save.

5. Configure the Raspberry Pi as a hotspot and DHCP server

sudo systemctl stop dnsmasq
sudo systemctl stop hostapd
sudo reboot

Restart.

sudo nano /etc/dhcpcd.conf
interface wlan0
static ip_address=192.168.100.1/24
nohook wpa_supplicant
sudo service dhcpcd restart
sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
sudo nano /etc/dnsmasq.conf

Modify as follows:

interface=wlan0 # Use the required wireless interface - usually wlan0
dhcp-range=192.168.100.2,192.168.100.20,255.255.255.0,24h
address=/#/192.168.100.1

sudo nano /etc/hostapd/hostapd.conf

Modify as follows:

interface=wlan0
driver=nl80211
ssid=HorseOnTour
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0

sudo nano /etc/default/hostapd

Modify as follows:

DAEMON_CONF="/etc/hostapd/hostapd.conf"
sudo systemctl start dnsmasq
sudo reboot

For source links, please click the original text to view.

Assemble the Raspberry Pi camera and install it on the front plate

How to Create a Raspberry Pi Day/Night Streaming Live CameraHow to Create a Raspberry Pi Day/Night Streaming Live CameraHow to Create a Raspberry Pi Day/Night Streaming Live CameraHow to Create a Raspberry Pi Day/Night Streaming Live CameraHow to Create a Raspberry Pi Day/Night Streaming Live Camera

1. Assemble the Raspberry Pi camera as shown. To facilitate installation on the front plate, I pasted 4 screws from the front camera board of the Raspberry Pi. 2. Connect the ribbon cable to the camera. 3. Connect the camera to the front plate. Be careful to align the rubber parts with the holes on the front plate. Also, please note to hold the tail end of the camera tightly as it is easy to break. 4. Tighten the 4 screws on the Raspberry Pi camera. 5. Pass the infrared lens through the large hole on the circuit board from the front. 6. Screw the optical lens into the socket from the front.

Power Connection

How to Create a Raspberry Pi Day/Night Streaming Live CameraHow to Create a Raspberry Pi Day/Night Streaming Live CameraHow to Create a Raspberry Pi Day/Night Streaming Live Camera

How to Create a Raspberry Pi Day/Night Streaming Live Camera

1. If you have Dupont wires, you can use them. If not, solder a 1cm long cable between the voltage regulator and DC power socket. Be sure to solder it on the right side (input). 2. Solder a 5cm long cable to the voltage regulator (output).

Preparing the Raspberry Pi

How to Create a Raspberry Pi Day/Night Streaming Live CameraHow to Create a Raspberry Pi Day/Night Streaming Live CameraHow to Create a Raspberry Pi Day/Night Streaming Live CameraHow to Create a Raspberry Pi Day/Night Streaming Live CameraHow to Create a Raspberry Pi Day/Night Streaming Live CameraHow to Create a Raspberry Pi Day/Night Streaming Live Camera

1. Solder 2 pin headers to 5V and ground, and connect them to the Raspberry Pi Zero W. For the circuit diagram link, please click the original text to view. 2. Stick double-sided tape on the small aluminum plate. 3. Stick the small aluminum plate on the CPU of Raspberry Pi Zero W. 4. Connect the camera to the Raspberry Pi using the ribbon cable. 5. Place the large aluminum plate into the 3D printed back plate and position it on top of the Raspberry Pi W. Secure the plate with four 2.5mm screws to the back plate.

Assembly Complete

How to Create a Raspberry Pi Day/Night Streaming Live CameraHow to Create a Raspberry Pi Day/Night Streaming Live CameraHow to Create a Raspberry Pi Day/Night Streaming Live CameraHow to Create a Raspberry Pi Day/Night Streaming Live CameraHow to Create a Raspberry Pi Day/Night Streaming Live Camera

1. This step completes the assembly of the camera. Install the front plate with the camera onto the shell and tighten it with four 3mm screws. 2. Connect the voltage regulator to the Raspberry Pi Zero W using the cable. 3. Carefully fold the ribbon cable and power cord inside the shell and close the camera. Be careful not to pinch any cables. 4. Secure the shell with four 3mm screws.

All done! I must say this shell is really nice!

Project file library address:

http://maker.quwj.com/project/87

via instructables.com/id/Day-and-Night-View-Live-Stream-Cam

Links in the text can be clicked to read the original text at the end

How to Create a Raspberry Pi Day/Night Streaming Live Camera

More Exciting Content

Raspberry Pi Drawing Robot

Build a “Pocket TV” with Raspberry Pi

Create a Decent NAS with Raspberry Pi

Raspberry Pi (Raspberry Pi) 3rd Generation A+ Version Released

Let’s make a fantastical “Infinite Extension” mirror

Petoi Nybble: A Blessing for Raspberry Pi Cat Slave Players

Raspberry Pi UPS: Uninterruptible Power Supply Modified from a Power Bank

How to Create a Raspberry Pi Day/Night Streaming Live Camera

Leave a Comment