Features

Introduction

TODO write me

Architecture

HW

SW

The software is written in C and compiled with avr-gcc.

The software is divided into 6 logical modules:

STATE:

State machine. The state machine is implemented by using function pointers.

Each menu state has three basic operations:

State machine diagram:

TIMER:

Initializes Timer1 and provides an interrupt based delay function.

BATTERY:

Initializes ADC to read the battery voltage.

BACKLIGHT:

Functions are used to control the backlight (initialize and update).

GPIO:

Initializes IO ports for:

LCD:

Most of the LCD related stuff is separated from the main source. This source code is independent from the main project. It represents the pcd8544 LCD driver, it is reusable code for other projects. The driver provides the API to initialize, control, and print text on the LCD.

The following project related functions are in the dintervalometer.c file:

Camera operation

Most DSLR and SLR cameras can be triggered remotely using a release cable. The standard solution consists of three wires: ground, focus and shutter. To focus the camera the focus wire has to be connected to the ground. To release the camera both wires have to be connected to the ground. Dintervalometer is tested with Canon EOS 700D. It has a jack plug for remote shutter. It's a DIY friendly stereo (3 pole) 2.5 mm jack plug.

Backlight Design

This backlight allows using the dintervalometer in the dark without an additional lamp. The backlight operates like a backlight of a cell phone: it is active for 10 seconds when the user presses a button or the dintervalometer finishes some job.

To increase the efficiency of backlight the LEDs are rotated 90 degrees. The top of the LEDs is on the side of the piece of transparent plastic. It was tricky to solder the LEDs on that way, but it is working well now :)

The following materials are needed for the backlight:

The first layer of the backlight is a sheet of white paper. The main function of it is to reflect the light of the LEDs. Then it comes the piece of transparent plastic. The top of the plastic is sanded with a fine sandpaper to diffuse the light. Finally, the LCD comes on the top. The layers are glued together with a double-sided tape.

Battery monitor design

LiPo/Li-ion batteries need special care in the way they are charged, discharged and stored. The battery must be monitored to prevent the over-discharge. In this solution the battery voltage is measured every 60 seconds. The user can always see the current status of the battery on the LCD. When the battery reaches the critical voltage the “Low battery” notification will be shown, then the device will turn off.

The typical LiPo or Li-ion battery voltages are 3V3 - 4V2. To measure the values with ADC a voltage divider is needed because Atmega328p has an internal 1V1 voltage reference.
The following equation is used to measure the battery voltage in mV:

In this case the known values are R2=10k, R3=3k3, Vref=1100mV, ADCres=1024.

Schematic and PCB

On the picture below You can see the schematic of dintervalometer.

Schematic and PCB are designed in Cadsoft EAGLE 7.2.0