You are browsing as a guest. Sign up (or log in) to start making projects!

6h 34m logged

A very specific timelapse tool…

…because it only works if you have a PS4 controller and a Bambu Lab A-series printer

How this project came about :3d-printer-icon:

I love 3D printing and began a youtube channel a few months ago showing my creations (shameless self-promotion lol). I really wanted to include cool 3D printer timelapses in my videos, and everyone knows that the A-series printer cameras suck, so I needed an alternative way to timelapse my 3D prints.

Enter yt channel 3D farmers and their solution :youtube:

Their solution is to use a bluetooth trigger mounted on the A-series x-axis via a 3D printed holder alongside a 3D printed trigger arm that snap fits onto the printhead. Each time the printhead moves to the end of the x-axis (which happens every layer when timelapse mode is enabled), the arm presses the button, which takes a photo with your phone.

Let’s face it - I’m impatient and a bit of a cheapskate :flying_money_with_wings:

Even though the bluetooth button would’ve cost $5 and would’ve only taken a day or two to arrive by delivery, I thought: ‘no… I’ll just use my PS4 controller instead - it’ll work before the button would arrive!’ How wrong I was…

What I needed to do 🛠️

I knew that a PS4 controller could connect to my phone via bluetooth, and I knew that I could mount it on the end of an A-series printer and have one of the buttons be pressed, therefore taking a photo on my phone. Pretty simple, right?

So I cadded up a PS4 controller holder that would mount to my A1 mini, and tested it. No software needed. The first result? Thousands (I kid you not) of photos because the PS4 triangle button was sometimes being held down for 30s - 1min at a time when purging filament waste. When I turned off burst photos in settings? Pretty much no photos. You see, there’s an issue with how PS4 controllers take in and send input:

Of course it’s not that simple :cryin-anim:

Well for some reason, PS4 controllers just don’t send any signal of a button being pressed via bluetooth if that button is being held down for longer than ~5 seconds before being released, or at least they don’t send the right kind of signal so that a phone takes a photo. I had no clue how to make an easy fix to this, so I had to bring in the big guns: my laptop.

The python program & IP Webcam :nerd_face-hole:

I needed a way to interpret the inputs from the PS4 controller at a more detailed level with more control, so I decided to write a python program using pygame to convert the PS4 inputs into a singular, reliable command to take a picture. As I’m not experienced with anything about android or phone apps, I installed IP Webcam on my phone so that my phone can host a server with a feed from my camera. When the python program determines a picture must be taken, it sends a request to the server address and receives a .jpg back.

I found it really neat that just putting a .jpg on the end of the return value from the request turns it from absolute jibberish into an actual photo from my phone, now stored on my laptop

The unexpected benefits to my woes :yay:

  • I edit my videos on my laptop, so it’s actually very helpful to have all the timelapse photos saved in one place on my laptop with useful file names. If I had used 3D farmer’s system, I would’ve had to send the photos from my phone every time I took a timelapse.
  • I still saved $5! :D

Tysm if you read this far and I hope you found it interesting! If you can’t tell I just found out you can put emojis in devlogs lol.

0
14

Comments 0

No comments yet. Be the first!