Hi guys. I have a DC motor controller that uses a 5k pot to drive an 0-5.7v analogue signal to control the speed of the motor. I am wanting to convert this to digitally controlled and I have copied the following circuit successfully (V2 = arduino, R2 = 390ohm and X1 = 4N25).
Vin = 5.7v (from DC controller) Vout = .25-5.7v varying PWM signal from Arduino.
My questions are:
- When power on the pwm side is off, the output circuit is open (NO) and 5.7v is output but I would prefer to have the circuit default to off (0v). Is there a simple way to do this in this circuit?
- Why is the minimum voltage just greater than 0v? Is this due to the capacitor? Is the capacitor oversized?
- A small thing but the signal is inverted from the PWM side. Other than changing the logic in the code (255 = 0v and 0 = 5.7v) is there way to invert it back?
I did look at using digital pots as replacements but this was a much simpler design with only one signal/octocoupler required to drive it.