Should one use resistors to protect an mbed when using it to simulate keyboard key presses

mbedprotectionresistors

One can use mbed to act as USB Host or as a USB Device. One use of the latter is to have it emulate a USB Keyboard by sending normal key presses. The general page on using mbed as a USB Device is in their handbook here: https://mbed.org/handbook/USBDevice But looking at the photos of completed projects on that page, for example the one below, they do not use any resistors to protect the mbed from power errors coming over the USB connection.

mbed as USB Device

Is that how one should do it? Would it be better to include protection and if so what would the amended schema/diagram be?

Best Answer

As pjc50 said, you can't put resistors in the power or data of the USB without interfering with the communication.

If you want to avoid any damage to the USB port, I'd recommend leaving disconnected the VCC pin of the USB breakout board, powering the MBED with a different power source. You will prevent any shortcircuit due to incorrect wiring.

Related Topic