Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: SFH618A-2 opto-coupler

  1. #1
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    877

    SFH618A-2 opto-coupler

    Hi all, I am changing from using usb-midi input for driving some CV outputs for an analogue synth, to using midi DIN. The DIN input seems to be working on breadboard when testing using serial monitor. Has anyone been using these SFH618 opto-couplers, I am after some advice on the resistor values. I am currently using 220ohm on the input and 560ohm on the output, as in the diagram. Like I say, seems to be working, but wanted any input from those who have used it, before i start soldering things up.

    Click image for larger version. 

Name:	optoCoupler2.jpg 
Views:	584 
Size:	81.0 KB 
ID:	4876Click image for larger version. 

Name:	opto2.jpg 
Views:	278 
Size:	120.0 KB 
ID:	4878
    The data sheet is here: http://pdf1.alldatasheet.com/datashe...SFH618A-2.html
    and the product page for Maplin is here: http://www.maplin.co.uk/p/low-curren...-coupler-cy94c

    many thanks for any suggested values, m
    Last edited by mortonkopf; 08-13-2015 at 05:40 PM.

  2. #2
    Senior Member Constantin's Avatar
    Join Date
    Nov 2012
    Location
    In the yard with a 17' Dia. Ferris Wheel
    Posts
    1,408
    Here is a resistor calculator I have liked. They have both DC and AC calculators.

    FWIW, I use AC-compatible opto-couplers. The only difference to yours (net) is the removal of the external diode.

  3. #3
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    877
    Thanks Constantin - roughly 650 to 700 Ohm by the calculator for a 5mA output. According to the calculator, i guess that my mA output with the 560Ohm resistor is around 6mA.
    Last edited by mortonkopf; 08-13-2015 at 06:02 PM.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,262
    If you compare that opto's specs with the usual PC900, it's a lot slower.

    PC900 has typical 1 us HIGH->LOW, and 2 us LOW->HIGH propagation delay, with 0.1 us rise and 0.05 us fall time.

    SFH618 has 6 us turn on time and 5.5 us turn off time. I'm not sure if "turn on/off time" is really the same as "propagation delay". But the rise and fall time specs probably compare directly, which are 3.5 and 5.0 us.

    One bit at MIDI baud rate is 32 us... so maybe timing in the 5 us range might work, but you definitely would not want to pass that received signal to a MIDI "Thru" connector.

    If you look at the test condition in the SFH618 datasheet, they got those 5 us numbers using a 100 ohm pullup resistor!

  5. #5
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    877
    Paul, thanks for the pointer on this opto's speed issues. TBH, that spec sheet test conditions table did not make sense to me regarding voltage drop requirements, and how the us values were derived.

  6. #6
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    877
    As a follow up with some results using the SFH618 optoisolator. I have had some success at signals being received and processed, and seems to work well for my purposes of Midi Din -> CV out. Set up as below:
    Click image for larger version. 

Name:	midi_monotron2.png 
Views:	352 
Size:	666.1 KB 
ID:	4992

    Some issues remain, such as very large gate values seeming to 'flood out' the signal, and the pitch scales being slightly off, but this is most likely a software side problem. This uses Marc Nostromos code and based on his great website: http://www.marc-nostromo.com/midi-co...-a-teensy-3-0/
    I just had to make a couple of small changes to convert the MIDI signal from USBmidi to Rx pin0, and Marcs code worked.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •