Variable Frequency Electrosense

From Mech
Jump to navigationJump to search

Introduction

INSERT INTRO

Team

  • Tod Reynolds
  • Pill Gun Park
  • Joshua Peng

INSERT TEAM PIC

Concept Overview

Mechanical Design

Electrosense Water Tank - Mechanical Design

Linear Actuator - Mechanical Design

Electrical Design

Bipolar Stepper Motor Circuit - Electrical Design

Signal Generation Circuit - Electrical Design

Signal Amplification/Level Shifting Circuit - Electrical Design

Code

PIC Code

Processing Code

The Processing code will display a window on the computer monitor that allows the user to control the motion of the linear actuator and sensor, run through a single routine of calculation and plotting, and run through full object identification and object detection routines.

INSERT PIC OF WINDOW

Buttons

  • Calibrate: returns the emitter/sensor module to the zero position. Unless it is in the middle of calculating and plotting, the module will immediately head in the reverse direction until it hits the limit switch and then it will go forward 200 steps so that the limit switch is completely released. All of our tests have been designed and analyzed according to and starting from this zero position. Once the Calibrate button is pushed, this process cannot be stopped unless someone flips the PIC power switch or the +12V/-12V power switch, etc.
  • Activate: activates the linear actuator so that the module can move
  • Data Acquisition: activates calculation and plotting (runs the Object Detection routine)
  • Calculate/Plot: runs through a single routine of calculation and plotting, the module will not move after the bode plots are generated.

Object Detection

In order to run the Object Detection routine, you must press the "Data Acquisition" and "Activate" in sequence.

"Data Acquisition" should be pressed first and "Activate" after. The module will then perform calculations and plotting at its current position, then move a halfinch forward, and then repeat this process until it hits the limit switch at the end.

If you press "Activate" first, then "Data Acquisition" after, the module will move a halfinch forward from its current position, perform calculations and plotting after it stops, and then it will repeat this process until it hits the limit switch at the end. In this case, the step and measurements in the text file output will be off by 1 index.

Object Identification

The Object Identification routine is performed automatically when "Data Acquisition" and "Activate" are pressed in sequence. Once the module has stopped moving and all 19 magnitude and phase bode plot points have been calculated and plotted, the program will compare the bode plot with library of bode plots of different object type in which the object was directly underneath the sensor and display the object index of the object with the closest matching bode plot for magnitude and phase in the space between the buttons. Thus, the program will try to identify whatever is underneath the sensor at its current position after each calculation and plotting routine (each time it has moved and stopped).

Linear Actuator Control

Note: for these buttons to have any effect, the "Activate" button needs to be pressed before these buttons

  • Forward: module will move forward, towards the right (if not already moving forward) at a constant speed
  • Reverse: module will move reverse, towards the left (if not already moving reverse) at a constant speed
  • Accelerate: module will increase speed (by decreasing the delay between clock pulses of the bipolar stepper motor by 1 ms)
  • Slow: module will decrease speed (by increasing the delay between clock pulses of the bipolar stepper motor by 1 ms)

Test Results and Analysis