{"id":451,"date":"2016-02-28T19:26:31","date_gmt":"2016-02-28T19:26:31","guid":{"rendered":"http:\/\/mitat.tuu.fi\/?p=451"},"modified":"2016-09-25T09:29:47","modified_gmt":"2016-09-25T09:29:47","slug":"fc-esc-update-speeds","status":"publish","type":"post","link":"http:\/\/mitat.tuu.fi\/?p=451","title":{"rendered":"FC &#038; ESC update speeds"},"content":{"rendered":"<table>\n<tbody>\n<tr>\n<td>Multishot shortest pulse<\/td>\n<td><\/td>\n<td>5 microseconds<\/td>\n<\/tr>\n<tr>\n<td>Multishot longest pulse<\/td>\n<td><\/td>\n<td>25 microseconds (40kHz)Designed to allow 32kHz update frequency, so 40-32 = 7kHz &#8220;sleep&#8221; time between pulses.<\/td>\n<\/tr>\n<tr>\n<td>Oneshot42 shortest pulse<\/td>\n<td><\/td>\n<td>42 microseconds<\/td>\n<\/tr>\n<tr>\n<td>Oneshot42 longest pulse<\/td>\n<td><\/td>\n<td>83 (?) microseconds (=250\/3?)<\/td>\n<\/tr>\n<tr>\n<td>Oneshot125 shortest pulse<\/td>\n<td><\/td>\n<td>125 microseconds<\/td>\n<\/tr>\n<tr>\n<td>Oneshot125 longest pulse<\/td>\n<td>\u00a04kHz<\/td>\n<td>250 microseconds<\/td>\n<\/tr>\n<tr>\n<td>Betaflight 2.5 looptime on SPI targets<\/td>\n<td>8kHz<\/td>\n<td>125 microseconds<\/td>\n<\/tr>\n<tr>\n<td>Betaflight 2.5 looptime on F1 boards<\/td>\n<td>4kHz<\/td>\n<td>250 microseconds<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>On betaflight the frequencies are defined by two denom-values:<\/p>\n<ul>\n<li>gyro_sync_denom<\/li>\n<li>pid_process_denom<\/li>\n<\/ul>\n<p>gyro read interval in uS<strong> = 125 * gyro_sync_denom<\/strong><\/p>\n<p>motor update interval in uS<strong> =\u00a0gyro read interval in uS *\u00a0pid_process_denom<\/strong><\/p>\n<p>For example Naze32 is set to looptime 250us. The betaflight sets both denom-values to 2, therefore:<\/p>\n<ul>\n<li>gyro is read every 250 us (125*gyro_sync_denom) -&gt; on every loop, at 4kHz<\/li>\n<li>PID is ran and motor update every 500us (gyro read interval in uS *\u00a0pid_process_denom) -&gt; at 2kHz (oneshot125 can handle this easily!)<\/li>\n<\/ul>\n<blockquote><p>&#8220;even at 8 kHz sampling time which is only possible on boards running spi connectivity to the gyro, your PID loops and thus motor update will only be running 4khz (actually just short) (in fact may even be 2666hz, don&#8217;t recall, as Boris has pointed out, it doesn&#8217;t seem to make much difference)<br \/>\nOneshot125 handles this fine.<br \/>\nThere is no driver for using oneshot42 or multishot (other than star wars startup tones)&#8221;<\/p><\/blockquote>\n<p>See:<a href=\"http:\/\/www.rcgroups.com\/forums\/showpost.php?p=34196204&amp;postcount=21460\">\u00a0http:\/\/www.rcgroups.com\/forums\/showpost.php?p=34196204&amp;postcount=21460<\/a><\/p>\n<blockquote><p>&#8220;From higher sampling the filter delays are being removed. You get less delay and cleaner signal in your pid loop.<br \/>\nYou essentially dont need something faster than oneshot125 if you dont care about running @4khz motor update speeds. &#8220;<\/p><\/blockquote>\n<p><a href=\"http:\/\/www.rcgroups.com\/forums\/showpost.php?p=34196337&amp;postcount=21463\">http:\/\/www.rcgroups.com\/forums\/showpost.php?p=34196337&amp;postcount=21463<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Multishot shortest pulse 5 microseconds Multishot longest pulse 25 microseconds (40kHz)Designed to allow 32kHz update frequency, so 40-32 = 7kHz &#8220;sleep&#8221; time between pulses. Oneshot42 shortest pulse 42 microseconds Oneshot42 longest pulse 83 (?) microseconds (=250\/3?) Oneshot125 shortest pulse 125 microseconds Oneshot125 longest pulse \u00a04kHz 250 microseconds Betaflight 2.5 looptime on SPI targets 8kHz 125 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-451","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/mitat.tuu.fi\/index.php?rest_route=\/wp\/v2\/posts\/451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/mitat.tuu.fi\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mitat.tuu.fi\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mitat.tuu.fi\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/mitat.tuu.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=451"}],"version-history":[{"count":19,"href":"http:\/\/mitat.tuu.fi\/index.php?rest_route=\/wp\/v2\/posts\/451\/revisions"}],"predecessor-version":[{"id":511,"href":"http:\/\/mitat.tuu.fi\/index.php?rest_route=\/wp\/v2\/posts\/451\/revisions\/511"}],"wp:attachment":[{"href":"http:\/\/mitat.tuu.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mitat.tuu.fi\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=451"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mitat.tuu.fi\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}