Yellow Jacket Gate

In the fall of 2018, I lost a hive due to yellow jackets. Yellow jackets are opportunistic and attack the hive in the early morning hours while the hive is asleep. This condition could be exacerbated by a wide opened hive entrance or a weakened hive due to other stressors. After some thought, I decided to try and modify a commercially available robbing screen by adding a servo motor to the top escape gate in an attempt to automatically lock down the hive during robbing times thereby denying yellow jacket access.

The yellow jacket gate utilizes a raspberry pi zero microcomputer and MG90S micro-servo motors. The raspberry pi zero runs a python script controlling the servos closing off the hive at 9:00pm and opening it at 9:00am by modifying the linux crontab file.

Robbing screens on the hive fronts

The servo motor will replace the top gate shown here in the open position.

The top servo in the closed position. The bottom servo is in the open position. The brackets and gate were fabricated by Steve Croneberger and Joe Daley

Two servos and Raspberry pi Zero

GPIO Pin-Out for Raspberry pi zero. The python scripts used to open and close the gate are below.

Close.py python script

import RPi.GPIO as GPIO

import time

servoPIN = 17

GPIO.setmode(GPIO.BCM)

GPIO.setup(servoPIN, GPIO.OUT)

p = GPIO.PWM(servoPIN, 50) # GPIO 17 for PWM with 50Hz

p.start(2) # Initialization

print ("90 degrees")

print('\a')

p.ChangeDutyCycle(7)

time.sleep(.5)

p.stop()

GPIO.cleanup()


Open.py python script

import RPi.GPIO as GPIO

import time

servoPIN = 17

GPIO.setmode(GPIO.BCM)

GPIO.setup(servoPIN, GPIO.OUT)

p = GPIO.PWM(servoPIN, 50) # GPIO 17 for PWM with 50Hz

p.start(2) # Initialization

print ("0 degrees")

print('\a')

p.ChangeDutyCycle(2)

time.sleep(.5)

p.stop()

GPIO.cleanup()


Sudo Crontab -e

# For example, you can run a backup of all your user accounts

# at 5 a.m every week with:

# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/

#

# For more information see the manual pages of crontab(5) and cron(8)

#

# m h dom mon dow command

00 09 * * * python /home/pi/Desktop/open.py

00 21 * * * python /home/pi/Desktop/close.py