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
-
A AVsetula locked this topic on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login