Using PWM Output from Raspberry
-
Im am using openplc with unipi 1.1 and raspberry 3. The unipi output A0 is only analog 0-10V and not a real digital PWM signal.
To control a servo i need a real digital PWM signal. How is it possible to use this in parallel to unipi?
-
Ok now i send a pic and a video
And here the video
As can be seen, the frequency changes rather than the length of the period
-
Hello @juergschwarz,
none of the outputs are capable of being drived by PWM signal. The analog output has a filter + amplifier to create smooth(ish) output. This cannot be bypassed.Other outputs are the relay outputs - and if your frequency is not in tens of seconds (or better in minutes), then I would not advise to use PWM to drive them.
You can try using some I2C expander connected to the external I2C bus.
Best regards,
Martin -
@Martin-Kudláček said in Using PWM Output from Raspberry:
Hello @juergschwarz,
none of the outputs are capable of being drived by PWM signal. The analog output has a filter + amplifier to create smooth(ish) output. This cannot be bypassed.Other outputs are the relay outputs - and if your frequency is not in tens of seconds (or better in minutes), then I would not advise to use PWM to drive them.
You can try using some I2C expander connected to the external I2C bus.
Best regards,
MartinOk i forgot this info: I try to use the raspberry output %QW0 separately to generate this PWM signal and not the A0 from unipi. I my video you can see the output of %QW0.
-
@juergschwarz Ok it works. had to change the position in raspberry.cpp to the end of
void initializehardware()and the Initial values higher (4000 and 6000)
Thanks
-