Programmable ATtiny IR remote

My Nikon DSLR camera does not have any internal programmable mode for continuous shooting (intervalometer) or socket in which wired remote shutter could be plugged in. The only way you can make exposures longer than 30 second is using IR remote. If you want to take only a few pictures, this is not a problem. But when you want to make a time lapse few hours long or photograph a meteor shower for whole night, this is no longer convenient. Especially when you want exposures to have the same length and the same interval between them, this can be very challenging.

That is why I took one of those cheap IR remotes and upgraded it using small ATtiny85 microcontroller. Its task is to simulate button presses depending on the settings of the DIP switch. The element in use consists of five switches. The first one (1) is used for selecting the operation mode. When switched ON continuous mode is selected and long exposure mode when it is turned OFF. Other four switches (5-2) determine the length of exposure or interval. You can change the settings during exposition, but they are not taken into account until the next exposition.

Front panel with ATtiny, DIP switch, MOS N-FET and power plug

Long exposure options – DIP switch 1 is set to OFF:

  • DIP switch 2 ⇒ 10 min
  • DIP switch 3 ⇒ 5 min
  • DIP switch 4 ⇒ 2 min
  • DIP switch 5 ⇒ 1 min

Total maximum time for a long exposure, when all switches are turned ON, is 18 minutes.

Continuous shooting (intervalometer) mode options – DIP switch 1 is set to ON:

  • DIP switch 2 ⇒ 120 s
  • DIP switch 3 ⇒ 60 s
  • DIP switch 4 ⇒ 30 s
  • DIP switch 5 ⇒ 10 s

Total maximum interval between two exposures in continuous shooting mode, when all switches are turned ON, is 240 seconds.

Back panel with voltage regulator and original IR remote

Button presses are simulated using MOS N-FET 2N7000 transistor (see the bottom image for wiring diagram). When pin 1 goes to HIGH the transistor opens and concludes an electric circuit that provides power to IR remote circuit.

Wiring diagram

The similar thing can be build without the whole IR remote circuit using only IR LED diode and microcontroller as output wave generator.

Simple Home automation using Arduino

I decided to upgrade the previous circuit with additional capabilities and intelligence. Using IR remote controller, relay and clock module it can be transformed into simple home automation system. Whereas the previous Arduino chip was lacking required ram space and I/O pins there was a need to add another one to the circuit board and to establish the serial link with the previous one that is managing the LCD display.

First thing needed was to figure out what HEX values the remote in use is producing to communicate with the device. I am using a remote that was bundled with USB TV-tuner, which is mainly used in another room. My remote has a total of 29 buttons however I am only interested in the fraction of them, here are the HEX values in use obtained for my remote.

  • A05F807F – Power
  • A05F906F – Num 1
  • A05F50AF – Num 2
  • A05FD02F – Num 3
  • A05FB24D – Display
  • A05FE817 – REC
  • A05F18E7 – Stop
  • A05FB847 – Fwd
  • A05F38C7 – Back
  • A05F6897 – Play/Pause
Test setup for testing IR receiver with remote.

The next thing to figure out was how to control the 8-relay module. Every relay in this module has 3 screw-type pins to control the high voltage AC current named NO(normally closed), NC(normally open) and COM(common connection). The 220/110V AC input must be connected to COM. The switch inside the relay is moved by the electromagnet that is indirectly connected to one of the Arduino ports. When the relay is turned off the COM is connected to NC and when turned on connected to NO. I am using the relay with revered logic which means that the relay is turned on when port is set to LOW. For every relay there is an on board LED that shows if it is active. The module has additional safety factor as all the relays are optically insulated, this means that all Arduino really does is turn on an LED inside an optocoupler, and that turns the relay on. So far I am using the relay module for switching the lights in my room, further applications are on the way.

8 – Relay switch module with two of them active. Top utp connector cable leading to Arduino, bottom high voltage cables leading to light bulbs.

Another novelties on the board are DS1307 RT Clock and piezo buzzer. Clock and buzzer together, combined with way to turn on/off the light bulbs in the room can be used for a brutal alarm clock.

Updated circuit board, clock module in the top-left, IR receiver in the bottom-left, UTP connector cable to relay module in top-right, piezo buzzer in bottom-right corner and additional Arduino UNO chip in the middle.
Wiring diagram – click on the image for full resolution.

Further things to add:

  • Sunrise alarm using light dimmer
  • Motion detection

Useful links:

Arduino telescope focuser

My goal was to use Arduino board to drive a stepper motor (from an old printer) that would be controlled via PC or hand held remote. Bipolar stepper motors can not be controlled directly with Arduino board so I had to use additional driver circuit (Allegro A4983). Ardunio feeds driver with three signals: step, enable and direction which determine the angular speed and direction of rotation. Remote has six buttons but so far only four are used for increasing/decreasing speed and movement control. Computer communicates with board over RS232 port with ASCOM drivers made by ejholmes. ASCOM standard is used in many astronomy software like MaximDL, Sharpcap,.. so you do not need additional software to control focuser.
Focuser works better than expected and is mainly used during imaging planets and DSO objects. Focusing by hand at that time is less accurate and almost impossible. The whole project costed me few € because I already had everything at home except a shaft coupler.Link to a source code for the focuser. Fell free to use, improve and comment, your feedback is desired.

Here is a picture of my telescope focuser with one of the focuser knobs removed and motor focuser attached instead of it. The motor’s and focuser’s shaft are joint directly by a shaft coupler.

Motor and circuit attached to focuser and telescope, ready for test under clear sky.
6-button remote, connected to Arduino by two 4-wire stretchable telephone RJ11 coiled cables.
Focuser wiring diagram

Helpful links at building this device:

More pictures in gallery
Ejholmes github site for ASCOM driver