The project is designed to capture images at regular intervals while cycling, allowing users to create a timelapse video of their rides.
The project consists of three main components:
- M5Stack TimerCamera-F firmware: the C++ code that runs on the M5Stack TimerCamera-F device, responsible for capturing images at specified intervals and transmitting them to a web server.
- Flutter app: a mobile application that runs a web server to receive images from the M5Stack TimerCamera-F device and provides a user interface for basic configuration, such as setting the image capture interval and metadata.
- O-ring mount for M5StickC-like devices: a 3D-printed mount that allows the M5Stack TimerCamera-F to be attached to a bicycle handlebar (or other rods) using a single o-ring.
The firmware is written in C++ compatible with the Arduino IDE and is designed to run on the M5Stack TimerCamera-F device (it may also work on TimerCamera-X, but this has not been tested since I don't have one).
While you can use any Wi-Fi network, the project was designed to work with a mobile hotspot, so you can use your smartphone as a hotspot while cycling.
As per my own experience, the device could capture images for about 2 hours on a full charge with the default settings (1 image every 5 seconds).
If you have a power bank and a frame bag on your bike, you can use it to extend the capture time significantly.
Flutter AppThe Flutter app is a simple mobile application that runs a web server to receive images from the M5Stack TimerCamera-F device and provides a user interface for basic configuration (such as setting the image capture interval and metadata) and monitoring (such as showing the number of images captured and the current battery level of the device).
The app is designed to run on mobile devices, but since it is built with Flutter, it can also run on desktop platforms with some limitations (such as the lack of metadata support and the inability to expose a web server on a hotspot, only on a local network).
All photos are saved in the device's gallery (each session is saved in a separate album).
The timelapse video is not generated automatically, you will need to use a video editing software to create the timelapse video from the captured images (I recommend using ffmpeg for this task).
O-ring Mount for M5StickC-like DevicesThe O-ring mount is a 3D-printed mount that allows the M5Stack TimerCamera-F to be attached to a bicycle handlebar (or other rods) using a single o-ring.
The design is based on the official mounts for M5StickC-like devices (such as the Lego and wall mounts).
The mount was designed using Dune3D and is available in STEP and STL formats (as well as the original Dune3D file, so you can modify it if needed, for example, to fit a different rod diameter).
I'm not a 3D printing expert, so I cannot assure that the mount will print correctly on all printers/materials, especially because I made some dimensions adjustments based on try-and-error (since I don't know how to configure tolerances and the like, and never used any filament other than PLA).
Both the STEP and STL files are already ready for printing (using the orientation that is less likely to break during use), so you can just slice them and print them without any additional modifications, just make sure to enable supports (I used tree supports).
The diameter of the O-ring may vary depending on the material it is made of and the diameter of the rod to which it will be attached. I tested it with a rigid O-ring with a diameter of 60 cm. I don't know what it's made of, but it's probably silicone.
I'm not gonna lie, I always feared that the mount would break during use, but it never did, even after several rides on rough terrain.
By the way, you can also try to use the camera without the mount (in different situations) or with a different mount. When I first started testing both the firmware and the app, I used the M5StickC Plus watch belt to strap the camera to my left wrist, and it worked fine (although all the images were slightly tilted).
----
All files and instructions for this project are available in the GitHub repository.
This was the first time I made this kind of project, I already had some experience with M5Stack devices (such as the M5StickC Plus and Cardputer), but most of it was related to displaying images/videos on the screen and playing sounds, so I had to learn a lot of new things to make this project work, especially regarding the 3D printing designing.
I also didn't know Android devices could expose a web server on the hotspot, it was just a random idea that I had while trying to figure out how to make the image transmission work (my initial idea was to use Bluetooth, but I quickly realized that it would be too difficult to implement as I had no experience with it).
I also had the idea of using a usb-c thumb drive to store the images directly on the device, but it doesn't have usb host capabilities (which seems to be required for that).
Talking about random ideas, I bought the M5Stack TimerCamera-F device for a different purpose, I wanted to use it to make a timelapse video of my maize crops growing in my garden, but before I could do that (I still plan to do it, it's not the right season now), I got this random idea of using it as a timelapse camera for cycling, and it worked out pretty well.
Comments