Operating Instructions

BlackBOX  Motor Operation Overview 

When powering the board, the motor will either start running or will stay motionless depending on the state of the main Start/Stop switch, the position of the Control Mode switch and location of the potentiometer.

If the main switch is in the stop position, the motor will not start moving until the switch is returned to the start position. When the main switch is switched on, a green light will appear. At this time the motor speed can be controlled either with a potentiometer or by a serial connection to the computer.

The control method is chosen by the Control Mode switch. If the Control Mode switch is in the analog control position, then the speed of the motor is set according to the state of a potentiometer.  If at any time the main switch is switched to the stop position, then the motor will ramp-down according to the transfer function and stay at full stop until the main switch is in the on position again.

If the potentiometer is turned all the way to the left, the motor will ramp backwards to full speed and if the potentiometer is turned all the way to the right, the motor will ramp forwards to full speed. The desired motor speed increases or decreases proportionally to the output value of the potentiometer. The motor is at full stop when the potentiometer is within 20% of the centre position.

The motor does not simply follow the state of the potentiometer but is ramped-up with a first-order transfer function (tau = 1s). When changing the desired speed, it takes the motor approximately 5 seconds to reach steady state at that speed. To reduce mechanical stresses, an added feature was added to the program that provides a short dead time at the full stop position before the motor changes directions. This prevents shoot-through (short circuit) within in the H-bridge.

When the Control Mode switch is in the digital mode position, then the speed of the motor can be controlled using a serial connection to the computer. As the same serial connection is being used to program and control the uC, a simple protocol was derived to instruct setpoint changes in order to filter serial commands. To use this protocol a correctly formatted ASCII string must be sent preceeding with an “s” for setpoint followed by a + or – for direction forward or backward then two numbers as a percentage where 99 is indistinguishable from 100%. As an example s+75 will implement a setpoint of forward at 75%, if the string begins with incorrectly formatted it will return the current setpoint control values (such as s???).

The BlackBox controller includes an emergency feature that forces that output values to zero.  For this purpose, flyback diodes were added to the original H-bridge design to prevent damage to the MOSFETs caused from back EMF (ElectroMotive Force)currents. The program allows for the emergency stop to have effect if it is pressed at any time.  Once pressed the motor stops immediately and a warning beacon will begin flash with a message being repetitively sent via the serial line. When this conditions is triggered, a hardware reset must be performed by briefly de-energising the micro-controller board in order to get the program into an operating state again.

During both manual and digital control, the current speed of the motor is displayed using a visual speed indicator in the shape of a needle similar to a car speedometer. An additional display composed of 16 LEDs shows the desired speed/setpoint. This additional LED display consists of 8 LEDs that show the speed of the intended set point of motor going forward and 8 LEDs that show the speed of the intended set point of motor going backward. It must be noted that the position of the needle is set according to the current value of the transfer function and is an approximation of the speed of the motor based on the PWM duty cycle being applied to the load.