{"id":1159,"date":"2011-01-11T09:29:39","date_gmt":"2011-01-11T14:29:39","guid":{"rendered":"http:\/\/embedded-lab.com\/blog\/?p=1159"},"modified":"2012-07-30T09:29:26","modified_gmt":"2012-07-30T13:29:26","slug":"lab-10-dc-motor-interfacing-to-picmicro","status":"publish","type":"post","link":"https:\/\/embedded-lab.com\/blog\/lab-10-dc-motor-interfacing-to-picmicro\/","title":{"rendered":"Lab 10: DC motor interfacing to PICMicro"},"content":{"rendered":"<p><strong>Description<\/strong><\/p>\n<p>Perhaps one of the most entertaining things to do with an embedded microcontroller is to get it to actually move something. Three very popular devices used to \u201cmake things move\u201d include dc motors, RC servos, and stepper motors. This lab session will look at how you can interface a dc motor to a PIC microcontroller.<\/p>\n<p><strong>Required Theory<\/strong><\/p>\n<p>DC motors are simple two-lead, electrically controlled devices that convert electrical power into mechanical power through the interaction of two magnetic fields. One field is usually produced by a stationary permanent magnet (on the stator), and the other field is produced by an electric current flowing in the motor coil (on the rotor). The interaction of the two fields results in a torque that tends to rotate the rotor. For this experiment, a reversible, permanent magnet, brushed DC motor is selected. The term &#8216;reversible&#8217; means the rotation of the motor can be reversed by simply flipping the terminals of the DC power supply. One such motor is shown below. I got it from my old broken printer. The dc motors are found in CD players, toy cars, cassette player, printers, etc.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/Img_DC_Motor.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1206 aligncenter\" title=\"Img_DC_Motor\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/Img_DC_Motor-550x417.jpg\" alt=\"\" width=\"550\" height=\"417\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/Img_DC_Motor-550x417.jpg 550w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/Img_DC_Motor.jpg 580w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/a><\/p>\n<p><!--more--><\/p>\n<p style=\"text-align: left;\"><em><strong>Modes of a brushed dc motor<\/strong><\/em><\/p>\n<p style=\"text-align: left;\">A brushed dc motor has four fundamental modes: <strong><em>clockwise mode<\/em><\/strong>, <strong><em>counter-clockwise mode<\/em><\/strong>, <strong><em>coast mode<\/em><\/strong>, and <strong><em>brake mode<\/em><\/strong>. In clockwise mode, the motor rotates in the direction of the clock, and the counter-clockwise mode is just the reverse of the clockwise mode. Switching between clockwise and counter-clockwise rotation is very simple. It can be done by simply flipping the terminals of either the power source or the motor itself.<\/p>\n<p style=\"text-align: left;\">The coast mode \u00a0refers to the free spinning mode of the motor. If you twist the motor shaft with your fingers, leaving both the terminals of the motor open, you will see the shaft continues to rotate for a short time, until the kinetic energy of the shaft is totally consumed through friction. Therefore, in coast mode, the terminals of a motor are left floating and the motor comes to stop slowly.<\/p>\n<p style=\"text-align: left;\">The brake mode is used to rapidly stop the motor, and is done by shorting both the terminals of the motor.\u00a0The motor behaves as a generator\u00a0when it is rotating, and if the terminals of the motor are shorted, it acts as an infinite load bringing the motor\u00a0to a rapid stop. Now the energy in the motor is decayed much faster as it is consumed not only through friction but also in the motor&#8217;s coil.<\/p>\n<p style=\"text-align: left;\">You can do a simple experiment to distinguish between the coast and brake mode. Take a brushed dc motor and try to spin the shaft with your fingers, leaving the leads floating. You will observe the shaft rotates freely (coast mode). Now try again with the leads shorted. You will find the motor has become more sluggish than in the coast mode.<\/p>\n<p style=\"text-align: center;\"><a rel=\"attachment wp-att-1207\" href=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=1207\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1207 aligncenter\" title=\"Img_DC_Motor_Coast\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/Img_DC_Motor_Coast-550x422.jpg\" alt=\"\" width=\"550\" height=\"422\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/Img_DC_Motor_Coast-550x422.jpg 550w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/Img_DC_Motor_Coast.jpg 647w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><strong>Coast mode:<\/strong> Motor spins freely<\/p>\n<p style=\"text-align: center;\">\n<p style=\"text-align: center;\"><a rel=\"attachment wp-att-1208\" href=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=1208\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1208 aligncenter\" title=\"Img_DC_Motor_Brake\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/Img_DC_Motor_Brake-550x417.jpg\" alt=\"\" width=\"550\" height=\"417\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/Img_DC_Motor_Brake-550x417.jpg 550w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/Img_DC_Motor_Brake.jpg 580w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><strong>Brake mode:<\/strong> Motor becomes more sluggish<\/p>\n<p style=\"text-align: left;\"><em><strong>Motor Driver<\/strong><\/em><\/p>\n<p style=\"text-align: left;\">Microcontrollers are designed for data processing, which requires millions of skinny pathways and microscopic switches. On the other hand, motors are straight forward and power hungry. Because of the internal structure of microcontrollers, they cannot supply enough current needed to run a motor directly. Therefore, an external driver circuit is required to deliver the electrical power to a motor under the control of the microcontroller. Such a driver circuit can be as simple as a single transistor or as complicated as an integrated chip with some additional components attached.<\/p>\n<p style=\"text-align: left;\"><strong><em>Single transistor motor driver<\/em><\/strong><\/p>\n<p style=\"text-align: left;\">The most basic motor driver circuit is a single transistor switch that can only turn a motor on or off. The single transistor can turn the motor on in one direction only, either clockwise or counterclockwise, depending upon how the motor is connected in the circuit. It also doesn&#8217;t permit the motor to be electronically braked. The circuit diagram of a single transistor motor driver is shown below.<\/p>\n<p style=\"text-align: center;\"><a rel=\"attachment wp-att-1234\" href=\"http:\/\/embedded-lab.com\/blog\/?attachment_id=1234\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1234 aligncenter\" title=\"Circuit_SingleTransistorDCMotor\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/Circuit_SingleTransistorDCMotor.png\" alt=\"\" width=\"426\" height=\"402\" \/><\/a><\/p>\n<p style=\"text-align: left;\">\n<p>In this example, I have used an ordinary BC547, which is a general purpose NPN transistor. I picked this because it is inexpensive and commonly available. However, this transistor isn&#8217;t very powerful, and can provide maximum driving current up to 100 mA. The objective of this tutorial is to explain the principles of motor drivers, and readers are suggested to select transistors with proper current ratings to fulfill their requirements. But this particular driver circuit is still good for driving small dc motors that require less than 100 mA current.<\/p>\n<p>The working principle of this circuit is very simple. The transistor acts as a power switch for the motor. The switch can be controlled through the logic voltage applied at the On\/Off terminal (see figure above). When the On\/Off pin is at logic 1 (+5 V), the transistor is turned on and the motor is connected across Vcc and ground. The Vcc voltage could be greater than 5 V. Therefore, one benefit of this single transistor motor driver is that you can control a higher voltage motor (&gt; 5 V) with a 5 V logic output from a microcontroller. The logic 0 at the On\/Off terminal turns the transistor off and the motor is stopped.\u00a0The 1K resistor connected in series with the base of the transistor limits the base current to a safe level.<\/p>\n<p>The diode connected across the motor terminals is for the protection of the transistor. When the switch is turned off, the collapsing electromagnetic field inside the motor generates a high voltage across the motor terminals with reverse polarity. This voltage could be high enough to damage the transistor permanently. The diode provides a current path back through the motor coil, and hence prevents any high voltage formation. During normal condition the diode is reverse biased and doesn&#8217;t affect the switching operation of the transistor.<\/p>\n<p>In order to test this circuit, we will replace the LED in Lab 2 (<strong><em><a href=\"http:\/\/embedded-lab.com\/blog\/?p=164\" target=\"_blank\">Basic digital input and output<\/a><\/em><\/strong>) arrangement and connect the RC0 pin of PIC16F688 to the On\/Off terminal of the above transistor driver circuit. Load the PIC16F688 with the same HEX code from Lab 2, and you will see the motor can be turned on and off by simply pressing the input switch. The direction of rotation could be clockwise or counterclockwise based on how the terminals of the motor are connected.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Img_SingleTransistorDriver.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1550 aligncenter\" title=\"Img_SingleTransistorDriver\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Img_SingleTransistorDriver.jpg\" alt=\"\" width=\"580\" height=\"354\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Img_SingleTransistorDriver.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Img_SingleTransistorDriver-550x335.jpg 550w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">Controlling the on\/off operation of a dc motor using a single transistor<\/p>\n<p><strong>H-Bridge Motor Driver<\/strong><\/p>\n<p>The single transistor motor driver has limitations. It can control a motor in only one direction and does not allow electronic braking too. A classic H-bridge motor driver provides all 4 operating modes of a dc motor. It is called H-bridge because its circuit looks like a capital letter H.<\/p>\n<p>A standard H-bridge circuit consists of four transistors (two PNPs on top and two NPNs on the bottom as shown below). The left half of the circuit is mirrored form of the right half. The four inputs of the driver circuit are named as A, B, C, and D. When the terminal B is grounded and the terminal C is pulled high (+5 V), the transistors Q2 and Q3 conduct. This provides a path for current to flow from Vcc (+5 V), through Q2, through the motor, through Q3 to the ground. This turns the motor on in one direction. Next, if the terminals A and D are connected to ground and +5 V, respectively, Q1 and Q4 are switched on, providing a current path from Vcc (+5 V), through Q1, through the motor, through Q4, and to ground. This time the current through the motor is flowing in other direction and so the motor spins in the opposite direction.<\/p>\n<p>Braking mode can be achieved either by applying logic 1 (+5 V) to pins C and D or by grounding A and B. In both the cases, the motor terminals are effectively connected.<\/p>\n<p>The cost mode corresponds to when all the four transistors are turned off. This happens when A and B are at logic 1 (+5 V) while C and D are grounded. Then the motor can spin freely as the motor leads are connected to nothing.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1165\" title=\"Circuit_H_Bridge_BJT_DCMotor\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/Circuit_H_Bridge_BJT_DCMotor.png\" alt=\"\" width=\"591\" height=\"542\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/Circuit_H_Bridge_BJT_DCMotor.png 591w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2010\/12\/Circuit_H_Bridge_BJT_DCMotor-490x450.png 490w\" sizes=\"auto, (max-width: 591px) 100vw, 591px\" \/><\/p>\n<p>This H-bridge will be tested with a dc motor and the <strong><em><a href=\"http:\/\/embedded-lab.com\/blog\/?p=574\" target=\"_blank\">PIC16F688 module<\/a><\/em><\/strong>. Four I\/O pins of PIC16F688 are required to control the clockwise, counterclockwise, and braking modes of the dc motor. These four pins will output the appropriate logic levels at pins A, B, C, and D corresponding to the desired mode. Our test arrangement also includes 3 push buttons to provide selection inputs for clockwise rotation, counterclockwise rotation, and brake mode. The circuit diagram of the arrangement is shown below.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/HBridge_PICInterface.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1573 aligncenter\" title=\"HBridge_PICInterface\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/HBridge_PICInterface-550x333.png\" alt=\"\" width=\"550\" height=\"333\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/HBridge_PICInterface-550x333.png 550w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/HBridge_PICInterface.png 755w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Img_DC_MotorHBSetup.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1549 aligncenter\" title=\"Img_DC_MotorHBSetup\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Img_DC_MotorHBSetup.jpg\" alt=\"\" width=\"580\" height=\"450\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Img_DC_MotorHBSetup.jpg 580w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Img_DC_MotorHBSetup-550x426.jpg 550w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">H-bridge setup on the breadboard<\/p>\n<p><em><strong><span style=\"color: #800000;\">Important note<\/span><\/strong><\/em><\/p>\n<p>While implementing the H-bridge circuit, you must be careful about switching on the right transistors at right time. If you are not careful and switch on both Q1 and Q3 (or Q2 and Q4) simultaneously, that will result in a short circuit and the transistors may burn out. Out of 16 possible combinations for A, B, C, and D inputs, 7 results in short circuits, which must be avoided. You can also tie A with C (say, AC terminal), and B with D (BD terminal) so that now you will have only two terminals to control the motor. If you apply 1 at AC and 0 at BD, the motor runs in one direction, and switching the logic levels at AC and BD will turn the motor on in reverse direction. Applying 0 or 1 to both AC and BD will brake the motor. The important thing is you cannot leave any of the terminals AC and BD float. Let&#8217;s look at the AC terminal in more detail. Since A and C are tied together, and if it is left float then there will be a path for current through the collector of Q1, through its base, through the base \u00a0of Q3, through its\u00a0emitter\u00a0to the ground. So, Q1 and Q3 are on resulting a short circuit. So, you must be careful if you are thinking about reducing the control pins by tying A with C and B with D. You just can&#8217;t leave the tied terminals open or float. They should be either grounded or pulled high.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/HBridgeTable.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1594 aligncenter\" title=\"HBridgeTable\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/HBridgeTable.png\" alt=\"\" width=\"516\" height=\"231\" \/><\/a><\/p>\n<p>Once again, this circuit is just for testing a small motor under no load. If you need a more practical circuit for driving a motor with load then you should consider using transistors with higher current rating. Replacing BC557 with 2907A and BC547 with 2222A transistors can increase the driving capacity of the circuit up to 600 mA. If your requirement is still higher than that, it is suggested to use the MOSFET instead of BJTs.<\/p>\n<p><strong>Software for testing H-Bridge<\/strong><\/p>\n<pre><span style=\"color: #003366;\">\/*\r\n Lab 10: DC Motor control (H-Bridge)\r\n Copyright @ Rajendra Bhatt, 2010.\r\n Description: Forward and reverse motor control\r\n MCU: PIC16F688\r\n Oscillator: Internal clock at 4.0 MHz, MCLR Enabled\r\n*\/<\/span><\/pre>\n<pre><span style=\"color: #003366;\">sbit Forward at RA5_bit;\r\nsbit Reverse at RA4_bit;\r\nsbit Brake at RA2_bit;\r\nsbit PinA at RC5_bit;\r\nsbit PinB at RC4_bit;\r\nsbit PinC at RC3_bit;\r\nsbit PinD at RC2_bit;\r\nvoid GetDelay(){\r\n Delay_ms(300);\r\n}<\/span><\/pre>\n<pre><span style=\"color: #003366;\">void main() {\r\n CMCON0 = 0x07; \/\/ Disable comparators\r\n ANSEL = 0b00000000;\r\n PORTC = 0x00;\r\n TRISC = 0b00000000; \/\/ PORTB all output\r\n TRISA = 0b00111100; \/\/ RA5, RA4, RA2 inputs<\/span><\/pre>\n<pre><span style=\"color: #003366;\"> do {\r\n  if (!Forward){\r\n  GetDelay();\r\n  PORTC = 0;\r\n  GetDelay();\r\n  PinA = 0;\r\n  PinB = 1;\r\n  PinD = 1;\r\n }<\/span><\/pre>\n<pre><span style=\"color: #003366;\"> if (!Reverse) {\r\n  GetDelay();\r\n  PORTC = 0;\r\n  GetDelay();\r\n  PinA = 1;\r\n  PinB = 0;\r\n  PinC = 1;\r\n }<\/span><\/pre>\n<pre><span style=\"color: #003366;\"> if (!Brake) {\r\n  GetDelay();\r\n  PORTC = 0;\r\n }\r\n } while(1);\r\n}  \/\/ END main()<\/span><\/pre>\n<p style=\"text-align: right;\"><a href=\"http:\/\/embedded-lab.com\/uploads\/HexFiles\/PIC16F688\/H_Bridge.zip\">Download HEX file<\/a><\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Img_DC_MotorHBControl.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1548 aligncenter\" title=\"Img_DC_MotorHBControl\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Img_DC_MotorHBControl-550x403.jpg\" alt=\"\" width=\"550\" height=\"403\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Img_DC_MotorHBControl-550x403.jpg 550w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Img_DC_MotorHBControl.jpg 580w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/a><\/p>\n<p>The above H-bridge circuit has a major disadvantage that it cannot be used to drive a motor with voltage greater than 5 V (voltage for logic 1). This H-bridge circuit works because it is powered with the same voltage as that of a logic 1 voltage from the microcontroller. If you want to drive a 9 V motor and change Vcc to 9 V, then transistors Q1 and Q2 will still be on when the logic levels at terminals A and B are high (+5 V). In such a case you need an additional voltage translation circuit between the microcontroller and the H-bridge circuit that converts the logic 1 voltage (which is +5V) to 9 V. Or you can also use two\u00a0additional\u00a0NPN transistors to the H-bridge circuit to resolve this problem (shown below). Now the control pins are A&#8217;, B&#8217;, C and D. It is left for readers to figure out the appropriate logic levels at these pins for controlling the operation of the motor.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Circuit_ModifiedH_Bridge_BJT_DCMotor.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1591 aligncenter\" title=\"Circuit_ModifiedH_Bridge_BJT_DCMotor\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Circuit_ModifiedH_Bridge_BJT_DCMotor-550x334.png\" alt=\"\" width=\"550\" height=\"334\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Circuit_ModifiedH_Bridge_BJT_DCMotor-550x334.png 550w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2011\/01\/Circuit_ModifiedH_Bridge_BJT_DCMotor.png 938w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/a><\/p>\n<p style=\"text-align: left;\"><strong>Reference:<\/strong><\/p>\n<p style=\"text-align: left;\"><em>Intermediate Robot Building<\/em> by David Cook<\/p>\n<p style=\"text-align: left;\">\n","protected":false},"excerpt":{"rendered":"<p>Description Perhaps one of the most entertaining things to do with an embedded microcontroller is to get it to actually move something. Three very popular devices used to \u201cmake things move\u201d include dc motors, RC servos, and stepper motors. This lab session will look at how you can interface a dc motor to a PIC microcontroller. Required Theory DC motors are simple two-lead, electrically controlled devices that convert electrical power into mechanical power through the interaction of two magnetic fields. One field is usually produced by a stationary permanent magnet (on the stator), and the other field is produced by<\/p>\n","protected":false},"author":2,"featured_media":1165,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32,38],"tags":[123,124,20],"class_list":["post-1159","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-embedded-labs","category-pic-tutorials","tag-dc-motor-control","tag-h-bridge","tag-pic16f688"],"_links":{"self":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/1159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/comments?post=1159"}],"version-history":[{"count":87,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/1159\/revisions"}],"predecessor-version":[{"id":5802,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/1159\/revisions\/5802"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media\/1165"}],"wp:attachment":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media?parent=1159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/categories?post=1159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/tags?post=1159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}