The transistor is cheaper, smaller and faster. I think only the first two matter in your case. The opto is just overkill.
For testing, you don't really have to wait - you could temporarily drive the transistor from some ESP I/O pin for that.
The transistor is cheaper, smaller and faster. I think only the first two matter in your case. The opto is just overkill.
For testing, you don't really have to wait - you could temporarily drive the transistor from some ESP I/O pin for that.