<?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>Programmable DC Electronic Load - First Look</title><link>/members-area/personalblogs/b/frank-milburn-s-blog/posts/programmable-dc-electronic-load---first-look</link><description>9 August 19 Update: 8 July 19 Update: A protoboard was populated for further testing and described at the bottom of the post I have wanted to build a programmable DC load for some time and have followed both this one by Jan Cumps et....</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Programmable DC Electronic Load - First Look</title><link>https://community.element14.com/members-area/personalblogs/b/frank-milburn-s-blog/posts/programmable-dc-electronic-load---first-look</link><pubDate>Sat, 31 Aug 2019 17:18:25 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:faa45e32-5181-4034-ae38-500f2f17752c</guid><dc:creator>fmilburn</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;span style="font-style:inherit;font-weight:inherit;text-align:left;text-indent:0px;"&gt;There is an interesting discussion on &lt;/span&gt;&lt;a class="" href="https://hackaday.com/2019/08/30/your-arduino-samd21-adc-is-lying-to-you/#comment-6175935" style="font-style:inherit;font-weight:inherit;text-align:left;text-indent:0px;"&gt;Hackaday&lt;/a&gt;&lt;span style="font-style:inherit;font-weight:inherit;text-align:left;text-indent:0px;"&gt; about how Arduino code for reading ADC is incorrect for the SAMD21 which is the microcontroller used in the MKR1000.&amp;nbsp; Basically it attempts to read the ADC before it is finished and ready.&amp;nbsp; This may be part of the problem encountered above but I have not investigated it yet.&amp;nbsp; The Feather M4 uses the SAMD51 and I haven&amp;#39;t looked into whether it suffers from the same problem.&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7280&amp;AppID=328&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Programmable DC Electronic Load - First Look</title><link>https://community.element14.com/members-area/personalblogs/b/frank-milburn-s-blog/posts/programmable-dc-electronic-load---first-look</link><pubDate>Tue, 30 Jul 2019 18:40:29 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:faa45e32-5181-4034-ae38-500f2f17752c</guid><dc:creator>three-phase</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Some good progress being made, thanks for keeping us updated.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Kind regards.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7280&amp;AppID=328&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Programmable DC Electronic Load - First Look</title><link>https://community.element14.com/members-area/personalblogs/b/frank-milburn-s-blog/posts/programmable-dc-electronic-load---first-look</link><pubDate>Tue, 30 Jul 2019 03:59:28 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:faa45e32-5181-4034-ae38-500f2f17752c</guid><dc:creator>fmilburn</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I have made a little progress...&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Received these parts which more or less match the 2nd schematic drawn above:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span&gt;&lt;span class="e14-init-shown" id="addProduct-CDnVmKlP-linked"&gt;&lt;a class="jive-link-product-addtolist" href="https://www.element14.com/community/view-product.jspa?fsku=&amp;amp;nsku=06W0932&amp;amp;COM=noscript" target="_blank"&gt;&lt;span class="pf-widget-map pf-productlink-cart-icon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a class="jive-link-product pf-embedded-product-link" href="https://www.element14.com/community/view-product.jspa?fsku=&amp;amp;nsku=06W0932&amp;amp;COM=noscript" target="_blank"&gt;Bourns PWR220T-35-1R00F&lt;/a&gt;&lt;/span&gt;&lt;span class="e14-init-hidden" id="addProduct-CDnVmKlP-unlinked"&gt;Bourns PWR220T-35-1R00F&lt;/span&gt;&lt;/span&gt; TO-220 style 1% 1 ohm resistors&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span class="e14-init-shown" id="addProduct-pppbg84r-linked"&gt;&lt;a class="jive-link-product-addtolist" href="https://www.element14.com/community/view-product.jspa?fsku=8651396&amp;amp;nsku=63J7705&amp;amp;COM=noscript" target="_blank"&gt;&lt;span class="pf-widget-map pf-productlink-cart-icon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a class="jive-link-product pf-embedded-product-link" href="https://www.element14.com/community/view-product.jspa?fsku=8651396&amp;amp;nsku=63J7705&amp;amp;COM=noscript" target="_blank"&gt;IRLZ34NPBF&lt;/a&gt;&lt;/span&gt;&lt;span class="e14-init-hidden" id="addProduct-pppbg84r-unlinked"&gt;IRLZ34NPBF&lt;/span&gt;&lt;/span&gt; Infineon N-Ch MOSFET&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span class="e14-init-shown" id="addProduct-7Lror8Iu-linked"&gt;&lt;a class="jive-link-product-addtolist" href="https://www.element14.com/community/view-product.jspa?fsku=1853451&amp;amp;nsku=77M3032&amp;amp;COM=noscript" target="_blank"&gt;&lt;span class="pf-widget-map pf-productlink-cart-icon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a class="jive-link-product pf-embedded-product-link" href="https://www.element14.com/community/view-product.jspa?fsku=1853451&amp;amp;nsku=77M3032&amp;amp;COM=noscript" target="_blank"&gt;MCP4725A0T-E/CH&lt;/a&gt;&lt;/span&gt;&lt;span class="e14-init-hidden" id="addProduct-7Lror8Iu-unlinked"&gt;MCP4725A0T-E/CH&lt;/span&gt;&lt;/span&gt; Microchip 12 Bit DAC&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span class="e14-init-shown" id="addProduct-fbgpO7d6-linked"&gt;&lt;a class="jive-link-product-addtolist" href="https://www.element14.com/community/view-product.jspa?fsku=2484554&amp;amp;nsku=51Y4122&amp;amp;COM=noscript" target="_blank"&gt;&lt;span class="pf-widget-map pf-productlink-cart-icon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a class="jive-link-product pf-embedded-product-link" href="https://www.element14.com/community/view-product.jspa?fsku=2484554&amp;amp;nsku=51Y4122&amp;amp;COM=noscript" target="_blank"&gt;OPA192IDBVR&lt;/a&gt;&lt;/span&gt;&lt;span class="e14-init-hidden" id="addProduct-fbgpO7d6-unlinked"&gt;OPA192IDBVR&lt;/span&gt;&lt;/span&gt; Texas Instruments Op Amp&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;span class="e14-init-shown" id="addProduct-4PXKu96w-linked"&gt;&lt;a class="jive-link-product-addtolist" href="https://www.element14.com/community/view-product.jspa?fsku=2663535&amp;amp;nsku=10C0354&amp;amp;COM=noscript" target="_blank"&gt;&lt;span class="pf-widget-map pf-productlink-cart-icon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;a class="jive-link-product pf-embedded-product-link" href="https://www.element14.com/community/view-product.jspa?fsku=2663535&amp;amp;nsku=10C0354&amp;amp;COM=noscript" target="_blank"&gt;10C0354&lt;/a&gt;&lt;/span&gt;&lt;span class="e14-init-hidden" id="addProduct-4PXKu96w-unlinked"&gt;10C0354&lt;/span&gt;&lt;/span&gt; Bourns 2 Ch Encoder&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I also recently purchased an Adafruit Feather M4 Express which has the ATSAMD51J19 microcontroller with 12 bit ADCs and 12 BIT DACs so I did some experimentation with that.&amp;nbsp; The DAC was programmed in the Arduino IDE to output various voltages and then measured with via ADC (2 pins away) and a digital multimeter.&amp;nbsp; The first ADC reading was thrown out and then the next 5 averaged. The following plot shows the deviation of the programmed DAC output and ADC readings from the meter.&lt;span&gt;[View:/resized-image/__size/620x368/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-faa45e32-5181-4034-ae38-500f2f17752c/8836.contentimage_5F00_204157.jpg:620:368]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The DAC output in blue is very linear and could be easily corrected to a large extent in software.&amp;nbsp; There is a lot of scatter in the orange ADC readings.&amp;nbsp; One ADC reading at around 1800 mV is in error by approximately 35 mV which is outside what the datasheet gives as maximum error - not sure what caused that.&amp;nbsp; I seem to remember the MSP432 giving much better results and had a look at the TI datasheet.&amp;nbsp; It reports error differently but does seem to be both more accurate and precise.&amp;nbsp; It might be interesting to do a real world comparison to the Atmel chip.&amp;nbsp; It is a shame there isn&amp;#39;t a MSP432 variant with a DAC.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The following plot shows the percent error for the ADC and DAC on the Feather M4 Express.&amp;nbsp; The title is a bit misleading - the X axis is the meter reading in mV and the Y axis is the percent error for the DAC in blue and the ADC in orange.&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x367/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-faa45e32-5181-4034-ae38-500f2f17752c/7331.contentimage_5F00_204158.jpg:620:367]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Percent error in the DAC would improve if the software correction described above was implemented.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In summary, DAC output seems good on the Atmel SAMD boards so far.&amp;nbsp; The ADC is probably only good for 20 mV or so.&amp;nbsp; This may be good enough for reading the input voltage of the DUT but not good enough for reading current.&amp;nbsp; For that, it would be better to just report the DAC setting.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The Bourns 1 ohm resistors were measured with the &lt;a class="jive-link-blog-small" href="/technologies/open-source-hardware/b/blog/posts/kelvin-4-wire-milliohm-meter-version-1-3-enclosure"&gt;milliohm meter&lt;/a&gt; and are within 0.1% of 1 ohm.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7280&amp;AppID=328&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Programmable DC Electronic Load - First Look</title><link>https://community.element14.com/members-area/personalblogs/b/frank-milburn-s-blog/posts/programmable-dc-electronic-load---first-look</link><pubDate>Fri, 14 Jun 2019 20:38:28 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:faa45e32-5181-4034-ae38-500f2f17752c</guid><dc:creator>fmilburn</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Thanks Donald&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7280&amp;AppID=328&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Programmable DC Electronic Load - First Look</title><link>https://community.element14.com/members-area/personalblogs/b/frank-milburn-s-blog/posts/programmable-dc-electronic-load---first-look</link><pubDate>Fri, 14 Jun 2019 19:29:51 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:faa45e32-5181-4034-ae38-500f2f17752c</guid><dc:creator>three-phase</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;An excellent start to your project Frank. Look forward to the updates as they come.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Kind regards.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7280&amp;AppID=328&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Programmable DC Electronic Load - First Look</title><link>https://community.element14.com/members-area/personalblogs/b/frank-milburn-s-blog/posts/programmable-dc-electronic-load---first-look</link><pubDate>Fri, 14 Jun 2019 08:48:17 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:faa45e32-5181-4034-ae38-500f2f17752c</guid><dc:creator>Andrew J</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I shall follow this with interest.&amp;nbsp; A DC Load is going to be my next project.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7280&amp;AppID=328&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Programmable DC Electronic Load - First Look</title><link>https://community.element14.com/members-area/personalblogs/b/frank-milburn-s-blog/posts/programmable-dc-electronic-load---first-look</link><pubDate>Fri, 14 Jun 2019 08:04:13 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:faa45e32-5181-4034-ae38-500f2f17752c</guid><dc:creator>michaelkellett</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I expect that with some settings and loads your current sink will oscillate.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You&amp;#39;ll be able to mitigate this with the following changes:&lt;/p&gt;&lt;p&gt;about 47R between op amp output and MOSFET gate&lt;/p&gt;&lt;p&gt;4k7 MOSFET source to op amp -ve&lt;/p&gt;&lt;p&gt;100pF op amp output to op amp -ve&lt;/p&gt;&lt;p&gt;These are starting values - if you have a spice model for the MOSFET you can tune by simulation.&lt;/p&gt;&lt;p&gt;Sometimes a resistor in series with the feedback cap helps..&lt;/p&gt;&lt;p&gt;Otherwise you can tune with a scope while applying pulses to the op amp +ve input, either with a&lt;/p&gt;&lt;p&gt;signal generator or software to the DAC.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;MK&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7280&amp;AppID=328&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>