Day and Night View Live Stream Cam

7,514

102

16

Rear view cameras, spy cameras, etc., there are enough, however, I wanted a camera that allows a live broadcast easily on any mobile phone or tablet. Incidentally, the construction of technical equipment is funny to me.
My cameras will be placed in a horse trailer and in a bird incubator.

Step 1: Material List

1x Raspberry PI Zero W Kit (Bundle 2) Link

1x Raspberry Pi Zero W Night Vision Camera Wide Angle Fisheye 5 MP 1080P Camera + 2 Infrared IR LED Link

1x Raspberry Pi Zero Camera Cable 16 cm FFC Cable for RPI Zero Pi0 Raspberry Pi Zero W Link

1x MicroSD card

1x DC BEC 5V Link

1x DC Power Black Jack Plug Link

1x 10cm 2x1mm cable (red and black)

8x M3x6mm Cap Point Hex Socket Screws

4x M2.5x3mm Cap Point Hex Socket Screws

1x 3d printed front plate

1x 3d printed enclosure

1x 3d printed back plate

1x 12x12x3mm alu spacer plate and 1x 40x20x3mm alu backplate. Alternatively you can use the aluminium heatsink from the Bundle 2. In this case print the alternative backplate.

Alternatively material whitch is not absolutely necessery:

2x 2pin female dupont connector

1x 4cm 1mm heat shrink tube

Step 2: Print Your Parts

I did a lot of tests so engeneering is alreday done, just print the parts!

PLA is required for the front panel and enclosure. The back plate is printed with PETG because the aluminum plate can become very hot.

You can download the 3D STL files from thingiverse. Link

First print the file "font_txt.stl" in black, change your filament to white and remove the skirt from your head bed. Second print front.stl

Printer Settings:

Frontplate: 100% infill

Enclosure: 50% infill

Backplate: 100% infill

Printing speed and tempartures depend on your 3d printer and your current filament.

Step 3: Install the Raspberry Pi Zero W

Step 1: Download the Raspbian image
Open the Raspverrypi web page and download the Raspbian Stretch Lite image (ZIP).

Source

Step 2: Unzip the image and copy it to your microSD card.

$ unzip 2018-06-27-raspbian-stretch-lite.zip

$ sudo dd bs=1m if=2018-06-27-raspbian-stretch-lite.img of=/dev/diskX conv=sync

Source

Step 3: Prepare your microSD card for connecting via ssh and usb.

1.) Open config.txt from your mircoSD boot volume

2.) add the following line at the very bottom dtoverlay=dwc2

3.) Save the file

4.) Open cmdline.txt from your mircoSD boot volume

5.) add the following after rootwait modules-load=dwc2,g_ether

6.) Save the file

Source

Step 4: Connecting to the Pi Zero with USB and SSH

1.) unmount your microSD card

2.) put it into your Rasperry Pi Zero W

3.) connect your USB cable to your Mac and power your Pi with the USB data cable. Use the USB port and not the PWR port.

Step 5: Connect to your Rasperry PI via Secure Shell

1.) ssh pi@raspberrypi.local

Password: raspberry

Step 6: update your Rasperry

$ sudo apt-get update

$ sudo apt-get upgrade

Step 7: Enable Camera interface

1.) $ sudo raspi-config

2.) 5 Interface

3.) P1 Camera

3.) Enable > YES

Step 8: Install uv4l core and server

1.) $ curl http://www.linux-projects.org/listing/uv4l_repo/l... | sudo apt-key add -

2.) add the following line to /etc/apt/sources.list

$ sudo nano /etc/apt/sources.list deb http://www.linux-projects.org/listing/uv4l_repo/l... stretch main

strg O

strg X

$ sudo apt-get update

$ sudo apt-get install uv4l-server uv4l-raspicam uv4l-raspicam-extras

$ sudo service uv4l_raspicam restart

3.) update firmware

$ sudo rpi-update

Source

Step 9: Setup your custom site

1.) $ sudo nano /etc/uv4l/uv4l-raspicam.conf

2.) uncomment the following lines

server-option = --enable-www-server=yes

server-option = --www-root-path=/usr/share/uv4l/www/

server-option = --www-port=80

3.) $ sudo mkdir /usr/share/uv4l/www

4.) $ cd /usr/share/uv4l/www

5.) $ sudo nano index.html

Copy and paste content from index.html (download from Thingiverse)

strg O

strg X

Step 10: Setting up a Raspberry Pi as an access point and DHCP Server

1.) $ sudo apt-get install dnsmasq hostapd

2.) $ sudo systemctl stop dnsmasq

3.) $ sudo systemctl stop hostapd

4.) $ sudo reboot

5.) $ ssh pi@raspberrypi.local

6.) $ sudo nano /etc/dhcpcd.conf

interface wlan0

static ip_address=192.168.100.1/24

nohook wpa_supplicant

7.) $ sudo service dhcpcd restart

8.) $ sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig

9.) $ sudo nano /etc/dnsmasq.conf

interface=wlan0 # Use the require wireless interface - usually wlan0

dhcp-range=192.168.100.2,192.168.100.20,255.255.255.0,24h

address=/#/192.168.100.1

10.) $ sudo nano /etc/hostapd/hostapd.conf

interface=wlan0

driver=nl80211

ssid=HorseOnTour

hw_mode=g

channel=7

wmm_enabled=0

macaddr_acl=0

auth_algs=1

ignore_broadcast_ssid=0

11.) sudo nano /etc/default/hostapd DAEMON_CONF="/etc/hostapd/hostapd.conf"

12.) $ sudo systemctl start hostapd

13.) $ sudo systemctl start dnsmasq

14.) $ sudo reboot

Source

Step 4: Assemble Your Pi Camera and Mount It on the Frontplate

1.) Assemble your Pi camera as shown in the picture. To facilitate mounting in the front panel, I glued the 4 screws on the Pi camera board from the front.
2.) Connect the ribbon cable to the camera

3.) Attach your camera to the front panel. Carefully align the rubber parts with the holes in the front panel. Also note that the small feet that hold the camera can break very quickly.

4.) Tighten the 4 nuts of the Pi camera

5.) Insert the IR lenses from the front through the large holes on the board

6.) Screw the optical lens into the socket from the front.

Step 5: Power Connection and Voltage Regulator

1.) If you have dupont connector you can use it. If not solder a cable of 1cm lenght betwin the voltage regulator and the DC Power Jack. Pay attention to solder it on the right side (Input).
2.) Next solder a cable of mi. 5 cm length to the output side of the voltage regulator. Also use dupont connector if available.

Step 6: Prepare Your Raspberry

1.) Solder 2 pin header to the 5V and Ground to your Raspberry Pi zero W.

Link

2.) Apply a piece of double-sided tape to the small aluminum plate and cut away the supernatant.

3.) Apply the small aluminium plate on the Raspberry Pi Zero W CPU.

4.) Connect the ribbon cable from the camera to the Raspberry Pi.

5.) Place the large aluminum plate in the 3D printed back plate and place the Raspberry Pi Zero W on top. The board is screwed on the back plate with 4x 2.5mm screws.

Step 7:

1.) Now it´s time to finish our cam. Attach the front plate with the camera to the housing and screw it with 4x 3mm.

2.) Connect the cable from the voltage regulator to the Raspberry Pi Zero W.

3.) Fold the ribbon cable and the power cable carefully inside the housing and close the camera. Pay attention not to clamp any cable.

4.) Screw it with 4x 3mm to the housing.

5.) Congratulation!

First Time Author

This is an entry in the
First Time Author

Share

    Recommendations

    • Big and Small Contest

      Big and Small Contest
    • First Time Author

      First Time Author
    • Toys Contest

      Toys Contest

    16 Discussions

    0
    None
    tovis

    26 days ago

    I like it! Especially the assembly. I'm planning some thing like this but using POE.

    2 replies
    0
    None
    WalterK26tovis

    Reply 24 days ago

    Power over ethernet with a Raspberry Pi Zero W? There is no RJ45 jack on the board!
    You need some additional hardware.

    0
    None
    Japon Secreto

    27 days ago


    Be careful! links doesn't work.

    Apart from that, amazing project!!!

    1 reply
    0
    None
    MountainManMike

    4 weeks ago

    How hard would it be to make this setup to be a cheap recording, low power, home security camera. Automatically record images to internal SD, say every second, 24/7 and then erase images automatically when they are say, 10 days old. I see a need for a very simple maintenance-free device to continuously record images of the outside home and be able to look through those images in the event its needed.

    1 reply
    0
    None
    thp68

    4 weeks ago

    This is a cool project. Would it work as an RV backup and continuous view camera? What range can be expected?

    0
    None
    JoeyyBoyy

    4 weeks ago

    Very cool project! Can I ask what was the total time to make and the cost? Thanks.

    1 reply
    0
    None
    WalterK26JoeyyBoyy

    Reply 4 weeks ago

    I do not know the total time for this project because I redesigned the housing very often. Just click on the links inside the material list and sum the prices. I didn't do this until now.

    0
    None
    NotCook

    4 weeks ago on Step 1

    “just print the parts!”. You did not include a 3D printer on your list of parts. Rather important detail!

    1 reply
    0
    None
    WalterK26NotCook

    Reply 4 weeks ago

    I printed the parts with a Prusa i3 MK3. You can print the parts on most available FDM 3D printers.

    0
    None
    seamster

    4 weeks ago

    Very nice, tidy design and assembly. I'm not completely familiar with this sort of stuff - will the live feed be viewable online to you somewhere . . or just via wifi to your device?

    3 replies
    0
    None
    WalterK26seamster

    Reply 4 weeks ago

    There is noting online. Just connect to the wifi, open a browser and enter the ip - voila you will see the stream!

    0
    None
    seamsterWalterK26

    Reply 4 weeks ago

    Very cool, I dig it. This is a great first instructable by the way!

    0
    None
    WalterK26seamster

    Reply 4 weeks ago

    Thx. The idea was to make it waterproof. I will post some images if the tests are done!