I've been trying to add a MIDI INput to an ATtiny-based synthesizer, powered by a CR2032 battery (3v) and running softwareSerial.

Currently I'm using an H11L1 optocoupler, which works fine at 5v, but I am missing notes at 3V; I'm not sure whether the problem is the optocoupler, or that the ATtiny can't establish proper communication on that voltage; any pointers will be much appreciated :)

  • This is what parametric searches on electronics suppliers' websites are for. And what does this have to do with Arduino anyway? This is both a general electronics question and a shopping question: doubly off-topic. – Majenko Nov 7 '17 at 10:53
  • I thought it would be better to ask a generic question, but it does relate to an ATtiny-powered synthesizer, and MIDI is a popular topic for Arduino enthusiasts. As ever lower voltage MCUs are becoming commonplace, I believe it'd be very useful for the community to get an update on the devices that work with them. – jose Nov 7 '17 at 13:57
  • Generic questions belong on electronics.stackexchange.com - however it would get closed there as a shopping question. – Majenko Nov 7 '17 at 14:01
  • if asking in this way was a mistake on my part, I apologize. Maybe it's worth keeping it alive on the merit of the interest people have shown on it already, though. – jose Nov 7 '17 at 17:29

The H11L1's minimum supply voltage is 3 V. There are low-power optocouplers like the TLP2361, but event those do not go below 2.7 V. (And those limits are actually designed for 3.3 V ± 10 % or 3.0 V ± 10 %.)

To get a high-speed optocoupler for lower voltages, you have to build it yourself from discrete parts, e.g.:
MIDI input with PC817

(R1 is sized for the PC817-A's minimum CTR of 50 %; higher CTRs should use a lower value for R1. Q1 can be any random small-signal transistor. Adjust R2 for about 1 mA, depending on VCC.)

  • What is the purpose of Q1? The proposed circuit has an inverted signal at the output. – AltAir Nov 7 '17 at 8:40
  • 1
    The PC817 alone would be too slow; Q1 has a lower input impedance and reduces the voltage swing at the PC817's output. The output of this circuit has the same polarity as the original MIDI circuit (both transmitter and receiver are inverting). – CL. Nov 7 '17 at 8:47
  • If the load is a digital input which has high internal resistance. Then Q1 is not needed as a buffer? – AltAir Nov 7 '17 at 9:08
  • 1
    When putting a pull-up resistor directly on the PC817's output, it would be too slow. Q1's input impedance is its base, as seen by the PC817. The optocoupler does not provide a voltage signal but is used as a current source to reduce its Miller capacitance. – CL. Nov 7 '17 at 9:15

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