The LLC-SPI Click is a very useful Click board™ which can be utilized as the level converter for logic signals. The topology of this logic level conversion (LLC) circuit is perfectly suited for SPI communication between devices with unmatched voltages of their logic signals. Although there are some specialized integrated circuits on the market, sometimes it is more convenient to have a simple solution made of just a few passive elements and four MOSFETs.
Besides this, MOSFETs can withstand up to 20V across their terminals (12V VGS), and supports far greater currents than the typical ICs, making them less likely to fail. The LLC circuitry, also known as the level translator or level shifter, can be used in virtually any application that utilizes the SPI communication protocol and needs matching between logic voltage levels.
LLC I2C Click does not use any integrated circuit, as already mentioned. With ICs avoided completely, there are some benefits gained: the overall cost of the LLC circuit is greatly reduced, a more robust MOSFET solution reduces the failure rate, and when powered off, both the low voltage and the high voltage sides are isolated from one another (by non-conductive MOSFETs). This type of circuit is sometimes referred to as a level shifting or level translating circuit and it is often necessary when one SPI device (typically a sensor IC) uses different logic voltage levels for the communication than the controller device, which is a microcontroller (MCU) in most cases. The conversion of this circuitry is bi-directional, which makes it suitable to be used with the SPI communication protocol.
The SPI protocol was first introduced by Motorola, in the '80s. The circuit is divided into low-side and high-side sections for future reference, however, both up-shifting, and down-shifting of the voltage level is possible. The mechanisms are slightly different, so each will be explained separately.
When there is a HIGH logic level on a low-side SPI line, both the gate and the source voltage of the MOSFET will be equal. This will turn OFF MOSFET since there is no gate-source voltage difference (e.g. VG=VS=VREF), while the pull-up resistor will pull the high-side SPI pins to a HIGH logic level.
When the low-side SPI line is driven to a LOW logic level, it will drive the source terminal of MOSFET to a LOW logic level, too. Since the gate is set to a fixed voltage value of the low-side voltage reference, a potential difference will form between the gate and the source terminal, causing the VGS voltage to appear. When this voltage raises above the gate threshold voltage (1.2V typically for the used transistors), the MOSFET will turn ON, conducting current through the high-side resistor, effectively bringing SPI pins on both low-side and high-side down to a LOW logic level.
When there is a HIGH logic level on a high-side SPI line, both the gate and the source voltage of the MOSFET will be equal, just like in the Up-shifting scenario.
When a high side SPI line is driven to a LOW logic level, it will drive the drain terminal of the MOSFET to a LOW logic level. Since the source of the MOSFET remains at the HIGH logic level (pulled up by a resistor), current will flow through the body diode of the MOSFET. In turn, the source-drain voltage (VSD) will drop towards the forward voltage of the MOSFET body diode. The lowered potential of the source terminal will result in forming the VGS voltage, ultimately turning ON MOSFET. From this moment, the MOSFET conducts the current, effectively bringing SPI pins on both low-side and high-side down to a LOW logic level. However, there is one condition in this case: the VGS voltage, which is equal to voltage of the low-side reference minus the forward voltage drop across the body diode, needs to be sufficient to allow turning MOSFET ON.
VGS = VLS - VSD VGS > VTH
The reference voltage for the high-side can be selected by using the SMD jumper labeled as VCC SEL. The pull-up voltage for the high-side can be selected from the mikroBUS™ power rails, so it can be either 3.3V or 5V. For the low-side, an arbitrary reference voltage can be applied to the VSL pin of the J1 header, respecting the maximum voltage rating, as well as the condition mentioned above. J1 is the standard, 2.54mm pin-header. The low-side SPI related pins are also routed to the J1 header, allowing an external device to be connected (using the standard wire-jumpers). As already mentioned, the low-side can actually use higher voltage levels than the controller, but in most usage scenarios, it will be lower than the controller, thus the terminology used in the text above.
No reviews yet.
Looking for answers to technical questions?
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
Log in or register to post comments.