You are not logged in.
Pages: 1
Topic closed
Hi everyone,
I am quite new to Raspberry Pi projects so I apologise in advance if I miss some background ^^.
I want to set up a basic temperature control using a DS18B20 and a servo motor that will control a gas valve.
Today, I followed the tutorial "REX Getting Started" and the temperature acquisition is working.
But I have more problems regarding the output of the PID block.
Is there any schematic or REX file about a typical PWM function.
I don't know which blocks and settings to use to practice PWM.
For example what kind of block should I use at the ouput of PWM module (2 outputs)?
What is the range value of output RPI__PWM18?
Thanks a lot for your help.
Last edited by povniouk (2017-03-12 12:31:22)
Offline
Hi povniouk,
glad that your temperature readings are working well.
Typical function of PWM function block can be derived from PWM examples at our GitHub repository: https://github.com/rexcontrols/REXexamp … dard/PWM_1 or https://github.com/rexcontrols/REXexamp … dard/PWM_2.
Raspberry Pi PWM output from REX (RPI__PWM18) has 0-1023 range. You can use LIN function block to convert PIDU output to the PWM range.
For proper function of Raspberry Pi PWM output on GPIO pin 18 switch Raspberry Pi audio output to HDMI (using "sudo raspi-config").
Reboot is needed afterwards.
PWM frequency is set by OS and is variable by default (dynamically set according to desired PWM output)
What servomotor do you want to interface with?
If I can be of assistance, please do not hesitate to contact me.
Regards, Tomas
Offline
Thanks Tomas. I'll check this out and come back to you
Offline
Pages: 1
Topic closed