Electrical Documentation¶
Board¶
Known issues:- BATT_GND is isolated from GND, but probably shouldn't be. Note that the charge input is connected directly to GND. (Fixed)
- Remove switch and charging power supply. (Fixed)
- Cut trace of middle top pin of button controller, and connect it to right top pin (<-- possibly correct). (fixed)
- Power LEDs could use larger resistors. Like seriously. (Fixed. Also changed charge led to 3.3V since charge pins were removed)
- PWR_WDOG should be pulled up before the NOT gate, not down after it (<-- this solution still not completely correct). (removed PWR_WDOG and Inverter)
- Use a spare IO from the gumstix that goes through a level converter to directly control the clear pin. Should be pulled down on the 1.8V side of the level converter (fixed)
- Add a shutdown button for the gumstix
- The AND gate for AVR_RESET is SOT23-6, but does not line up with the pads on the board. For now we'll just connect the reset line to AVR_ISP_RST.
- Additionally, GND and VCC on the AND gate are switched.
- Break out AVR TX/RX for easier debugging. (fixed)
- SONAR_TX and SONAR_PWM1 are switched.
- !ENABLE on the stepper driver should be connected to GND, not 3V3. (fixed)
- The i2c level converters have a narrower footprint than the pads on the board.
- Sparkfun no longer carries the gyroscope, so replace it with an i2c one. (fixed)
- Why does each of the level translators have a 10kOhm resistor between 1.8V and ground? I don't think they serve any purpose.
- ARM debug TX and RX are switched on the four-pin header. This may be intentional, but (a) it's confusing, and (b) it would be more convenient if it matched the Sparkfun USB<->serial breakout board, which matches the labels (but not connections) on the four-pin header.
- Level Converter stops gumstix from being inserted (fixed)
- Add DS2786 Battery Fuel Gauge on battery input
- Either SLEEP, ENABLE, or RESET on the stepper controller should be wired to the AVR to prevent high current usage by the stepper when it's not moving (fixed. !Sleep is connected to avr)
- 3.3V is not given to breakfly on connector SV1, and breakfly needs it for the cliff sensors
- In the eagle part for the pushbutton controller, OUT and OUT.L are switched. As a result, SHDN is connected to the wrong one.
- Remove BOM from mainboard and breakout reset and i2c for bom sensors in from and send to back. (removed from board, still need to add breakout)
- 40 pin ribbon header is facing a possibly inconvenient direction
- The stepper motor header is the wrong size
- Encoders 2 and 3 are switched, and inconsistently wired
- Resistors: 33k (R0603), 1M (R0603)
AVR¶
AVR: http://atmel.com/dyn/resources/prod_documents/doc8266.pdf
Cliff sensors: http://www.pololu.com/catalog/product/1135
Name | Pin | Alternate pin function |
BOM_SIG0 | PB0 | PCINT0 |
BOM_SIG1 | PB1 | PCINT1 |
BOM_SIG2 | PB2 | PCINT2 |
BOM_SIG3 | PB3 | PCINT3 |
BOM_EMIT0 | PF4 | |
BOM_EMIT1 | PF5 | |
BOM_EMIT2 | PF6 | |
BOM_EMIT3 | PF7 | |
SONAR_TX | PD2 | INT2 |
SONAR_PWM0 | PD3 | INT3 |
SONAR_PWM1 | PG1 | |
STEP_MS | PB7 | PCINT7 |
STEP_STEP | PD6 | |
STEP_DIR | PD7 | |
ORB0_B | PB4 | OC2A |
ORB0_G | PB5 | OC1A |
ORB0_R | PB6 | OC1B |
ORB1_B | PE3 | OC3C |
ORB1_G | PE4 | OC3A |
ORB1_R | PE5 | OC3B |
EDGE_DETECT_0 | PD0 | INT0 |
EDGE_DETECT_1 | PD1 | INT1 |
EDGE_DETECT_2 | PE6 | INT6 |
UART_RX | PE0 | RXD0 |
UART_TX | PE1 | TXD0 |
USR_BUT_1 | PE7 | INT7 |
USR_BUT_2 | PE2 | |
EXT_BUT_1 | PF1 | |
EXT_BUT_2 | PF2 | |
GYRO_PD | PD4 | |
GYRO_ST | PD5 | |
GYRO_OUT_YAW_FILT | PF0 | ADC0 |
GYRO_OUT_PITCH_FILT | PF3 | ADC3 |
ACCES_DETECT | PG0 | |
ACCES_PIN0 | PG2 | |
ACCES_PIN1 | PG3 | |
ACCES_PIN2 | PG4 | |
ACCES_PIN3 | PG5 |
Timer | Bits | Prescaler | Value | Compare A | Compare B | Compare C |
0 | 8 | 1 | BOM 38kHz and ROS | N/A | ||
1 | 16 | Orb 0 G | Orb 0 R | |||
2 | 8 | Orb 0 B | N/A | |||
3 | 16 | Orb 1 G | Orb 0 R | Orb 1 B | ||
4 | 16 | 64 | BOM data | |||
5 | 16 | 8 | Sonars and BOM rx |
Timer 0 will be handled in Atmega128rfa1.cpp, and its ISR will first deal with the ROS timer and then toggle BOM output.
ARM¶
Motor Driver: 2x TB6612FNG drivers with PWM input
Motors/encoders:Name | GPIO # | Another thing | A third thing |
MOTOR0_PWM | 147 | GPT8 | PWM |
MOTOR0_IN1 | 70 | L | DD00 |
MOTOR0_IN2 | 71 | L | DD01 |
MOTOR0_ENC_A | 78 | L | DD08 |
MOTOR0_ENC_B | 79 | L | DD09 |
MOTOR1_PWM | 144 | GPT9 | PWM |
MOTOR1_IN1 | 72 | L | DD02 |
MOTOR1_IN2 | 73 | L | DD03 |
MOTOR1_ENC_A | 80 | L | DD10 |
MOTOR1_ENC_B | 81 | L | DD11 |
MOTOR2_PWM | 146 | GPT11 | PWM |
MOTOR2_IN1 | 74 | L | DD04 |
MOTOR2_IN2 | 75 | L | DD05 |
MOTOR2_ENC_A | 82 | L | DD12 |
MOTOR2_ENC_B | 83 | L | DD13 |
MOTOR3_PWM | 145 | GPT10 | PWM |
MOTOR3_IN1 | 76 | L | DD06 |
MOTOR3_IN2 | 77 | L | DD07 |
MOTOR3_ENC_A | 84 | L | DD14 |
MOTOR3_ENC_B | 85 | L | DD15 |
Power¶
Short TI paper on battery reverse current protection: http://www.ti.com/lit/an/slva139/slva139.pdf