Components Previously on the PCB
The printed circuit board has many components that have been deemed obsolete and removed. Below is a list of those components, how they worked, and why the were removed.
Components Removed In Spring 2020
Prior to spring 2020, the PCB was designed for use by both CUBike and CUSail, resulting in many parts that were not necessary for the functioning of the bike. In Spring 2020, a major overhaul was started in part to remove many of these unnecessary parts.
Watchdog
The Watchdog is an external timer circuit that assured the Arduino DUE was correctly executing its loop. The Watchdog’s timer was reset each time the DUE successfully completed a loop. However, if the DUE’s loop execution was unsuccessful, the Watchdog’s timer would not be reset, causing an emergency shutdown and preventing damage to the bike’s systems.
The Watchdog connected to the PCB through three pins, labeled WD+DPINS, and an op-amp.
WD+DPINS
Pin Label | Connected To |
---|---|
1 | DUE pin 45 |
2 | DUE pin 43 |
3 | Op-Amp pin 1 WDO |
Associated Op-Amp
Pin Label | Connected To |
---|---|
1 WDO | WD+DPINS pin 3 |
2 GND | GND |
3 EN | DUE pin 41 |
4 WDI | DUE pin 42 |
5 VCC | C35 --> GND |
The Watchdog and associated hardware were removed because an unsuccessful loop execution by the DUE was deemed to be an unlikely source of failure.
POT
The POT (Potentiometer) pin-outs is a grouping of pin-out ports that were designed to be used to connect a potentiometer. A potentiometer is an adjustable resistor that provides varying voltages. By keeping the current constant, measuring how much the potentiometer was adjusted allows one to know the voltage. When making the bicycle, it was debated whether using a potentiometer or an encoder was better for measuring the position of the bike's front wheel. Although the potentiometer is more accurate than the encoder, it was decided that an encoder was to be used because it was easier to work with. Thus, the POT pin-out ports were deemed to be unecessary.
Pin Label | Connected To |
---|---|
1 | GND |
2 | DUE Pin A10 |
3 | 3.3 V |
Additional Components Only Used by CUSail
Sail Motor
The old PCB contained outputs for the sail motor and bike motor. Since the bike is not a sailboat, the sail motor outputs were removed.
Pin | Connected To |
---|---|
1 | Pin 4 of H-Bridge 1 (OUT) |
2 | Pin 3 and 4 of Current Sensor (IP-1, IP-2) |
Sail Power
Similar to the sail motor, only the bike power output is necessary.
Pin | Connected To |
---|---|
1 | BGND |
2 | SAIL-IN |
H-Bridges
The H-Bridges on this PCB board controls the CUsail motors. Since the bike does not use H-bridges for the motors, we took them out. These components convert a source of direct current from one voltage level to another. In other words, it transforms the battery voltage (24 V) to an acceptable voltage (5V) that many of the components take in. It also allows us to, more importantly, reverse the flow of current in the output circuit or, in other words, command the bike's motor to turn in a certain direction. It is interesting to note that the SR (Slew Rate) pin on the BTN7971B (current model we use) allows the user to attach a resistor or not, which, in effect, changes the slew rate of the power switches. The current PCB has both H-Bridges attached to a 100 Ohm resistor. This prevents any overshoots in the signals that the H-Bridges sends to the bike's motor.
First H-Bridge
Pin (Label) | Connected To |
---|---|
1 (GND) | BGND |
2 (IN) | Pin 7 of H2-Isolator |
3 (INH) | Pin 6 of H2-Isolator |
4 (OUT) | Sail Motor 1 |
5 (SR) | SR1 |
6 (IS) | (Xbee Pro?) |
7 (VS) | BAT+ |
Second H-Bridge
Pin (Label) | Connected To |
---|---|
1 (GND) | BGND |
2 (IN) | Pin 7 of H1-Isolator |
3 (INH) | Pin 6 of H1-Isolator |
4 (OUT) | Pin 1 and 2 of Current Sensor |
5 (SR) | SR2 |
6 (IS) | (Xbee Pro?) |
7 (VS) | BAT+ |
H-Bridges Isolator
The H-Bridges isolator isolate the H-bridges from the other components so that the voltage changes in the H-bridges would not affect the other components on the PCB. It helps bridge together different components with different power supply so that there is not a short circuit. There are two of them for each of the two H-bridges necessary for the job needed for the sail motors. 2 isolators are used for the bike motors and should not be confused with these isolators described below.
First H-Bridge Isolator
Pin (Label) | Connected To |
---|---|
1 (VDD1) | 3.3V |
2 (IN1) | Pin 34 of DUE Shield |
3 (IN2) | Pin 30 of DUE Shield |
4 (GND1) | GND |
5 (GND2) | BGND |
6 (OUT2) | Pin 3 of HB2 |
7 (OUT1) | Pin 2 of HB2 |
8 (VDD2) | REG5V |
Second H-Bridge Isolator
Pin (Label) | Connected To |
---|---|
1 (VDD1) | 3.3V |
2 (IN1) | DAC1 of DUE Shield |
3 (IN2) | Pin 31 of DUE Shield |
4 (GND1) | GND |
5 (GND2) | BGND |
6 (OUT2) | Pin 3 of HB1 |
7 (OUT1) | Pin 2 of HB1 |
8 (VDD2) | REG5V |
Xbee Pro
The Xbee Pro was used in conjunction with CUSail's remote controller. The bike uses a different controller.
The Xbee Pro was already taken out before the creation of this wiki page. As such, the pin label could not be provided.
Linear Current Sensor
The Linear Current Sensor detect the change in current between the H-bridges and the Sail Motor and send the output to a device called current_sense. It also changes the output of H-bridges at 5 V to 3.3 V and act as a circuit protector for the Sail motor circuit. This measures AC or DC current levels and provide output based on measurement. In most applications, current sensors serve as circuit protectors and current monitors. The ACS 711, the model we currently use, is an open-loop current sensor. Open-loop current sensors are usually preferred in battery-powered circuits because of their low-operating power requirements. The current sensor takes in the output from H-Bridge 1, amplifies the signal, and sends it to the DUE. The current sensor also acts as a circuit protector, where it converts the H-Bridge 5V signal to acceptable voltage of 3.3V, preventing the possibility frying the DUE's microprocessor.
Pin (Label) | Connected To |
---|---|
1 (IP+1) | Pin 4 of HB2 |
2 (IP+1) | Pin 4 of HB2 |
3 (IP-1) | Pin 2 of Sailmotor |
4 (IP-2) | Pin 2 of Sailmotor |
5 (GND) | GND |
6 (FAULT) | GND |
7 (VIOUT) | CURRENT_SENSE |
8 (VCC) | 3.3V |
Servo1 and Servo2
The SERVO1 and SERVO2 pin headers provided power supply for designated servo motors. Currently, the bike does not implement any servo motors, explaining why these pin headers are not being used. In addition, these pin headers output the PWM signal required to control the servo. Below are the components and their corresponding connections.
SERVO1 Pin-Out | Terminal Connection |
---|---|
1 | FRONT_PWMOUT/SERVO1 |
2 | BAT+ |
3 | BGND |
SERVO2 Pin-Out | Terminal Connection |
---|---|
1 | REAR_PWMR/SERVO1 |
2 | BAT+ |
3 | BGND |
Although, the pin headers are not being used. The BGND terminal (both from SERVO1 and SERVO2) are used for supplying GND to the rear and front motor. TO minimize the number of unused pins, the SERVO1 and SERVO2 pin headers were removed and replaced with a MA02-1 pin header (i.e. two-by-one pin header array). Both pins supply BGND and can be used for RM and FM. NOTE: had to use a different Eagle library called divers.lbr to implement the MA02-1 component.
Other Components
IMU & RS
The IMU (Inertial Measurement Unit) is a sensor used to provide information regarding the bike's current angle and angular rates. The IMU is connected to the board using a six pin-out terminal (figure N). Because the IMU communicates with the DUE using SPI, the pin-out terminal requires MISO, MOSI, and SCK connections to the DUE. The pin-out terminal has a pin called IMU-CS and it is believed to be the designated SS (Slave Select) for the IMU. Additionally, two pins (5V and GND) supplies power to the IMU.
IMU Pin-Out | Terminal Connection |
---|---|
MISO | MISO |
MOSI | MOSI |
SCK | SCK |
IMU-CS | A11 |
3.3 V | 3.3 V |
GND | GND |
Similarly, the RS communicates to the DUE using SPI and thus requires the same terminals, MISO, MOSI, SCK, and (in this case) RS-CS. The RS is connected to the board through a six pin-out terminal, two terminals being GND and 3.3V. Initially, the RS terminal was used for the BeagleBone Black that is a micro-controller. The motivation behind the BeagleBone was that the DUE would communicate with the IMU through the BeagleBone. However, the BeagleBone is no longer used and the DUE directly communicates with the IMU directly via SPI. Currently, the pin-put terminal for RS is not used but serves as an extra SPI communication port and thus may be used for any future microcontrollers or peripherals (e.g. Raspberry Pi).
RS Pin-Out | Terminal Connection |
---|---|
MISO | MISO |
MOSI | MOSI |
SCK | SCK |
IMU-CS | Pin 52 |
3.3 V | 3.3 V |
GND | GND |
Design Changes for IMU & RS
Because the IMU is a critical component for developing an autonomous bicycle and is a sensor that needs to be read periodically and requires initialization, the current implementation of the IMU is going to be remained unchanged. Since the RS terminal is not being used but can be useful for any future implementation of micro-controllers or peripherals that require SPI, the RS pin-out terminal is also remain unchanged.
LEDs
The LEDs (Light Emitting Diodes) are used to alert users to the status of the bicycle during testing and operation. There were 5 LEDs, each attached to a different pin of the Arduino DUE.
- LED 1, Red, and LED 2, Yellow, are programmed to fit specific testing needs as necessary
- LED 3, Blue, blinks at the same rate as the Arduino DUE's cycle
- LED 4, Green, turns on when power is supplied to the bicycle
- LED 5, Red, redundantly acts as a counterpart to LED 4
The redundant LED 5 has been removed from the PCB. Other changes are pending based on the possibility of adding new status LEDs or incorporating a LCD screen instead. Either option will provide more feedback during testing of the bicycle.
LED | Connected To |
---|---|
LED 1 [RED] | DUE Pin 22 |
LED 2 [YELLOW] | DUE Pin 35 |
LED 3 [BLUE] | DUE Pin 36 |
LED 4 [GREEN] | DUE Pin 53 |
LED 5 [RED] | DUE Pin 44 |
Jumpers
Jumpers basically connect voltages between multiple different areas. The GND jumper connects the ground for both the 5V and 3.3V sides. The VIN jumper connects the 12V to VIN or BAT+ for different devices. The PWR jumper connects the BIKEIN or SAILIN to BAT+. Due to the PCB does not need to work for both the bike and sail team, the VIN and PWR jumper is not needed since the board can be simplified. However, the connection need to be replaced.
GND jumper
Pin | Connected To |
---|---|
1 | GND |
2 | BGND |
VIN jumper
Pin | Connected To |
---|---|
1 | 12V |
2 | VIN |
3 | BAT+ |
PWR jumper
Pin | Connected To |
---|---|
1 | BIKE-IN |
2 | BAT+ |
3 | SAIL-IN |
Encoders (RE1 and RE2)
The four-by-two pin headers RE1 and RE2 are meant to receive the six outputs (AIN1, AIN2, BIN1, BIN2, CIN1, CIN2) from the encoder and supply 5V power supply. To learn more about encoder outputs and their function, check Fundamental Concepts. Currently, only RE1 is used for the front motor encoder. Although RE2 is not being used, it was decided to keep it because of the potential benefit of having a secondary encoder. This includes differential measurements (i.e. minimizing error) for the front motor or simply another encoder for a new motor that may be used (e.g. landing gear). Because RE2 is not used, the power supply pins are used for the RC. To avoid this, an MA02-1 (i.e. two-by-one pin header) was added specifically for the RC.