@tundra tundra authored on 28 May 2018
README.md initial set of basic docs complete 6 years ago
TODO initial set of basic docs complete 6 years ago
devtimer.py collapse profile switch handling into a single thread, further reorg of supporting functions 6 years ago
time-temp.xlsx added time/temp spreadsheet to repo, trimmed todos 6 years ago
tm1637.py add support for negative temps 6 years ago

Compensating Development Timer

Developing traditional film and silver paper is very temperature dependent. The warmer the developer solution, the less time the film or paper needed to be developed and vice-versa. Historically, people read the temperature and then manually corrected their development time accordingly, using a correction table provided by the manufacturer.

It turns out that these corrections for temperature are quite similar across different manufacturers of film and paper, although the corrections are different for film versus paper.

Many years ago, a company called "Zone VI" realized this and created an analog timer that corrected for this effect. You placed a temperature probe into the developer and it corrected - via analog adjustments - what a "virtual second" actually had to be. The photographer just looked up the normal development time for 68F developer and the timer ran faster or slower based on the actual temperature. Better still, if the temperature of developer varied during development, it corrected for that in realtime. The Zone VI Compensating Timer had settings for film, paper, and realtime.

The timer was a work of genius engineering and a really nice addition to the serious photographer's wet dakroom. I've depended on one of these for years to make my darkroom work repeatable with minimal thinking or measuring. Mine is getting kind of old now and I began to wonder what I would do if it broke. The timer did come with a "Lifetime Warranty", Sadly Zone VI and its founder, Fred Picker, are both now long gone making warranty claims ... difficult.

While I could design an analog replacement or just figure out the circuit of the Zone VI, it occurred to me that it would be easier to just design a "work alike". Thanks to the explosion of interest in robotics and the Internet Of Things, there is an embarassment of riches of computers, sensors, switches, temperature probes, and so forth. Not only can we build something like this ourselves, doing so has several advantages over the old Zone VI timer:

  • It's digital, not analog, so we don't have mess with a bunch of precision parts and corrective feedback circuits.

  • It's software controlled so you can customize how this timer works to suit you. Don't like my compensation factors? Want to adapt this for a different application? Both are easily done with software changes.

  • It's cheap. You can build one of these for well under $50. (The original Zone VI timer was around $200 if memory serves, and that was when money was still worth something. :)

Required Skill Level

As of this writing, you'll need to be an accomplished Raspberry Pi hacker or have access to someone who is. The goal is to eventually package this up in a way that a relatively inexperienced person could build it, but I wanted to make the code and design available as early as possible for those who have have already expressed an interest in this project.

State Of The Project

The hardware design is really simple because it's based on a Raspberry Pi Zero platform. The whole timer uses a little over a dozen parts in total ... that's including a case and USB power supply.

Think of this as an "MVP" (Minimum Viable Product) implementation of the timer. It works as expected but needs to be turned into a real "product". The code is completely working but not "done". It's needs a fair bit of tidying up, factoring, reorganizing, etc. But it works

HOWEVER ... there are essentially NO docs right now. You have to figure out stuff from the code or reading this very limited document. This will hopefully change with time but - for now - you pretty much need to know how to read Python and do simple wiring.

Basic Hardware Connections

The code will tell where to connect things on a Raspberri Pi Zero.

Note that these reference GPIO pin numbers, not device pin numbers.

A few notes:

  • Where there are pullups or references to Vcc below, I've chosen to use the 3.3V pin on the Raspberry Pi Zero.

  • You'll need two TM1637-compatible 4-digit LED displays - one for time and one for temp. Their CLK and DIO assignments are noted in the code. Of course, you'll also have to connect them to Vcc and ground.

  • Connect a piezo buzzer between GPIO 26 and ground. No resistor needed.

  • Connect a momentary contact footswitch between GPIO 6 and ground. Pull up that pin with a 4.7K resistor.

  • Connect a SPDT switch for profile selection to GPIO pins 23 and 24, each pulled up with a 4.7K resistor. The switch common goes to ground.

  • Connect the data line of a DS18B20 temperature probe to GPIO 4, pulling it up with a 4.7K resistor. Again, you'll have to connect it to Vcc and ground as well.

  • Take note to read the code concerning the temperature probe. Each probe has a unique serial number and you have to configure a symlink in Linux to point to your specific device.

Basic Software Setup

There's not much to this:

  • Get your favorite Raspberry Pi Linux distro running.

  • Setup 1-wire support. In /boot/config.txt set dtoverlay=w1-gpio (At least, that's how you do it on Raspbian. Other distros may be different.)

  • Make sure python3 is installed - this project requires it.

  • Make sure to properly create the symlink to the temperature probe as described in the code.

  • pip3 install the wiringpi module. You can either do this systemwide or in a pew virtual environment. Either way, you need to be root because this code - at least for now - requires superuser to run.

  • Copy the devtimer.py and tm1637.py files onto your Pi Zero. You can then start the timer with ./devtimer.py.

  • By default, the code currently writes a lot of debug info to the Pi's tty so you can watch all manner of things fly by. If it bugs you, just change DEBUG to False at the top of the code.

Operating The Timer

  • You can add a reference to /etc/rc.local to automatically start the timer when the Pi boots. Right now, this takes about 30 seconds but a future effort will work to rip out the stuff not needed and make booting way faster (hopefully).

  • At program start, the temperature display will briefly show 999F. This is a "sentinel" to let you know the timer is looking for the temperature probe. The display should rapidly update to show actual temperature as reported by the probe. If it does not (i.e., 999F remains displayed), it means that something is wrong with the temperature measurement hardware.

  • Pressing the momentary contact footswith start/resets the timer.

  • The timer beeps twice at start and again at reset.

  • The timer provides a long single beep at each virtual 30 second mark.

  • The SPDT switch selects Film correction, Paper correction, or realtime (no correction). You can change this while the timer runs.

  • When the film profile is selected, the displays are dimmed on the assumption that film is panchromatic (it can "see" red) and far more sensitive to light than paper.

  • If you are in a film or paper correction profile, and the temperature is beyond the range of the timer to correct, the temperature display will blink.

What's Next?

Lots of cleanup, documentation, and stuff will hopefully follow. My longer term goal is to release a preconfigured minimal Linux image you can just blow down onto a microSD card and all this stuff will just "work".

Help & Support

There isn't any. You can send mail to devtimer@tundraware.com and I'll do what I can to help as I able, but this is very much a part-time activity.

What would be VERY welcome would be pull requests, bug reports, patches, etc.