Functional Diagram
High-level functional block diagram.
Software Flow Chart
High-level software flow chart.

High Level Design

At a high-level, our project is large collection of motors which are controlled by three sources. The majority of our motors are controlled by a video game controller, while one is controlled by either a simple switch or software. A high-level functional block diagram of our project can be seen in the column to the left (click on the image for a larger view).

The following design subcomponents were used in our project:

  • Motors to control the X-, Y-, and Z- movement of our hook piece.
  • H-bridges to amplify the supply voltage to drive the motors.
  • Switch and controller to allow for user operation.

  • Hardware Design

    The logic to drive all four of our motors controlled by user or software input was implemented in hardware for our design. The timers used to drive the motors, as well as the ones used to interface to the Nintendo controller, were hardware driven. The PPC823's internal bus clock frequency was modulated down using hardware timers and the input from the Nintendo controller and switch were latched and ported off board by hardware.

    The interaction with the Nintendo controller was handled by a finite state machine. This machine uses a shift register to capture incoming signals and a second register to maintain steady output signals. We used six buttons on the controller- all four D-pad directions, as well as A and B to direct our fishing lure.

    Two of our three stepper motors contain two different coils, which must be driven with alternating currents. Thus, our hardware takes input from the Nintendo controller and produces a 4-wire output signal for the stepper motors. Each of these wires had to be driven high, in order; while each one was driven high, the remaining three had to be kept low. To drive the motor in the opposite direction, the previous sequence had to be performed in opposite order. A single cycle would produce four steps and each sequence had to be performed rather slowly to avoid having the motor simply jitter in place. The remaining stepper motor was more simplistic than the others, in the fact that, to drive it in one direction, a pair of wires had to be driven high-and-low alternatingly. To drive this motor in the opposite direction, two other wires had to be driven in the same manner.

    Software Design

    The software is used mainly to provide an alternative control system to allow for single player gameplay. This software modeled a random number generator using two offset timers. This method of timer implementation was chosen because the timer was originaly to be used to interface to the ADC. Using this pre-existant timer provided an efficient random number without requiring extra hardware and allowed us to implement interrupts and the real-time clock.

    All of our software was implemented using assembly. A high-level flow chart of our software is located in the column to the left (click on the image for a larger view).

    Results of the Design

    Except for the exclusion of the Wiimote and accelerometer, our design functioned as expected. The overall functionality remained the same and actually operated more smoothly than intially expected. The ADC interface for our design did remain unresolved, and with more time, we are confident that we could have successfully implemented this final piece.