Ignition Sequence

Ignition Switch Hardware

  • The Controls Leaderboard takes in a 12V line from the supplemental battery (through POW_2ND_CONN). This is a small 12V battery meant mainly for the startup of our boards; once the main HV battery pack is deemed safe by BPS, all low-voltage power will switch to that.
  • Note that there are 6 positions on the ignition switch, where corresponding pairs are connected as the ignition switch is rotated (1 and 7 are connected at the same time, 2 and 8 as well, 3 and 9, etc.)
    • Diagonally opposite positions of our ignition switch are connected up at the same time. Note that it's essentially the same as two separate switches being "synced up", and this model is AKA a double pole switch.
  • The bottom half of the ignition switch (pins 1 through 6) facilitates the LV on/off signal. Depending on the position of the Ignition Switch, this 12V will be routed to BPS_PWR_OUT. This connector is wired to the Power Board (formerly known as the Secondary Power Board). Previously this was used to power BPS during startup to determine the conditions of the battery pack; however, now it's used as a signal for the Power Board to connect the Supplemental Batteries to the Fusebox, which will power all LV boards.
    • As you can see in the diagram, BPS_PWR_OUT receives 12V at any position other than position 6 (same as position 12). This is because that is our off position, and in any other position we need the car to receive LV power.
      • In a state where the HV battery has been deemed unsafe, this signal is still necessary to provide the enable signal to the Power Board
  • The top half of the ignition switch (pins 7 through 12) provides a digital signal to two pins on the Controls leaderboard (IGN1 and IGN2). As you can see in the diagram, each position labeled.
    • Pos. 12 is OFF, and this corresponds with pos. 6 (since both connect to nothing)
    • Pos. 11 is LV. This is allocated a position so that it only turns on LV and nothing else. In actuality, all the other positions will also turn on LV as well, but they will turn on other things too.
    • Pos. 10 is ARR_ON. This is hooked up to the IGN_1 pin on the Controls Leaderboard to tell Controls to begin the Array Precharge sequence.
    • Pos. 9  is MOT_ON. This is hooked up to the IGN_2 pin on the Controls Leaderboard to tell Controls to begin the Motor Precharge sequence.
    • Any further positions (pos. 8 and 7) are also hooked up to IGN_2.
  • Note that the Ignition Switch control intends to make the positions cumulative. For example, when clicking from LV → ARR_ON, the low voltage systems will continue to remain active in the ARR_ON position. Furthermore, when clicking from ARR_ON → MOT_ON, both the array and the low voltage systems will continue to remain active in the MOT_ON position

Notes on Photocouplers and Voltage Domains

The 12V line on pins 7-12 is on the 12V power domain and is either cut off from ground or connected to GNDPWR, which is the 12V ground. This line goes through a rotary switch which determines whether current goes through the photocouplers or not.

Photocouplers allow for logic to be done across two power domains, as seen here. If a photocoupler has current, then the transistor on the other side allows current to conduct, creating a short circuit. On the other side of the photocouplers, is a GPIO input that is pulled up to 3.3V (3V power domain). The MCU reads HIGH if the photocoupler has no current going through it since there is an open circuit to ground. Once the photocoupler receives current, it creates the short circuit meaning the node on which the GPIO input sits is now GND and the MCU reads LOW.

Photocouplers also provide input isolation, which is necessary for when the Controls Leader board will be using the 12V from the Fusebox while reading 12V signals from the Ignition switch.

The photocoupler is also referred to as an optocoupler or an opto-isolator.

Precharge

We go through the Array and Motor states so that we can precharge the array and motor. These two are attached to the HV+ and HV- terminals and disconnected with contactors initially. For both, since they are at undetermined voltages, we need to let them slowly reach the voltage of the battery so that no big voltage spikes occur. Voltage spikes can cause damage. We do this using a precharge resistor. We let BPS handle this precharge. We let them know that we switched states and they let us know when the precharge is finished. More on this is in the Software section.

Sequence

The following are the steps in the sequence of the rotary switch. The first step is when the rotary switch is turned clockwise from the perspective of the user.

  1. POW_2ND_CONN and BPS_PWR_OUT are disconnected meaning other systems are turned off as well. IG1/2 are 11.
  2. POW_2ND_CONN and BPS_PWR_OUT are connected meaning other systems are turned on. We call this the low voltage (LV) step. IG1/2 are 11.
  3. Current flows through the photocoupler on IG1 meaning IG1/2 is 01. This is called Array. This is where we precharge the array.
  4. Current flows through the photocoupler on IG2 meaning IG1/2 is 10. This is called Motor. This is where we precharge the motor and the car is fully turned on.
  5. Same as 4.
  6. Same as 4.

Software

The first distinction to make is that...

Controls has jurisdiction over two contactors:

  1. Array Precharge Bypass Contactor (Array PBC)
  2. Motor Controller Precharge Bypass Contactor (Motor Controller PBC)

BPS has jurisdiction over three contactors:

  1. BPS Array Contactor
  2. High Voltage Plus Contactor
  3. High Voltage Minus Contactor

PBC = precharge-bypass contactor

There are a couple of conditions that Controls checks for before proceeding with the delays.

What is a precharge? After a sufficient amount of messages from BPS telling us that a main component contactor is active, a set precharge delay occurs to avoid huge surges of current. This allows current to flow across a precharge resistor placed between the component in question and the power source to allow

The HV Plus/Minus BPS Contactors tell Controls to close Motor Controller Precharge-Bypass Contactor. The Array BPS Contactor tells Controls to close Array Precharge-Bypass Contactor.

The least significant bit (bit 0) is associated with the Array BPS Contactor, and the bit 1 and 2 are associated with the HV Minus and Plus Contactors. The HV Minus and Plus Contactors are grouped because Controls require both to close the Motor Controller PBC. It is important to note that HV Plus and Minus Contactors are two separate contactors that BPS owns. Because Controls logically ANDs HV Plus and HV Minus Contactors, they acknowledge it as a single entity, which it is not.


Example:

000 - All BPS contactors are open

011 - HV Plus/Minus BPS Contactors are open, HV Array Contactor is closed

110 - HV Plus/Minus BPS Contactors is closed, HV Array Contactor is open

111 - All BPS contactors are closed

BPS should send Controls a message every half a second (500ms) or a frequency of 2 Hz. Controls enforces this by using a watchdog timer that is started and reset every time a BPS_CONTACTOR message is received.

When we switch to a state, such as Array or Motor, we send a CAN message to BPS on CarCAN to tell them that we want array to be charged. We wait and listen for a message back once they have confirmed that is true. We do this so that we do not use the array or motor in our code until they have been charged.

Full System Diagram