I spent 9 hours this week working on my project.
I ordered the last Pi Zero I (hopefully) will need for this project, as well as some more screws/nutes from McMaster-Carr.
I started by downloading the ClusterHAT custom OSs for each Pi from the ClusterHAT website. Each of these then needed to be installed on their respective microSD cards. Installing the “lite” Zero OS’s took about 10-15 minutes/card, while the controller OS took over 30 minutes. I spent a few minutes familiarizing myself with the basic controls for the ClusterHAT:
clusterhat on p1 – Turns on the Pi Zero in the 1st position. ‘p1’ can be substituted for ‘p2’, ‘p3’, ‘p4’, to turn on the other Zeros individually, or ‘all’ to turn them all on at once. Similarly, the ‘clusterhat off’ command can be used to turn the Zeros off together or individually. The physical ClusterHAT has an LED for each Pi that signifies its power status (On/Off). Each Zero can take 1-3 minutes to boot. After they have finished booting (there isn’t an easy way to tell), each Zero can be accessed via ‘minicom p1’, which initiates a serial console connection. A few seconds later, a login prompt appears, which then gives you access to that Zero’s terminal.
A significant portion of my time this week was spent trying to figure out why none of my cameras seem to be working. I’ve tried multiple cameras, cables, and Zero combinations and I have only sporadically (and not reproducibly) been able to get one of the cameras to work. My working theory is that the Zeros don’t immediately recognize the wide angle cameras, which is strange as I’ve tested them without issue in the past. I’ve had some success with the 5MP camera and then switching to the wide angle camera. It seems that the Pi caches the presence of a recognized device. I’ll need to do more reading and testing to know if this is a circumventable problem. Reliable camera functionality is so crucial to this project that no other progress can be made until it is resolved.
While writing this post, I became concerned with the efficiency of my setup, so I took a few minutes (which then became hours) to re-evaluate my design. ClusterHAT + Zeros may actually be a less cost effective solution than the multiplexers I had examined over the summer. When I last looked at multiplexers, I had only considered narrower angle cameras, and therefore needed many more cameras than I currently anticipate needing. Multiplexers seemed, at the time, a very expensive solution to the 1Pi/camera problem, and had varying compatibility with different model cameras. Shortly after, the Pi Zero v1.3 was announced with a camera connector, and looked to be a cheaper solution. Blindsided by the $5 price tag of the Zero, I didn’t appreciate some of the other costs that would necessarily be involved. Due to high demand, the Pi Zeros are limited everywhere to one per customer. All the cameras come with a FFC cable, but the Zero utilizes a smaller cable connector, which costs $5.95. The cheapest shipping Adafruit offers costs $9.11, bringing the total to $20.06 / Pi Zero. That’s not the end either. Each Zero needs a microSD card. The cheapest microSD cards I can find in the 16GB range are about $6-8 a piece, bringing our total cost to ~$26/Pi Zero. With a minimum of 4 Zeros needed, the cost becomes just over $100, nearly twice the price of the Arducam Multi Camera Module. Each Zero needs to be connected to the MasterPi via USB cable or the ClusterHAT, adding an additional either $1.65 per Zero or $35.77 per 4. The current configuration of this project, in addition to having added layers of complexity and potential points of failure, costs ~$136. Note that this price accounts only for the costs that vary between designs and exclude the cost of the cameras and Pi 3. The “multiplexer” solution will cost about $50, and it’s stackable nature makes it easily scalable to an increased number of cameras. The ClusterHAT + Zero solution limits me to strictly 4 cameras per Pi 3, so all the costs outlined above would need to be more than doubled for any configuration involving 5-8 (or more) cameras.
One of my early hesitancies about the multiplexers was the limitation on camera models. I had hoped to be able to test with the 5MP Pi Camera, and then later upgrade to the 8MP camera, which would have required a different multiplexer. This is much less of an issue now, as the wide angle cameras I’m using are built on the 5MP sensor and I haven’t found any suitable 8MP wide angle cameras. While I don’t have any empirical data to back this up, I expect that the multiplexer would use less energy than 4 additional Pi Zeros, which is another consideration in favor of that solution and prolonged battery life. Switching to the multiplexer will eliminate my need to figure out interPi communication, and theoretically get me back 2-4 weeks from my original capstone proposal schedule. In reality, this doesn’t actually save me anytime, as most of that window has already passed. Arducam has some instructions on their website about using their product, but I’ll probably need some time to configure it for my needs.
Long story short, I’m no longer sure about how I want to immediately proceed with this project. All the money I’ve detailed for the Zeros is already a nonrefundable sunk cost. If I abandon the ClusterHAT and Zeros, I’m sure I’ll find a use for them in some future project. I don’t yet know why my cameras have been working so unreliably, or if the multiplexer would help resolve that issue. I’ve ended this week with more questions and uncertainty than I started with. I’m going to continue to cogitate on all this and hopefully next week brings some more positive progress.