..................

Modified 11/03/04

This schematic and source code are intended for demonstration purposes only. They are offered "as-is". Use at your own risk.

Code and circuits (and more) are here.

Introduction

This circuit is a lamp control system for use in a photographic darkroom. Two relays control the safelamp and enlarger lamp. Exposure measurement and timing functions are included.

Features

  • Lamp functions are interlocked.
  • Enlarger exposure meter
  • Exposure timer and general timer with audible alarm
  • Context sensitive switches (some autorepeat)
  • Time settings are stored in EEPROM memory

Specifications

  • Power: 110VAC
  • Exposure meter range: 0-200%, paper speed factored in
  • Exposure timer range: 0-99 seconds, countdown
  • General timer range: 00:00 to 59:50 (min:sec), countup, with alarm

Operation

There are four screens that may be displayed.

  1. MAIN - toggles the safelight and selects the other three screens.
  2. EXPOSURE METER - displays photocell information
  3. EXPOSURE TIMER - sets and runs the enlarger exposure timer
  4. GENERAL TIMER - sets and runs the general timer



MAIN screen

Select...       
SAF FOC EXP TIMR

This is the main screen. Control always returns to this screen. Pressing SAF toggles the safelight on and off. Pressing FOC turns the enlarger lamp on for focusing and displays the EXPOSURE METER screen. Pressing EXP displays the EXPOSURE TIMER screen. Pressing TIMR displays the GENERAL TIMER screen.


Click on photo to display full size image.

The four push button switches are located directly below the display, aligned with the menu prompts.




EXPOSURE METER screen

Expo meter 100% 
RET

This screen turns the enlarger on and displays the output of the photocell that is placed under the image displayed on the enlarger easel. It allows the user to set the enlarger lens aperature for consistent gray density. Results are displayed as 0% to 200% with 100% being the target exposure. Photocell gain is adjustable. When the ADC reads 2.5V (50% of the maximum 5V input) the display shows 100%. Since the energy radiating from the red or yellow safelight significantly affects the photocell reading, the safelight is automatically shut off two seconds after coming into this screen, and is turned back on when leaving this screen. Pressing RET returns to the main screen.


Regardless of whether you chose to meter highlight areas, gray areas, or dark areas, this exposure meter is is simply a method to achieve the same illumination intensity from print to print, negative to negative. The intensity is controlled by the enlarger lens aperature. A series of test strips will determine the actual exposure time and development time required; thereafter you use this metering facility to set only the aperature and maintain that same exposure/development time.




EXPOSURE TIMER screen

Exposure 10 sec 
RET DEC BEG INC

This screen allows the user to set the enlarger exposure time from 1 to 99 seconds. Pressing DEC decrements the set time. Pressing INC increments the set time. Pressing BEG begins the exposure by turning on the enlarger lamp for the set time. Pressing RET returns to the MAIN screen.



Exposing 09 sec 
RET

This screen is displayed during the exposure time period. The time is decremented every second. When the exposure time is done or if the RET button is pressed and held, the enlarger lamp is turned off and the MAIN screen is again displayed.




GENERAL TIMER screen

Timer     14:10 
RET DEC INC BEG

This screen allows the user to set and start the general timer. One use is for timing film developing. The timer will count up from 00:00 up to 59:59 (min:sec). An alarm time may be set. Pressing DEC decrements the alarm time by ten seconds. Pressing INC increments the alarm time by ten seconds. Pressing BEG begins/starts the timer. Pressing RET returns to the main screen.



Timing    01:36 
SIL RET

This screen is displayed while the general timer is running. If the alarm time was set to 00:00, the alarm is disabled. If set to anything else, the alarm will beep every second once that time period has elapsed, and the timer will continue to run. Pressing and holding the SIL button will silence the alarm. If the timer reaches 59:59 or if the RET button is pressed and held, the timer is stopped and the MAIN screen is again displayed.



SETUP SCREEN

Paper Speed  500
NXT DEC INC

This screen allows the user to set the paper speed that will be factored into the exposure measurement. This ranges from 50 to 950, and increments by 50. Pressing DEC decrements the speed by 50. Pressing INC increments the speed by 50. Pressing RET returns to the main screen.




Technical Reference

HARDWARE

  • The four buttons are located along the bottom of the LCD screen. Button A is on the left; D is on the right.
  • The 7808 regulator supplies 8V to the opamp so that it's high level can reach as high as 5V for the ADC. Since it can actually exceed the PICs 5V power supply voltage and risk driving current into the Vdd rail through the reverse ESD diodes in the chip on the ADC pin, the 5.1K series resistor on the ADC input limits current to approximately 300µA when the LM324 opamp hits it's maximum +6.5V output level (8V minus 1.5V, according to the spec.)
  • The photocell is a silicon photocell that generates voltage, not a photo-resistive cell such as a cadmium-sulfide cell.
  • The opamp gain control, as depicted, is quite sensitive and it's unknown/untested regarding temperature sensitivity, especially temperature sensitivity of the silicon photocell. There are additional components that should probably be added to remove any slight DC offset that could occur for high gain when the input to the opamp is zero volts. (I use a shorting miniture phone jack to force the input to zero when the photocell is unplugged.)
  • The pushbutton switches don't need pullup resistors because they are built in and enabled in the PIC.
  • The safelight and enlarger relays are 5V relays with 110V contacts.
  • Any LCD display that has an industry-standard HD44780 compatible controller may be used. "Supertwist" displays have wider viewing angles than others. While backlighting is sort of a "must" in a darkroom setting, one must also ensure that it's light will not expose film or paper.

SOFTWARE

  • There is nothing elegant about the code. It is brute-force coding, meaning no pointers to pointers to pointers, etc. It's big-loop architecture. The one-second timing comes from tuning the code loops. The 4KHz piezo alert timing is also done by tuned coding.


CORRECTIONS / UPDATES

  • v1.0 - first release
  • v1.1 - zeroed iAdcAvg after displaying value because it was adding into next averaging cycle