{"id":1834,"date":"2025-04-14T08:18:16","date_gmt":"2025-04-14T08:18:16","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=1834"},"modified":"2025-06-10T08:36:55","modified_gmt":"2025-06-10T08:36:55","slug":"example-dynamic-braking-with-spice10213","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/example-dynamic-braking-with-spice10213\/","title":{"rendered":"Example: Dynamic braking with SPice10213"},"content":{"rendered":"\n<p>This is a very simple example program illustrating how to apply dynamic braking.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Note: Dynamic braking with the SPice10213 is intended for and tested with small permanent magnet brushed DC motors.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The principle of dynamic braking of a DC motor is as follows: When the motor rotates, the movement of the wound coil in a magnetic field generates a voltage. During normal running that voltage will nearly equal the voltage supplied by the power supply. If the power supply is removed, the motor will continue to spin and still generate a voltage which can be measured across its terminals. The motor will then gradually slow down as its rotational energy is dissipated in friction and in the mechanical load. If, during the slow-down phase you short the motor terminals, a large current will flow (limited only by the resistance of the motor windings). The motor has now become a dynamo that is converting the mechanical energy of rotation into electrical energy, and that energy is dissipated rapidly in the motor windings as heat. The result is that the motor comes to a stop much sooner.<\/p>\n\n\n\n<p>In practice The SPice10213 does not directly short out the motor terminals for braking. Instead it uses a series connected 1.2ohm resistor and diode in conjunction with the direction relay. The resistor limits the braking current to a safe level. The diode is present in the circuit to protect the PWM driver transistor from inductive kick-backs, and serves incidentally in the braking function.<\/p>\n\n\n\n<p>Given the motor is running, the dynamic braking process consists of the following steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Turn off the power to the motor. The dynamo voltage from the motor will at this point be reverse biasing the diode.<\/li>\n\n\n\n<li>Change the reversing relay to the opposite direction. This will forward bias the diode, it turns on and current flows through the diode and resistor so the mechanical energy of the motor can quickly dissipate as electrical energy in the resistor, diode and motor winding.<\/li>\n\n\n\n<li>Allow enough time for the motor to come to a halt. The time required will depend on the motor and possible inertia of its load (i.e. a big fly-wheel will take longer to stop because it contains more rotational energy), and needs to be determined for each application. Typical stop times would be 100mS to 500mS.<\/li>\n\n\n\n<li>(Optionally) restore the direction relay to the original direction. This will depend on the overall logic of your program &#8211; you just want to be sure it&#8217;s set for the correct direction next time you start the motor.<\/li>\n<\/ol>\n\n\n\n<p>Note that it&#8217;s important to turn off the power (set PWM=0)&nbsp;<em>before<\/em>&nbsp;reversing the relay.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">;MDrv0  SPice10213 dynamic braking example<br><br>;This program simply illustrates dynamic braking of a small DC motor using the SPice10213<br>;on an MS12. It has a stop\/start button. The motor is driven in simple on\/off mode <br>;(no speed control) off the motor 1 output.<br><br>iStopStart      iEQU            16              ;The Stop\/Start button<br><br>oDirection      oEQU            12              ;The direction relay<br>oMotor          oEQU            16              ;The on\/off output<br><br>;------ <br>;Start of program<br>                setu            0,1             ;set spice connector pin 4 as DO<br>                setu            4,1             ;set spice connector pin 8 as DO<br>                <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/the-splat-expansion-framework\/spice-configuration-instruction\/\">SpiceConfigU<\/a><br><br><br>Idle:                   ;Back here when motor is stopped<br>                <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/input-and-output-instructions-digital\/waitonk-ii\/\">WaitOnK<\/a>         iStopStart      ;Wait for start command<br>                On              oMotor          ;Run the motor<br>Running:<br>                WaitOnK         iStopStart      ;Wait for stop command<br>Stop:<br>                Off             oMotor          ;Turn off the motor<br><br>;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o3465\">Comment out<\/a> the following line to see the effect of not using dynamic braking<br>                ON              oDirection      ;Apply the brake<br><br>                Pause           50              ;Allow motor time to stop<br>                Off             oDirection      ;Turn off the brake<br>                GoTo            Idle  <\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This is a very simple example program illustrating how to apply dynamic braking. Note: Dynamic braking with the SPice10213 is intended for and tested with&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1832,"menu_order":1,"template":"","class_list":["post-1834","spl_knowledgebase","type-spl_knowledgebase","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Example: Dynamic braking with SPice10213 - SPLat Controls<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Example: Dynamic braking with SPice10213 - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"This is a very simple example program illustrating how to apply dynamic braking. Note: Dynamic braking with the SPice10213 is intended for and tested with...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/example-dynamic-braking-with-spice10213\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-10T08:36:55+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/example-dynamic-braking-with-spice10213\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/example-dynamic-braking-with-spice10213\/\",\"name\":\"Example: Dynamic braking with SPice10213 - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-14T08:18:16+00:00\",\"dateModified\":\"2025-06-10T08:36:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/example-dynamic-braking-with-spice10213\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/example-dynamic-braking-with-spice10213\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/example-dynamic-braking-with-spice10213\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Product documentation\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Product documentation: SPice add-on boards\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"SPice10213: DC motor control\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"SPice10213: Programming\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/\"},{\"@type\":\"ListItem\",\"position\":6,\"name\":\"Example: Dynamic braking with SPice10213\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\",\"name\":\"SPLat Controls\",\"description\":\"OEM Embedded Machine Controllers\",\"publisher\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization\",\"name\":\"SPLat Controls\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg\",\"contentUrl\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg\",\"caption\":\"SPLat Controls\"},\"image\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Example: Dynamic braking with SPice10213 - SPLat Controls","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Example: Dynamic braking with SPice10213 - SPLat Controls","og_description":"This is a very simple example program illustrating how to apply dynamic braking. Note: Dynamic braking with the SPice10213 is intended for and tested with...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/example-dynamic-braking-with-spice10213\/","og_site_name":"SPLat Controls","article_modified_time":"2025-06-10T08:36:55+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/example-dynamic-braking-with-spice10213\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/example-dynamic-braking-with-spice10213\/","name":"Example: Dynamic braking with SPice10213 - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-14T08:18:16+00:00","dateModified":"2025-06-10T08:36:55+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/example-dynamic-braking-with-spice10213\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/example-dynamic-braking-with-spice10213\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/example-dynamic-braking-with-spice10213\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/"},{"@type":"ListItem","position":2,"name":"Product documentation","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/"},{"@type":"ListItem","position":3,"name":"Product documentation: SPice add-on boards","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/"},{"@type":"ListItem","position":4,"name":"SPice10213: DC motor control","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/"},{"@type":"ListItem","position":5,"name":"SPice10213: Programming","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/"},{"@type":"ListItem","position":6,"name":"Example: Dynamic braking with SPice10213"}]},{"@type":"WebSite","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/","name":"SPLat Controls","description":"OEM Embedded Machine Controllers","publisher":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization","name":"SPLat Controls","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg","contentUrl":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg","caption":"SPLat Controls"},"image":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase\/1834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase"}],"about":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/types\/spl_knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/users\/1"}],"up":[{"embeddable":true,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase\/1832"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=1834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}