TRS300
Established
Hi all, thougt I'd pass on a tip I've been using for some time now. It has to do with input signals to a mcu device. Let's take a VESC for example. It's based on the STM32 which uses 3.3v I/O level. Let's say you want to capture a 12v brake light signal. Typically people would use a voltage divider to ensure that the input voltage does not exceed 3.3v. But depending on the resistors used its possible to damage the MCU if the ground on the divider resistor failed.
The tip is this... The STM32 does not get damaged from high input voltage, it gets damaged by excessive input current. If you were to wire your 12v brake light signal through a 10k ohm resistor it would drive the input pin high and not damage the STM32 chip. You can do the same thing with any high voltage signal. Just size the resistor to only pass >2ma of current. If you want to still use a voltage divider use a high ohm resistor on the signal line as extra protection. Like I sad, I don't use a divider at all. I've done this on arduino, esp32s, mbed, and STM32s. No issues on any of these devices.
I currently have two VESCs sharing a common throttle signal. The signal is fed through 10k resistors in parallel to each VESC. It works perfectly and if the signal for some reason went high to a high voltage (ie 5V), it would not damage the VESC. And each VESC could not damage the other one either. A loss of signal connection would result in no signal at all. It's actually safer.
Anyway, it's a technique I don't see mentioned often for some reason.
The tip is this... The STM32 does not get damaged from high input voltage, it gets damaged by excessive input current. If you were to wire your 12v brake light signal through a 10k ohm resistor it would drive the input pin high and not damage the STM32 chip. You can do the same thing with any high voltage signal. Just size the resistor to only pass >2ma of current. If you want to still use a voltage divider use a high ohm resistor on the signal line as extra protection. Like I sad, I don't use a divider at all. I've done this on arduino, esp32s, mbed, and STM32s. No issues on any of these devices.
I currently have two VESCs sharing a common throttle signal. The signal is fed through 10k resistors in parallel to each VESC. It works perfectly and if the signal for some reason went high to a high voltage (ie 5V), it would not damage the VESC. And each VESC could not damage the other one either. A loss of signal connection would result in no signal at all. It's actually safer.
Anyway, it's a technique I don't see mentioned often for some reason.
Last edited:

