When one side is on, the motor turns one way... When the other is on, the motor turns the other.. If when they are both on it free wheels, then PWM may work... If when they are both on the motor brakes ( stops quick ) then PWM wont work..
I tried the last circuit
When giving: high low low the motor turns in the first direction
When sending: low low high the motor turns in the other direction
But the speed of the motor is very low, i measured the voltage and found it less then 1 volt.
this is the circuit i have now
when i try simulating it with Proteus (adding and Arduino UNO in place of inputs, and a motor in output) i get this errors:
[SPICE] transient GMIN stepping at time=2.54501e-005
[SPICE] TRAN: Timestep too small; timestep = 1.25e-019: trouble with node #00000.
and i'm still having the problem of low voltage, i tried both with 5v and 9v in source bit i get always low than 1v.
How much current is the motor taking... The original circuit had a PWM controlled ground.... That means another optocoupler..
To check if you can use PWM on the inputs.... Take both optocouplers high ( high low high ) and see if you can turn the motor by hand easy.. If not it's on brake... Then try low low low and see if you can turn the motor by hand...