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 5 Next »

Since the DC-DC converter that was requested as a sample has not arrived yet, I soldered wires to short the pads of the DC-DC converter. Isolation is not important at this point because the board will not be connected to 150 V during validation. Using the continuity mode of a handheld DMM, I verified that none of the power nets are connected. I also checked for shorts between all adjacent pins of the ADC, since I only have one and I don’t want to destroy it. Upon powering the board, all LEDs lit up, and the LDO was correctly outputting 5 V. The ADC’s internal reference is correctly outputting 2.48 V. The LTC6820 is outputting 2 V at the IBIAS pin, indicating that it is awake. So far, everything seems to be working.

The DC-DC converter has arrived, so I added it to the PCB. The INA240 correctly outputs a voltage that is proportional to the input voltage. I connected all the wires for SPI communication to validate the ADC. During testing, I powered the controller board first by accident, which I think output a high signal to the CS of current sense, exceeding the supply voltage (the board wasn’t powered), which may have damaged the ADC or LTC6820. After trying to send ADC commands and not getting any response, I remembered that the LTC6820 has a push-pull driver on the CS and CLK pins, so I removed it. Still, when trying to read the registers, the ADC responded with 0x00, but every third byte was 0x80. I believe this is because the data out pin will output a high signal while data conversions are taking place, and then switch low when the conversion is complete. Upon reading the datasheet again, I learned that conversions need to be stopped before registers can be read/written to. This is the output from stopping the conversions and then reading the registers:

[0] projects/smoke_spi/src/main.c:53: Byte 0 of response: 25
[0] projects/smoke_spi/src/main.c:53: Byte 1 of response: 8
[0] projects/smoke_spi/src/main.c:53: Byte 2 of response: 80
[0] projects/smoke_spi/src/main.c:53: Byte 3 of response: 0
[0] projects/smoke_spi/src/main.c:53: Byte 4 of response: 0
[0] projects/smoke_spi/src/main.c:53: Byte 5 of response: 0
[0] projects/smoke_spi/src/main.c:53: Byte 6 of response: 0
[0] projects/smoke_spi/src/main.c:53: Byte 7 of response: 0
[0] projects/smoke_spi/src/main.c:53: Byte 8 of response: 40

These values match the reset values for all the registers, except for bit 7 of CONFIG0, which is a 0, but should be a 1. This is a reserved, read-only bit, so I don’t know if it affects the operation of the ADC. After reading some online support forums on TI’s website, it seems that other people are also reading a value of 0x25 in CONFIG0. Since reading from registers seems to work, I wrote 0b10100000 to CONFIG0, which should turn off the internal reference and the SPI timeout. Here’s the result of reading from CONFIG0 after writing to it:
[0] projects/smoke_spi/src/main.c:53: Byte 0 of response: 20

Unsurprisingly, the reserved bit didn’t change. The reference voltage decreased to 1.2 V. I’m not sure why the reference stayed at 1.2 V instead of 0 V, but writing to registers seems to work.

I found out that firmware was expecting the start pin to be pulled low instead of high. I’m not sure if this is necessary because the datasheet seems to suggest that data can be read from the ADC in continuous conversion mode, but I still attempted to change it. I couldn’t cut the 5 V trace on the PCB because it continues to the LTC6820. Instead, I decided to try lifting the pin off the PCB, soldering a wire to it, and then soldering the wire to ground. After the wire was soldered to the pin, the pin twisted and snapped off while bending the wire. In hindsight, I should have just put Kapton tape on the pad. Now that the pin was gone, I just soldered the wire to the stub that was left and even though it’s delicate, it seems to work. The firmware smoke test required some changes to make it work. Here’s all the changes I can remember at the moment:

  • The read register command wasn’t sending the byte that indicated how many registers to read. This was an oversight from firmware and was never programmed.

  • The ADC’s internal reference bias was not enabled. This is required for the current sense amplifier to output the correct value.

After fixing the above problems, the ADC readings were fairly accurate. Here are the inputs and outputs during testing:

Voltage at Input of ADC

Input - 2.48 V Reference

ADC Reading

3.29 V

810 mV

805 mV, 806 mV

2.48

0 mV

-0.195503234863 mV

0 V

-2.48 V

-2.497 V

These values were measured without any calibration.

  • No labels