It is finished and working! Now i want to modify it by adding a frequency divider between Arduino and the optocouplers. I am using a 4040 counter.This i can not get to work. The voltage of the output from the 4040 counter drops when i connnect the optocoupler, so that the optocoupler does not turn on. My guess is that it has something to do with the optocouplers input impedance, but i am not sure how to fix it.
You should supply a schematic of your circuit for a better chance to get help, but from your description I would suspect that the 4040 is not able to supply the current needed by your configuration of the optocoupler. IE, what resistor are you using to limit current drawn by the optocoupler?
It cannot drive a 50 ohm resistor, that would take 100mA at 5V.
See page 3 - It's only capable of 0.4mA of drive current with Vcc at 5V.
You can put a MOSFET in the circuit as a current driver.
Or a part like ULN2803 if you need to drive more optocouplers.
CrossRoads:
This part? http://www.ti.com/lit/ds/symlink/cd4040b.pdf
It cannot drive a 50 ohm resistor, that would take 100mA at 5V.
See page 3 - It's only capable of 0.4mA of drive current with Vcc at 5V.
You can put a MOSFET in the circuit as a current driver.
Or a part like ULN2803 if you need to drive more optocouplers.
In all likelihood he just needs to use a larger resistor. Optocouplers, do not require much current to operate properly. 0.4ma should work fine. If not choose a different optocoupler. They were originally used with TTL/CMOS parts that could supply far less current than the modern microcontrollers.
Rewire your output side swap the connections at pins 4 & 5.
4 will be ground, 5 will be the SigOut.
When the LED is driven with a low, SigOut will be high.
When the LED is driven with a high, Sigout will be low.
will let 0.4mA flow thru output transistor with 0.2mA at the gate side.
Only one I could find that is spec'ed that low.
Most are looking for more base current.