I am planning to build a sensor module for smartphone using Attiny 85 as its microcontroller.

The sensor module will have a USB type A and to connect to the smartphone, OTG is required.

Serial Communication (TX RX) will be used for them to communicate with each other.

My questions are:

  1. TX of Attiny85 should be connected to D+ or D-?

  2. TX RX of Attiny85 will have 5V for its logic signal voltage level. Do I need to use a voltage regulator to change them to 3.3V for the D+ and D-? Commonly, what logic signal voltage level is used for D+ and D-?

  3. What is the max current can be drawn from smartphone's USB

Note: My smartphone model is Redmi Note 4. TX RX of Attiny will be done by using software serial following this guide https://www.instructables.com/id/ATtiny85-ATtiny84-Analog-Pins-Serial-Communication/


1 Answer 1


1) USB is not compatible with serial communications

2) USB is 3.3V levels so connecting 5V serial comms will kill your phone

3) 100mA without enumerating USB, maybe 500mA after requesting it.

  • \$\begingroup\$ Thank you for your fast and direct answer! Appreciate it. Regarding to your first answer, if USB is not compatible with Serial communication,then how it can be used to communicate with Arduino via Serial ? \$\endgroup\$ May 7, 2019 at 10:25
  • \$\begingroup\$ In the link you posted, there is a board that has a FTDI USB to serial converter chip. \$\endgroup\$
    – Justme
    May 7, 2019 at 10:30
  • \$\begingroup\$ Thank you for the great input! \$\endgroup\$ May 7, 2019 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.