Retro Style Camera
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
- UNIHIKER IoT Single Board Computer with Black Silicone Case
- 2* 3.7 Volt Li-Ion Battery from Digi key
- STMICROELECTRONICS L7805CV
- PANASONIC EEUHD1C101
- Acrylic Sheet Clear/Transparent 3MM 12"x12"
- Toggle Switch
- M2 screw
- Solding Iron
- GLue Gun
- Universal PCB
- Pine Wood
- Jumper Wire
- Seeed Studio XIAO ESP32S3 (Sense)
- Visual Studio Code
- Arduino IDE
Making of Wooden Enclosure
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
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
Drilling a Hole in the Acrylic Sheet to Mount the Screen
Mounting the Screen on the Wooden Case
Circuit Diagram
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
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
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
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
wohoooo! looks amazing
Setting Up Visual Studio Code
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
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
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
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.
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
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
Tools>Board>Board Manager>esp32>XIAO_ESP32S3
Then configure in exact same way
#PROGRAM for ESP32S3 Sense
Downloads
Wi-Fi Credentials
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
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
First Program for Unihiker for visual studio