{"id":13,"date":"2015-09-15T12:10:00","date_gmt":"2015-09-15T11:10:00","guid":{"rendered":""},"modified":"2023-08-18T12:25:04","modified_gmt":"2023-08-18T11:25:04","slug":"diy-dro-for-mini-mill-2","status":"publish","type":"post","link":"https:\/\/blog.hslracing.com\/electronics\/2015\/09\/diy-dro-for-mini-mill-2.html","title":{"rendered":"DIY DRO for Mini Mill 2"},"content":{"rendered":"<p>I have since had some more thoughts on this subject and after counting the connections again, decided that it could be implemented with an <a href=\"http:\/\/www.atmel.com\/devices\/attiny85.aspx\">ATtiny85\/45\/25<\/a> DIP 8 chip.<\/p>\n<p>After downloading the DRO_2_2 source code from Yuriy&#8217;s website and compiling it up noticed that it will fit on an\u00a0<a href=\"http:\/\/www.atmel.com\/devices\/attiny85.aspx\">ATtiny85<\/a>\u00a0or 45, but not on a 25 because at 2294 bytes \u00a0it requires slightly more than the 2048 bytes of memory available on the 25 chip.<\/p>\n<p>If I use\u00a0<a href=\"http:\/\/www.ernstc.dk\/arduino\/tinycom.html\">TinyDebugSerial<\/a>, this gives me TX only, however this is all I need and it still works with the standard\u00a0<a href=\"https:\/\/www.arduino.cc\/\">Arduino<\/a>\u00a0<a href=\"https:\/\/www.arduino.cc\/en\/Serial\/Print\">Serial.print<\/a>, etc functions &#8211; the TX connection on the\u00a0<a href=\"http:\/\/www.atmel.com\/devices\/attiny85.aspx\">ATtiny85\/45\/25<\/a>\u00a0chip is on pin PB3 or Digital 3.<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/attiny85.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-74 size-medium\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/attiny85-300x249.png\" alt=\"\" width=\"300\" height=\"249\" srcset=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/attiny85-300x249.png 300w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/attiny85.png 414w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/div>\n<div style=\"clear: both; text-align: left;\">I ended up rotating the chip on the board for the best fit for the connections:<\/div>\n<p>Clock &#8211; digital pin 0<br \/>\nX Data &#8211; digital pin 1<br \/>\nY Data &#8211; digital pin 2<br \/>\nZ Data &#8211; digital pin 4<\/p>\n<p>After all only 7 pins are being used anyway (inlcuding GND and VCC), so a full blown\u00a0<a href=\"https:\/\/www.arduino.cc\/\">Arduino<\/a>\u00a0or dip 28 <a href=\"http:\/\/www.atmel.com\/devices\/atmega328p.aspx\">atmega328p<\/a> chip is not required.<\/p>\n<p>The pull-up resistors are not actually required for any of the Arduino based options as there are internal pull-ups that can be used (<a href=\"https:\/\/www.blogger.com\/\">pinmode<\/a>(pin, INPUT_PULLUP)), and if run at 3V, then the voltage divider is not required either.<\/p>\n<p>The <a href=\"http:\/\/www.atmel.com\/devices\/attiny85.aspx\">ATtiny85\/45\/25<\/a> chips can be run at 8MHz using their internal clocks at 5V or 3V.<\/p>\n<p>I adjusted the schematic<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/Screen-2BShot-2B2015-09-13-2Bat-2B10.02.35.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-75 size-medium\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/Screen-2BShot-2B2015-09-13-2Bat-2B10.02.35-300x219.png\" alt=\"\" width=\"300\" height=\"219\" srcset=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/Screen-2BShot-2B2015-09-13-2Bat-2B10.02.35-300x219.png 300w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/Screen-2BShot-2B2015-09-13-2Bat-2B10.02.35-768x560.png 768w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/Screen-2BShot-2B2015-09-13-2Bat-2B10.02.35.png 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/div>\n<p>Circuit board<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/Screen-2BShot-2B2015-09-13-2Bat-2B10.02.20.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-76 size-medium\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/Screen-2BShot-2B2015-09-13-2Bat-2B10.02.20-300x260.png\" alt=\"\" width=\"300\" height=\"260\" srcset=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/Screen-2BShot-2B2015-09-13-2Bat-2B10.02.20-300x260.png 300w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/Screen-2BShot-2B2015-09-13-2Bat-2B10.02.20.png 724w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/div>\n<p>You will note that I have re-arranged the various USB cable pins in order to simplify the board layout, this also means that I can use any shielded cable that happens to have a mini USB connection at one end and replace the other end with a 4 pin Dupont connector.<\/p>\n<p>I ultimately decided to build it with female USB connectors so I don&#8217;t have to cut the ends off the USB connectors, which made for slightly more complex wiring.<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/Screen-2BShot-2B2015-09-30-2Bat-2B17.06.22.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-77 size-medium\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/Screen-2BShot-2B2015-09-30-2Bat-2B17.06.22-300x230.png\" alt=\"\" width=\"300\" height=\"230\" srcset=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/Screen-2BShot-2B2015-09-30-2Bat-2B17.06.22-300x230.png 300w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/Screen-2BShot-2B2015-09-30-2Bat-2B17.06.22-768x588.png 768w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/Screen-2BShot-2B2015-09-30-2Bat-2B17.06.22.png 784w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/div>\n<p>I had to move the Z axis pin from pin 1 to pin 3 because otherwise I would need to disable the reset function and lose the ability to easily program the chip, but this was no big deal.<\/p>\n<p>Ensure you upload a bootloader to these chips before programming, or the fuses do not set, you may also need to slow down the communication to using JP3 on a USBASP programmer when burning a brand new chip.<\/p>\n<p>The 7V supply is from a telephone power supply, this is then dropped to a regulated 5V by a cheap switch mode Buck converter (\u00a38.75 ($13.50) for 10 from <a href=\"http:\/\/www.ebay.co.uk\/\">ebay<\/a> seller\u00a0<a href=\"http:\/\/www.ebay.co.uk\/usr\/chesk_2013\">chesk_2013<\/a>).<\/p>\n<p>I then also drop the 5V to 3.1V with a voltage divider for powering the scales using a 220 Ohm and 360 Ohm resistor.<\/p>\n<p>I could have dropped the 7V to 5V using a voltage divider as well, but was unsure how well regulated the 7V supply was.<\/p>\n<p>Here is the completed circuit board<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/droif5.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-78 size-medium\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/droif5-300x229.jpg\" alt=\"\" width=\"300\" height=\"229\" srcset=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/droif5-300x229.jpg 300w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/droif5-768x587.jpg 768w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/droif5.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/div>\n<p>Rear view<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/droif6.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-79 size-medium\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/droif6-300x205.jpg\" alt=\"\" width=\"300\" height=\"205\" srcset=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/droif6-300x205.jpg 300w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/droif6-768x525.jpg 768w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/droif6.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/div>\n<p>and with the voltage regulator and bluetooth modules installed.<\/p>\n<div style=\"clear: both; text-align: center;\"><a href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/droif7.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-80 size-medium\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/droif7-300x223.jpg\" alt=\"\" width=\"300\" height=\"223\" srcset=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/droif7-300x223.jpg 300w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/droif7-768x570.jpg 768w, https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/2\/2015\/09\/droif7.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/div>\n<p>Total cost for the parts is \u00a32.50 for the bluetooth module, \u00a30.87 for the regulator, \u00a30.10 for the 2032 holder, \u00a30.60 for the USB connectors, \u00a30.95 for the\u00a0<a href=\"http:\/\/www.atmel.com\/devices\/attiny85.aspx\">ATtiny45<\/a>\u00a0chip, \u00a30.10 for the perf board and a few pennies for the diodes, pins and capacitors, so about \u00a35.00 ($7.50) in total. The 2032 cell came with the scales, so I am not including this in the total, although they are only about \u00a30.20 each anyway.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have since had some more thoughts on this subject and after counting the connections again, decided that it could be implemented with an ATtiny85\/45\/25 DIP 8 chip. After downloading the DRO_2_2 source code from Yuriy&#8217;s website and compiling it up noticed that it will fit on an\u00a0ATtiny85\u00a0or 45, but not on a 25 because&hellip;<\/p>\n","protected":false},"author":2,"featured_media":74,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3],"class_list":["post-13","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorised","tag-dro"],"_links":{"self":[{"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/posts\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/comments?post=13"}],"version-history":[{"count":4,"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/posts\/13\/revisions"}],"predecessor-version":[{"id":176,"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/posts\/13\/revisions\/176"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/media\/74"}],"wp:attachment":[{"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/media?parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/categories?post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hslracing.com\/electronics\/wp-json\/wp\/v2\/tags?post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}