Go Down

Topic: midi to cv project minor problem (Read 643 times) previous topic - next topic

alisomay

Apr 18, 2018, 10:55 am Last Edit: Apr 18, 2018, 10:57 am by alisomay
https://github.com/elkayem/midi2cv

I use elkayem's code and schematics for this project and actually it works great but only when i connect midi input directly to arduino, i couldn't make it work with an optocoupler.

i connect the optocoupler SFH617A (project uses SFH618A i don't have it at the moment SFH617A looked similar to me) like in the schematic and actually get output. The RX led on arduino blinks but i don't get pitch CV output.

When i connect midi directly, both RX and TX on arduino blinks and i get very precise CV output with no errors.


I tried to change the input resistor to optocoupler to maybe get more current flowing but it only made the RX led on arduino light a bit brighter still no CV out.

Any ideas?

By the way this is about the optocoupler so i thought i should write this to LED and Multiplexing but sorry if it is the wrong category.

Grumpy_Mike

Quote
I tried to change the input resistor to optocoupler to maybe get more current flowing but it only made the RX led on arduino light a bit brighter still no CV out.
That is very wrong and should not happen, it suggests something is not working. Can you post the schematic and photograph of how it is wired.

alisomay

for sure,
the schematic is
https://raw.githubusercontent.com/elkayem/midi2cv/master/images/schematic.JPG

and i will take a photo in 2-3 minutes (had to borrow a friends phone)

Grumpy_Mike

#3
Apr 18, 2018, 11:09 am Last Edit: Apr 18, 2018, 11:09 am by Grumpy_Mike
Can you read the how to use this forum sticky post about posting images so they show up here. The OP's schematic.


alisomay

#4
Apr 18, 2018, 11:15 am Last Edit: Apr 18, 2018, 11:25 am by alisomay
Of course, sorry i started quick this is my first question in forum.
So these are the pictures of wiring the first one i annonated, the second one is the other end of the optocoupler. Pin 4 is connected to 5V rail with a 500Ohm resistor(two parallel 1K) and Pin3 is GND.



Grumpy_Mike

For posting images see this Image guide image guide.

The thing is that the RX LED is not controlled by the RX pin so any change in that is odd to say the least. You should not have the Arduino plugged into the USB port of a computer when you add an opto isolator. The schematic by itself looks OK providing the opto you used as the same pinout and can handle the MIDI speed. I haven't checked the data sheet for that.

alisomay

Yeah it seems it has the same pin out, i power arduino externally with 12 V because i use that for opamps also.
I don't connect it to usb port and because it seemed to be a nano clone i thought it was original :( i programmed it with an original UNO from ICSP to be quick, making the usb communication work is time consuming. It has no boot loader also. I believe the code runs ok because of the output when i see when i do not connect by the optocoupler.

Grumpy_Mike

Just looked at the data sheet and the SFH617A is too slow for MIDI speeds.

alisomay

#8
Apr 18, 2018, 11:46 am Last Edit: Apr 18, 2018, 11:53 am by alisomay
Thank you Mike, would you tell me how do you calculate and evaluate optocouplers for midi speed.
I didn't work with them before.

And also, thanks for the jet fast answers. All the best.

Grumpy_Mike

Look at the data sheet under saturated switching characteristics. You will see the turn off time is about 25uS. That translates to 40000 baud ( 1 / 25uS ), just for turn off time which is too close to the MIDI rate. What it means is that the serial signal will be distorted and held high for almost all the time as far as the signal is concerned.

alisomay


Go Up