| Electronics > Beginners |
| Connecting MCU to the outside world - how safe should it be? |
| (1/2) > >> |
| Manx:
I'm building a device consisting of a couple of sub-devices. They will be connected to each other with cables. There is a serial connection via RS485 which provides a buffer between microcontroller pins and the outside world and thus makes me feel quite safe about this. But there are also other signals between the devices - between two MCUs or between MCU in one device and some chip in another. For now, as I develop the project, these signals are connected directly. But something doesn't feel right to me when I think about letting it stay like this in the final version. It doesn't feel right to let MCU pins be connected to wires that go outside of the device's box. Could you comment on that? What are best practices in this area? Should I use some buffers? Or can it stay like this? Or maybe I should go crazy and make some additional protection with diodes, filters and whatnot? |
| martin1454:
Some ESD protection and a optocoupler then you cant go that much wrong |
| Mr. Scram:
It also depends on the microcontroller family. Something like that ATmegas are known to be fairly robust and endure abuse quite well, whereas some other families can be much more touchy. It's good to always assume the worst, but there's definitely differences in the amount of leeway you have. |
| AndyC_772:
I'd never just connect an MCU pin to the outside world directly. It's a mistake I made a long time ago, once. MCU pins have very limited protection against ESD damage, and essentially no protection at all against being connected to voltages in excess of the MCU's own supply. Think about what kinds of faults might occur outside the unit. How could the external signals be mis-wired? Could they be shorted together? Could a power supply be shorted to a signal pin? Could there be other signals in the same wiring loom which might end up being connected to your device as a result of a fault elsewhere? A separate buffer might be a bit more robust, but it'll still fry in an instant if (say) someone connects 12V to a device powered from 3.3V. You need to think about what specific faults might occur, what voltages might appear on what pins as a result, and what the consequences might be. |
| KL27x:
--- Quote ---what the consequences might be. --- End quote --- You might sell more? :-DD I personally expect when you plug 12V into a 3V device that it should die. The more expensive the device, the more I expect this to happen. You gonna buy a $1000 laptop and plug it into 40V adaptor? Maybe someone will figure out how to plug it into mains, directly? Why would you worry about that? I'm more worried about the connector being idiot-proof, polarity and whatnot. Why would you or anyone else go plugging in random things to see if they fit? ESD protection of the micro may not be any good at all, but I guess you have to determine that for yourself. |
| Navigation |
| Message Index |
| Next page |