Camera Station

Introduction

Image sensors are so cheap now, they can be deployed in extremely large number at ultra low costs. Increasing your data gathering capability substantially, providing you with greater insight, improved security, extra income etc.

With your own Private Cyberspace you can even use your Camera Stations to monitor yourself to answer previously difficult questions with absolute privacy:

  1. When were the last TEN times you have wore that dress ? (the camera can be OUTSIDE your home).
  2. When were the last TEN time you have visited the toilet ? (the camera is OUTSIDE the toilet door)

Camera Station 2023.1 comes with a OV2640 base camera onboard, to give your Private Cyberspace "eyes" at ultra low cost.

esp32cam

Activity Marker

You can (should) use your Camera Station as an Activity Marker, the recommended position is plugged into wall power socket, placed under a window with the camera facing the entrance (door).

Camera Firmware

The recommended firmware is esphome, but we have also listed others we have tested.

esphome

esp32cam-rtsp

tasmota

arduino ide

Test Camera Stations include:

PCCC1 - AU$21 - with headers, usb cable.
PCCC2 - AU$17 - with flash light, tf card slot.
PCCC3 - AU$39 - with battery charger, microphone, infra-red detector, oled display.

Prices quoted as of 2023-05-22 including tax and transport.

Camera

The cheapest is the OV2640 sensor.

OV2640 Sensor

OV2640 2 MP Image sensor
Array Size 1600 x 1200 (UXGA)
Power Supply Core: 1.3V DC ± 5%, Analog: 2.5~3.0V DC, I/O: 1.7V to 3.3V
Power Consumption YUV 125mW, Compressed 140mW, Standby 600μA
Image Sensor Format Type 1/4″
Maximum Image Transfer Rate 1600×1200@15fps, SVGA@30fps, CIF@60fps
Sensitivity 0.6V/Lux-sec
S/N ratio 40dB
Dynamic Range 50dB
Pixel Size 2.2 x 2.2 μm
Dark Current 15mV/s at 60°C
Well Capacity 1.2Ke
Fixed Patter Noise <1% of VPEAK-TO-PEAK
Image Area 3590 x 2684 μm
Package Dimensions 5725 x 6285 μm
Resolution UXGA SVGA and below
Output Format YUV/RGB/Raw RGB Data
Shutter Type Rolling Shutter
Color Filter Array RGB Bayer Array
ISP Functions AE, AWB, Sharpness, Noise Reduction, Defect Reduction, Gamma, Color Saturation, Special Effects

Lens

Personal Console Controller Camera (PCCC) can use numerous different camera modules

  • with viewing angles from 30 degrees to 222 degrees
  • with infrared filters 650nm or 850nm
  • with different cable lengths 21mm to 75mm

camera

Note esp32 based PCCs used the Digital Video Port (DVP) standard while the raspberry pi based PCCs uses the Mobile Industry Processor Interface (MIPI). Luckily most camera modules supports BOTH out of the box :)

OV2640 - resolution 1600 × 1200
OV5640 - resolution 2592 x 1944

2. Many Extra Options

We have listed some controller cameras here as reference implementations below, but there are MANY different models available from MANY different manufacturers. For example, below are just some models from one range (T-Camera) from one manufacturer (LILYGO):

  • with Front Normal camera - AU$34
  • with Front Fish Eye camera - AU$40
  • with Rear Normal camera - AU$35
  • with Rear Fish Eye camera - AU$40
  • with Rear Normal Movement camera - AU$49
  • with Rear Fish Eye Movement camera - AU$49

"Movement" above means it has a MPU-6050 module with 3 Axis Gyroscope + Accelerometer

Prices quoted as of 2023-05-22 including tax and transport.

AI-Thinker Camera

The AI-Thinker Camera is the 2023.1 reference Camera Station.

pcc5

A ultra low-cost wifi camera with flash light, TF card storage and option for external antenna.

esp32cam

The top board is double sides (as shown above) with all the important functions.

1. Flash Light

The white LED flash light on the top board faces the same direction as the camera, providing illumination for the camera or the surrounding.

2. External Antenna

External antenna can be attached to increase radio range, by changing the resistor placement.

antenna

A large number for antenna types are available.

antenna1

We will be focusing on the ESP32-CAM here.

esp32cam

which normally comes with a OV2640 image sensor capable of 2 megapixels (1600x1200):

  • 1600×1200 @15fps
  • 800x600 @30fps
  • 352x288 @60fps

There are many lens available, normally it is bundled with a len with 66 degree field of view. Different angle lens are available 24, 30, 120, 160, 200 etc.

lens

References for ESP32-CAM usage:

Antenna Types

When purchasing ESP32-CAM be careful that there are TWO different boards with support for on-board antenna OR for external antenna.

esp32cam_antenna

3. Firmware

3.1. ESPHome

Program camera with ESPHome so it can be controlled from Home Assistant (Device Node) and send video Frigate backend for recording and image recognition purposes.

3.2. Tasmota

Tasmota Firmware

The simplest way is to flash using Tasmota Web Installer and select tasmota32-webcam from the drop down menu.

TasmotaTemplates

There are Tasmota templates for many common webcam devices, for example:

  1. Ai-Thinker Camera (ESP32-CAM) Configuration for Tasmota
  2. Freenove ESP32-WROVER.DEV Camera (FNK0060) Configuration for Tasmota

Tasmota Image URL

http://DEVICE_IP/snapshot.jpg
Example: http://172.27.105.237/snapshot.jpg

Tasmota RTSP URL

Navigate to the ESP32-cam webUI and then go to the Console and enable the RTSP server by entering the following command:

WcRtsp 1

Now, the video stream should be accessible via using the following addresses:

rtsp://DEVICE_IP:8554/mjpeg/1

Example: rtsp://172.27.105.237:8554/mjpeg/1

Tasmota LED Patch

Navigate to the ESP32-cam webUI and then go to the Configuration -> Configure Other -> in the TEMPLATE field, copy and paste the following

{"NAME":"AITHINKER CAM inc LEDs","GPIO":[4992,1,1,1,416,5088,1,1,1,1,1,1,1,1,5089,5090,0,5091,5184,5152,0,5120,5024,5056,0,0,0,0,4928,320,5094,5095,5092,0,0,5093],"FLAG":0,"BASE":2}

Click on the Save button and the board will be rebooted.

If successful, the Toggle button and the slider to determine the brightness of the LED will be displayed.

led_toggle

Tasmota iBeacon

The collect ibeacon markers

4. Pin-Outs

5. Availability

https://shop.oztralia.com/product/pccc2/

WROVER-DEV Camera

The Personal Console Controller Camera version 1 (PCCC1) is implemented with the Freenove ESP32-WROVER-DEV and its clones (board: esp-wrover-kit).

basic_p_station

Using the esp32-wrover-e module with 2 rows of 20-pin headers.

  1. GitHub - Freenove/Freenove_Ultimate_Starter_Kit_for_ESP32: Apply to FNK0047
  2. ESP32 Camera Component — ESPHome
  3. How to retrieve images from WROVER esp32 camera - ESPHome - Home Assistant Community

PCCC1 can stream video and take still images easily.

peripheral_station_2023_b

ESPhome on Home Assistant

esphome_on_ha

The next step is to EDIT, copy and paste the following to the esp32 device. In the configuration example below, the device used is the esp32-wrover-dev.

esp32_camera:
  external_clock:
    pin: GPIO21
    frequency: 20MHz
  i2c_pins:
    sda: GPIO26
    scl: GPIO27
  data_pins: [GPIO4, GPIO5, GPIO18, GPIO19, GPIO36, GPIO39, GPIO34, GPIO35]
  vsync_pin: GPIO25
  href_pin: GPIO23
  pixel_clock_pin: GPIO22

  # Image settings
  name: My Camera
  # ...

Note: different esp32 devices will have different pin settings.

Click on the save button and then click on the install button.

If successful, the following will be shown

logs

Viewing live video and still images

On the side bar, select Media.

media_sources

Live Video

Select the Camera button.

live_video

Still Images

Set up:

  1. On Home Assistant sidebar, select Developer Tools -> Services -> in the Service dropdown menu, type in Camera: and select the Camera: Take snapshot.

camera_take_snapshot

  1. Copy and paste the following (edit the entity_id as used by your camera):

service: camera.snapshot
data:
filename: /media/{{ '{{ entity_id.entity_id }}' }}/{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg
target:
entity_id: camera.my_camera_2

  1. To take an image, click on the blue Call Service button.

call_service

  1. If successful the button will turn to green_tick.To view the image, on the sidebar select Media -> Local Media -> camera_entity_id

media_snapshot_location

1. Availability

https://shop.oztralia.com/product/pccc1/

LILYGO TTGO T-Camera

This is a very small yet featureful PCCC with battery charger, microphone, infra-red detector, OLED display.

console-controller

While the highly integrated LILYGO TTGO T-Camera is very cool, as of 2023-04-23, it is MORE expensive than the "supermarket" mobile phone below, making it a niche solution.

cheap_mobile

Low end mobile phones make the best sensors in a lot of cases. Even "supermarket" mobile phones at AU$47 (as of 2023-04-23) has a lot of features like touch display, rechargeable battery, camera, microphone, satellite positioning etc.

Camera Station Related Topics

Hacking Cameras

A9 is an ultra cheap camera being hacked to work with linux (very long but very interesting/entertaining thread).

Body Camera

While body cameras are a bit over the top for everyday collection of data into your Private Cyberspace, they can improve the care of people with disability substantially when combined with advanced Private Cyberspace features.

For example, traditionally it is very expensive to provide care those people disability that requires 24/7 monitoring (e.g. those with severe autism). With their own Privacy Cyberspace, people's privacy can be preserved and the costs keep low, no matter high intensive the monitoring is.

Camera Stations can provide light-weight small-size sensors that can be attached to baby to enable remote monitoring by human or artificial intelligence.

Chest Harness
chest_harness

Arm Band
arm_band