My timely obsession with real-time clocks

Blognosticator Head

As a part of my Bishop Peak Portrait Project, I have built a couple of “printed” circuit boards. I made these on my CNC router, which I used to cut away the copper on a blank circuit board, leaving behind the traces for the circuit connections. On that circuit board is a Raspberry Pi computer which is programmed to control the camera.

RTC on Raspi 06

The real-time clock is mounted on the lower-left of the Raspberry Pi on the GPIO pins. Though it does not use them all, it’s connected to: 3.3V, 2 SDA, 3 SCL, 4 and GND.

On that Raspberry Pi computer I have mounted a real-time clock, also called a hardware clock. This is critically important to my project because the Raspberry Pi needs to know exactly what time it is.

Normal Raspberry Pi projects are desktop projects or robot projects, and most involve being connected to the Internet, either with a cable or with WiFi (requiring a WiFi module plugged into the USB plug on the edge of the Pi). The Linux operating system on the Raspberry knows where to get the time from the Internet, and it does it easily. But, disconnect the Internet, and the Raspberry reverts to the Beginning Of Time (which is December 31, 1999 at 4:00 p.m.).

I know that some scholars may argue that the Beginning Of Time happened much earlier, but the Linux Operating System knows!

I studied the world of keeping time on a Raspberry Pi, and I learned that I needed a Real Time Clock (RTC). Fortunately, these are available on every digital street corner, so I ordered one from Amazon, and it arrived just a day or two later. It was extremely easy to install, but a bit complicated to configure the software. I asked my friend Eric Johnson to help with that because he’s a Linux expert and he understands the methods for getting the operating system to see the clock and learn the time. This involves “blacklisting” the network time component of the operating system and telling it instead to look to the hardware clock that is installed. You must be connected to the Internet to make the changes, because in one Linux command you request the Internet time, then you write that time to the hardware clock. From that moment on, the clock knows what time it is.

The real-time clock I bought features a DS3231 chip, a device that appears to be the universal clock chip for these special devices. Most of our computers have a clock inside, one that is typically powered by a lithium-ion battery. That clock keeps track of the time and date when the power is turned off. When we restart, the clock tells the computer what time it is.

Real Time Clocks 14

This is my ample collection of real-time clocks. The red ones, though purchased from a variety of suppliers, are all the same: they all use a super-capacitor to power the 3231 chip on board. The black one is a battery-powered circuit that uses a Lihium-Ion button battery for power.

The real-time clock I found features a “super capacitor” to power the small circuit board when the power is off. The seller on Amazon touted the “super capacitor” as being better than a battery because it would last longer. The buyer feedback told a different story. The clock received a range of ratings from no stars to 2.5 stars. Several people said that the super capacitor would only last a few hours at best.

I bought it anyway, mostly because it was easy, and it appeared that it would work in my circumstances. Two to three hours of life after a power failure was OK, because my system is powered by solar panels and a motorcycle battery. I couldn’t imagine my system failing for more than a minute or two.

After we installed the clock on my Raspberry Pi, I put the camera and controller on the roof of the library at Cal Poly, and is started working. At the start I had 9 ampere-hours of battery power in the box, which I calculated would last four days with no sunlight hitting the solar panels. In San Luis Obispo four days of cloud or rain is unthinkably rare, so I assumed that that would never happen. It happened in the first five days the camera was running. The computer ran out of power and the whole thing stopped.

Battery RTC 03 Super Capacitor

This is the power side of the two different real-time clocks. The upper circuit uses a Lithium-Ion button battery, the lower photo shows the super-capacitor on the bottom of the board. You can also see the five-pin connector that connects to the GPIO pins on the Raspberry Pi.

It started the next day when the sun came out, but in the break, the super capacitor had drained away, and the clock lost track of time. My system still worked, but it was 1999, and it was running on a schedule that was far from correct – shooting photos in the middle of the night, and it stopped shooting in mid-afternoon instead of 9:00 p.m. when it’s supposed to stop. I bought and installed a second battery, bringing the total available current to 19 ampere-hours, which gives the system 9 days of power with no solar recharging.

Though the camera was running well, I suspected that the real-time clock was defective so I replaced it with another of the same design. On close inspection I discovered that the super capacitor was soldered to the board, but that solder connection was “cold.” The contact was no good; an ohmmeter confirmed this diagnosis. I marked it as a bad component.

In the period between installing the original camera and circuit board I built the “printed” circuit board as a back-up. The first version was hand-wired, and it worked fine, but I needed a back-up. I tested the real-time clock that I bought, leaving it unpowered for periods of time ranging from a few minutes to a few hours. I learned that it would run out of power after just a few hours, and that was not acceptable.

I decided to order a battery-powered real-time clock. This one was also found on Amazon, but I really had to dig to get one with the battery. And, once ordered, Amazon indicated that its delivery would be several weeks later; it was coming from China, and not by air mail.

When the clock circuit arrived, I switched it for the one on my back-up circuit. It works fine, and I have tested it for periods up to one full day with no power. It comes right back up with the correct time. Since my two circuit boards are exactly the same size, I can substitute the one in the box now with the one on my desk, and get the battery-powered real-time clock into the working unit. Though it probably doesn’t make much difference, it will be nice to have a more reliable clock in the working camera box.

Posted in New technology, Panoramic Photography, Photography, Software, Technology | Tagged , , , , , | Leave a comment

This is turning out better than I had imagined!

Blognosticator Head

If you have been reading this blog for the last month you know that I am currently obsessed with a mountain in San Luis Obispo named Bishop Peak.

I am so obsessed that I am taking 71,808 photos of it over the next year.

This is public art – a collection of images that will be assembled in the Baker Center at Cal Poly. The photo collection will grow during the year, and at the end – next March – it will be complete.

I have selected just eight of the photos to present in this blog so that you can see how diverse the weather has been on my mountain of obsession:

Bishop Peak Portrait 05058 4-20-16Bishop Peak portrait 01072

The project, so far, has involved building a weatherproof camera box, designing and building a circuit to run the camera as a time-lapse device, installing this box and camera on the roof of the Kennedy Library at Cal Poly, then troubleshooting the system until all the bugs are worked out. The adventure has involved my CNC router for the box and the circuit board, studying Python for the Raspberry Pi computer, and putting all the pieces together into a working whole. I started it up on March 3, 2016, at about 9:00 a.m.

Once the camera started to produce images, I wrote an AppleScript to crop and label each selected photo (one each day). Those images can then be sent to a photo lab to be printed on aluminum sheet material. I am still awaiting the results of my first shipment.

Bishop Peak portrait 02118Bishop Peak portrait 02692 3-31-16

I’m working with the engineers now to fabricate a frame to hold the 374 images that come from the project.

My original plan was to make these photos, and then choose one each day that shows how beautiful Bishop Peak can be. What I didn’t expect was the real thing I have created here. It’s a year-long weather study! Since installing the camera, I have collected o 5,000 photos of the mountain that show everything from a moonset to driving rain to beautiful white clouds in a blue sky. The camera takes a photo every five minutes, and it is simply amazing how much can change in those five short minutes.

Bishop Peak Portrait 04011 4-13-16Bishop Peak Portrait 04179 4-14-16

I am amassing an astonishing collection of very different photos.

I know that as summer comes I will see more and more of the same: clear blue skies, mountain. Not much difference. In the meantime, though, this has been a forty-day wild ride through every type of weather (well, not every type – it never snows here). But, the photos show some wonderful extremes, and I am collecting the images on my computer for my project.

Bishop Peak Portrait 04333 4-15-16Bishop Peak portrait 01806

This last image shows the moon partly eclipsed by Bishop Peak. This occurred at 5:05 a.m. on March 22, 2016. This last week we had the moon setting as the sun was coming up, and I am excited to see the photos of that! (I’ll get the photos from the camera in about ten days).


Posted in Art, Photography, Photoshop techniques, Software, Technology | Tagged , , , , , , , | Leave a comment

An Exposure Expedition at Cal Poly

Walking cameraEach quarter when I teach Digital Photography at Cal Poly, I take the students out for what I call an Exposure Expedition. These expeditions are in the interest of teaching basic camera techniques, and teaching the students how to “see” images in the field.

These are images I made while out with the students. The images were all made near the O’Neal Green in the Cal Poly Rose Garden and the Cactus Garden, both of which are spectacular.

Posted in Art, People, Photography | Tagged , , , , | Leave a comment

175,000 readers!


178,265, actually.

Thank you to all of you who read the Blognosticator!

I started blogging about 11 years ago when I was hired by Graphic Arts Monthly magazine to do a weekly blog about topics in the graphic arts. That was a great assignment, one that lasted for several years.

When that magazine failed, I took about a year to rethink and regroup while I decided what to do with the Blognosticator. I wrote for a few months for, and eventually decided to move the Blognosticator to my own server and make it a private blog.

I tried in vain to find a sponsor, one that would pay me to write these words on a regular basis. That would have been great, but it didn’t work out.

Yet, I kept it up for all these years.

This is my 212th blog in the Blognosticator series (a hundred or more in the Graphic Arts Monthly series).

Keep visiting for more information on printing, publishing, solar power, time-lapse photography, everything!

I might even resort to making a few political comments in this year of the weird and crazy election for President of the United States.

Best wishes to all my readers,

Brian P. Lawler

Posted in Uncategorized | Leave a comment

Time-lapse project, part III: a new circuit board

Blognosticator Head

My time-lapse camera has been running now for 25 days. It snaps a photo of Bishop Peak (elev. 1559 ft.) every five minutes. I have over 2,300 photos so far.

Bishop Peak portrait 01247

This is a sample of the photos being taken by my time-lapse camera. My plan is to assemble a montage of 374 of the best photos in a large frame mounted in the Baker Center on the Cal Poly campus.

The project has not gone perfectly. The first week we had rain and cloudy skies for five days in a row (a nearly impossible weather event here – front page news!). My solar panels didn’t get enough sunlight, and on the sixth day the Raspberry Pi computer inside the box gave out. My 9Ah battery just couldn’t hold out that long. I revived it two days later with a freshly-charged battery, and I added a third solar panel. Under normal circumstances the solar panels will generate over three times the power consumption of the camera system, so it should go for a long time (over a year) without running out of power. You can read about the project in my earlier blogs here.

Two weeks later I added a second battery so now I have a total of 19 Ah of power, which should run the camera for nine days with no sunlight. Now it’s all working fine.

The program running on the Raspi instructs the camera to start shooting at 5:00 a.m. and stop at 9:00 p.m. Linux knows about Daylight Saving time, so it automatically changed to Pacific Daylight Time on March 13th. My problem since is that the camera still thinks it’s on Standard time, so I have to make mental adjustments as I process the images. I can’t move the camera, and I can’t see the LCD viewfinder in the box, so it will just have to stay in the wrong time for the duration.

At 9:00, the Raspi goes into a sleep mode, cruising along on less power, which makes it possible to run for longer. At 5:00 a.m. it wakes up and starts its daylight cycle.

I’m shooting in Camera Raw, so each photo is full-resolution. I can make big prints of the photos as a result, and I can convert them into smaller photos if I need to.

I was in a bit of a rush when I installed the camera on the roof of the Kennedy Library, and I hadn’t satisfied myself that the program and the computer would work without failing for an entire year. I decided to build a second one as a back-up. This would be a complete circuit board and battery that I could test on my desk at home while the other one is clicking away on the roof. I ordered the parts, buying some slightly different versions that use less power. I redesigned the layout of the parts on the board, and then had the idea of making a “printed” circuit board of my system.

I ordered some copper-clad phenolic board from Amazon in a size large enough to make the circuit board. While waiting for its arrival I designed the traces for the components I would later mount on the board. I have never made a circuit board before.

Circuit board fabrication 49

This is my CNC router working its way around the traces of my “printed” circuit board. The cut-out in the foreground is to provide access to the microSD card on the Raspberry Pi (in case I need to change the program on the computer). In this photo you will see that the holes were drilled first, then the traces cut. It was slow, but it worked beautifully.

To make the traces, I used my CNC router with a small cutter. I laid-out the traces in Adobe Illustrator as positive lines with round pads for the connection points. Then, on a separate layer I prepared the holes where the components would go through the board to be soldered onto the board.

When the phenolic board arrived, I took it to the CNC machine and I made a practice run on a corner of the board. By cutting only a few thousandths of an inch deep, I was able to remove the copper from the non-conductive areas of the board, leaving the conductors behind. The CNC machine did a stellar job of cutting the traces. I had to run emery paper across the traces when it was finished to clean off some small burrs that the cutter left behind.

Finished circuit board 07

This is the bottom side of the finished circuit board after mounting the components and soldering all the connections. The large areas of copper are “ground” – but I didn’t use it for that purpose. You can see the MicroSD card in the top of the cut-away area on the lower-left. Some of my mounting hardware came dangerously close to the live traces, but not close enough to short any of the wires.

When it was finished I examined it carefully, then soldered the components to the board. It makes a very clean layout, and it’s very solid. I put the transistor, the diode and the resistor into their positions, and soldered them in place, and I mounted the Raspberry Pi and soldered its output pins to the circuit board.

This circuit is so simple that I only needed copper on the backside of the board. Had it been any more complicated I could have designed a two-sided board.

Finished circuit board 03

This is the top of the circuit board with all components and wires in place. I am very happy with the layout and the appearance of the board. And, best of all – it works! The wires leaving the board on the left connect power to the camera, the camera trigger line, and two 12VDC power inputs (upper-left). One is coming from the batteries, the other from the solar panels.

Once I had it all wired, I applied battery power and the computer started up, but the circuit didn’t work. (My friend Eric told me recently, “It’s ALWAYS the hardware.”) The software was running fine; the control circuit on the Raspberry Pi was “going high” once every five minutes. But the relay was not closing, and therefore the camera will not take a photo. I was dumbfounded. I double-checked the wiring; I triple-checked the circuit to be sure I had designed it correctly, and put the parts on the board with correct polarities. Everything checked out. But it didn’t work.

I let it sit for a week while I traveled to Memphis for the TAGA conference, then stopped in Phoenix on the way home for three days of Spring Training (and some mighty good food!). When I got home again I took out a lighted magnifying glass and followed every trace for its entire path. Up where the signal voltage from the transistor reaches the relay I found a microscopic sliver of copper shorting-out the two pads at the relay, grounding-out my transistor circuit. I scratched it off with a sharp jeweler’s screwdriver.

Then I powered-up the board again and the whole thing started working! Hurrah! Now it’s sitting on the desk to my right, clicking every five minutes as it is supposed to be.

I might substitute this board for the one in the box on the roof of the library. Or I might just let that one keep running, and keep this one available as a back-up if I need it.

The entire process has been educational and fun. I have learned a little bit of Python coding (very little), have observed my friend Eric enter the “cron” code necessary for the Linux OS in the Raspberry Pi to control my program, and I have learned how to make a simple electronic switch using an NPN transistor, a diode and a resistor. This is the stuff that makes these projects so interesting.

Posted in Adventures, Gadgets, New technology, Photography, Technology | Tagged , , , , | 2 Comments

An adventure in the Distiller Time Machine

Blognosticator Head

Way back in 2003 I wrote an essay for inclusion in an article in Pre magazine about using Adobe Acrobat Distiller with hot folders to get PDFs with specific settings just by dropping a source file into a watched folder in Distiller. At the time, source files were PostScript files generated by various applications as a method of going to print when one was not directly connected to a PostScript printer.

Almost no one knows about Distiller today, and there are only a few geeks like me who even remember that it exists. But, exist it does! And it still works.

Adobe keeps Distiller (almost) up-to-date. I have the latest version, one called Distiller DC (as opposed to CC?). I don’t know what the D stands for.

What is Distiller, and why on Earth do we need it? Distiller was originally the only way for a graphic artist to make a PDF from most applications. The workflow went like this: create a document in QuarkXPress, go to the Print menu, and “print” a file to PostScript. Take the resulting file and drop it on Distiller’s input window, after setting what kind of PDF one wanted, and a few minutes later a PDF would appear. Distiller is essentially a printer-in-software that makes PDF files.

[A more robust cousin of Distiller is embedded in Kodak Prinergy, Agfa Apogee, and other commercial prepress systems. It’s called the Normalizer, and its job is to pre-process PDF files (and a few other files types), making them ready for the rest of the trip through the system.]

Setting the stage for my trip down Distiller Memory Lane is a book that my students have created. It’s made up of 17 “chapters” each of which is four pages. Together, the book must be a complete work with consecutive page numbers, all printed as one publication. Using the Book function in Adobe InDesign is something I have done many times, most recently to produce ePubs. The Book feature is very efficient for ePubs because the resulting e-books are (nearly) automatically made with navigable tables of contents.

InDesign Book palette
This is an InDesign Book. This palette shows all of the contributing “chapters” from which you can choose individual InDesign documents to open and edit. Whenever you want, you can tell the Book to synchronize its components, and it will reset page numbers. The second file down has been designated as the “master” chapter, from which the book gets all of its Paragraph and Character styles, and from which it derives its Master Page items, including page number format.

The InDesign Book only works correctly when there is one master set of Paragraph and Character styles. When that is true, it’s easy to update all of the contributing “chapters” and to update the page numbers of all of the contributing documents.

For our book project I imported all the Paragraph and Character styles from all of the students’ chapters into the first chapter. I also copied all of the type fonts from all the packages produced by the students to get them all into the first chapter’s Document Fonts folder, otherwise InDesign would not have been happy with the available fonts, requiring me to load them all each time I opened the book chapters.

You can Export a PDF from InDesign Books using all the usual PDF settings that are available in InDesign. I tried this technique and got a perfectly acceptable PDF of the entire publication. But I wanted to see if my 2003 hot folder technique still works, and so I did it a second time the old fashion way.

For those in production jobs, this technique can save a tremendous amount of time because various contributors can simply drop their files into a hot folder, and a PDF will emerge out the other end. It’s the files that can be difficult to get because (in general) we don’t use PostScript anymore.

You can print from an InDesign Book, and it was by this method that I produced a PDF from my students’ work last night. It was a long journey.

InDesign Book fly-out options
This is the fly-out menu from the Adobe Book palette shown above. Notice the Export Book to PDF, and other selections. I used both the Export to PDF and the Print Book tool to make a PostScript file that I later distilled to PDF using Distiller’s hot folder tools.

My method is to “print” my book, comprised of 18 separate InDesign documents (“chapters”) to PostScript. To those born after 1999, PostScript is a page description language that was created by Adobe Systems in 1984. It was the foundation of the revolution that unseated phototypesetting and put electronic publishing into our vocabulary. PostScript is still buried inside all of Adobe’s products – it is at the core of PDF, and it is at the core of the PDF Print Engine that is the controlling software on most modern printers and prepress systems. Think of PDF as a superset of PostScript.

Once the PostScript file was created, I tried two other methods for converting it to PDF. The first was to run Acrobat Distiller, and drop the file onto the input window of that application. The problem is that Distiller doesn’t support PDFx/4. I tried importing the joboptions file for PDF-x/4 into Distiller, but that had no effect. So my choices of presets were limited to PDF print options up to x/3. That wasn’t acceptable. I need PDF-x/4.

My second approach was to use the latest version of Acrobat to create a PDF from a file, one of its many (many!) functions. After first crashing, it successfully made a PDF, but again, I couldn’t choose PDF-x/4, so that didn’t work. (I think that Acrobat actually uses Distiller or its libraries to make the PDFs that it makes.)

I fell back on the technique I described in my article back in 2003, where I created hot folders for sheet-fed offset, newsprint, and screen display PDFs.

Distiller Folders

This is similar to the layout of the Hot Folders I created back in 2003. Each folder has an In and Out folder, and each has its own joboptions file that Distiller will recognize and use for processing the files dropped in it.

A Distiller Watched Folder is a folder that sits anywhere on your computer, and inside of which there is an Adobe PDF joboptions file, and In folder, and an Out folder. I created the basic folder, then told Distiller to watch it; Distiller then makes the In and Out folders inside it. I then copied the joboptions file for PDF-x/4 from the Adobe folder in my Application Support folder in my System files. This is the same joboptions file that is used by InDesign to make a PDF directly.

Here is what that folder looks like:

Hot folder content

To distill the PostScript file into PDF-x/4, all I have to do is drag the file into the In folder inside this folder, and watch the fireworks. Actually there are no fireworks. It processes the file, then puts it, and the original file into the Out folder, and you’re finished.

By using this technique I tricked Distiller, which otherwise offers no support for X/4 PDFs, into making an X/4 PDF.

Tomorrow I will attempt to impose and print the PDF on Cal Poly’s Konica Minolta C1100 digital printer.

Posted in Imposition and Pagination, Printing and Printing Processes, Software, Technology | Tagged , , , , , , , | Leave a comment

374 days taking photos of a mountain

Blognosticator Head

On Thursday morning this week I set up my time-lapse camera on the roof of the Kennedy Library at Cal Poly, San Luis Obispo. It’s facing almost due-west toward a mountain named Bishop Peak, which stands over the city of San Luis Obispo at an altitude of 1559 feet. The camera is going to take one photo every five minutes from now until next year. It stops at night, starts before the sun comes up every day.

Camera on roof 02

This is the camera box mounted on its support frame on the roof of the Kennedy Library at Cal Poly. On the right you can see the 30W solar panel with its lead up to the camera box. On the roof of the camera box are two smaller solar panels. After mounting the camera box we added eight concrete blocks to the base to weight it down.

The camera is a Canon T5, controlled by a Raspberry Pi computer in the box with the camera. It has three solar panels to provide a charge to the battery in the box. The entire unit is self-contained. I plan to let it run for about two weeks at a time when I will visit the camera to change the memory card. The memory card is big enough to accommodate months of photos, so my visits are only necessary to pick up the images and start processing them.

Interior electronics 01

This is the interior of the camera box. In the back is the battery, on the left is the circuit board, and at the top is the charge controller. The camera mounts on the wooden device in the center.

Ultimately the photos will go into an aluminum frame that will grow during the year. I plan to make the photos into prints on aluminum sheet, 5 x 5 inches in size. I will occasionally populate the aluminum frame with more photos, and eventually it will grow to a complete rectangle with 374 images in it. The frame will be mounted on the wall of the Baker Center at Cal Poly as public art.

View of Bishp Peak 03

This is the photo the camera takes every five minutes. As the seasons change, the green will turn to California gold, the skies will change, and the image will be quite different. It should be interesting!

The circuit board I built is a sheet of polycarbonate plastic with the components mounted on it. I drilled the holes for the electronics and wires on my CNC routing machine, and I built the board by soldering the wires from component to component on the board. After the board was built, I struggled for a solution to triggering the camera (as described in my previous blog). I ultimately solved that problem by making an electronic relay to power a mechanical relay to trigger the camera.

Composite image

This is my simulation of the 374 images in their final frame. The final frame will be seven feet wide and nine feet tall with the images in it.

I am building a back-up circuit board now, with all the components of the original. On the back-up board I am using a solid state relay that might (I have not tested it yet) be able to trigger the camera without needing the electronic switch to power it.

Setting the camera up on the roof of the Kennedy Library was relatively easy. Someone had left a satellite dish mount on that roof sometime in the past, and that mount was still up there when we went up to check the site. I commandeered the unused mount, and designed my camera box to attach to its 1.25 in. diameter center post. I had to make a plywood pad for the bottom, and two plywood inserts to hold concrete blocks that we added after the camera was in position. The entire thing now stands on the roof, with the camera clicking every five minutes.

Circuit Board 05

This is my finished circuit board with two power supplies, the relay, the electronic switch, and the Raspberry Pi computer on the right. Power comes in from the upper-left.

The idea of taking the same photo 192 times every day for over a year is admittedly strange, but since I put the camera up, we have had one day of clear blue skies, one of dense morning fog, and a third of drizzling rain. The plan is to document the mountain in all light and weather, then show the most interesting and beautiful photo taken each day. Some of these will be solid gray rectangles, of course, but that’s part of the story.

As I build the images (I have not started the frame part of the project yet) and start loading them into the frame, I will post another blog.

And if anything goes wrong, I will certainly tell that story here also. I hope that the next year and nine days are completely successful.

Posted in Adventures, Gadgets, New technology, Photography, Technology | Tagged , , , , , , , | Leave a comment

Time-lapse weather-proof box construction

Blognosticator Head

This is part two of a blog about making a weather-proof time-lapse camera box, and the camera equipment to go inside it. You can read part one here.

With may plan to do a year-long time-lapse project, I began in earnest to finish the weather-proof box for the camera and electronics.

I decided to make the entire box with parts cut on the CNC router in my shop. I would make the box out of 3/4 inch Baltic plywood, which itself is weather-proof. When finished, I would spray a coat of clear acrylic over the box to add to its resistance to the weather.


This is my box parts layout in Illustrator. The parts were cut from a sheet of Baltic plywood 29 x 44 inches in size. At the top are the two pieces that form the mounting bracket on the back of the box. This is a pretty simple pattern, and it was all cut with one router cutter – the 1/4 inch end cutter.

I designed the box in Adobe Illustrator, then converted the illustrations into a cutting plan in one big sheet. I have made enough parts on the CNC machine now that I don’t get too obsessive about drawing 3D versions to check them. I just forge ahead, cutting with abandon, and then I build. This has gotten me into trouble a few times, but in general I have great confidence in the process.

My work flow is to start the machine, and run the Mach3 cutting program to get set-up. Mach3 is the controller software for the CNC machine. It converts machine instructions from the design software into the actual motor pulses that move the stepper motors on the machine to their cutting positions. This software runs on a Sony Vaio laptop computer conneced to the CNC router by an Ethernet cable. I bring the cutting head close to the operator’s position, put a laser pointer tool into the router spindle, and locate the lower-left corner of the material I am cutting. This establishes the X,Y zero point. I then run the laser along the lower X-axis of the material to ensure that it’s set straight in the machine. I lock the material down using a variety of tools, one of which I described in a previous blog – the printer’s quoin.

To set the Z axis on the machine, I substitute a router cutter for the laser and use an automated zero-finding tool we have for the machine. This is a touch plate that uses electrical conductivity to establish when the cutter touches a brass plate in the tool. I connect an alligator clip to the cutter and run a routine that slowly lowers the cutter until it touches, and then – in an instant – the Z is set.

Time-lapse box 07

This is my CNC router making its way around the Baltic plywood and cutting the parts for my weather-proof camera box. The blue-silver device in the middle is the Bosch router on the machine. The gray hose is the dust-evacuation pipe that removes sawdust from the machine as it cuts. The machine makes a lot of noise, but it cuts with tremendous precision and makes construction of projects like this very simple.

Then, using a program called V-Carve on the same Sony computer I enter the dimensions of my material – width, height and thickness. V-Carve has the ability to import Illustrator vectors and convert them into cutting instructions. It’s a very nice program, and I am impressed by its features. Many people design in V-Carve, but I can’t run it on a Mac, so I use it only to convert my Illustrator files to cutting instructions, and then export those to the Mach3 cutting program in the language it understands – G-code. G-code is a fairly simple X-Y-Z coordinate language that is used on most machine tools. It gives simple instructions to a program in X-Y coordinates, it indicates the depth of the cut, and the speed of travel and the speed of the Z axis head. If you look at G-code, it’s easy to understand. Here is an example from this project:

G0 X0.0000 Y0.0000 Z0.8000
(Cut outlines)
(End Mill {0.25 inch} .25 inch pass depth 25percent stepover)
G0 X2.2756 Y3.1052 Z0.2000
G0   Z0.0500
G1   Z-0.2530 F10.0
G1 X8.2609   F50.0
G1 X9.0109
G3 X14.9606 Y3.2302 R0.1250

In those instructions, the positions are set, the tool is set, X-Y feed is set, Z feed is set, and the speed of the cutter is set (8000 rpm). Then there is a list of instructions that take the machine from one point to the next. In this case, the file has 2200 lines of instructions.

Camera in box open

This shows the camera, the battery and all the electronics mounted in the partially finished box. I was testing the positions of the components to be sure that they would fit in the end.

In V-Carve, I choose the tool (a 1/4 inch router cutter is common), and then assign that cutter to a path as either a profile cut (outside) or an pocket cut (inside). V-Carve also has special controls for drilling, and for cutting lettering (which it does beautifully). Our CNC machine doesn’t change cutters automatically, so I am usually thoughtful about grouping my cuts to use the same cutter as much as possible, then I change the cutter and move to other cuts that use that one. I always save the outside profile for last, which helps me to avoid the cut piece breaking free of its surrounding material.

This weather-proof box included both inside and outside cuts, all of which were very simple. I transferred the file to V-Carve and prepared to cut all the needed pieces out of one half-sheet of Baltic plywood. It took about 30 minutes total, and when I was finished, I had all of the parts (except the door, which I cut later to fit). Building the box was then just a matter of assembling the pieces and screwing it together with stainless steel screws.

Almost complete box 05

The nearly-finished camera box sports two solar panels on its roof, a hinged access door, and the opening in the front for the glass (yet to be installed in this photo). There is a tiny notch in the underside of the roof board whose job is to cause water to drip off the roof there, and not travel down to the glass.

The camera box will be mounted on a steel pole made of electrical conduit. I measured that conduit, then designed a clamp mechanism made-up of two pieces of Baltic ply that will pinch the conduit and hold the camera box in-place. I plan to add two additional posts in the front of the camera box to stiffen its resistance to the wind.

You can see in these illustrations and photos how the box went together. It’s finished now and ready to house the camera and electronics to do its year-long time-lapse job.

In my next blog I will include images of the mounting and assembly of the camera on the roof of the building at Cal Poly.

Posted in Gadgets, Photography, Technology | Tagged , , , , , , , | Leave a comment

Time-lapse with a Raspberry twist

Blognosticator Head

What’s been going on since December?

I’ve been spending a lot of time making a cabinet for my camper (another thing I designed in Illustrator and built on my CNC Router). That has taken a tremendous amount of time, and it has shown me over and over again that the CNC is a great addition to a workshop, but not a substitute for more traditional tools and common sense. I also re-learned the old axiom about measuring twice and cutting once, as I had to modify the cabinet after it was built to accommodate some hardware in the back of my van that I had failed to see when I made the first measurements. More on that in another blog that I will write when I get the time.


This is an illustration of my time-lapse camera box. It must be weather-proof so that it can survive on a hot roof for over a year.

Speaking of time, my major project since December is a super-duper water-resistant time-lapse camera box and system that I am installing on the roof of the Kennedy Library at Cal Poly, my place of work. My plan is to take a “portrait” of a local mountain every five minutes for a full year and put the photos from that camera into a montage in one of our buildings.

The camera idea came to me last year after I finished the Mars photo project of which I wrote in this blog in September.

I have done a similar project with a similar box years ago when I photographed the construction of a home over a four-year period. The box proved to be very successful, so I cloned it to make a more modern version, this one a little smaller, but a little more robust. As I write this, I am listening to the sounds of strong winds buffeting my home – I need to be sure that the camera and its mounting can withstand that kind of assault in addition to any rain that might fall in the coming year. We get so little rain that it’s almost silly designing for it, but I must protect the equipment and I must hope for rain!

I over-engineer those projects for a couple of reasons. One is that I need to be sure that this camera does not move at all over the one year and 11 days in which I will be making my study. The second reason is that I enjoy the challenge of making things. I also decided to make my own time-lapse computer this time using a Raspberry Pi microcomputer and other components on a circuit board of my own design. I liked the idea of learning how to program the Raspberry Pi, and learning about these popular devices. My circuit is bigger and it consumes more power than is necessary for such a small task, but I decided to do it myself (as much as I could) and get the project running, and I gave up efficiency for the ability to learn how to do it myself.

I began with the Raspberry Pi and a Canon T5 camera that I purchased for the project. The camera uses battery power that under the best of circumstances would allow it to run for a day or so. I solved that basic problem by purchasing a power supply adapter for the T5 from a Chinese maker of camera accessories. This adapter came with a 110V transformer power supply which I cut off and put into e-waste. I only wanted the plastic battery “cheater” and cable. The Canon runs on 7.2 volts, which required me to come up with that power on my circuit board.

Raspberry Pi with clock

My Raspberry Pi computer with its on-board real-time clock (red circuit, upper-right). This combination provides a complete Linux computer with a precise clock to keep track of my photo schedule.

My camera box must be a stand-alone device, not relying on electrical power from the building on which it will sit. I designed it to have two 5-watt solar panels on the top to keep a motorcycle battery fully charged for the year it will be in service. Those solar panels go through a solar charge controller that monitors the battery and keeps it topped-off when the sun is shining. Motorcycle batteries provide 12 volts of power, so I bought a small DC-to-DC power supply to change the voltage from 12 to 7.2 volts to run the camera. Check.

The Raspberry Pi is a complete computer on a board the size of a business card. It’s a very popular computer for making projects – robots, sensors, control circuits, and more. The Raspi (as its adherents call it) runs a free version of Linux and it comes with a development environment for writing programs in Python. I have done a lot of small-scale programming in other languages including C and AppleScript, but this was my first excursion into Python (and I didn’t go far, as my program is so simple).

Power for the Raspi is 5 volts, so I bought another DC-to-DC power supply to deliver that power to the computer. From the Raspi I take a 5 volt line to a small relay, and from there I trigger the camera with the computer.


This is my block diagram of the time-lapse circuit for my project. It’s a relatively simple plan, made into reality with components and modules I purchased at

When I had the whole circuit designed, I converted the block diagram in Illustrator to a cutting plan for the actual circuit board. I measured each of my components (Raspi, two power supplies, relay, push-button, terminal strip) and designed their precise locations on the board. From there I made a pattern for the CNC Router, and I cut the board and drilled all the necessary holes into a sheet of polycarbonate plastic.

Circuit designers use a technique called breadboarding when making hardware. I bought a breadboard to go with my Raspi and I began the process of making my circuit work. I wired power to the power supply that drives the camera. When tested, it worked perfectly. Check.

Then I moved to the Raspi and the relay. I wired the relay to trigger the camera’s remote input (a simple open circuit, which when closed causes the camera to take a photo). I wired a push-button to the board so that I can trigger the camera manually. That push-button worked perfectly, and the relay, when triggered by a AA battery, worked perfectly. Check.


…and this is the nearly exact diagram of the components and their positions for the circuit board. I used this illustration to make the CNC cutting file that I used to drill the holes for all the components in a sheet of polycarbnate plastic to make the circuit board.

I bought a book about programming the Raspberry Pi, and I went through the book, following the assignments and progressing as a new Python programmer, but I was impatient. I only need to push an output pin “high” to create a signal to the relay for a moment. I studied the book’s example for making an LED flash. That was exactly what I needed. I built a circuit using the Raspi and an LED. I wrote the program and tested it, and voila! – the LED flashed. Check.

Then I took the LED out of the circuit and connected the signal from the Raspi to the signal side of my relay and I ran my program. It failed to work. Uncheck.

I studied various fora on controlling relays with the Raspberry Pi, learning that the small computer does not provide enough current to drive a relay. What I needed was a relay with a lower power threshold on its signal side. I ordered two on Amazon Prime!). While those were in the mail I thought that I could solve the problem with a transistor, making what is essentially an electronic switch. I read-up on transistor circuits, and learned that an NPN transistor can rather easily be wired to control the signal side of my relay. Armed with this information, I studied very simple transistor circuits that I found online, and discovered that I could make a simple electronic switch with a transistor, a resistor and a diode. I got my friend D.K. Philbin involved because he has years of experience with electronics. I gave him the challenge, and he calculated the values of the resistor and diode, and he sent me a little envelope with an NPN transistor, the resistor and the diode. I built the circuit and had it working in less than an hour!


The Raspberry Pi hummed along, sending its pin 18 “high” to drive my transistor every five minutes, and the transistor sent 5 volts of power to the signal side of the relay, and the relay closed the circuit on the Canon camera, causing it to take a photo. This was going very well! My circuit was complete!

Circuit board i box

This is the nearly complete circuit board mounted in the back of the weatherproof box for a test fit. The motorcycle battery is on the right. My wooden camera mount is in the center, still in need of a couple of parts. The solar charge controller is mounted in the ceiling of the box, which is not shown in this photo.

I need the entire system to work without failure for a year without outside power, and I was relying on 10 watts of solar power as my power source. I wired an ammeter into the circuit between the battery and the board and I powered it up. With all of the components going, it consumes .23 amps of power (a lot for a small device like this). At that rate, I would run my battery down in less than three days and the whole contraption would come to a screeching halt. I obviously needed more power. In order to run rain or shine, I wanted to have three to four times that much energy. I bought another solar panel and added 30 more watts to the system. After installing that panel I tested the solar system, finding that I am generating .73 amps in bright sunlight and keeping the battery at full-charge. Check!

The Linux side of my program was done my by dear friend Eric Johnson who dreams in Terminal code. He came over on Saturday and installed a couple of modules of code to the kernel on the Raspberry Pi. That little computer uses the Internet to get the time. My system will not be connected to the Internet, so I purchased a module called a real-time clock to add time to the Raspi. Eric instructed the Raspi to get the time on startup, and then to use the time to trigger my very small program to take photos in a schedule he devised using a Linux command called “cron.” Cron is really cool because it can be instructed to do something (run my program) at intervals. Eric instructed it to start taking photos every five minutes beginning at 5:00 a.m. and continuing until 9:00 p.m. We tested it and it works. Check!

My time-lapse circuit is now complete and the camera is successfully taking photos every five minutes. On my desk.

Now for the enclosure – I went to work on the box (I was actually doing both at the same time in two locations). More on that in the next blog. You can read about the enclosure here.

Posted in Gadgets, Photography, Technology | Tagged , , , , , | 2 Comments

Calibrating the iPhone with i1 Display Pro

Blognosticator Head
I see iPhones being used for all sorts of “professional” applications including video capture, and now that the phone sports a 12Mp camera, graphic arts quality photography. No excuses professional photography.

Several years ago I was made aware of a new iPhone and iPad application from Pantone called MyPANTONE that allows me to select colors from the Pantone swatch books, from photos, or from live scenes, and then use those colors to build color palettes that can be exported (easiest method is e-mail) to a desktop computer, and then opened and used in the Adobe applications. The app also makes QuarkXPress-compatible color files, but I have never tested those.

iPhone with i1 Display Pro 04
This is my X-Rite i1 Display colorimeter sitting atop my iPhone 6, reading colors that are being flashed there by the new Pantone ColorTRUE application. At the end of the process, the iPhone is calibrated and profiled. It works!

(I tried exporting a palette today, and it will not open in the Creative Suite… I wonder what has happened.)

Nov. 21 follow-up note: I reported the problem to Pantone, and in a few days they responded to tell me that they have now seen the problem, and are devising a fix. It is rare that tech support ever responds these days, but the Pantone folks have been very responsive and very courteous. I will report when the problem is solved.

Despite that big bug, I like MyPANTONE, and will continue to use it, hoping that the company fixes whatever is wrong – soon.

The issue of color comes up when I first launched MyPANTONE. There is a disclaimer on the splash screen that warns me that colors displayed on the iPhone or iPad may not be accurate, etc., etc.

And there you have the crux of the problem. The iPhone screen may not be accurate; in fact it’s pretty obvious that it isn’t accurate. My new phone has a visible pink tint to the screen, one which I ignore – mostly.

Last week I became aware of a new application from PANTONE, one called ColorTRUE. It allows me to calibrate my iPhone screen using one of several colorimeters and one spectrophotometer. By an amazing coincidence I own one of those instruments. I downloaded it in a heartbeat!

ColorTRUE requires that you install a small accessory application on your Macintosh, and connect an instrument to the same machine. I use the i1 Display instrument, which I use often to profile and calibrate my computer displays. Then, using the instrument on the face of the iPhone (or iPad), I run a calibration of the iPhone, which takes about four minutes. The interface on the iPad is slightly more elegant than the interface on the iPhone (a function of available screen real estate). Various colors are flashed on the screen of the iPhone, and the i1 Display reads them and sends them to the Mac, which then sends the data to the iPhone where a color profile is built.

The net of this is that I can now calibrate and profile my iPhone and iPad. It works, and it works well.

ColorTRUE screens 02
This is the X-Rite app ColorTRUE indicating that it is talking to my X-Rite i1 Display colorimeter. Once communication is established, the ColorTRUE app puts colors on the iPhone’s screen in succession to build a list of colors. With that data, the software creates an iPhone color profile that corrects the color on the phone.

But, I only get the benefit of the calibration when I am using applications that are ColorTRUE smart. The list is very short:



running the iPhone Photo Gallery modified by ColorTRUE

End of list.

Lauren Klammer screen 01
This is a photo I took recently being displayed by the Photo Gallery with ColorTRUE adjusting the color of the iPhone screen. On the left is the calibrated view, which is slightly warmer than the uncorrected version on the right.

It is conceivable that there will be more apps that can take advantage of the color profile, and that would be great. In the meantime, I am pleased with what I see.

I can open images in my photo galleries, and view them in ColorTRUE, applying one of several RGB color profiles to those images. I prefer Adobe RGB (1998). In my estimation that profile warms-up my images to the degree that I like, and they appear more saturated than they do in the iPhone’s native sRGB color space. I can also simulate one of several CMYK profiles to see what effect converting to CMYK might have on an image. The one closest to my usual choice is FOGRA 27, and I find that simulating the FOGRA space is very similar to the same image on my desktop Mac simulating the same thing.

ColorTRUE screens 07

This is the settings menu where a CMYK profile can be selected. I have chosen the FOGRA27 profile here, it being the closest to my CMYK favorite – GRACoL – which is not on the list of available CMYK profiles in the ColorTRUE app.

Other settings allow me to control the native white point of the phone: 6500K is the most logical, as it is the same as other LCD displays, and is compliant with the ISO 3664 international standard. There is also a brightness setting with various choices, my favorite is the Office environment where the brightness is very reasonable in my indoor work area.

In a world of color, and for a person who teaches color management, these apps, and the supporting instrumentation, make it possible for me to use my iPhone in the field and see accurate color, and very reasonable interpretations of how photos would be converted to the colors of a sheet-fed printing press.

Posted in Color Management, Digital video, Gadgets, Photography, Printing and Printing Processes, Software, Technology | Tagged , , , , , , , , | Leave a comment