Granular Flow Rotating Sphere
Team Members
- Brian Kephart - Electrical Engineering Class of 2009
- Jonathan Shih - Mechanical Engineering Class of 2009
- Kristi Bond - Mechanical Engineering Class of 2008
Overview
Mechanical Set-up
Housing and Ball Support
Main Drive Wheel and Motor
Lazy Susan and Position Control Motor
Circuitry
Summary
Our project was unique in that we relied on the use of three different PICs to precisely coordinate the motion of our ball. The main reason for this was because the 18F4520 chip only has enough encoder inputs for one Pittman motor.
Component List
Part | Part No. | Qty |
---|---|---|
PIC18f4520 Prototyping Board | --- | 1 |
Microchip 8-bit PIC Microcontroller | PIC18F4520 | 3 |
Pittman Motor with Encoder | GM8224 | 3 |
Hex Inverter Chip | SN74HC04 | 1 |
Counter Chip | LS7083 | 2 |
H-Bridge Chip | L293 | 1 |
Diodes | 1N4001 | 8 |
100mF Capacitor | --- | --- |
1K Resistor | --- | --- |
Hall Effect Sensor | A3240LUA-T | 1 |
Big Cat Super Strong Magnet | PM20134 | 1 |
Set Up
The electrical design for our project was pretty basic. All of our components (including the Pittman motors) were powered with 5V DC.
PICs
The three PICs communicated via I2C, which enabled us to control the two motors by telling the master PIC what to do (more information can be found here [I2C communication between PICs]). We designated the PIC on the 18F4520 Prototyping Board as the "Master" and the other two PICs as the "Slaves." It is important to connect the clock from the prototyping board to the two Slave PICs, but the two main lines of communication are shared on pin 18 (RC3) on each chip, and pin 23 (RC4).
H-Bridge
Each slave PIC sends an individual pulse to one of the two H-bridges (the L298 has two). The pulse width determines the direction and speed of each motor. At 50% duty cycle, the motor is at rest, while at 0 and 100% duty cycles the motor runs at maximum speed but in opposite directions. Pin 16 from the first slave PIC needs to connect to pin 10 on the L298, while other other should connect to pin 5.
Hex Inverter
Now pins 5 and 10 from the H-bridge needs to go into pins 1 and 13 on the hex inverter chip. The outputs of these two need to go back the the H-bridge as an inverted signal for pulse width modulation (pin 1 to L298's pin 12, and pin 14 to L298's pin 7).