Retro Style Camera

by vishal_soni88 in Circuits > Gadgets

2023 Views, 26 Favorites, 0 Comments

Retro Style Camera

save (2).png
WhatsApp Image 2024-10-16 at 05.24.50_8f73f5b2.jpg
My Video Gif.gif

I am a student majoring in Electronics Engineering and have recently discovered my interest in retro or aesthetic photography. These types of cameras have become popular due to Instagram trends. Interestingly, the low quality and reduced resolution of such cameras seem to be their strength because of these trends.

I was fascinated by this and wanted to own one, but these cameras are quite expensive. So, I decided to build one myself using the electronic components I already have. I plan to use a Python-based UniHiker board or, alternatively, an ESP32-S3 Sense module with a TFT display to create this fascinating retro-style camera.

Let’s go! πŸš€.

What it Does ?

The camera simply takes a photo when button B on the UniHiker is pressed, and pressing button A deletes all the photos it has captured! Hilarious, I know. πŸ˜„

Since I haven't inserted a memory card, managing space efficiently is crucial. The UniHiker comes with 512MB of DDR3 temporary RAM, which is used for displaying the image. Once the image is displayed, it is cleared from RAM and stored in the static memory for later review. Alternatively, you could use a TFT screen with an SD card for storage.

Later reviews of clicked images 

You can also check previously clicked photos by opening another program saved in the Unihiker's root folder. In this program, button A and button B function as 'next' and 'previous' image controls, while the home button is used to exit or execute the program

Lets go

The development of this device is divided into three phases: 

[1] The first phase involves making hardware connections and setting everything up in a wooden enclosure box that I created from pine wood, 

[2] The second phase focuses on setting up the UniHiker and ESP32-S3 Sense, 

[3] The third phase showcases how to capture, save, and review the clicked images

Supplies

Making of Wooden Enclosure

46-mm-wooden-pinewood-timber-385699791-q315v.jpg
WhatsApp Image 2024-10-15 at 21.54.07_a5ff3552.jpg

A pinewood enclosure will give the camera a vintage touch. I recently purchased pinewood sticks on Amazon to create a wooden enclosure for this project. You can choose the dimensions as per your preference. Cut two identical pieces for the length and two for the breadth of the camera. Then, I simply glued these pieces together to form a cuboid, leaving the bottom and top surfaces open.

Cutting the Acrylic Sheet

IMG20241013195602.jpg
IMG20241013195745.jpg

After this, I cut two rectangular pieces of acrylic to close the enclosure. I used transparent acrylic

Setting the Toggle Switch to the Pinewood Enclosure

c.gif (1).gif
b-ezgif.com-video-to-gif-converter.gif

Drilling a Hole in the Acrylic Sheet to Mount the Screen

My Video Gif (1).gif
My Video Gif (2).gif

Mounting the Screen on the Wooden Case

My Video Gif (3).gif

Circuit Diagram

Creative Process Roadmap Diagram Infographic Graph.png
unihiker.PNG

The ESP32-S3 is not connected to any signal pins on the UniHiker, as it communicates through the WebSocket communication method. In this method, the ESP32-S3 generates an IP address using the hotspot credentials provided in its program. This IP address is then used by the UniHiker to establish a wireless connection between them.

Note: I forgot to add the toggle switch in the diagram. You can attach it to the ground pins, as it is common to the entire circuit. 

The ESP32-S3 Sense can operate on a single-cell lithium-ion battery, making it more portable. It functions within a voltage range of 3.8 to 4.2 volts. You can check more power-related specifications for the ESP32-S3 Sense here

The UniHiker uses a USB-C cable that provides 5 volts, with a maximum operating current capacity of 2A. While the operating voltage is 3.3V, I noticed that the display fluctuates when executing programs. Therefore, it is recommended to use a 5-volt cellphone power bank or a regulated 5-volt power supply.


Wire Management at Universal PCB

IMG20241013183108.jpg
IMG20241013183114.jpg

For wire management, I use a universal PCB along with some male headers and female connectors, which allow for easy removal of any device. Both the UniHiker and ESP32-S3 Sense are independent of connections and only rely on power.

Adaptive Features

d3e3c7b2c7bc951d7d6dc71211634044.png

We can also power them via USB; for this purpose, I have exposed both USB ports on the outside for future program changes or updates

Warning: Do not turn on the toggle switch or connect both the battery and USB at the same time, as this may cause damage to the board, potential difference across USB and Battery may harm the circuit

Bonus Functionality

18360802b8c0169166130d058118dca3.png

Since both the UniHiker and ESP32-S3 are not connected via any signal pins, they can be used independently with just a power supply. You can remotely press button B on the UniHiker (up to 200 meters away/within signal strength) to capture a photo from the ESP32-S3, display it on the UniHiker, and save it for later review

Use cases of device 

Remote Surveillance: Capture and display images from a distance for security monitoring. Portable Camera: Take and store photos in the field, without wired connections.

Educational Tool: Demonstrate wireless communication and image processing in IoT Projects Home Automation: Use it for remote home monitoring and photo capturing.

Wildlife Monitoring: Capture images in remote areas for research or observation.

 BUT I PREFER TO THINK OF IT AS A RETRO CAMERA.

Fixing All the Components Inside the Enclosure Box

ef13e37d380a8a522a61652c8fe50224.png

wohoooo! looks amazing

Setting Up Visual Studio Code

1715743166493-391327bf-296f-4cfe-a446-9a90494753d8.png
1695094508325-36a43f68-3438-4533-97c0-f0ef0d6f27fd.png

 

First, plug the UniHiker board into your computer using a USB-C cable. Next, install Visual Studio Code and set it up with UniHiker. After completing these initial steps, follow the instructions below

 

Set-up Unihiker with Visual studio (Official Forum available on website)

 

Now, I assume you have followed the official UniHiker forum's guidance for setting up Visual Studio Code. We are now in the root folder of the UniHiker

Now, when your laptop screen looks like this, create a Python file and name it camera.py, or use any name you prefer

Now, when your laptop screen looks like this, create a Python file and name it camera.py, or use any name you prefer

Then, open the terminal and use the following bash commands

STEP 1

sudo apt update

STEP 2

sudo apt install -y python3-pip

STEP 3

pip install pinpong

STEP 4

pip install opencv-python

STEP 5

pip install requests

STEP 6

pip install numpy

Troubleshooting: Before installing libraries or packages on the UniHiker, make sure it is connected to the internet. You can use your phone's hotspot as it requires an active connection.

 

nmcli device wifi list

List available Wi-Fi networks

 

nmcli device wifi connect "SSID" password "PASSWORD"

Replace SSID with the name of your Wi-Fi network and PASSWORD with the Wi-Fi password

 

nmcli connection show --active

You can check if the device is connected and see network details with


NOTE: To connect to a different network, first you have to disconnect from the current network

 

nmcli connection down "SSID"

To disconnect from the current network

 

ping 8.8.8.8

You can also check if your internet is working by entering this command

 

Then if your screen look like this your good to go 

Cheaking Internet Connection

1_9TNPBeuIvpWE7Aj5hKuT0Q.png

use ctrl+c for stop that otherwise logs are continuously running 

And if your screen not looking like this then you have to cheak your ssid and password you provided to bash commands also cheak the signal strength of your internet connection

 

IMPORTANT: Internet is crucial for this device to communicate. To make it portable, ensure that your mobile hotspot is turned on with the same SSID and password you entered in both the UniHiker and ESP32-S3 program

Setting up the ESP32-S3 Sense:

 First, connect the ESP32-S3 to your computer using a USB-C cable. Then, check the Device Manager; a new COM port will appear when you connect the ESP32-S3 Sense module.

Finding Port

5d672bbb8f60fec090ca261f31026174.png

In my case, this shows COM port 19 in Boot Mode and COM port 4 in non-Boot Mode

Then, you need to make some changes. Select it, click on it, and then proceed with the following steps

Coding Shoding

592287bae2d80b7264bfb4c05a0cccde.png

select 115200 baud rate 

Then click 'OK,' and you are ready to go for sharing serial data ?

 

NOTE: If the COM port is not showing or you're having trouble finding it, my suggestion is to refer to the ESP32-S3 Sense documentation.

Now install Arduino IDE 

Then, for setting up the ESP32-S3 Sense with the Arduino IDE, I recommend using the official documentation for the ESP32-S3 Sense

 I recommend running the Blink program first, following the official documentation, before flashing the actual program to see whether it is communicating via the serial port.

If you are having trouble connecting to the serial port, try changing the mode from Boot Mode to Unboot Mode and then back to Boot Mode. This worked for me.

To enable and disable Boot Mode, follow these steps:

[1] Press and hold the BOOT button on the XIAO ESP32-S3 without releasing it.[2] While keeping the BOOT button pressed, connect the device to your computer via the data cable. Release the BOOT button after connecting.[3] Upload the Blink program to check the operation of the XIAO ESP32-S3, ////////according to the Seeed Studio documentation.?

Setting Up Arduino IDE

d3da98baa6d5e56944e377d1d754172c.jpg

Additionally, if the program runs abnormally, you can press the Reset button once during power-up to let the XIAO re-execute the uploaded program. By pressing and holding the BOOT key while powering up and then pressing the Reset key once, you can also enter Bootloader mode.

I will assume that you have downloaded the correct board manager for the ESP32-S3 Sense according to the official documentation.

After opening the Arduino IDE, you need to select the following options shown below

Set Configuration for Esp32s3sense

d9560048218b86bae9ae65d277e63f41.jpg
7f48fa9ce703b939a5a3560eaf325500.jpg

Tools>Board>Board Manager>esp32>XIAO_ESP32S3

Then configure in exact same way 

#PROGRAM for ESP32S3 Sense

Downloads

Wi-Fi Credentials

Capture.PNG

Rename your Wi-Fi credentials for easy identification. It's a good idea to create a Wi-Fi hotspot on your phone, as this device relies on the WebSocket protocol. A stable internet connection is essential for the device to operate effectively..

Getting IP Adress

92b57e080eb134c5f6822b03fdcdb76e.png

You will get an IP address by uploading the program. Note the IP address, as it will be used to establish a socket connection with the UniHiker

You need to turn on your phone's hotspot with the same SSID and password you wrote in the Program, and make sure to do this before uploading the program to the ESP32S3

There are two programs involved:

First Program: It handles clicking, deleting, displaying, or saving images in the photo folder. Button A is used for deleting all the photos, and button B is used for clicking a new photo.

Second Program: This is for reviewing the clicked photos, just like in a real camera. Button A is used for the 'previous' image, and button B is used for the 'next' image.

Using the IP Address Via Web Socket in Unihiker Board

ddf9752ff809a91fb0f6d798f0a401c8.png
camera.py - root [SSH_ 10.1.2.3] - Visual Studio Code 2024-10-20 01-05-38

First Program for Unihiker for visual studio

Captured Photo Reviewing

photo_show.py - root [SSH_ 10.1.2.3] - Visual Studio Code 2024-10-20 02-05-07

YouTube Video

UNIHIKER Based Retro Camera

Final View of Camera

My Video Gif (4).gif