Facebook Twitter Instagram Pinterest YouTube
    Trending
    • Elecrow Meteor IPS Touchscreen with RGB LEDs
    • Pi Pico Pinout Display on the Command Line
    • How to Add a Raspberry Pi Pico Reset Button
    • Pi Pico Onboard LED
    • Pi Pico W Pinout and Power Pins
    • CrowPi L Raspberry Pi Laptop and Learning Platform
    • Pi Pico W Launched
    • Add Kodi to RetroPie Menu
    Facebook Twitter Instagram Pinterest YouTube RSS
    Raspberry Pi SpyRaspberry Pi Spy
    • Home
    • Categories
      • General
      • Hardware
      • Programming
      • Python
      • Software
      • Tutorials & Help
    • BerryClip
      • BerryClip Instructions
      • BerryClip Plus Instructions
      • Videos & Reviews
    • Buy
      • Buy Pi
      • Buy Pi Accessories
      • Buy Books
    • Tools
      • Ultimate Raspberry Pi Alexa Skill
      • Pi Power Estimator App
      • Pi-Lite 14×9 LED Matrix Sprite Editor
      • RPiREF Pin-out Reference App
      • Simple Ohm’s Law Calculator
      • Web Sites & Links
    • Tutorials & Help
        Featured
        November 9, 20200

        Raspberry Pi Temperature Monitoring

        Recent
        December 23, 2022

        How to Add a Raspberry Pi Pico Reset Button

        November 20, 2022

        Pi Pico Onboard LED

        May 6, 2022

        Add Kodi to RetroPie Menu

      1. Contact Us
      2. Site Map
      Raspberry Pi SpyRaspberry Pi Spy
      You are at:Home»General»Halloween Pumpkin with Servo Controlled Eyes
      3 Eyed Pi Powered Pumpkin

      Halloween Pumpkin with Servo Controlled Eyes

      0
      By Matt on October 31, 2017 General

      It’s Halloween 2017 and I decided to create a pumpkin with moving eyes. The result is a pumpkin with three ping pong ball eyes hooked up to some small servos and controlled with a Raspberry Pi and an I2C control board.

      Here is a short Instagram video of the eyes in action :

      https://www.instagram.com/p/Ba45RJJn5N8/

      The ping pong balls are pivoted in a ring with a small arm glued on the back. This arm is connected to a small servo by some paper-clip wire. I 3D printed some custom parts to connect this all together. It worked fine but the hard bit was holding these three eye units in place. Eventually I used wooden cocktail sticks which you can see in this Instagram video :

      https://www.instagram.com/p/Ba7NTxXHgu5/

       

      The servos were then connected to an I2C servo control board which can support 16 servos. This board is then connected to a Raspberry Pi running a basic Python script.

      3 Eyed Pi Powered Pumpkin

      The Pi and control board were powered from a USB power bank with twin USB sockets. The controller board takes 3.3V from the Pi to deal with the I2C logic and a separate 5V feed from the battery to provide power to the servos. Everything was thrown in a plastic food bag to stop it getting wet.

      The Python script uses the excellent Adafruit 16-channel servo driver library which is explained here : https://learn.adafruit.com/16-channel-pwm-servo-driver/using-the-adafruit-library

      This library is compatible with other 16-channel servo boards that use the PCA9685 chip.

      For simplicity and speed I drew on the pupils with a Sharpie once I had the basics working.

      3 Eyed Pi Powered PumpkinThe script randomly selects an eye and moves it to a random position between its maximum and minimum. It then waits a randomly determined time before choosing another eye to move. Using cron I set the script to run when the Pi boots.

      I will add a few more details and photos when I disassemble the pumpkin. I was in a bit of a rush and didn’t have time to take photos of the 3D printed eye brackets or take a copy of the Python script.

      Parts Used:

      • Ping pong balls
      • 3 sets of custom 3D printed brackets
      • 3 “9g” equivalent micro servos
      • 16-channel I2C servo control board [Adafruit]
      • Raspberry Pi
      • USB power bank
      • Female-female DuPont cables to connect control board to Pi’s GPIO pins
      • USB to male DuPoint cable to connect power bank to control board screw terminals
      Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
      Previous ArticleAnalysing Storage Usage on a Raspberry Pi with Ncdu
      Next Article How to Rotate the Raspberry Pi Display Output

      Related Posts

      Add Kodi to RetroPie Menu

      RetroPie Temperature Monitor from Menu

      Install Arduino IDE on Raspberry Pi

      Leave A Reply Cancel Reply

      This site uses Akismet to reduce spam. Learn how your comment data is processed.

      Recent Posts
      March 13, 2023

      Elecrow Meteor IPS Touchscreen with RGB LEDs

      December 26, 2022

      Pi Pico Pinout Display on the Command Line

      December 23, 2022

      How to Add a Raspberry Pi Pico Reset Button

      November 20, 2022

      Pi Pico Onboard LED

      November 14, 2022

      Pi Pico W Pinout and Power Pins

      Categories
      • 1-wire
      • 3D Printing
      • Add-ons
      • BBC Micro:bit
      • BerryClip
      • Books
      • Camera Module
      • Cases
      • Events
      • General
      • Hardware
      • I2C
      • Infographics
      • Interfaces
      • Minecraft
      • Model A+
      • Model B+
      • News
      • Pi Models
      • Pi Pico
      • Pi Zero
      • Power
      • Programming
      • Python
      • Raspberry Pi OS
      • Raspbian
      • RetroGaming
      • Robotics
      • Sensors
      • Software
      • SPI
      • Tutorials & Help
      Tags
      Arduino audio battery berryclip Birthday bluetooth cambridge camera CamJam DigiMakers display games GPIO I2C interface Kickstarter Kodi LCD LED Linux media Minecraft Model A motionEyeOS PCB photography photos Pi-Lite Pi Pico power python Raspberry Jam Raspberry Pi Bootcamp raspbian Retrogaming retroPie screen SD card security sensor SPI SSH temperature ultrasonic video
      Raspberry PI Related
      • Adafruit Blog
      • Average Maker
      • Official RaspBerry Pi Site
      • Raspberry Pi Pod
      • RasPi.tv
      • RaspTut
      • Stuff About Code
      Tech Resources
      • MattsBits – Pi Resources
      • Microbit Spy
      • Technology Spy
      Archives
      About

      Unofficial site devoted to the Raspberry Pi credit card sized computer offering tutorials, guides, resources,scripts and downloads. We hope to help everyone get the most out of their Pi by providing clear, simple articles on configuring, programming and operating it.

      Popular Posts
      September 19, 2014

      Top 5 Reasons The Raspberry Pi Sucks

      July 27, 2012

      16×2 LCD Module Control Using Python

      October 20, 2013

      Analogue Sensors On The Raspberry Pi Using An MCP3008

      Recent Posts
      March 13, 2023

      Elecrow Meteor IPS Touchscreen with RGB LEDs

      December 26, 2022

      Pi Pico Pinout Display on the Command Line

      December 23, 2022

      How to Add a Raspberry Pi Pico Reset Button

      Facebook Twitter Instagram Pinterest YouTube RSS

      Entries RSS | Comments RSS

      This site is not associated with the official Raspberrypi.org site or the Raspberry Pi Foundation. Raspberry Pi is a trademark of the Raspberry Pi Foundation.

      Copyright © 2022 - All Rights Reserved - Matt Hawkins

      mastodon.social@RPiSpy

      Type above and press Enter to search. Press Esc to cancel.