Download presentation
Presentation is loading. Please wait.
1
Motion Controlled Servo Motor
Dylan Keller Eastern Kentucky University Networking Securities and Electronics Department
2
Abstract This project is a small step in a larger project
It function and purpose is to have a servo motor that will be activated by a motion sensor
3
Problem This project is designed as one of the cores of a bigger project which is a robotic prosthetic The main issue is how to get a servo motor to respond to electrical pulses in the same fashion as a human brain would send electrical pulses to a body part
4
The design The design of this project is to have a motion detector attached to a raspberry pi A micro-servo motor will also be attached to a raspberry pi When the motion sensor detects movement in front of it, the sensor will send an input signal to the raspberry pi to make the servo motor move as well as display “Activated” and “Deactivated” on the screen
5
Field Focus This project has different parts
The first part is that it has a fair portion of electronics associated with it because you will need to know how to wire the components together and if it needs other parts like capacitors, resistors, or logic controllers The next part is computer science related because of all of the programming language that is required in order to get the pi to accept input signals and use output signals The final part is that there is a small portion of networking because I tried to set up a VNC server with the pi, but it didn’t work
6
The process The process was broken down into three simple cores in its main design The first core is to program the raspberry pi to send specific frequency signals The second core is to program the raspberry pi to accept input signals and send them as output signals The third and final core is to combine the other two cores together
7
Core functionality 1 This phase is an important phase of the project
This phase is designed to program the raspberry pi to send electrical signals as a specified frequency that will operate the servo motor I found a video on YouTube.com that was published by a Gaven MacDonald that walks through programming a servo motor using a raspberry pi and Python coding language.
8
Core Functionality 2 This phase was a little more challenging than the other phase In order to get my project to work the program will need to have use of many loops within the program This gave insight into designing a conditional loop in python
9
Core Functionality 3 This phase/core can be the riskiest one of them all In order to get this core to work the other two cores will need to be combined together Both cores have a loop designed into the programming In order to get the programming to work the correct loop will be the deterring factor
10
Attempt 1 This was the first attempt at the design
It worked on the first attempt When the code was running the screen would say “DEACTIVATED” When someone walks in front of the PIR sensor, the screen will say “ACTIVATED” and the servo motor will run through its designed program
11
The code import RPI.GPIO as GPIO import time GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.setup(26,GPIO.IN) GPIO.setup(20,GPIO.OUT) p = GPIO.PWM(20,50) p.start(7.5) while True: i=GPIO.input(26) if i==0: print “DEACTIVATED” GPIO.output(20,0) time.sleep(1) elif i==1: print “ACTIVATED” GPIO.output(20,1) p.ChangeDutyCycle(7.5) p.ChngeDutyCycle(12.5) p.ChangeDutyCycle(2.5)
12
Video
13
Struggles The first design was difficult to implement
There was a OWI robotic arm that was stripped down to just the motors and wires, with only the VCC and ground wires A playstation eyetoy that was not compatible with the linux operating system The problem was it needed more electricity than the pi and extra voltage could offer An “AND” logic micro-circuit broke There was no code or tutorial videos that could show me how to program a USB camera to control the OWI robotic arm on a breadboard
14
Reason for doing this project
The main reason for doing this project is to learn how to program a motor that will accept electrical pulses much like a human limb will accept electrical pulses from the brain This is essentially a small baby step to achieving the larger project
15
Future Implementations
The design itself is fairly simple Using a robotic arm with four or more servo motors at one time Add a LCD monitor in the circuit to show what is wrong with the program or the devices
16
Special Thanks Dr. Chandra Vigs Professor Jeff Kilgore
17
Q & a
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.