I assume that is with PWM. You can not get that directly, you will have to filter the PWM first. PWM is a digital signal that goes from 0 to 5V all the time. The analogue write just controls the ratio of high to low.
I would suggest that all lines that you want to cut and insert a switch of some sort, or switches you want to parallel you do with a relay.Any series switching resistance means you are open to noise being included on the switched signal, and a welder of any sort has a lot of noise.This ensures no worries low resistance connection and isolation between controller and machine and no ground reference problems.I gather these connections are low voltage low current so small a number of relays built on an interface board would do the job.
I understand that you want to control the wiper input to the welder, have you found the ground of the welder control board that you are trying to control.What is the voltage on Pin 3 and Pin 5 with respect to the welder ground? This very important.
As Grumpy_Mike says, you will have to filter the PWM output to get a smooth DC voltage that is the same as what is supplied by the potentiometer.
... still thinking about this: what if I was to install an optically-isolated relay between the Vcc and the wiper pin of the potentiometer circuit, then feed the relay with a PWM signal to modulate the amount of voltage that was seen on the wiper pin? In this case, it seems like I would dodge any issues with matching the ground of the Arduino with the ground of the welder, although any potential issues with PWM signal would remain. This assumes that the relay has fast enough switching speed to keep up with the PWM signal. IIRC, the Uno's PWM frequency is something like 500 Hz, so that's a 1 kHz signal, or sub-ms switch time. A relay like the CPC1219Y has a listed max switch time of 5 ms, but the detailed charts show a more typical time of around 0.5 ms, with outliers around 0.7 ms, so perhaps it could work.
Your circuit is kind of blowing my mind a little bit. Am I correct that the optical isolators are supposed to turn on and off opposite of each other? When Dout is LOW, there is 5v across the top isolator and it is closed, and there is 0v across the bottom isolator and it is open. When Dout is HIGH, there is 5v on both sides of the top isolator, so 0v across it, and it is open. There is 5v across the bottom isolator and it is closed. This is part of what is blowing my miind: that you could disable a switch by putting 5v on BOTH sides of it, creating 0v across it, vs. pulling both sides to ground. That never occurred to me.So if I understand correctly, when fed a PWM signal, this circuit will basically switch R from between Vcc/wiper and wiper/Gnd according to the PWM duty cycle. You've diagrammed a potentiometer that is controlled by a PWM output.
Can you elaborate on the purpose of the capacitor? Is it for noise protection on the signal circuit, or some other purpose?
The capacitor smooths the PWM to produce DC (with a small ripple), so as to simulate what a potentiometer would do.
If you want to pulse at 30Hz, then you need to increase the PWM frequency.
Increasing the PWM frequency will have the additional advantage of making it easier to filter it out while leaving the 30 Hz pulse frequency. Ah, but I guess the flip-side is that I will need to use opto-isolators that have a high enough rated bandwidth.
Correct on both counts. I suggest you use a PWM frequency of 3906.25Hz, which is a value you can get from the PWM pins associated with timer 1 and timer 2.
With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.
Warning: this topic has not been posted in for at least 120 days.Unless you're sure you want to reply, please consider starting a new topic.