This is a GyroFlow-compatible data logger firmware for the esp32 and esp32-c3 microcontrollers (and probably others supported by esp-idf)
- An esp32 or esp32-c3 with 4MB flash
- A BMI270, BMI160 or MPU6050 IMU
- 4 wires
You can get these as separate modules or on a single board (EspLog)
- Connect your IMU board to the ESP board. For esp32 it is recommended to connect SDA and SCL to pins 16 and 17 accordingly. For esp32-c3 - to pins 6 and 7.
- Download the firmware from github. You can find the latest build in "Artifacts" of the latest build from the "Actions" tab. The zip file will contain a readme file with a command line for flashing using esptool.
- After flashing the firmware you should see a wifi network with SSID starting with "esplog_". Connect to that network with "12345678" password.
- Go to http://192.168.4.1/settings, enter the SDA and SCL pin numbers you have connected the IMU to, click "Apply".
- Reboot the board and go to http://192.168.4.1. If the IMU is OK, "Avg gyro sample int. (ns)" should be non-zero.
- Calibrate the accelerometer. For that you need to go to http://192.168.4.1/calibration, add some calibration points (for example x-up, x-down, y-up, y-down, z-up, z-down). Hold your IMU stationary for some time before adding a points as the accelerometer data is low-pass filtered. Then click "Calculate offsets" and then "Save to flash".
- You can connect a button and a led to any free pins and assign the pin numbers in settings. NOTE: when recording is started using the button, wifi is disabled until you stop the recording using the button. This is done intentionally.
Four-layer 11 x 14 mm PCB with esp32-c3, 3.3v ldo and either bmi160, bmi270 or lsm6dsr gyro. The side with the components can be submerged in epoxy, making the logger almost a perfect 11x14x2.5mm cube, so it is easier to glue to a camera.
Assembled:
There also are two alternative designs in this repository: https://github.com/VladimirP1/esplog-hardware
To open the project files, use KiCad 6
esplog_hv
is a 2-layer deisgn with a built-in switching regulator supporting 4.5-30v input voltage range.esplog_ldo
is a 2-layer design, which is almost exacly the same as the older 4-layer design.
Both 2-layer designs omit the ceramic antenna(because it can be very hard to buy) and implement the antenna as a random piece of trace. Wifi TX power over 7dbm cannot be used (otherwise the signal gets distorted too much to be recieved).