Basic Servo Positioning and Programming Using Nodes |
Posted: January 14, 2020 |
Specially made for positioning, servos are made of a geared electric motor, a position sensor, and an electronic controller circuit. Small ones used in DIY projects use DC motors and potentiometer for rotation detection and positioning. As technology advances, popular servos become more affordable, more reliable, and easier to use and control. These custom servos have several ways to be controlled, but generally, the principle is alike.
You may see tutorials online when trying to learn to create servo powered DIY projects of any difficulty. However, you can improve understanding those tutorials when you learned essential servo positioning. Computers and PLCs run custom platforms used for programming servos. A servo programming software uses nodes to represent devices and processes operated by your microcontroller. Servo Node A servo node has three control inputs: PORT, VAL, and ACT. While PORT input selects the microcontroller port where your servo is connected, VAL input asks the position where your motor should go, and ACT input tells the servo when to run or pause. You can declare a constant value to the VAL input when positioning the servo at a fixed location. If you need to use a potentiometer, a pot node is required to make the servo follow a manual command. A pot node also has a PORT input, where you tell the program which port the potentiometer is connected. The pot node has a VAL output that can feed signals to the VAL input of the servo node. Servo Device Standard DIY servos can only turn within 120, 180, or 270 degrees. Their controllers send pulse signals at certain time intervals called pulse width to tell the servo which angle should they turn. Their min and max positions correspond to specific pulse widths, which are usually within 500 to 2000 microseconds. Servo-device node is used to program those servo motors. Servo-device node has three inputs: PORT, PMIN, and PMAX. PORT input, like what the servo node has, tells which microcontroller port the motor is connected. PMIN and PMAX inputs ask the pulse width values of the desired extreme servo positions. It means that PMIN and PMAX values can be customized but usually limited within the pulse width range of the servo motor. To make the servo rotate at a particular position, a rotate node is linked from the DEV output of the servo-device node. Rotate node has a DEV input that receives signals from a servo-device node. Rotate node also has VAL input, which is a valuable reference like what the servo node has. Rotate node uses its DO input to know when to rotate at the specified VAL position as quick as possible. There are more advanced nodes on a typical servo programming software that can be connected to the DEV output of the servo-device node. A rotate-slow node can make the servo motor rotate at a specific speed within its allowable range. The rotate-slow node can also make looping motion using its DO input and the DONE output connected to any and defer nodes. A position-value node has a VAL output that displays the real-time servo position of the connected servo-device node. Conclusion There are several opportunities after you learn to program servos, but you will learn quickly during the actual programming of your DIY servos. You will learn and achieve more if you plan your servos to serve a specific purpose in mind. I hope this helps you understand basic servo programming using nodes.
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|