Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

None of the power nets are connected. The board was powered with 12 V, and the correct values were measured on the 3V3 and 12V nets. The 5 V converter is not populated on this version of the BMS carrier, since it is not required for validating the new features of this revision.

With the kill switch connector shorted, toggling PB9 (kill switch enable) causes the on-board relay to close and open. Similarly, reading the value of PA15 (kill switch monitor) while toggling PB9 correctly displays the state of the kill switch. So the basic functions of the HSD and LV relay are working.

When attempting the MCP23008 smoke test, the GPIOs are not toggled. By measuring the I2C wires with an oscilloscope, I noticed the clock signal was constantly 3.3 V. I eventually found that the pin on the mezzanine connector on the BMS carrier was not soldered to the PCB. I quickly checked the other pins on that side and found a few other pins that were not soldered to the PCB, including the current sense MOSI. After soldering these pins, the MCP23008 smoke test correctly toggles and reads the values of the GPIOs. The only issue is that the values that are read for the first time after the GPIOs are initialized are wrong.

 Here's the output showing the incorrect values being read.

Version: 298bdac-dirty
[0] projects/smoke_mcp23008/src/main.c:100: Testing GPIO initialization...
[0] projects/smoke_mcp23008/src/main.c:101: Initializing all pins out...
[0] projects/smoke_mcp23008/src/main.c:62: State for pin 0 set and read correctly
[0] projects/smoke_mcp23008/src/main.c:62: State for pin 1 set and read correctly
[0] projects/smoke_mcp23008/src/main.c:62: State for pin 2 set and read correctly
[0] projects/smoke_mcp23008/src/main.c:62: State for pin 3 set and read correctly
[0] projects/smoke_mcp23008/src/main.c:62: State for pin 4 set and read correctly
[0] projects/smoke_mcp23008/src/main.c:62: State for pin 5 set and read correctly
[0] projects/smoke_mcp23008/src/main.c:62: State for pin 6 set and read correctly
[0] projects/smoke_mcp23008/src/main.c:62: State for pin 7 set and read correctly
[0] projects/smoke_mcp23008/src/main.c:104: GPIO initialization complete. Now beginnin
[0] projects/smoke_mcp23008/src/main.c:83: State for pin 0 incorrectly
[0] projects/smoke_mcp23008/src/main.c:83: State for pin 1 incorrectly
[0] projects/smoke_mcp23008/src/main.c:83: State for pin 2 incorrectly
[0] projects/smoke_mcp23008/src/main.c:83: State for pin 3 incorrectly
[0] projects/smoke_mcp23008/src/main.c:83: State for pin 4 incorrectly
[0] projects/smoke_mcp23008/src/main.c:83: State for pin 5 incorrectly
[0] projects/smoke_mcp23008/src/main.c:83: State for pin 6 incorrectly
[0] projects/smoke_mcp23008/src/main.c:83: State for pin 7 incorrectly
[0] projects/smoke_mcp23008/src/main.c:87: GPIO state = low

By modifying the MCP23008 smoke test, I set the HSD diagnostic and select pins high, and activated the LV relay, then read the analog current value. Before activating the relay, the current is 0 and after, the current is about 1525. The current sense output was measured to be 1.17 V using a handheld DMM. I’m not sure how to convert the analog value to a voltage, but I think the value is about 1.23 V. I’ll double check these numbers later.

I initially thought that SPI communications were not working because the ADS1259 smoke test in master was not returning anything. I used an oscilloscope and watched the SPI signals after running the smoke test and the voltages did not change at all. I checked for shorts to adjacent pins and ground, and for continuity between the pins on the mezzanine connector and the LTC6820. Everything seemed fine. Later, I realized that the version on master was not the same as the version I used to validate current sense (specifically, there was no baudrate set so SPI initialization was failing and hence no signals).

 This is the output using the version I used for current sense validation.

Version: d5cb3e5-dirty
smoke test initializing ads1259
ads1259 post init register values:
reg 0: 0x25
reg 1: 0xc0
reg 2: 0x93
reg 3: 0x0
reg 4: 0x0
reg 5: 0x0
reg 6: 0x0
reg 7: 0x0
reg 8: 0x40
ads1259 driver init all ok
=========READING # 1========= vref mv: 2500
read: chksum: 0x53, lil endian: [bb fe ff]
raw reading as a float: 0xb8c80000
*1: 0, *10: 0, *100: 0, *1000: 0
=========READING # 2========= vref mv: 2500
read: chksum: 0x19, lil endian: [80 ff ff]
raw reading as a float: 0xb8200000
*1: 0, *10: 0, *100: 0, *1000: 0
=========READING # 3========= vref mv: 2500
read: chksum: 0x60, lil endian: [47 ff ff]
raw reading as a float: 0xb85c0000
*1: 0, *10: 0, *100: 0, *1000: 0
=========READING # 4========= vref mv: 2500
read: chksum: 0x7c, lil endian: [63 ff ff]
raw reading as a float: 0xb8340000
*1: 0, *10: 0, *100: 0, *1000: 0
=========READING # 5========= vref mv: 2500
read: chksum: 0x60, lil endian: [47 ff ff]
raw reading as a float: 0xb85c0000
*1: 0, *10: 0, *100: 0, *1000: 0
=========READING # 6========= vref mv: 2500
read: chksum: 0x15, lil endian: [fd fe ff]
raw reading as a float: 0xb8a00000
*1: 0, *10: 0, *100: 0, *1000: 0

  • No labels