“Don’t ever try to sell me a piece of electronics without an API. How is one expected to add any product customization without an API?”
“The only real problem that I have run into during testing is Las Vegas outdoor temperatures.”
I am a retired aerospace engineer with a strong background in the operations of satellites including RF Ground Systems and Computer Satellite Control Systems. I have had extensive training in electronics and computer science throughout my career and hold an MBA from the College of William and Mary.
I enjoy solving problems and improving processes through the use of commonly available hardware and by applying my own custom developed scripts.
I am a always up for a challenge and relish the satisfaction of a successfully completed project.
I received my Ricoh Theta S on 21 Feb 2017.
I had wanted to dabble in 360 photography and after researching the available cameras in the market I started to narrow down my search using cost, image quality and API availability. In my mind the Ricoh Theta S was the clear winner.
The Theta S might have scored a little lower then some on available memory and available power but I was impressed with the API. Don’t ever try to sell me a piece of electronics without an API. How is one expected to add any product customization without an API?
After taking a few pictures with the Theta S to validate the reviews that I had read about the camera I dug into the API in an effort to see what it could do. I decided to use my iPhone and an app called Pythonista which is a Python editor/interpreter to write my scripts. I had barely gotten started investigating the Theta S API when I read about the "THETA Unofficial Guide 360 Time-Lapse Video Challenge.” The challenge was to find ways around the ThetaS 200 image storage limit and battery capacity limit.
Little did I know at the time but the code that I wrote for the Time-Lapse Challenge would became the birth of the base code used in my next project, The Little Black Box (LBB).
The Little Black Box started life as a stand for the Theta S that provided a solid base for the camera and allowed for external power to be plugged into the camera while in use.
I envisioned the stand as something to be used on a tabletop or counter. I wanted the stand to be something that could be used on any flat surface without the need of adjustments as with a tripod-based stand.
I also wanted the stand to have added value as in self-contained Theta S computer control and image storage.
The diagram below best shows what the current capabilities of the LBB are but the highlights are:
Theta S Control, image storage, web-server, image presentation, file server, computer battery, charging and power regulation for both the on board battery and the Theta S battery when plugged into an external 5V DC source.
The hardware components of the LBB are:
- Raspberry Pi Zero W - On board computer and WIFI WLAN0
- WIFI USB adapter - WIFI WLAN1
- 2500mA LiPo battery - Provides power for Pi and most of the ballast to keep the stand stable.
- Adafruit PowerBoost 1000C - Acts as a charge controller for the LiPo battery and also boosts the LiPo voltage to 5.1 volts for powering the Pi and the LBB USB power output port.
- High speed Class 10 64GB MicroSDXC card
- 4.4" x 2.4" x 1.1" project box
- 1/4" 20 turns per inch threaded metal rod for attaching the camera to the LBB using the camera’s existing tripod mount
- Miscellaneous switches, connectors and hardware
The software components of the LBB are:
- Raspbian Jessie - Pi operating system
- Apache 2.4.10 - Web-server package
- PHP 5.6.30 - For building webpages
- Python 3.4.2 - For writing scripts
- Samba 4.2.14 - File transfer package
- SSH - Provides headless control of the Pi
- Google VRview - Used for displaying 360 degree and Google Glasses images
- WIFI command - Used to establish WIFI connections
click to enlarge
It has been a fun and evolving project. I don’t feel that I have hit the limits of the Pi zero CPU yet but when I do there is always the more powerful Pi 3 that I can switch to.
The only real problem that I have run into during testing is Las Vegas outdoor temperatures. It didn’t take long in 115 degree temperatures to reach the shut off point of the Theta S. The Pi 0 CPU was still chugging along at 59C/138F but that is very close to the maximum range so I terminated testing for the day and moved everything back indoors.
Thermal insulation and/or cooling would have to be addressed if the unit is to be used in extreme heat. My first thought would be to look into some type of sleeve for the area of the Theta S below the lenses where the battery and electronics reside. As for the LBB it would be just a matter of dropping the unit into a cooling box with just the camera attachment rod protruding into the elements.
Is the Little Black Box just a technology demonstration? If not, who could use it? Is it for security, used cars sales, baby monitoring…?
As I mentioned earlier this project started while I was looking to build a stable stand for the Theta S. I also was looking at incorporating the software that I had developed for the Time-Lapse Challenge into this project.
In its current configuration the LBB and attached Theta S camera should easily last through most of a day constantly snapping and processing 5376 x 2688 images at a rate of better then once every 8 seconds. After an image is processed and while the next image is being taken the first image is transferred to the LBB storage where it is immediately available for viewing and/or download via the LBB web-server and fileserver. Images stored on the LBB are also erased from the camera to alleviate any possibility of filling the camera storage.
Did I mention that the LBB has its own WIFI Access Point (WAP)? No router is necessary to log into the LBB for viewing or transferring images. Any phone, tablet or computer is capable of viewing stored images within seconds of them being taken.
Just think of the possibilities.
Car sales for instance. Obtaining 360 images of a car’s interior would become, open car door, place the LBB in your desired location, shut the door, wait 8 seconds and view the 360 image to ensure it is what you were looking for. Then either repeat the process after reposition the LBB or move on to the next car.
After a few cars I am sure that one would be good at camera placement and not be subject to many repeats. I am guessing that I could go through a 500 car lot in a day. Well maybe not me but a younger me could.
After obtaining all the images (or while the images were being obtained) the dealership web page builder could download the images for use. Which interior goes with which car? Easy answer, just look at the previous image and it should be an image which includes the vehicle in question since you were snapping images every 8 seconds. Or for the risk adverse jot down the time that each car was visited. The images are all time tagged.
How about grabbing 360 images for showing a houses interior in 360 images or recording progress on a new construction project? This becomes just a matter of walking room to room and setting the LBB down on tables, shelves or any flat service. Again you can log in with your phone or tablet to view the images captured to ensure that you got what you wanted. When you get back to the office you can log into the LBB and transfer the images for delivery to your webpage builder or customer.
Want to know who showed up at your users conference? Put a LBB at the sign in table and another at the snack table. Let them both just rip off images every 8 seconds. You might even find out who ate all the bacon wrapped shrimp.
I could go on and on with potentially uses for this technology but I want to bring up one last thought.
Using the LBB without a camera attached.
Have you ever presented to a customer and been caught short on interfacing your laptop or presentation materials to their audio visual equipment? Missing/incompatible cables, different drivers required, wrong version of software. Murphy strikes often and hard. Just load your presentation on a LBB and have the customers technician point their computer’s web browser at the LBB WAP. As an added bonus if there are any folks in the back of the room having problems viewing the screen they can login to the LBB as well with their phone, tablet or laptop and zoom in to their hearts content.
The LBB camera control capabilities continue to mature. A Settings webpage has been added to the system to display the current camera options as active selections to the LBB Settings menu system. The next enhancement will be adding the option to read any changes made to the LBB Settings menu back into the camera as settings changes.
The current projected final phase of the Settings menu is to add the ability to save snapshots of camera settings into named templates that can be recalled at any time to reconfigure the camera to a previously used configuration.
On the hardware side I would like to increase the capacity of the LBB internal battery to a point where it will be able to provide power for both the Pi and the Theta S for a full working day. This will require a larger enclosure with a bigger footprint but it will also increase stability and allow for a taller stand. Testing with an external battery of 6000mA has shown very positive results running the complete system for a full working day. A 6000mA LiPo candidate for the new configuration is on order and testing will begin shortly.
Also under development is a pocket sized non-camera stand version of the LBB which could be used as a Webpage/Fileserver host using the Pi Zero W’s internal WIFI to provide access. Adding a second WIFI by plugging in a USB WIFI adapter would turn this mini system into a Theta S controller comparable to the LBB system. Currently it is planned that external 5V power will be required to run this system but just about any 5V USB power source should suffice.
That’s all that is planned for now but ask me again tomorrow as I am always thinking about enhancements.
Currently there are no extra units available for loan. However, the WIFI Wireless Access Point which is used to communicate with the LBB can be reconfigured to a client of a router. A tester would then be given an IP address and temporarily access port number for testing the system. Strict coordination of use would have to be applied as more then one person trying to control the Theta S at the same time would not be a good thing. There is a good reason why Ricoh designed the Theta S to only allow one WIFI connection at a time. On the other hand, multiple connections to the Pi are acceptable but only for image viewing and transfer.
There we go, another possible LBB enhancement. Locking all camera control to all but one user.
Yes, custom designs for unique problems is my mantra.
Consulting services are negotiable and are dependent on scope of work and time constraints.
Contact Robert W. White Consulting at email@example.com or 702-405-0749
The base code of the project is already available on GitHub. There are two versions available. The first version leaves captured images in camera storage. The second version transfers the images to the controlling device and then deletes the image from camera storage.