ESP32-based photogrammetry turntable with Fujifilm camera control via WiFi.
This project combines an ESP32-controlled stepper motor for a turntable with WiFi-based remote control of a Fujifilm camera. It automatically rotates the turntable in precise increments, takes photos at each position, and continues until a full 360° rotation (or more) is completed.
- WiFi connectivity to control Fujifilm cameras via the Fuji Remote Shutter Server
- Automated stepper motor control for precise positioning
- Photogrammetry sequence with configurable angles and delays
- Simple one-button operation to start/stop the sequence
- Automatic camera focus and capture at each position
- ESP32 development board
- Stepper motor driver (A4988, DRV8825, etc.)
- NEMA stepper motor
- Power supply for the stepper motor
- Button (optional, can use the built-in BOOT button on ESP32)
- WiFi network with access to a computer running Fuji Remote Shutter Server
- STEP pin → GPIO 18
- DIR pin → GPIO 19
- ENABLE pin → GPIO 23
- Connect VCC, GND, and motor outputs according to your specific driver
- Copy
src/credentials.h.templatetosrc/credentials.h - Edit
src/credentials.hto include your actual WiFi credentials and server settings - Upload the code to your ESP32 using PlatformIO
To configure the WiFi settings and server connection:
- Open
src/credentials.h - Enter your WiFi network name (SSID) and password
- Enter the IP address of the computer running the Fuji Remote Shutter Server (default port is 27015)
Example:
const char* WIFI_SSID = "your_wifi_name";
const char* WIFI_PASSWORD = "your_wifi_password";
const char* SERVER_IP = "192.168.178.119";
const int SERVER_PORT = 27015;You can customize the photogrammetry sequence by modifying these constants in main.cpp:
#define STEPS_PER_REV 200 // Motor steps per revolution
#define MICROSTEPS 16 // Microstepping setting on your driver
#define DEGREES_PER_STEP 15 // Turn 15 degrees per step
#define NUM_TURNS 1 // Number of full revolutions
#define DELAY_BETWEEN_SHOTS 1000 // Milliseconds to wait between shots- Power on the ESP32
- The ESP32 will connect to your WiFi network
- It will then connect to the Fuji Remote Shutter Server
- Press the BOOT button (or connect a button to GPIO0) to:
- Start the photogrammetry sequence
- The sequence will automatically:
- Move the stepper motor to the next position
- Focus the camera (S1)
- Take a photo (S2)
- Wait for the specified delay
- Repeat until complete
- Press the button again to stop the sequence
The photogrammetry sequence follows these states:
- IDLE: Waiting for button press to start
- MOVING_STEPPER: Rotating to the next position
- FOCUSING: Sending S1 command to focus the camera
- CAPTURING: Sending S2 command to take a photo
- WAITING: Delay before moving to the next position
- The credentials file (
src/credentials.h) is excluded from Git to prevent exposing sensitive information - If the connection to the camera is lost, the photogrammetry sequence will stop automatically
- The stepper motor will move in precise increments based on the DEGREES_PER_STEP setting
- A full 360° sequence will require 360/DEGREES_PER_STEP photos