Introduction: Raspberry Pi Zero W Timelapse HAT

I was looking for a HAT for a timelapse slider, but I couldn't find one that satisfied my requirements, so I designed one on my own. It's not an instructable you can do with parts at home (unless you're really well equipped). Nevertheless, I wanted to share my design, perhaps someone has similar problems to mine.

You will need to have access to a pcb milling machine. I made mine using my univesity's machine, you could probably find one at a FabLa or similar.

Go easy on my PCB-design, I'm studying mechanical engineering, not electrical ;)

Step 1: Overview

My timelapse HAT for the Raspberry Pi Zero is designed to drive two stepper motors and a DSLR camera. There is also the possibility to add two endstops, if you're planning to design a timelapse slider. The power to the motors can be cut by a simple switch. The PCB ist designed for stepper voltages up to 24 V. I tested it with two Nema 17 steppers, each one rated at 1.2 A per phase.

The camera control is made with two transistors. I know thats not the best way because it can be dangerous for the camera, but I didn't know at the time of the desinging process. I'm currently using the HAT with my Canon EOS 550D and never experienced any problems.

Step 2: Parts List

The main component you'll need is the PCB. You find the files attached. Be sure that the drilled holes are connected to both the top and bottom layer.

Other components:

  • 2 stepper drivers with a pinout similar to the DRV8825 or the A4988
  • 1 2x20 female socket, used to connect the HAT to your Pi. If you have a female socket soldered to your Pi, you might want to use a male header.
  • 4 1x8 female sockets, used to connect the stepper drivers
  • 2 4-pin screw terminals, used to connect the motors
  • 3 2-pin screw terminals, used to connect the power and the endstops

  • 1 3-pin screw terminal, used to connect the camer

  • 1 3-pin switch
  • 2 1000 Ohm resistors
  • 1 63V 220 uF capacitor
  • 2 2N2222 transistors

All headers, sockets, switches and screw terminals shold have a pin spacing of 2.54 mm to match the PCB.

Step 3: Soldering

You don't need to solder the parts in a specific order, but due to the limited space I recommend you to stick to my experiences.

    1. The 2 transistors
      They are the most complicated parts to solder. Remember that you want to connect your DSLR to them, so better check the pinout twice. Base should be connected to the resistors, Emitter to ground and collector to the screw terminal.
    2. The 2 resistors
    3. The 4 1x8 sockets
      Be sure to solder them straight, otherwise the drivers won't fit
    4. The capacitor
      Difficult to solder, once the big socket is done. Make sure "-" is soldered to GND
    5. The 2x20 socket
      Not all the pins have to be soldered, check the attached plans for the pinout
    6. All the screw terminals
      Check the attachet plans/pictures for the position of the terminals
    7. The switch
      Don't forget the switch!

      Easy to solder, but tucked between the sockets, if you solder them first

      Step 4: Connections

      Connect your motors, power, endstops and the camera as seen on the picture above. For the camera you'll need an 2.5 mm jack cable.

      The pins from your Pi are used as followed:

      • Motor 1:
        • DIR: GPIO 2
        • STP: GPIO 3
        • M0: GPIO 27
        • M1: GPIO 17
        • M2: GPIO 4
        • EN: GPIO 22
      • Motor 2:
        • DIR: GPIO 10
        • STP: GPIO 9
        • M0: GPIO 6
        • M1: GPIO 5
        • M2: GPIO 11
        • EN: GPIO 13
      • Camera
        • Shutter: GPIO 19
        • Focus: GPIO 26

      Step 5: Applications

      As previously said, I designed this for a timelapse slider. I wanted to drive a dolly, pan at the same time and release the shutter of the camera.

      However, you could also use it for a pan-tilt system or other applications.

      Feel free to comment any improvements on my instructable or the design.