Digital Level Shift Used With Current Sources

For help with the bus itself (not a specific product).
Posts: 208
Joined: Sun Sep 18, 2016 6:07 pm

Digital Level Shift Used With Current Sources

Postby rpu_bus » Mon Jun 19, 2017 12:39 pm

K38 is the marking for BSS138 which is used to level shift voltage for I2C communications. It also works for higher voltages. The control boards have current sources that operate from the input voltage. The K38 is then used to level shift that to a voltage that is safe for the MCU (e.g. typically 4V), before going into the current protection resistor. The protection resistor is sized to allow the MCU to pull down or sink a current source. This means the MCU is protected while gaining the ability to sink a 20mA current source from the 12V battery and therefore light up a string of LED's or a string of solid state relays to turn on three phases with one control line that still has enough voltage drop for an LED, and can be manually open with a switch.

DigitalIO_WithCurrSource.png (9.34 KiB) Viewed 112 times

A note regarding the protection resistor, which is sized to keep the pin current below the 40mA absolute maximum current. It is not a perfect solution and should not be expected to allow the MCU to last for more than a few hours of operation at the maximum current flow (it may work for a few weeks or a few hours). The point is that it is not a perfect solution but it should give a chance to see a mistake before turning into a critical failure. So verify that the pin is sinking no more than about 20mA, before moving to the next task. The ATmega238p and ATmega1284p are are able to sink 20mA on a pin for over twenty years, which means they can be directly interfaced to many real world hardware controls.

other notes:

Return to “Installation, Troubleshooting, and Usage”

Who is online

Users browsing this forum: No registered users and 1 guest