{"id":551,"date":"2016-07-16T20:13:05","date_gmt":"2016-07-16T20:13:05","guid":{"rendered":"https:\/\/einhugur.com\/blog\/?page_id=551"},"modified":"2016-09-30T23:51:06","modified_gmt":"2016-09-30T23:51:06","slug":"pcf8591-analog-to-digital-braking-out-of-the-box","status":"publish","type":"page","link":"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/","title":{"rendered":"PCF8591 Analog To Digital &#8211; Braking out of the box"},"content":{"rendered":"<p>&nbsp;<\/p>\n<h2>Yes you heard me right we are braking out of the box! We will be doing some soldering and making our own PCF8591 breakout board.<\/h2>\n<h5>In this example we are going to connect to PCF8591 AD\/DA Converter without using a pre-made breakout board.<\/h5>\n<p><a href=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591.jpg?ssl=1\"><img data-attachment-id=\"712\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/pcf8591-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591.jpg?fit=250%2C241&amp;ssl=1\" data-orig-size=\"250,241\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1468674634&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;80&quot;,&quot;shutter_speed&quot;:&quot;0.03030303030303&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"PCF8591\" data-image-description=\"\" data-medium-file=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591.jpg?fit=250%2C241&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591.jpg?fit=250%2C241&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-712\" src=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591.jpg?resize=250%2C241&#038;ssl=1\" alt=\"PCF8591\" width=\"250\" height=\"241\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>When connecting to PCF8591 AD\/DA Converter in the previous example then we used a breakout board that had the PCF8591 chip, and some support components.<\/p>\n<p>The issue with going this way is that the breakout board had no way to set the base address for the i2c bus which limits us to one such board which is total of 4 analog inputs and 1 analog output. But what if we needed 2 analog outputs ? Or 6 analog inputs ? This is why we will be making the breakout board by our self&#8217;s in this example so that we can set address for the i2c bus and connect 2 boards on the bus. Which will enable us to connect up to 8 such boards, \u00a0getting possibility of up to 32 analog inputs and 8 analog outputs.<\/p>\n<p>Another\u00a0for building our own is to limit power usage. I\u00a0skip totally debug LED on the analog output. And debug power on LED I put a jumper on it so it can be disabled to save power.<\/p>\n<p><strong>Disclaimer:<\/strong><br \/>\nWe do not take any responsibility for possible errors in the guide or errors that you might do wiring it up. Incorrect wiring can result in damaged sensor or damaged Raspberry PI.<\/p>\n<p><strong>Pieces we use in this example:<\/strong><\/p>\n<ul>\n<li>Raspberry PI 2 (or Raspberry PI 3 or maybe Orange PI which are also great for GPIO)<\/li>\n<li>Cobbler and Cobbler cable<\/li>\n<li>WiringPI needs to be installed on the Raspberry PI -&gt;\u00a0<a href=\"http:\/\/wiringpi.com\/download-and-install\/\">See here<\/a>.<\/li>\n<li>I2CTools needs to be installed on the Raspberry PI and I2C needs to be enabled in the Raspberry PI settings.<\/li>\n<li>5x 10k\u03a9 resistors.<\/li>\n<li>2x 0.1\u00a0\u00b5F ceramic capacitors (or one 0.2\u00a0\u00b5F)<\/li>\n<li>PCF8591 chip (just the chip not brake-out board) <span style=\"color: #808080;\">(Those usually come surface mounted, but if you shop around you can probably also find them suitable for breadboard, I took surface mounted to get best price and I was planning to solder anyhow, in this example I will be making one of them usable for breadboard though for initial testing).\u00a0<span style=\"color: #000000;\">Those do cost a bit, I paid around $9 with free shipping to Iceland for 20 surface mounted chips.<\/span><\/span><\/li>\n<li>Adaptor PCB board if the PCF8591 is surface mounted which is the most common for this chip.<\/li>\n<li>LED<\/li>\n<li>1x 1k\u03a9 resistor.<\/li>\n<li>Some header pins<\/li>\n<li>Jumper<\/li>\n<li>DIP switch (3 button. (Or you can use jumpers if you don&#8217;t want to get fancy)<\/li>\n<\/ul>\n<p><strong>Other things you almost\u00a0definitely\u00a0will need in this project:<\/strong><\/p>\n<ul>\n<li>Soldering Wick ! &#8212; To fix errors, you will need it in this project if you are dealing with surface mounted chip.<\/li>\n<li>Soldering magnifier.<\/li>\n<\/ul>\n<hr \/>\n<p><strong>If you are not familiar with breadboards, how to place a cobbler on the breadboard or need to know how to read the color codings on the resistors then click here bellow<\/strong><\/p>\n<p><a class=\"mb-button mb-style-glass mb-size-small mb-corners-default mb-text-style-default \" style=\"background-color: #2b7dc4;\" href=\"https:\/\/einhugur.com\/blog\/index.php\/understanding-your-breadboard-and-placement-of-raspberry-cobbler\/\">\u00a0<i class=\"fa fa-code-fork\"><\/i>\u00a0 Using breadboard<\/a> <a class=\"mb-button mb-style-glass mb-size-small mb-corners-default mb-text-style-default \" style=\"background-color: #2b7dc4;\" href=\"https:\/\/einhugur.com\/blog\/index.php\/basic-electronics\/resistor-color-codings\/\">\u00a0<i class=\"fa fa-bars\"><\/i>\u00a0 Resistor color codings<\/a><\/p>\n<hr \/>\n<p><strong>Wiring diagram for our custom made brake-out board:<\/strong><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2SC.png?ssl=1\"><img data-attachment-id=\"710\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/pcf8591part2sc\/\" data-orig-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2SC.png?fit=800%2C517&amp;ssl=1\" data-orig-size=\"800,517\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"PCF8591Part2SC\" data-image-description=\"\" data-medium-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2SC.png?fit=300%2C194&amp;ssl=1\" data-large-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2SC.png?fit=474%2C306&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-710\" src=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2SC.png?resize=474%2C306&#038;ssl=1\" alt=\"PCF8591Part2SC\" width=\"474\" height=\"306\" srcset=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2SC.png?w=800&amp;ssl=1 800w, https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2SC.png?resize=300%2C194&amp;ssl=1 300w, https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2SC.png?resize=768%2C496&amp;ssl=1 768w\" sizes=\"(max-width: 474px) 100vw, 474px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Now the plan is to build it first on breadboard to test and fine tune for possible errors and then build it on a decent board that can be used as component. (This turned out to be good plan since there was error in the design that I caught in the breadboard test and fixed the design after figuring it out)<\/p>\n<p>First issue with this plan was that it would\u00a0call for making breadboard friendly PCF8591 adapter. And right here the project got stuck, first realisation was that I need adapter PCB since you will not solder such chip to normal test PCB, their way to small to fit on that. Then finally a PCB adapter came and then I realised I had taken wrong. Its tricky not only is it pin count but also width of the chip and density of the pins.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Adapter.jpg?ssl=1\"><img data-attachment-id=\"714\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/pcf8591adapter\/\" data-orig-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Adapter.jpg?fit=400%2C259&amp;ssl=1\" data-orig-size=\"400,259\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1468694487&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;32&quot;,&quot;shutter_speed&quot;:&quot;0.0012391573729864&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"PCF8591Adapter\" data-image-description=\"\" data-medium-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Adapter.jpg?fit=300%2C194&amp;ssl=1\" data-large-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Adapter.jpg?fit=400%2C259&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-714\" src=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Adapter.jpg?resize=400%2C259&#038;ssl=1\" alt=\"PCF8591Adapter\" width=\"400\" height=\"259\" srcset=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Adapter.jpg?w=400&amp;ssl=1 400w, https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Adapter.jpg?resize=300%2C194&amp;ssl=1 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>The one on the left was the correct one, but the one on the right had right density by was not wide enough.<\/p>\n<p><a href=\"https:\/\/i2.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Magnifier.jpg?ssl=1\"><img data-attachment-id=\"716\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/pcf8591magnifier\/\" data-orig-file=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Magnifier.jpg?fit=400%2C388&amp;ssl=1\" data-orig-size=\"400,388\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1468675432&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;64&quot;,&quot;shutter_speed&quot;:&quot;0.03030303030303&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"PCF8591Magnifier\" data-image-description=\"\" data-medium-file=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Magnifier.jpg?fit=300%2C291&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Magnifier.jpg?fit=400%2C388&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-716\" src=\"https:\/\/i2.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Magnifier.jpg?resize=400%2C388&#038;ssl=1\" alt=\"PCF8591Magnifier\" width=\"400\" height=\"388\" srcset=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Magnifier.jpg?w=400&amp;ssl=1 400w, https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Magnifier.jpg?resize=300%2C291&amp;ssl=1 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>You will probably always need magnifier when soldering this one no matter how good your vision is.<\/p>\n<p>Once I finished soldering then it looked like this:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591ForBB.jpg?ssl=1\"><img data-attachment-id=\"718\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/pcf8591forbb\/\" data-orig-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591ForBB.jpg?fit=400%2C381&amp;ssl=1\" data-orig-size=\"400,381\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1468678236&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;32&quot;,&quot;shutter_speed&quot;:&quot;0.0025575447570332&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"PCF8591ForBB\" data-image-description=\"\" data-medium-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591ForBB.jpg?fit=300%2C286&amp;ssl=1\" data-large-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591ForBB.jpg?fit=400%2C381&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-718\" src=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591ForBB.jpg?resize=400%2C381&#038;ssl=1\" alt=\"PCF8591ForBB\" width=\"400\" height=\"381\" srcset=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591ForBB.jpg?w=400&amp;ssl=1 400w, https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591ForBB.jpg?resize=300%2C286&amp;ssl=1 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>I made two of those, one for the Breadboard experiment and one for the final build.<\/p>\n<p>Now I measured from each pin on the chip to each header pin to make sure everything was all right. It was good I did this testing at this point as\u00a0one pin was not good on one of the boards so I had to fix.<\/p>\n<p><strong>The breadboard\u00a0experiment:<\/strong><\/p>\n<p><a href=\"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2BB.png?ssl=1\"><img data-attachment-id=\"719\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/pcf8591part2bb\/\" data-orig-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2BB.png?fit=900%2C460&amp;ssl=1\" data-orig-size=\"900,460\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"PCF8591Part2BB\" data-image-description=\"\" data-medium-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2BB.png?fit=300%2C153&amp;ssl=1\" data-large-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2BB.png?fit=474%2C242&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-719\" src=\"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2BB.png?resize=474%2C242&#038;ssl=1\" alt=\"PCF8591Part2BB\" width=\"474\" height=\"242\" srcset=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2BB.png?w=900&amp;ssl=1 900w, https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2BB.png?resize=300%2C153&amp;ssl=1 300w, https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Part2BB.png?resize=768%2C393&amp;ssl=1 768w\" sizes=\"(max-width: 474px) 100vw, 474px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>(Sadly I could not find 3 way dip switch for the drawing program so the drawing shows 2x 2 way, but it should be 1x 3 way)<\/p>\n<p>To test this then this is applied the same way as is shown in the pre-made board in the <a href=\"https:\/\/einhugur.com\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital\/\">PCF8591 Analog To Digital<\/a>\u00a0guide. (Except you may want to download updated code at bottom of this guide that can set alternate hardware addresses depending on your DIP switch settings)<\/p>\n<p>Once this was working perfectly reading the analog input channels and writing to the analog output channel then it was time to build the final board.<\/p>\n<p><strong>The final board:<\/strong><\/p>\n<p>I wanted the PCB adaptor for the chip to be like plug in that I could take out of the main board like as if it was breadboard. But sadly my header pins were rectangular and the female socket pins I had were circular. So I had to skip this niceness for now.<\/p>\n<p>I started making it without having the PCP adaptor board in, this way I was able to fit some things under the chip and use the space there.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/NearFinal.jpg?ssl=1\"><img data-attachment-id=\"720\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/nearfinal\/\" data-orig-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/NearFinal.jpg?fit=600%2C280&amp;ssl=1\" data-orig-size=\"600,280\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1468675468&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;200&quot;,&quot;shutter_speed&quot;:&quot;0.03030303030303&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"NearFinal\" data-image-description=\"\" data-medium-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/NearFinal.jpg?fit=300%2C140&amp;ssl=1\" data-large-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/NearFinal.jpg?fit=474%2C221&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-720\" src=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/NearFinal.jpg?resize=474%2C221&#038;ssl=1\" alt=\"NearFinal\" width=\"474\" height=\"221\" srcset=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/NearFinal.jpg?w=600&amp;ssl=1 600w, https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/NearFinal.jpg?resize=300%2C140&amp;ssl=1 300w\" sizes=\"(max-width: 474px) 100vw, 474px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>So this is how it was before installing the chip &#8220;daughter board&#8221;. Header pins, Resistors, LED, capacitors and the DIP switch are all in place.<\/p>\n<p>Then at last I soldered the &#8220;daughter board&#8221; in as seen bellow.<\/p>\n<p><a href=\"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Final.jpg?ssl=1\"><img data-attachment-id=\"721\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/pcf8591final\/\" data-orig-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Final.jpg?fit=600%2C407&amp;ssl=1\" data-orig-size=\"600,407\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1468678165&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;160&quot;,&quot;shutter_speed&quot;:&quot;0.03030303030303&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"PCF8591Final\" data-image-description=\"\" data-medium-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Final.jpg?fit=300%2C204&amp;ssl=1\" data-large-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Final.jpg?fit=474%2C322&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-721\" src=\"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Final.jpg?resize=474%2C322&#038;ssl=1\" alt=\"PCF8591Final\" width=\"474\" height=\"322\" srcset=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Final.jpg?w=600&amp;ssl=1 600w, https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Final.jpg?resize=300%2C204&amp;ssl=1 300w\" sizes=\"(max-width: 474px) 100vw, 474px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>As you can see then my board did not end up to be a lot bigger than the bought one. I don&#8217;t know why the bought ones do not expose the hardware address and instead put jumpers for useless on board Light sensor and Potentiometer. Its as if their made only for showcase and not for practical uses.<\/p>\n<p>On the picture above the first DIP is set to one which will make the Hardware address 0x49 instead of 0x48.<\/p>\n<p>The black pins on top right are Analog in 0 to 4 from top to bottom. The white pin on right is Analog out. Blue pin is GND, red pin is +5 V. Lower yellow pin (pin number 9 on the daughter board) is SDA, upper yellow pin is SCL (pin number 10 on the daughter board).<\/p>\n<p>You can now use more than one of those on your SDA bus if setting one to different hardware address. This means you can even use the bought one and your own together since one may remain on address 0x48.<\/p>\n<p>You can wire up to 8 in theory by using the dip switch addresses but of course you need to be aware of power management if having many devices.<\/p>\n<p>If you are using more than one boards then do not use the cheap resistor way to convert the bus voltage but instead use a I2C logic converter as we both show how to build and how to use a pre-made one in our\u00a0<a href=\"https:\/\/einhugur.com\/blog\/index.php\/xojo-gpio\/i2c-logic-level-converter-building-our-own\/\">I2C logic level converter &#8211;\u00a0Building our own<\/a>\u00a0guide. You only need one such converter as all the PCF8591 would plug on the 5V side and then the Raspberry on the 3V side. Like shown bellow:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/05\/WithLogicConverter.png?ssl=1\"><img data-attachment-id=\"696\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital\/withlogicconverter\/\" data-orig-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/05\/WithLogicConverter.png?fit=493%2C147&amp;ssl=1\" data-orig-size=\"493,147\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"WithLogicConverter\" data-image-description=\"\" data-medium-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/05\/WithLogicConverter.png?fit=300%2C89&amp;ssl=1\" data-large-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/05\/WithLogicConverter.png?fit=474%2C141&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-696\" src=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/05\/WithLogicConverter.png?resize=474%2C141&#038;ssl=1\" alt=\"WithLogicConverter\" width=\"474\" height=\"141\" srcset=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/05\/WithLogicConverter.png?w=493&amp;ssl=1 493w, https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/05\/WithLogicConverter.png?resize=300%2C89&amp;ssl=1 300w\" sizes=\"(max-width: 474px) 100vw, 474px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<hr \/>\n<p>After doing all this then I realised that I really should have jumper on the pull up resistors on the SDA bus. Only one device on the SDA bus should be using pull up resistors. Its often a problem that there is no way to disable them on brake-out board with out cutting out the resistors on one board if you have many SDA devices.<\/p>\n<p>So after adding another jumper then schema looks like this:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591-BrakeoutboardSC2.png?ssl=1\"><img data-attachment-id=\"734\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/pcf8591-brakeoutboardsc2\/\" data-orig-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591-BrakeoutboardSC2.png?fit=800%2C510&amp;ssl=1\" data-orig-size=\"800,510\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"PCF8591 BrakeoutboardSC2\" data-image-description=\"\" data-medium-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591-BrakeoutboardSC2.png?fit=300%2C191&amp;ssl=1\" data-large-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591-BrakeoutboardSC2.png?fit=474%2C302&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-734\" src=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591-BrakeoutboardSC2.png?resize=474%2C302&#038;ssl=1\" alt=\"PCF8591 BrakeoutboardSC2\" width=\"474\" height=\"302\" srcset=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591-BrakeoutboardSC2.png?w=800&amp;ssl=1 800w, https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591-BrakeoutboardSC2.png?resize=300%2C191&amp;ssl=1 300w, https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591-BrakeoutboardSC2.png?resize=768%2C490&amp;ssl=1 768w\" sizes=\"(max-width: 474px) 100vw, 474px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>Where if having more than one device on the SDA bus you pull out the JP2 given that the other device has pull up resistors in place.<\/p>\n<hr \/>\n<p><strong>Downloading the code:<\/strong><\/p>\n<p><a class=\"mb-button mb-style-glass mb-size-small mb-corners-default mb-text-style-default \" style=\"background-color: #2b7dc4;\" href=\"http:\/\/www.einhugur.com\/Downloads\/GPIO\/I2Custom.zip\">\u00a0<i class=\"fa fa-download\"><\/i>\u00a0 Download the code<\/a><\/p>\n<hr \/>\n<p>After doing this all then I went ahead and did draw up PCB board ready to be fabricated. \u00a0You many think this is expensive but it is not. I found service that will do 10 boards for $10, given you would else need to buy adapter for the chip and also base plate to solder on then the $1 per board is probably not bad deal !!<\/p>\n<p><a href=\"https:\/\/i2.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Fabricated.png?ssl=1\"><img data-attachment-id=\"736\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/pcf8591fabricated\/\" data-orig-file=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Fabricated.png?fit=480%2C409&amp;ssl=1\" data-orig-size=\"480,409\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"PCF8591Fabricated\" data-image-description=\"\" data-medium-file=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Fabricated.png?fit=300%2C256&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Fabricated.png?fit=474%2C404&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-736\" src=\"https:\/\/i2.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Fabricated.png?resize=474%2C404&#038;ssl=1\" alt=\"PCF8591Fabricated\" width=\"474\" height=\"404\" srcset=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Fabricated.png?w=480&amp;ssl=1 480w, https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCF8591Fabricated.png?resize=300%2C256&amp;ssl=1 300w\" sizes=\"(max-width: 474px) 100vw, 474px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>The board came like this from fabrication:<\/p>\n<p><a href=\"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCB.png?ssl=1\"><img data-attachment-id=\"775\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/pcb\/\" data-orig-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCB.png?fit=450%2C386&amp;ssl=1\" data-orig-size=\"450,386\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pcb\" data-image-description=\"\" data-medium-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCB.png?fit=300%2C257&amp;ssl=1\" data-large-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCB.png?fit=450%2C386&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-775\" src=\"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCB.png?resize=450%2C386&#038;ssl=1\" alt=\"pcb\" width=\"450\" height=\"386\" srcset=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCB.png?w=450&amp;ssl=1 450w, https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCB.png?resize=300%2C257&amp;ssl=1 300w\" sizes=\"(max-width: 450px) 100vw, 450px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>The following red marked areas are 10k resistors (SMD 0805 form factor):<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCB10kResistors.png?ssl=1\"><img data-attachment-id=\"776\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/pcb10kresistors\/\" data-orig-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCB10kResistors.png?fit=450%2C386&amp;ssl=1\" data-orig-size=\"450,386\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pcb10kresistors\" data-image-description=\"\" data-medium-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCB10kResistors.png?fit=300%2C257&amp;ssl=1\" data-large-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCB10kResistors.png?fit=450%2C386&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-776\" src=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCB10kResistors.png?resize=450%2C386&#038;ssl=1\" alt=\"pcb10kresistors\" width=\"450\" height=\"386\" srcset=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCB10kResistors.png?w=450&amp;ssl=1 450w, https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCB10kResistors.png?resize=300%2C257&amp;ssl=1 300w\" sizes=\"(max-width: 450px) 100vw, 450px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>The following red marked area is 1k resistor (SMD 0805 form factor):<\/p>\n<p><a href=\"https:\/\/i2.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCB1kResistor.png?ssl=1\"><img data-attachment-id=\"777\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/pcb1kresistor\/\" data-orig-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCB1kResistor.png?fit=450%2C386&amp;ssl=1\" data-orig-size=\"450,386\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pcb1kresistor\" data-image-description=\"\" data-medium-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCB1kResistor.png?fit=300%2C257&amp;ssl=1\" data-large-file=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCB1kResistor.png?fit=450%2C386&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-777\" src=\"https:\/\/i2.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCB1kResistor.png?resize=450%2C386&#038;ssl=1\" alt=\"pcb1kresistor\" width=\"450\" height=\"386\" srcset=\"https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCB1kResistor.png?w=450&amp;ssl=1 450w, https:\/\/i2.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCB1kResistor.png?resize=300%2C257&amp;ssl=1 300w\" sizes=\"(max-width: 450px) 100vw, 450px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>The following are\u00a00.1\u00b5F capacitors (SMB 0805 form factor);<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCBCapacitors.png?ssl=1\"><img data-attachment-id=\"778\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/pcbcapacitors\/\" data-orig-file=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCBCapacitors.png?fit=450%2C386&amp;ssl=1\" data-orig-size=\"450,386\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pcbcapacitors\" data-image-description=\"\" data-medium-file=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCBCapacitors.png?fit=300%2C257&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCBCapacitors.png?fit=450%2C386&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-778\" src=\"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCBCapacitors.png?resize=450%2C386&#038;ssl=1\" alt=\"pcbcapacitors\" width=\"450\" height=\"386\" srcset=\"https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCBCapacitors.png?w=450&amp;ssl=1 450w, https:\/\/i0.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCBCapacitors.png?resize=300%2C257&amp;ssl=1 300w\" sizes=\"(max-width: 450px) 100vw, 450px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>And the red mark on this one shows the orientation of the main chip:<\/p>\n<p><a href=\"https:\/\/i2.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/ChipOrientation.png?ssl=1\"><img data-attachment-id=\"779\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/chiporientation\/\" data-orig-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/ChipOrientation.png?fit=450%2C386&amp;ssl=1\" data-orig-size=\"450,386\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"chiporientation\" data-image-description=\"\" data-medium-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/ChipOrientation.png?fit=300%2C257&amp;ssl=1\" data-large-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/ChipOrientation.png?fit=450%2C386&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-779\" src=\"https:\/\/i2.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/ChipOrientation.png?resize=450%2C386&#038;ssl=1\" alt=\"chiporientation\" width=\"450\" height=\"386\" srcset=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/ChipOrientation.png?w=450&amp;ssl=1 450w, https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/ChipOrientation.png?resize=300%2C257&amp;ssl=1 300w\" sizes=\"(max-width: 450px) 100vw, 450px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>And finally a LED (SMD 1206 form factor). Greed shows the cathode \u00a0of the LED.<\/p>\n<p><a href=\"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCPLed.png?ssl=1\"><img data-attachment-id=\"780\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/pcpled\/\" data-orig-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCPLed.png?fit=450%2C386&amp;ssl=1\" data-orig-size=\"450,386\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pcpled\" data-image-description=\"\" data-medium-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCPLed.png?fit=300%2C257&amp;ssl=1\" data-large-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCPLed.png?fit=450%2C386&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-780\" src=\"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCPLed.png?resize=450%2C386&#038;ssl=1\" alt=\"pcpled\" width=\"450\" height=\"386\" srcset=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCPLed.png?w=450&amp;ssl=1 450w, https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCPLed.png?resize=300%2C257&amp;ssl=1 300w\" sizes=\"(max-width: 450px) 100vw, 450px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>And the final build:<\/p>\n<p><a href=\"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCBFinal.png?ssl=1\"><img data-attachment-id=\"782\" data-permalink=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/pcbfinal\/\" data-orig-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCBFinal.png?fit=500%2C433&amp;ssl=1\" data-orig-size=\"500,433\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pcbfinal\" data-image-description=\"\" data-medium-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCBFinal.png?fit=300%2C260&amp;ssl=1\" data-large-file=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCBFinal.png?fit=474%2C410&amp;ssl=1\" loading=\"lazy\" class=\"alignnone size-full wp-image-782\" src=\"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/07\/PCBFinal.png?resize=474%2C410&#038;ssl=1\" alt=\"pcbfinal\" width=\"474\" height=\"410\" srcset=\"https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCBFinal.png?w=500&amp;ssl=1 500w, https:\/\/i1.wp.com\/einhugur.net\/blog\/wp-content\/uploads\/2016\/07\/PCBFinal.png?resize=300%2C260&amp;ssl=1 300w\" sizes=\"(max-width: 474px) 100vw, 474px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<p>Dip switches 1 &#8211; 3 set the hardware address.<br \/>\nDip switch 4, turns on or off the power status light (to save power then you may want it turned off).<br \/>\nThe Jumper at top left turns off the pull up resistors. Only one device on the bus should be using pull up resistors.<\/p>\n<p><em>Note that soldering this one was not easy ! I used hot air touch free soldering, but still found it to be very hard.<\/em><\/p>\n<p><a class=\"mb-button mb-style-glass mb-size-small mb-corners-default mb-text-style-default \" style=\"background-color: #2b7dc4;\" href=\"http:\/\/www.einhugur.com\/Downloads\/GPIO\/PCF8591GerberFiles.zip\">\u00a0<i class=\"fa fa-download\"><\/i>\u00a0 Gerber files to fabricate copy the Einhugur A10 board<\/a><\/p>\n<p>The boards were fabricated at AllPCB, if you use the link bellow to sign up there then both you and Einhugur should get discount. (Which of course would help support our effort here). Making your own boards is cheaper than you might think, for 10 boards we paid $10, so $1 per fabricated board, which is about same as just the chip adapter board costed in our first prototype.<\/p>\n<p><a href=\"http:\/\/www.allpcb.com\/setinvite.aspx?inviteid=17891\">All PCB<\/a><\/p>\n<hr \/>\n<p>That is\u00a0it for now, by all means leave comments if you like this article or have questions.<\/p>\n<hr \/>\n<p><a href=\"http:\/\/s.click.aliexpress.com\/e\/3JmyzZR7Y\" target=\"_parent\"><img src=\"https:\/\/i2.wp.com\/g03.a.alicdn.com\/kf\/HTB1_wanJFXXXXc5aXXXq6xXFXXXK\/Multimetro-HoldPeak-HP-770D-Auto-Range-font-b-Digital-b-font-font-b-Multimeter-b-font.jpg_220x220.jpg?w=474\" data-recalc-dims=\"1\" \/><span style=\"display: block;\">AliExpress.com Product &#8211; HoldPeak HP-770D Multimeter<\/span><\/a><\/p>\n<p><a href=\"http:\/\/s.click.aliexpress.com\/e\/UB66yNRbY\" target=\"_parent\"><img src=\"https:\/\/i2.wp.com\/g03.a.alicdn.com\/kf\/HTB1uYtsIXXXXXa7XFXXq6xXFXXXY\/1-4W-0-25W-122-kind-20-PCs-2440-PCs-0-33ohm-4-7m-5-carbon.jpg_220x220.jpg?w=474\" data-recalc-dims=\"1\" \/><span style=\"display: block;\">AliExpress.com Product &#8211; 1\/4W 0.25W 122 kind * 20 PCs =2440 PCs (0.33ohm-4.7m) 5% carbon film resistors assorted kit<\/span><\/a><\/p>\n<p><a href=\"http:\/\/s.click.aliexpress.com\/e\/zBYNrVz72\" target=\"_parent\"><img src=\"https:\/\/i2.wp.com\/g03.a.alicdn.com\/kf\/HTB13t44LpXXXXauXFXXq6xXFXXXp\/-font-b-PCF8591-b-font-module-AD-DA-converter-module-font-b-analog-b-font.jpg_220x220.jpg?w=474\" data-recalc-dims=\"1\" \/><span style=\"display: block;\">AliExpress.com Product &#8211; PCF8591 module AD \/ DA converter module analog to digital \/ digital to analog conversion<\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Yes you heard me right we are braking out of the box! We will be doing some soldering and making our own PCF8591 breakout board. In this example we are going to connect to PCF8591 AD\/DA Converter without using a pre-made breakout board. When connecting to PCF8591 AD\/DA Converter in the previous example then &hellip; <a href=\"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital-braking-out-of-the-box\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">PCF8591 Analog To Digital &#8211; Braking out of the box<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":94,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"spay_email":""},"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/Pd75nk-8T","jetpack-related-posts":[{"id":530,"url":"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/pcf8591-analog-to-digital\/","url_meta":{"origin":551,"position":0},"title":"PCF8591 Analog To Digital","date":"May 5, 2016","format":false,"excerpt":"In this example we are going to connect to PCF8591 AD\/DA Converter. Raspberry PI has no Analog inputs\u00a0or outputs, so to talk to analog devices we need to convert the signal. Updated 6. May 2016 - Added R6 and R7 to get the voltage to safe levels on the I2C\u2026","rel":"","context":"Similar post","img":{"alt_text":"PCF8591","src":"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/05\/PCF8591.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":94,"url":"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/","url_meta":{"origin":551,"position":1},"title":"Xojo GPIO","date":"September 19, 2015","format":false,"excerpt":"Guides for GPIO in Xojo \u00a0Infrared motion detection (Updated 1. May 2016) Shows\u00a02 ways of coding: Using Interrupts or simple polling. Sensors: \u00a0HC-SR501,\u00a0ST-00082 Mini,\u00a0Mini IR Pyroelectric Infrared PIR Motion Human Sensor Detector Module Uses:\u00a0Basic GPIO Relay board In this example we \u00a0wire up a relay board and let your Xojo\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":674,"url":"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/i2c-logic-level-converter-building-our-own\/","url_meta":{"origin":551,"position":2},"title":"I2C logic level converter - Building our own","date":"May 29, 2016","format":false,"excerpt":"In this example we are going to create a I2C logic level converter. Disclaimer: We do not take any responsibility for possible errors in the guide or errors that you might do wiring it up. Incorrect wiring can result in damaged sensor or damaged Raspberry PI. The problem: Some I2C\u2026","rel":"","context":"Similar post","img":{"alt_text":"Be careful about which wires are actually connected and which are not. The SCL wires are crossing others but you see by the dots which they actually connect to.","src":"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/05\/I2CScheme.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":617,"url":"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/bmp180-barometer-sensor\/","url_meta":{"origin":551,"position":3},"title":"BMP180 Barometer sensor","date":"May 22, 2016","format":false,"excerpt":"In this example we are going to connect to BMP180 barometer sensor, we will be using brake-out board called GY-68. This sensor is really small even the full brake-outboard is only size of a fingernail. The board does not come with the header pins soldered on, but with mine the\u2026","rel":"","context":"Similar post","img":{"alt_text":"BMP180Soldered","src":"https:\/\/i1.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2016\/05\/BMP180Soldered.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":102,"url":"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/relay-board\/","url_meta":{"origin":551,"position":4},"title":"Relay board","date":"September 19, 2015","format":false,"excerpt":"In this example we are going to wire up a relay board and let your Xojo code control it. A really board is normally used to control high voltage devices such as lights for example. In my case I will be using them \u00a0to remote control electric heaters in a\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/09\/RelayWiring-300x225.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":288,"url":"https:\/\/einhugur.net\/blog\/index.php\/xojo-gpio\/connecting-max7219_led_matrix-with-spi-bus\/","url_meta":{"origin":551,"position":5},"title":"Connecting MAX7219_LED_MATRIX with SPI bus","date":"October 21, 2015","format":false,"excerpt":"In this example we going to connect a\u00a0MAX7219_LED_MATRIX and control it with the SPI bus on the Raspberry PI. 8. Nov 2015 Important !! When I was working on next step in this to daisy chain more than one on same bus then I measured some extreme power usage at\u2026","rel":"","context":"Similar post","img":{"alt_text":"MAX7219_LED_MATRIX","src":"https:\/\/i2.wp.com\/einhugur.com\/blog\/wp-content\/uploads\/2015\/10\/MAX7219_LED_MATRIX-e1445384705632.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/pages\/551"}],"collection":[{"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=551"}],"version-history":[{"count":0,"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/pages\/551\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/pages\/94"}],"wp:attachment":[{"href":"https:\/\/einhugur.net\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}