Comments: Setting Up the Pi Zero Wireless Pan-Tilt Camera


Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Member #1464132 / about 5 years ago / 2

    Works great, but the servos jitter and shake at their final positions, as others have mentioned. I wonder if using the Sleep mode in the PCA9685 could quiet these shudders until a new position is requested. Has anyone explored this possibility? Otherwise, I suppose adding a relay to turn off the servo hat's power after panning might work, but seems a little extreme. So has anyone else found a solution to the "shakes" in the final pan/tilt position?

    • Member #1464132 / about 5 years ago / 1

      Another followup... I finally have this pan tilt working reliably by substituting better servos for the ones that came with the kit, which had the problems mentioned by others in the comments (jittering, overheating, inaccurate positioning, etc.). I used instead and now the pan and tilt work smoothly and properly. I would suggest that these be included in the kit from the start! Also, there is a bug in the script: the pan and tilt input ranges to 'scale' are reversed. If you substitute the better servos, you'll also need to reverse the output range in the call to 'scale'.

    • Member #1464132 / about 5 years ago * / 1

      A followup... I was able to add a couple of "userbuttons" to the web interface that puts the servo chip to sleep and wakes it up. This prevents the shaking and saves power when not panning. The trick was to add the logic in to toggle the sleep bit on the device based on 2 new commands that I added, "servosleep" and "servowake". These are sent from new userbutton macros that 'echo' the commands to the pipan_FIFO pipe when the userbuttons are pressed. Works great! Now I just need to figure out why the tilt keeps sticking...

  • Member #393051 / about 6 years ago / 2

    On startup, servo deflection is minimal and then when the pipe is opened by the pi, it seems like the servo's just buzz but actually they're maxed out and still pushing which gets them really hot and would probably cause them to burn out if left for more than a few seconds or what. Nothing changes when pressing the pan/tilt arrows on the website.

    I moved the addressing in to the third and fourth channels which someone recommended, but the same result ensues so no success.

    It seems like the pulses expected by the servo's are way different than the hat is configured for. I've used four different servo's with the same result so having a hard time believing they're broken. They are 'old' servo's though (2013ish) so perhaps something with the tech has changed radically since I last used them?

    I did try to make sense of and writing values to the PWM registers but it's all new to me so having a hard time trying to troubleshoot.

    All input is welcome!

    • Member #1401317 / about 6 years ago / 1

      I have this exact same issue. Anyone have any thoughts on how to fix it?

  • Member #577441 / about 4 years ago / 1

    When attempting to access the Remote Camera Web Interface Software by entering the command:


    I get the following message:

    WARNING: The following packages cannot be authenticated! dialog E: There are problems and -y was used without --force-yes

    Any ideas and thanks.

    • santaimpersonator / about 4 years ago / 1

      Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you.

      That being said, did you configure the file permissions with chmod u+x *.sh?

  • Member #1532871 / about 5 years ago / 1

    Seem to have the same issue as but apparently cannot use the same solution.

    Running the I get the error: Traceback (most recent call last): File "RPi_PanTilt_Camera_Kit/Firmware/", line 13, in <module> bus.write_byte_data(addr, 0, 0x40) OSError: [Errno 121] Remote I/O error

    Also with the original 0x20.

    Have I2C enables, webserver runs OK. Camera streams, Controls show. Working on Buster on a Pi 3B+

    No idea what address to try...

    Any help is appreciated.

    Kind regards, Manno

    • Member #1532871 / about 5 years ago / 1

      Ah, I think I got somewhere at least: sudo i2cdetect -y 1 gives me something on address 0x15 but using that address does not change anything in the results.

      Oh, wait. Is the in the hex stored in addr (how did I overlook that one...)? Changing that one to 0x15 and having the third parameter of write_byte_data back to 0x20 gives me an error on line 29: File "RPi_PanTilt_Camera_Kit/Firmware/", line 29, in <module> bus.write_word_data(addr, 0x08, pan_setting) TypeError: integer argument expected, got float

      Replacing the scale(...) call with something in the range 833...1667, the error is gone but the servo does not respond to running the script, nor to the interface in the webpage (XHR calls seem to run OK, HTTP 200 and all)

      • santaimpersonator / about 5 years ago / 1

        Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you.

        That being said:

        • This product is 5 years old and hasn't been tested on buster. I suggest rolling back to Stretch; I know it works with that OS distribution.
        • The OSError: [Errno 121] Remote I/O error error message usually indicates that in the script, the Raspberry Pi can't reach the PCA9685 chip.
        • Did you cut the power isolation jumper? That would cause the chip not to show up/respond on the i2cdetect search.
        • The address for the chip is set in hardware (see datasheet), if you change the address value (in the code)... the code will not work.

  • Frakter / about 6 years ago / 1

    August 27 2018 If your trying to get the camera to work and get camera not found, try reflashing the SD card and skip the update request when the Pi boots the first time. Verion 4.14.62-v7+ #1134 doesn't find the camera but 4.14.50-v7+ does. It's the June 2018 download. You can check the version using the command uname -a.

  • Member #393051 / about 6 years ago / 1

    just have to love the tech support here

  • Member #1350339 / about 6 years ago / 1

    But can I install something like Kaa platform and manage everything through it? At the moment I'm using it with wireless sensors and it's written that they are providing a full support for all the wireless devices including cameras. Why I want to make it over the platform because they are giving a nice API for the mobile devices and I don't what to write everything by myself...

  • dis there a youtube video explaining?

  • Member #757023 / about 6 years ago / 1

    There are two important problems that I had with this product:

    1. The pan servo has a annoying buzz when idle. I think this might be an issue of the code given that it has no problem when I tested with an Arduino.
    2. The mount does not appropriately hold the pan servo, when I “sandwiched” the pieces it has a gap of about 3mm, sufficiently for the thing to wobbly itself at each move.

    • SFUptownMaker / about 6 years ago / 2

      Interesting. We'll look into this. Neither of these was a problem when we initially released the product.

  • BradLevy / about 6 years ago / 1

    Suggestions for improving the assembly instructions for the pan/tilt mechanism:

    Install the single-arm horn into its upper bracket before assembly of the sandwich of the upper servo + brackets. (Once you have the sandwich assembled, you can't put the horn attachment screws in straight unless you have a tiny right-angle screwdriver. There is no reason not to attach the single horn to its bracket first, while you can put the screws in straight.)

    The instructions mention needing both horn-to-servo screws, but left out the instruction to put in the one of the two - the one through the base, into the lower servo.

    The instructions say to use longest machine screws from the baggy to attach the upper servo to the top platform. The shorter machine screws are the better choice. They are long enough, and don't create the potential hazard of rubbing against the servo wires that the longer screws do.

    • BradLevy / about 6 years ago / 1

      A little surprised that it has been three months now and the assembly instructions haven't been updated to include the corrections I suggested.

  • TommyN / about 6 years ago / 1

    Set up went OK but GitHub kept asking for password (I have one) and nothing made a difference except time. Tried again 2 hours later and all went smoothly. Great directions. Unfortunately, both servos wander. The vertical especially; it slowly creeps up 10 degrees per minute or so. Then when I click the browser down arrow a few times it goes down and then starts creeping up again. When I switch Left/Right for Up/Down, and now they both just randomly wander around. I've also tried 2 power supplies (4.8 and 5.3).

    Any suggestions would be greatly appreciated.

  • Member #388538 / about 6 years ago / 1

    I got everything set up flawlessly following the tutorial. Well done.

    I have had it running for about 2 months and just ran into an issue. My pi zerow went dark and wouldn't reboot. I was receiving this error message on boot screen:

    bcm2835-aus-uart 20215040.seial: could not get clk: -517

    I narrowed the problem down to one of the servos, everything runs fine if the servo is not connected. For now I only have tilt. Will replace servo and try again.

    Any ideas as to what the cause may be?

  • mark4 / about 6 years ago / 1

    I just got this set up after a few hiccups. My first challenge was that my first 2 USB cables didn't work properly. However, all of that trouble was pointless, because I already had WiFi and SSH set up on the Pi, so I could have just SSH'd in and bypassed all of the serial monitor setup.

    My second challenge was installing the RPi_Cam_Web_Interface. I received several "404 not found" errors communicating with the repositories, so I had to edit my repository sources in /etc/apt/sources.list.

    It should also be noted that it appears that only PHP 7 is an option for Raspbian Stretch, so be sure to select 7 when setting up the web interface.

  • Member #1192907 / about 6 years ago / 1

    Hi! Will the camera be able to be viewed over the internet? I have that set up on my Octoprint pi camera for 3d printing when I'm far away, and I would love to buy this kit as a home security cam with pant tilt function.

    • SFUptownMaker / about 6 years ago / 1

      This is entirely up to the user. If you know how to set up the system so that the IP address of the Pi is visible from the internet, the answer is "yes". We don't at this time have any plan to update the tutorial to add that functionality.

  • mark4 / about 6 years ago / 1

    I've also hit a snag. I'm having trouble finding the motor shield on USB on my Mac (Sierra 10.12.6). It's been years since I've used the Arduino IDE (1.8.5), and I tried following and installing the FTDI drivers as instructed in the related Sparkfun article, but no luck. I also have an old Arduino Leonardo, and the Arduino IDE isn't finding it on the serial Ports either, so my guess is that this is a Mac OS FTDI driver issue, but I'm stuck. Any help would be appreciated. Thanks.

    • M-Short / about 6 years ago / 1

      I'm a bit confused as to your question since this tutorial/shield is for a Raspberry Pi not an Arduino, and only microcontrollers should be visible to your computer (not shields). But if the IDE can't find your Arduino board I'd check your USB ports and cables and check the Mac equivalent of the Windows Device Driver. Also the Leonardo does not use FTDI drivers (nor does the Uno). If you are still having problems try emailing our techsupport department and they should be able to help you out.

      • mark4 / about 6 years ago / 1

        Thanks for the reply. I tried the Arduino Leonardo to test if the problem was the motor shield, my cable, or computer. The Arduino IDE recognized an Arduino Uno. I'll keep plugging. Thanks!

    • SFUptownMaker / about 6 years ago / 1

      :-( It's a bad sign that you can't see the Leonardo, because it doesn't use the FTDI drivers at all. That suggests that maybe you have a bad cable, or a bad USB port. Try rebooting the machine, swapping the cable, and using a different USB port.

      • mark4 / about 6 years ago * / 1

        It was a cable issue. The first 2 failed. I almost didn't try a 3rd, but that made the difference.

  • Member #160896 / about 7 years ago / 1

    Have hit a brick wall - trying to download the camera software from github and get the message "unable to resolve host name". I can get to github from my PC but the Raspberry can not. (Yes - I am entering the command correctly) Help!

    • SFUptownMaker / about 7 years ago / 1

      Sounds like maybe you don't have a good internet connection. Can you use ping (ping to ensure that you're reaching the internet correctly, and that github is up and functioning?

      • Member #160896 / about 7 years ago / 1

        Back on track. Problem was I did not include the quotes (") around the SSID and the Password. The wpa_supplicant file was there but without the quotes. Just got the git file from github and hope to finish this evening. Thanks again for the clue to the problem.

      • Member #160896 / about 7 years ago / 1

        +I think the problem is with the wpa_supplicant.conf file. I created the file using Notepad on win 7 64bit and did "Save As" with the conf extension. Windows explorer shows the file on the MicroSD card under "boot". Put the SD in the Raspberry and tried to get the updates and clone the git file from github. Removed the SD, put it back in my PC and the wpa file has disappeared. I think you are correct in that I am not getting to the internet. Thanks for your help.

  • Member #160896 / about 7 years ago / 1

    Tabs on back of pan/tilt platform interfere with the ribbon cable. The sticky tape is not thick enough to allow the camera board to seat on the platform. How is this intended to work?

    • SFUptownMaker / about 7 years ago / 2

      See the picture at the bottom of the hardware assembly page. It shows where to put the camera module and how to route the ribbon cable.

  • Member #170205 / about 7 years ago / 1


    Thanks !

    Yep, that was it :)

    On another note, the pan servo would not work correctly when attached to channel 0. It would continually 'buzz' and got very hot. I changed the address in to channel 2 (0x10) and connected the servo to that channel it works OK now.


    • Member #757023 / about 6 years ago / 1

      Hi, I have the same issue as you, regarding the buzz in the pan servo. I changed the address in both in lines 16-17 and in line 29 ( so I can use channel 2, but I got the same problem. Did you do the same as I?

      Thank you.

  • Member #170205 / about 7 years ago / 1

    Hi, built the camera kit and camera is working OK but servo's are not. Used latest Raspbian image, Stretch.

    Version:September 2017 Release date:2017-09-07 Kernel version:4.9

    Error message on start up: bcm2835-aux-uart 20215040.serial: could not get clk: -517

    Also when executing this command

    pi@raspberrypi:~ $ RPi_PanTilt_Cam/ & [1] 11720 pi@raspberrypi:~ $ Traceback (most recent call last): File "RPi_PanTilt_Cam/", line 6, in <module> bus = smbus.SMBus(1) IOError: [Errno 2] No such file or directory ^C [1]+ Exit 1 RPi_PanTilt_Cam/

    Is this something to do with Stretch?

    Any help would be much appreciated!


    • SFUptownMaker / about 7 years ago / 2

      Sounds like maybe you didn't enable the I2C interface with the raspi-config utility. That would result in the "No such file" error. Check out the "Configure the Raspberry Pi" page of the tutorial for more info on how to do this.

    • Member #388538 / about 6 years ago / 1

      This is the error I encounter on Stretch. Haven't been able to work past it.

      Traceback (most recent call last): File "RPi_PanTilt_Cam/", line 13, in <module> bus.write_byte_data(addr, 0, 0x20) IOError: [Errno 121] Remote I/O error

      • SFUptownMaker / about 6 years ago / 1

        Try opening that file ( and changing "0x20" to "0x40". I think that's the problem, an incorrect I2C address.

If you've found an issue with this tutorial content, please send us your feedback!