<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>MSP432 and TI-RTOS: PID Library Part 1 - Intro</title><link>/challenges-projects/design-challenges/texas-instruments-safe-sound-wearables-design-challenge/b/blog/posts/msp432-and-ti-rtos-pid-library-part-1---intro</link><description>A port of the very good Arduino PID library to MSP432 LaunchPad and TI-RTOS. image source: e2e.ti.com PID is a control algorithm. It tries to keep the output of a device at a desired level by controlling its input.Part 1 describes the port...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: MSP432 and TI-RTOS: PID Library Part 1 - Intro</title><link>https://community.element14.com/challenges-projects/design-challenges/texas-instruments-safe-sound-wearables-design-challenge/b/blog/posts/msp432-and-ti-rtos-pid-library-part-1---intro</link><pubDate>Thu, 02 Mar 2017 23:02:37 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:11ba5e54-da32-447c-8b71-1617e8faf227</guid><dc:creator>fmilburn</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Jan,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I have worked my way through your examples up to here and they are great!&amp;nbsp; I did skip the one on DACs because I don&amp;#39;t have that part but it was easy to follow.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Regarding your comment on this particular PID code:&lt;/p&gt;&lt;blockquote class="jive-quote"&gt;&lt;p&gt;You should (really: should) read Brett&amp;#39;s blog before continuing here: &lt;a class="" href="http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/"&gt;Improving the Beginner’s PID – Introduction « Project Blog&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;I fully agree.&amp;nbsp; It is a great tutorial with some very good links behind it as well.&amp;nbsp; Sometime back I built a sous vide controller using Brett&amp;#39;s library and placed everything in an enclosure.&amp;nbsp; It controls a slow cooker not shown in the photo.&amp;nbsp; The temperature probe is inside a broken off whisk bought from the dollar store so as to isolate it from the walls of the cooker and food. There is no mains inside the enclosure - I use an external relay to drive the heating element in the cooker.&amp;nbsp; Being a mechanical engineer, that seemed the safe thing to do &lt;span&gt;[View:/resized-image/__size/16x16/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-11ba5e54-da32-447c-8b71-1617e8faf227/5722.contentimage_5F00_3.png:16:16]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x551/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-11ba5e54-da32-447c-8b71-1617e8faf227/3678.contentimage_5F00_205636.jpg:620:551]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;This is of course a very slow responding system.&amp;nbsp; It was a great learning experience and fun playing with the tuning parameters.&amp;nbsp; In the graph below I reset the temperature part way through to see how it responded.&amp;nbsp; There was a bit of overshoot but it settles to less than 0.5 F error quickly.&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x222/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-11ba5e54-da32-447c-8b71-1617e8faf227/6811.contentimage_5F00_205637.jpg:620:222]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Anyways, on to your example.&amp;nbsp; Thanks again for the series.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2442&amp;AppID=150&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: MSP432 and TI-RTOS: PID Library Part 1 - Intro</title><link>https://community.element14.com/challenges-projects/design-challenges/texas-instruments-safe-sound-wearables-design-challenge/b/blog/posts/msp432-and-ti-rtos-pid-library-part-1---intro</link><pubDate>Tue, 24 Jan 2017 21:02:07 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:11ba5e54-da32-447c-8b71-1617e8faf227</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;A few sneak previews of the library in action.&lt;/p&gt;&lt;p&gt;- MSP432 generates PWM, and an RC filter converts that to DC.&lt;/p&gt;&lt;p&gt;- MSP432 ADC samples that DC&lt;/p&gt;&lt;p&gt;- PID changes PWM duty cycle so that the sampled value matches a preset level.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/802x601/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-11ba5e54-da32-447c-8b71-1617e8faf227/8156.contentimage_5F00_205633.png:802:601]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;two captures with different PID parameters.&lt;/p&gt;&lt;p&gt;proportional 1, integral 1, differential 0, steady&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/804x482/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-11ba5e54-da32-447c-8b71-1617e8faf227/8078.contentimage_5F00_205634.png:804:482]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;proportional 1, integral 0, differential 0: nervous&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/805x482/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-11ba5e54-da32-447c-8b71-1617e8faf227/7573.contentimage_5F00_205635.png:805:482]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;in part 2 I&amp;#39;ll post the firmware and the RC filter.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2442&amp;AppID=150&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: MSP432 and TI-RTOS: PID Library Part 1 - Intro</title><link>https://community.element14.com/challenges-projects/design-challenges/texas-instruments-safe-sound-wearables-design-challenge/b/blog/posts/msp432-and-ti-rtos-pid-library-part-1---intro</link><pubDate>Sun, 22 Jan 2017 20:04:51 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:11ba5e54-da32-447c-8b71-1617e8faf227</guid><dc:creator>DAB</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Nice post Jan.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;It reminds me of some of the control algorithms I developed in the mid 1980&amp;#39;s to control a FLIR device and slave it to the movement of a helicopter.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I had to constantly update the FLIR look angle depending upon the attitude changes made by the pilot.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Very challenging, especially since I only had an Intel 8085 process to work with.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;DAB&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2442&amp;AppID=150&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: MSP432 and TI-RTOS: PID Library Part 1 - Intro</title><link>https://community.element14.com/challenges-projects/design-challenges/texas-instruments-safe-sound-wearables-design-challenge/b/blog/posts/msp432-and-ti-rtos-pid-library-part-1---intro</link><pubDate>Sun, 22 Jan 2017 14:04:41 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:11ba5e54-da32-447c-8b71-1617e8faf227</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;This part of the blog series is also a good excuse to try out the LED board that &lt;span&gt;[mention:4f57fc9d538949ad9eb336ddb9469bb8:e9ed411860ed4f2ba0265705b8793d05]&lt;/span&gt; gave me (I&amp;#39;ve gone medieval on the PSU &lt;span&gt;[View:/resized-image/__size/16x16/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-11ba5e54-da32-447c-8b71-1617e8faf227/4705.contentimage_5F00_1.png:16:16]&lt;/span&gt; ). I&amp;#39;m going to train myself on the internals of the LIB with that.&lt;/p&gt;&lt;p&gt;(I took a specialisation year on control theory in 1985-86, but I&amp;#39;ve forgotten more than 100% of it)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x465/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-11ba5e54-da32-447c-8b71-1617e8faf227/3386.contentimage_5F00_205632.jpg:620:465]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The project that I&amp;#39;m going to control with the PID lib has i2c as input and output. This board has analog out and PWM at the input.&lt;/p&gt;&lt;p&gt;That will force me to keep the lib independent of the device and have it as a reusable entity, as intended by the original creator).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Also because it has 3 controllable circuits, I can use it to extend the library to support more than 1 control strategy, and see if I can switch between them.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=2442&amp;AppID=150&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>