Punica has the latest iteration of current sources on the board which can not damage an MCU pin. To be truly useful I want the current source to be able to take power from the VIN voltage (those wants are a PITA).
Years ago I noticed some circuits that level shifted I2C with a nearly useless BSS138 N-CH MOSFET. After playing with some SPICE simulations I started using the level shift for 12V to 5V and on the Punica from 36V to 5V. It turns out that running a 20mA current source from 36V and then through a ridiculous string of LED's befor going into a level shift and then into the MCU allows the MCU to control that ridiculous string of LED's.
I have yet to let out the smoke with these current limited sources, I think they are intrinsically safe to use with the MCU inputs. I also think it helps that the MCU inputs are tolerant as possible of my mistakes (e.g. limited to 40mA from other sources) without getting overly in the way of what I am trying to do.
127 Ohm inline resistor drops 5V at 40mA when the MCU pin is high and the plug-able connector has been shorted to ground. The MCU will survive this for a while, but the problem needs to be fixed since the MCU is taking damage. Driving a green LED is fine since the current will be less than 20mA and it can do that for over 25 years. Driving a red LED directly is a little harmful since the current will be about 25mA (perhaps it does not need to be continuously on), but it can probably do that for 7 years.
The current source is aimed at 22mA but with luck will fall in the range of 20 to 24mA. A digital input with that current source into it should be expected to work for 10 years with the continues stress.
To be clear this is all just best guesses based on my present experience, and I am pushing everything to much for what the Telecom world would consider safe but this also needs to be useful, which is code for get out of my way and let me do the thing I am trying to do (but also give me a chance to see my mistake before I make a smoking cinder out of it).
ATmega1284p Controller /w pluggable connectors for 9DIO, 2ICP, 6ADC
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest