Emergency Stop System - Carleton-SRCL/SPOT GitHub Wiki

In an emergency, it is important to have a system that is completely separate from the system that is failing protect the failing system from itself. In this case, a separate wireless link is made from an emergency stop transmitter circuit on the ground station desk to the on board Arduino Pro Mini. The Arduino Pro Mini is responsible for controlling the emergency stop circuitry. All the components on the 12 V power line pass through a power MOSFET before returning to Ground, except the air bearings solenoid. The Arduino Pro Mini is powered by the 5 V voltage regulator, and uses one of its digital output pins to send a High or Low signal to the gate of the MOSFET depending on the desired status of the emergency stop. Since the Arduino Pro Mini is powered by the 5 V regulator, its Ground is the same as the 5 V and 12 V Ground. Therefore, since the source pin of the MOSFET is connected to 12 V Ground, applying a +5 V signal to the gate of the MOSFET will exceed the gate-source threshold voltage and allow current to flow.

Communication between the emergency stop button on the ground station table and the Arduino Pro Mini is accomplished through 315 MHz RF transmitters and receivers. The software on the Arduino minis and RF documentation can be found here. The main wireless link between the ground station computer and the Raspberry Pi 3 is through Wi-Fi. The following Table shows the emergency stop components used.

Name Manufacturer (Supplier) Part Number Quantity
RF Link Transmitter (315 MHz) Sparkfun Electronics (Robotshop) RB-Spa-664 1
RF Link Receiver (315 MHz) Sparkfun Electronics (Robotshop) RB-Spa-662 1
E-Stop Button Amazon 1
Arduino Pro Mini (328 5V/16MHz) Sparkfun Electronics (Digikey) 1568-1055-ND 2

Transmitter

The RF transmitter is connected to an Arduino Pro Mini and is embedded in the Emergency Stop Button located on the ground station table. The RF transmitter is wired to the Arduino Pro Mini exactly as outlined in the documentation. A 12 V supply line is used, to increase the outgoing signal of the transmitter. An antenna is also used, to increase the range of the signal. The transmitter electronics are plugged into a power source and is continuously operating. When the Emergency Stop button is raised, the RF transmitter repeatedly transmits a good signal (the number 20). When the Emergency Stop button is pressed, the RF transmitter repeatedly sends a bad signal (the number 13). The same good and bad signals are transmitted blindly to all receivers. Therefore, when the E-Stop is triggered, all active spacecraft platforms will simultaneously trigger their Emergency Stop circuitry.

Receivers

The RF receiver electronics are attached to the Arduino Pro Mini on the control panel of the spacecraft platforms exactly as outlined in the RF receiver documentation. An antenna is also used on the receiver to increase reception. When the receiver electronics receive the good signal, a High signal is applied to the gate of the emergency stop MOSFET. When the bad signal is received, a Low signal is sent to the gate of the MOSFET by the Arduino Pro Mini. If no signal is received for 5 seconds, the receiving Arduino Pro Mini automatically triggers the Emergency stop, as there is a fault in the system rendering the system unsafe.

LEDs are used to alert the operator to the current status of the Emergency Stop circuitry. The E-Stop LED is solid blue when the good E-Stop signal is being received. When the LED is solid red, this indicates that the bad signal was received. When the LED flashes red, this indicates that no E-Stop signal is received, that the E-Stop has been triggered, and that there is a fault in the Emergency Stop circuitry.

The exterior of the control panel is shown in the Figure below.

Emergency stop panel

The electrical diagram of the emergency stop system is shown in the main electrical diagram (see the Power Subsystem page).

Programming the Arduino Pro Mini

The Arduino Pro Mini can be connected to a computer using the TTL-232R-5V FTDI cable shown in the image below. In order to program the Arduino Pro Mini, there MUST NOT be a signal applied to the RX/TX lines of the Arduino. In other words, the Arduino cannot be connected to the (powered) RF receiver/transmitter whilst programming.

To connect the FTDI cable to the Arduino Pro Mini, line up the green cable with the GRN label and the black cable with the BLK label on the Arduino FTDI pins. It should only fit one way, as shown in the image below. If the wires somehow come loose, then connect them according to the following:

FTDI to Arduino colour chart

To program the Arduino, the Arduino IDE is used. The files to program each of the platform's Arduinos are provided in the software folder. In the programming process, the user first specifies the options for the Arduino at hand in the Tools tab (see below image):

  • Board: Arduino Pro or Pro Mini
  • Processor: ATmega328P (5V, 16MHz)

Upload options

For the current configuration of the Arduino Pro Mini and FTDI cable, there are some key steps to the uploading process:

  1. In the IDE, press on the checkmark icon to "Verify" the code;
  2. On the Arduino Pro Mini, press and hold the RESET button;
  3. While still holding the RESET button, press the "Upload" button in the IDE;
  4. Immediately as the IDE message box says "Uploading", release the RESET button;
  5. Wait for message saying the upload was successful.

If the upload fails, it is likely that the RX/TX pins are receiving data, or the RESET button was not activated/deactivated properly.

Calibrating the Arduino Pro Mini Code on each Platform

The difference in the code for each platform is in specifying the "low_batt_value" and the "critical_battery" constants, corresponding to the signal read across the 200 kOhm-22 kOhm voltage divider. The low_batt_value is set when the battery is at 23.8 V, and the critical_battery value is set when the battery is at 23.3 V. The constants should not need to be changed unless the voltage divider is modified.

If so, the constants in the Arduino Pro Mini code must be updated. To do so, the Arduino must be connected to the voltage divider circuit, which is powered by the bench power supply (see below image). A multimeter may be used to ensure that the voltage reading on the power supply is accurate to the voltage received at the voltage divider. The get_critical_battery code in the software folder is used to read the analog input signal received by the Arduino at the specified "low" and "critical" voltages, 23.8 V and 23.3 V, respectively. In the case of BLUE from the two images below, the critical_battery value at 23.3 V is around 470.

Signal