Camera Pan Tilt Head Fully Programable With WIFI PTZ Capability
by DigitalBird in Circuits > Cameras
11277 Views, 214 Favorites, 0 Comments
Camera Pan Tilt Head Fully Programable With WIFI PTZ Capability
This is the Digital Bird three axis balanced pan tilt head part of the Digital bird motion control system. The head can be used on its own or as part of the wider Digital Bird Motion control system. In order to use this head you will also need to build one of the two WIFI controllers required to program all parts of the system. The system which can include Slider; Video turntable and motorized mini Jib is the most feature rich DIY 3D printable motion control system you will find anywhere on the internet. All parts are ESP32 based and require no interconnecting cables. If you own a Bambu Labs printer then you can save yourself a lot of time by downloading the print profile for all the parts here: DB3 for Bambu on the Maker World site. Parts kits can be found here: Digital Bird Shopify Store
Operating modes:
- A-B straight run
- A-B with acceleration controls (ramp/Ease)
- A-B-A Bounce mode
- Time-lapse mode with built in intervalometer and camera shutter control.
- Six key sequencer for more complex moves.
- Stop motion functions for animators.
- PTZplus real-time camera functions for up to 4 camera systems with 9 presets / system.
Features:
- 360 deg of continues rotation in the pan axis and 130 deg in the Tilt axis
- Capable of lifting a balanced Tilt payload up to 3.5KG
- Automated mount/dismount via two buttons on the control panel
- Sony NP style batteries with 7.5v external power port
- 3rd axis support for Focus motor through RJ45 port
- Full feature interface though Digital Bird compact WIFI remote or PTZ remote
- OLED battery monitor and PTZ slave ID
- Battery lock for Inverted mounting safety
- Camera shutter control
Credits:
This project makes particular use of two main opensource arduino libraries for which I am very grateful.
- gin66/FastAccelStepper A great resource for controlling multiple stepper motors with acceleration control on all steppers
- Seithan/EasyNextion Library An easy to use method of setting up and actioning commands from the Nextion displays.
Supplies
Non Plastic Bill of materials
Plug and play Kits for most of the parts listed bellow can be found here: https://digital-bird-motion-control.myshopify.com
3D Print files can be found here: Printables or Thingiverse
Software is open source and can be found here: https://github.com/digitalbird01/DigitalBird-Camera-Slider
Bolts
- M5 cap head 45mm long -Pan shaft x1
- M4 Ball head Bolts 25mm x1-Tilt tensioner hub bolt
- M4 cap head Bolts 40mm x2 - battery bay
- M4 cap head Bolts 50mm x1 - Top cover
- M1.7 Self tapping screws 10mm long - PCB mount x2
- M1.7 Self tapping screws 6mm long - PCB mount x4
- M5 low profile bolt 30mm x 5 - control bay
- M5 low profile bolt 15mm x 1 - Pan tensioner
- M5 low profile bolt 20mm x 1 -Base
- M5 low profile bolt 50mm x 2 -Tightening Key & Tilt axle
- M5 Nuts x2
- 7x4x1 washer x2
- 10x5x1 washer x2
- 1/4 -3/8th Camera screw adapter x1
- 5/8 -3/8th Camera screw adapter x1 (Also commonly used as a microphone adapter)
- 1/4-inch x 3/4-inch Countersunk Flat Head Hex Socket Cap Screw
- M5 Lever bolt 20mm long x1 -for focus motor tube clamp
Belts & Pulleys
- GT2 6mm wide Closed loop timing belt 360mm for Tilt
- GT2 6mm wide Closed loop timing belt 200mm for Pan
- GT2 Pulley 20 Teeth 5mm bore 6mm Width for Nema 17 Stepper
- GT2 Pulley 16 Teeth 6mm bore 6mm Width for Nema 11 Stepper
Bearings:
- 5mm bore 6mm belt pully for tilt tensioner
- 61806 2RS ZEN Sealed Deep Groove Ball Bearing 30x42x7mm x 2
- 625 2RS ZEN Sealed Deep Groove Ball Bearing 5x16x5mm x1
- 6811 2RS bearing 55x72x9mm x1
Spring:
- A small approx. 8mm diameter 5mm long compression spring for battery locking button x1 (You can probably just just cut down a Pen spring for this)
Electronics:
- Digital Bird Mainboard with ESP32 and TMS2208 drivers
- Shutter cable 2.5mm Stereo Jack socket & Cable
- Thumb Joystick with cable x 1
- Power Cable 210mm with DigitalBird NP Battery Terminals
- Switch Cable 150mm with two twitches
- Power switch harness 150mm long x1
- Aux power harness with 150mm cable
- OLED Display 0.49 Inch 64x32 res & Cable 180mm long
- Magnets 8x3mm x 3
- Stepper motors:
- Nema 11 Stepper Motor Bipolar L=51mm w/ Gear Ratio 19:1 Planetary Gearbox Part Number: 11HS20-0674S-PG19
- Nema 17 Bipolar 45Ncm (63.74oz.in) 1.5A 42x42x39mm 4 Wires Part No. 17HS15-1504S-X
Camera Connection:
- Arca Swiss clamps:
- Andoer Quick Release Plate Clamp for Arca Swiss Tripod Ball Head Quick Release Plate
- Neewer 38 mm Screw Knob Aluminium Quick Release Clamp
- Arca swiss camera L Bracket 110mm or longer
Watch the Build Video Here
This video will take you through the full build sequence with commentary.
Inserting the Main Pan Bearing
Part Numbering
First off all take a look at how the plastics parts are numbered 001_60.stl for example. 001 is the part number the _60 tells you that this part should be printed with at least 60% fill.
- Take the base part 001_60. Clean-up any elephants foot you can see on the first layers of the part due to first layer spread. This will make it easier to fit the bearing.
- Press home the large 6811 2RS bearing 55x72x9mm as shown.
Assemble the Two GT2 Timing Pullies
Assemble the two GT2 pulleys by gluing together parts 008_100, 009_100 and 011_100 with 012_100 respectively to give you two pulleys. The larger of the two is for the pan axis the smaller is for the tilt.
Temporarily run any M5 bolt through the centre holes to ensure the parts come together with perfect alignment until glue sets.
Assemble the Pan Wheel
- Assemble the round Pan head part No. 004_100 by first running the 45mm long M5 Cap head bolt through the centre to to provide its shaft. Ensure that you have removed all of the support material from this hole since the head of the bolt should be lower than the base of the screw adapter to be melted in over it. Then using the heat method heat the 5/8 x 3/8 camera screw adapter using a torch and very carefully melt it into the centre of the wheel ensuring it finishes flush with the face of the part. Have a cold sponge ready to cool the part off and prevent it from over melting the plastic.
- Push the Pan head into the bearing and run the larger of the two cogs onto the shaft until it connects with the key ways in the top of the pan wheel
- Take your 200mm Closed loop GT2 timing belt and place it over the pan pully.
Install the Nema17 Pan Motor Mount
- Take part No.002_30 and press in your 5x16x5mm bearing into the hole in the top. With the pan shaft running through this bearing press fit the part to base part 001_60 ensuring that it clicks into the slots provided in the base.
- Next take your 40mm long Nema17 stepper and fix on a 20T aluminium pully to the shaft in the orientation shown. With this in place simple drop the Nema 17 into place and using a small screwdriver lever the timing belt over the pully through the small opening on the side of the parts. Ensure that the stepper cables are coming out on the tilt side of the assembly.
- There are two holes in the bottom of the base. Take a 20mm M5 black low profile bolt and place it in the hole closest to the pan wheel and screw it down to lock parts 001_60 & 002_30 together.
- Take an M5 Nylock nut and place on the end of the Pan shaft above the bearing
Install the Auxsilury Power Port
- Find your Auxiliary power supply socket and push the cable through the hole on the side of base part 001_60 as shown. Add a little glue around the hole and press the socket into place.
- Find part 003_25 and place it loose over the stepper ready for the next stage.
Tilt Support Bearings Power Switch and Camera Shutter Control
- Take part 16_30 The main tilt support and press home the two 30x42x7mm bearings one on each side of the part ready for the tilt wheel.
- Take the small power rocker switch run the cable through the square hole and press the switch all the way home
- Take your 2.5mm female shutter release jack. Place the cable through the small round hole and after adding a little glue around the hole press the jack all the way home.
Install the Mount/Dismount Switches
- Take your Mount/Dismount switches and press them into the holes in the sides of the part as shown. ensure the the cables lead away from the top switch.
- Find the plane strap from the small parts part No.15_100 and run it up in the slots provided behind the two switches to hold them in place.
Install the Tilt Stepper
- Cut the cables on the 19:1 Geared Nema11 Stepper to 230mm long and crimp on a 4 pin JST connector as shown.
- Before installing the the motor fit the 16T GT2 pully with 6mm bore to the motor shaft.
- push the motor home as far as it will go into the large round hole in the Tilt assembly.
- Run The tilt stepper cable under the pan motor top support down and out of the back of the main tilt support ready to connect with the main board.
Bolt the Tilt Support to the Base Assembly
- Connect this whole assembly with the base and drive in a 30mm long M5 low profile bolt from the bottom of the part as shown
- On the inside of the main tilt support block you will see another hole for a second 30mm low profile bolt which runs through and into the top orange pan motor support.
Secure the Pan Motor Mount
- Using two 30mm long M5 low profile bolts secure the top Pan motor support.
- Take a 15mm long M5 low profile bolt and place it into the outside hole in the Topmost part to at as a belt tensioner by pushing the Pan stepper back. Check the tension on the pan stepper belt through the small window on the side of the part.
- Run your Nema17 stepper motor cable from the back of the stepper out through the back of the main Tilt support block ready to connect with the main board.
Assemble the Tilt Wheel
- Take Tilt wheel part 006_100 and screw in a 50mm M5 low profile bolt to act as a centre shaft.
- Using the heat method press in a 1/4 to 3/8 camera screw adapter using either a small kitchen torch or in this case a soldering iron will also work. Have a wet sponge ready to cool the part down when in position.
- Insert the Tilt wheel into the tilt support bearings.
Install the Tilt Drive Belt and Pully
- Take the second smaller 3D printed pully and place the 360mm closed loop Timing belt around it.
- pass the other end of the belt loop over the metal Tilt stepper pully and insert the orange plastic pully onto the end of the Tilt shaft. Press it all the way home ensuring that the pully keyways lock into the keyway on the back of the tilt wheel.
- Take your second M5 Nylock nut and lock the pully to the end of the shaft
Tilt Belt Tensioner
- Take the small plastic block with a hole in the centre from the parts labelled 015_100.
Take the silver M4 bull head bolt 26mm long and assemble your tilt Belt tensioner usingthreesmall 10x4x4 bearings together with the two small M4 washers and the one large M4 washer. Belt tensioner is now provided ready to go and uses an aluminium pully in place of the bearings.- Place the small plastic block into the slot close to the top pully and insert your tensioner assembly into the hole in the block. Before you finally tighten the assembly push the block with the bearings over to tension the tilt belt and finally tighten up the screw.
Battery Bay Assembly
- Install the Digital Bird Battery prong board into the back of the battery bay part 017_30. I ensure it is held in place with some hot glue once I am sure the prongs are connecting correctly with the battery. Hot glue is the best choice because it is easily removed with no damage to the parts if you need to repair anything at a later date.
- Attach the orange gasket part 010_100 using two very small 6mm long 1.7m screws at the base only just to prevent it from slipping out of place.
Installing the Battery Lock Button
- The battery locking button Part 015_100 should know be inserted from the back of the battery bay with the button push showing through on the battery side.
- Take the small 8x5mm spring and place into the hole in the back of the button.
- Next take the small square cover plate from part 015_100 and super glue this into place over the spring.
- Once assembled check that the button locks the battery in place and releases it when pressed. If the battery is hard to release you can file down the button catch on the battery side a little until it function smoothly.
Installing the OLED Display
The OLED display simply drops into the small rectangular window at the top of the battery bay and is fixed n place using the strap from part 015_100 and two very small 6mm M1.7 self tappers.
Battery Support Tabs
Where the battery slides into the battery bay you should see four small slots in the side walls. Take four of the small tabs from part 015_100 and simply press one into each of the slots. Do not glue these. If they get brocken off in the future just print off another tab and press in the replacement.
Top Plate & Joystick
- Find the top over part 007_30 and install the small PCB mounted joystick using 4 small self tapper screws as shown. Pay particular attention to the joystick orientation to the part see picture.
- Run the joystick cable through the free hole in the tilt support and out through to the back of the device ready to be plugged into the main board.
- Find the side walls part 13_30 and glue in two of the small 8x3mm neodymium magnets. These are designed to provide a place to dock the smaller compact controller. To this end these magnets must attract the magnets on the back of your controller.
- Fit the side walls to the base and let the top plate com down to close the unit using one 50mm long M4 bolt at the joystick end. The other end should latch under the lip of the tilt support
Software Installation
If you have purchased the digital bird kit then the main board will come pre installed with the most up to date software.
If however you are building everything up for yourself on the back of a generic Digital Bird main board you will need to download and install the software yourself. In any case it is likely you will want to keep your system up to date with the latest software releases. If you are building the system from scratch make sure you read to step26 for additional wiring and setup information.
The software for all parts of the system can be downloaded free from the Digital Bird GitHub repository here: https://github.com/digitalbird01/DigitalBird-Camera-Slider
- If you haven't done so already your first step is to download the contents of the Digital Bird code repository from GitHub this is the link.https://github.com/digitalbird01/DigitalBird-Camera-Slider.git
- Click on the green “CODE” button top right and select <Download Zip>
- Unpack the ZIP file to somewhere you will remember on your system but do not unzip the zip files contained in that top level folder. This folder contains all the Digital Bird specific software you need to install the system but be aware the project is still under development and you should check back for future updates and bug fixes.
- Read the installation guide provided in the folder and titled 'DigitalBird-Software_Installation_Guide.pdf'
Or click on this link to read it know: Digital bird Installation guide
Installing the Main Board
- Install the Digital Bird main board into the rear of the assembly and secure with two 12mm long M1.7 self tapping screws on the left hand side only. Note the RJ45 port should fit out through the window on the bottom left.
- Plug in all your devices switches etc following the colour coding on the board and the cable ends. But note there are two White 4 pin connectors for the steppers and two Blue 4 pin connectors for the joystick and OLED display! What can I say its hard getting different coloured connectors all with four pins.
- The top white 4 pin is for the tilt stepper the lower white 4 pin is for the pan stepper
- The top blue four pin is for the joystick and the lower blue 4 pin beside the RJ45 port is for the OLED display.
- For the other cables just follow the colour code and pin count.
Attaching the Battery Bay & Testing
- Take the cables for the battery port and the OLED display and plug them in before screwing down the battery bay to the back of the device using two 30mm long M4 screws.
- Insert a battery into the back of the device and test to make sure everything is working correctly . Test the joystick operates the pan and tilt as expected and that the dismount/mount buttons are functioning. You should also see the small OLED light up with the battery capacity and PTZ ID.
- If you find a problem there is a trouble shooting guide at the end of the Digital Bird software installation guide which you can find in the GitHub repository here: Digital bird Installation guide Otherwise send me an email with your problem and I will try to assist. My email is digitalbirdfilm@gmail.com
Add the Tightening Tool
While the mount/ dismount buttons will wind the head down onto your mounting point the motor is not strong enough to properly tighten the device into place. To this end I have provided a screw as a tool for this purpose. Simple place the screw into one of the holes in the side of the pan wheel ant tighten the head down. Follow the same procedure in revers to loosen the head. The screw is stored in the base of the device
- Take your last 50mm M5 low profile bolt and simply slide it into the hole on the side of the base as shown.
- Turning the unit upside down you should see a small rectangular hole where the screw comes to a stop. Take your last 8x3mm neodymium magnet and press it down into the hole to act as a keeper for this screw
Camera Supports
- Bolt on your choice of swiss clamp using the quarter screw. there are many styles available but the one in the picture is a good choice in this application.
- Assemble your camera swiss L bracket and at the camera end bolt on your second smaller swiss clamp ready to receive the camera. Slide the whole assembly into place on the head. Do your best to balance your camera on the L bracket in both axis by sliding the camera back and forward and the L bracket up and down on the tilt clamp.
That's all for the balanced Pan Tilt head. There are a number of other Digital Bird devices you can build into the system including a duel action slider, Pan head/Video Turntable, Focus or Zoom Motor and coming soon the Digital Bird mini Jib. All of these devices are designed to work together wirelessly and there are build videos on the Digital Bird YouTube channel. If you have any questions feel free to use the comments section here or contact me directly here: digitalbirdfilm@gmail.com
Happy building
WIFI Controller Options
As I have said you will also need a controller to program your moves. I have designed two WIFI controllers for the system. The compact controller which allows for programmed moves only. The PTZplus WIFI controller adds a further set of functions allowing you to control the system with Realtime PTZ moves. The choice is yours. Only one controller is required to operate all the devices in the system.
Additional Notes for Scratch Builders
The Digital Bird Kits are good value for money taking a lot of work out of the project for you and removing much of the pain of scratching around the internet looking for the correct small parts. If however you are happy to work from scratch I do provide the Generic main board used on all the project parts and is the one component which is truly custom to the project. The following notes are for those of you working from just the generic mainboard.
Wiring the 4 pin 2,5mm Shutter Socket
Resistor patch
Version 1.0 main boards were supplied with a resistor patch on the back which allows us to use the OLED display as a battery monitor and PTZ ID status for the device. The resistors used are a 330 ohm and a 220 ohm. As of 13th Jan 2023 Version 2.0 boards do not require the patch and the OLED has its own port.
TMC2208 v3.0 stepper drivers
The digital bird system uses TMC2208 v3.0 Tepper drivers which are best purchased in sets of 4 or 5
Important note:
If you are building the board up to be used on one of the pan tilt heads these drivers should be soldered directly to the main board with no pin risers. This is because space in those devices is at a premium.
All the other devices using only one driver can be mounted on the single set of pin risers supplied with the boards.
The two capacitors provided loose with the generic main board should be installed one for each driver with the negative side facing in towards the ESP32 board. When Risers are being used on the single stepper configuration this capacitor can be bent over on its side below the driver.
Tuning the drivers Vref to the motor
Stepper drivers need to be tuned to the requirements of the motor thay are driving. Otherwise they may become very hot in operation and reduce the life of the driver and the motor This is achieved using a simple Voltage meter.
- Install the drivers on the board ensuring that the small adjustment screw on the top is alongside the capacitor position. Do not plug in your stepper motors. Use a 7.5v NP style battery to power the board. Do not power the board using the usb port on the ESP32.
- Power up the board and carefully place your black meter probe to the board's earth. (I use the earth on the Auxiliary power port) And the red probe on the small screw on top of the stepper driver. On the meter you can now read off the Vref voltage the driver is set up for by default typically around 1.2v.
- Using a small flat head screwdriver Turn turning the small screw clockwise in very small steps will reduce the Vref voltage down to the voltage we require to drive our steppers. For the Nema17 steppers this should be about 0.9v The Nema11 stepper should be set for 0.6v