Attiny85 as USB HID + Charger

How i can make a single board device with attiny85 as HID + phone charger at the same time connected to phone?

I know that something like that exists


But can i omit this adapter, and just connect +- from charger to attiny, and connect that attiny to phone trough usb -> type-c adapter?

You can - if you are good at soldering.

1 Like

I understand that, but will that work? maybe adapter on photo has some additional circuit? this is what im asking

Not easy to do that, if it is even possible.
Wrong chip?

depends, might be possible, might charge slower if it doesn't use USB PD anymore

Why wrong? VUSB lib + Attiny85 = Digispark

Interesting, never heard of that, cool.

1 Like

The following setup (Fig-1) must work.
Attiny85USB
Figure-1:

1 Like

I understand that this setup will work, i want to not use this adapter, and instead make it on board with my attiny85, so in result my board will have in and out port, in -> from charger, out -> to phone.

Can you please, transform the text description of post #9 into a hand drawn diagram in order to visualze the connections.

Note that what ever you do with VUSB, you have USB1.0 speed. Otherwise you'd be just fine. If PD is opported by the cable then you'd have a LDO or stepdown to 5V in the box with the switch.

1 Like


This is how i want to make it work, also keep in mind, that i will not use digispark directly, just attiny85 with almost same circuit as digispark

As i know, in case that i drawn, PD will not be enabled, cause im using only +- form charger

Referring to your post #12: Does it mean that you want to program (creating and uploading sketch) the ATtiny85 MCU of the Digispark Board using your Android Phone or iPhone?

No, i will program it manualy, and then use in my pcb, this attiny will act as mouse/keyboard

Then what is the purpose of connecting phone with Digispark Board?

Why simple if you can make it complicated?

To make attiny act as mouse/keyboard, and at the same time charge phone.

What you mean?

Does it men that you want to interface a Mouse/Keyboard with your PC using ATtiny85 MCU as an Interface Controller? If yes, then Good Luck!