Robot Drummer

From Mech
Jump to navigationJump to search

Team Members

Niecestro-Lee-By
  • Bobby By: Senior in Electrical Engineering
  • Agatha Lee: Master Student in Biomedical Engineering
  • Dan Niecestro: Senior in Mechanical Engineering


Overview

This project consisted of creating motor control PICs that will make it easy for anyone to do high-speed encoder-based feedback control of brushed DC motors with only a few dollars of hardware and a cable to connect to Matlab on a PC. The "master" PIC commnicates with the PC and any number of "slave" PICs, two in our case. The master PIC takes the takes program written in Matlab and communicates it to the slave PICs and to coordinate the initiation of moves by the slave PICs. To demonstrate motor control, a drumming device was created.

Mechanical Set-Up

In this project, we were asked to present motor control of two separate motors running simultaneously. A few different ideas were suggested and others were gathered through brainstorming. Some of the different ideas that were not picked due to aseptic reasons or reliability reasons include throwing a ball like a catapult or even a two joint arm that can pick up, move and place an item. In the end, it was thought the simplest way to show motor control to the eye and be aesthetically pleasing was to make a small drum set.

  • pic of setup here*

This drum set essentially consisted of a base, a drum pad and two drum sticks. All the parts were manufactured in the machine shop that we have access to with materials supplied. The motors are removable and can be switched by loosening the brackets that hold them down. One of the main considerations was reusability of the motors and allows easy removal or switching of motors from our device.

==Base== The base was made in a U shape, this was done to allow the motors to hang over the insides and share the same drum pad, as seen above. Also, small legs were planted under the base so that when the motor rotated, the drumsticks would not hit the surface underneath. To make it look more aesthetically pleasing, we put some black cardboard over it. We chose the cardboard rather than painting it because the cardboard gives that look of being the side of a drum and we did not want to get paint on the motors.

Connecting Motors to Base: The motors were secured to the base using two brackets. The first bracket went around the circular part of our motor to hold the motor down and prevent side to side movement. Next, around the square part, a small, thin bracket was used to prevent the motor from moving up and down and slipping. After securing it in place, the motors did not move at all and proved to be very secure.

Drum pad: The drum pad is elevated off the base to allow the ends of the drumstick to hit it without hitting the base. Both the base and the drum pad were made of wood. The drum pad then was covered in a thick poster board material to dampen the sound since the metal hitting the wood was rather loud. This also gave the look of a drum pad. Also, the number 13 was put on the pad to represent our team number.

Drum Sticks: This was the most difficult part to make, but in the end, it is a very simple concept. It was only difficult because there was a large number of trials and different ways of creating them. In the end, it was decided that a light weight structure should be made to ensure that the motor could support it. Therefore, aluminum sheet metal was used. Basically, two L beams were made mirrored of each other and one hole was drilled for a screw on each side at the base of each beam. This was to connect to another small beam to go on the other side which will make a simple collet and a nice force fit on the shaft of the motor. To connect the two L beams together, rivets had to be used as spot welding aluminum is not very effective. Only three rivets were placed on the beam because a small circular rod of aluminum was added at the end of the beam. The beam had to open up and the rod was place in the middle, where two holes were drilled to prevent the rod from moving. Lastly, we wrapped it in a yellow glossy paper to make them look more like drumsticks; however, these coverings are not exactly round because it had to attach to the beam itself, which isn’t round. The result showed that it created a very nice force fit that showed no slipping.

Circuitry

Component List

PartPart No.Qty
PIC18F4520 Prototyping Board---3
Microchip 8-bit PIC MicrocontrollerPIC18F45201
Microchip 8-bit PIC MicrocontrollerPIC18F44312
Pittman Motor with EncoderGM82242
Hex Inverter ChipSN74HC041
H-Bridge ChipL293D2
10K Resistor---2

Set Up

All of the components, except the Pittman motors, were powered with 5V DC. The Pittman motors were powered with 12V DC.

PICs

The PICs used were one "master" 18F4520 and two "slaves" 18F4431. The three PICs communicated via I2C, which enabled us to control the two motors by telling the master PIC what to do through Matlab.

H-Bridge

The slave PICs send an individual PWM to an L293D H-bridge. This PWM determines the speed of each motor. The motor is at rest at a 50% duty cycle and is at its maximum speed at 0 and 100% duty cycles. Pin 16 of the slave PICs connect to pin 2 of the L293D.

Hex Inverter

Pin 16 of the slave PICs is also run through a the hex inverter chip. The output of the hex inverter (pin 2 or pin 12) is sent to pin 7 of the L293D.

Schematic

High-speed Motor Control Schematic


Programming

Results

See Also