I previously posted about my set-up of an arduino-controlled turntable and automatic android camera trigger. It made some pretty awesome results.
I’ve now expanded that setup so that it triggers my Sony Nex-6 – either by a physical clicking of the button on the camera via a servo motor, or by infrared. I’ve included both because in an ideal world I want to use the IR remote, but I don’t actually have an IR LED at the moment.
By incorporating multiple cameras (and the set-up is easily extendable to more DSLRs and more Android phones), it means multiple angles can be captured per revolution of the turntable.
I want to make clear that I haven’t done anything spectacularly clever here, I’m just merging a couple of useful guides and posts from the internet. Assuming you got as far as the last post, with turntable and android phone, let me run through what I’ve changed.
All my changes to the AA-scan code, which includes the Arduino file and python files for Android and computer, are documented on github here: https://github.com/pfalkingham/AA-Scan
You now pass two optional arguments to the python code on the PC – imagename and image number. The former ensures that all the photos captured by the phone have a specific name, so you can change the name between sets and the second set won’t overwrite the first. You might want to do this if you need to turn the object over. image number determines how many photos get taken – it just divides 360 by that number to get the number of degrees to rotate the turntable by each time.
Photos are stored on the phone by default in internalStorage/Photog, rather than a temporary folder, again to avoid overwriting.
I added a bash script to be run on PC (windows subsytem for linux, or using a linux distro), that will automatically copy files over from the phone using FTP. For that, you’ll need to install Wifi FTP Server on your phone. You can set everything up so that photos transfer as they are taken, and something like Meshroom’s live reconstruction means it can start reconstructing while the photos are being taken. That doesn’t work with the DSLR images though, and to be honest I’ve not found the live reconstruction to be terribly efficient.
Servo motor to physically trigger the DSLR. I followed these instructions to add a servo motor to the arduino setup, and trigger the motor to move when the turntable has moved. It’s gracefully held onto the camera with bluetac and a rubber band, as you can see in the photo above and video below. It was hard to find a way to attach the servo in such a way that it didn’t just lift up when pressing the trigger. I may 3D print something in the future to clip it onto the camera more easily.
IR remote trigger. I’ve also coded in the ability to trigger the camera by flashing an IR LED hooked up to the Arduino, following these instructions. Unfortunately, I don’t actually have an IR LED at home with me, so for now I’ve thrown on a red LED just to see if it works. It turns out that the codes to send for various makes of camera have all be worked out by very clever people, and handily put into this github repository. All I needed to do was put these files into my c:\users\pfalk\Arduino directory, and add them in the Arduino IDE. That’s where the *.ino file creates a camera object, in this case at line 45 “Sony mycamera(8)” the ‘8’ being the pin on the board that the LED is hooked up to.
I think that’s everything. The result looks something like this:
How good is it? Very! I already showed you in my previous post the excellent reconstruction of a Rabbit vertebrae. That reconstruction used 720 photos just from the Android phone.
To demonstrate this new setup, I set it to just 50 steps (50 photos from Nex-6, and 50 from the Note 8, which was positioned a little lower and to the left as in the video above), and captured a cast Allosaurus tooth:
I’ve decimated it and put the model up on Sketchfab too:
I’m super pleased with this setup – I can get incredibly good models very quickly and with very little effort. I’m open to any improvements people might want to suggest!