0
\$\begingroup\$

I need to solve a problem with connecting a wireless charger (cheap chinese one without datasheet) to a microcontroller (ATtiny85).

If the phone is not placed on the charger, there is 5 V in the signal, if the phone is placed on the charger and charging, there is 3.3 V.

I need this signal to be passed to the microcontroller with a digital input. However, it only responds to 0-1 V as LOW and 3-5 V as HIGH. How to convert the 3.3-5 V range from the charger to 0-5 V for the microcontroller?

I tried a Schmitt trigger, but don't know how to go low under 1 V.

\$\endgroup\$
2

2 Answers 2

3
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab enter image description here

The Microchip ATtiny85 GPIO pins are ST so this should be adequate.

enter image description here

\$\endgroup\$
0
\$\begingroup\$

A simple solution is a non-inverting HCMOS gate and a resistor divider. enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ I'm not sure if this would work reliably. For \$V_{CC}=4.5V: V_{IH,MIN} = 3.15V, V_{IL,MIN} = 1.35V\$. Here the gate input is 3.11V and 2.05V for VG1 = 5V and 3.3V, respectively. \$\endgroup\$
    – Velvet
    Nov 22, 2022 at 14:54

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.