{"id":46,"date":"2012-02-22T20:54:00","date_gmt":"2012-02-22T20:54:00","guid":{"rendered":"https:\/\/blog.hslracing.com\/3dprinters\/2012\/02\/22\/wireless-communication-success\/"},"modified":"2012-02-22T20:54:00","modified_gmt":"2012-02-22T20:54:00","slug":"wireless-communication-success","status":"publish","type":"post","link":"https:\/\/blog.hslracing.com\/3dprinters\/2012\/02\/wireless-communication-success.html","title":{"rendered":"Wireless communication success"},"content":{"rendered":"<p>Well after loads of trial and error and lots of searching on the web, I am finally able to talk to the&nbsp;ATmega644p&nbsp;chip on my breadboard via a bluetooth connection.<\/p>\n<p>There were 2 issues:<\/p>\n<p>First, I have no RST pin on my bluetooth module, so I had to find a way of generating one.<\/p>\n<p>This involved attaching a wire to the place where the &#8220;status&#8221; pin would be connected (basically looped through from the status LED, that actually connects to pin 32 of the HC-05 board that is soldered onto the module) then connecting this via a 1uF capacitor to the reset pin of the ATmega644p.<\/p>\n<p>Now when I power up the board, initially both the ATmega644p and the BT module flash until a connection is established.<\/p>\n<p>Once a connection (like from&nbsp;<a href=\"https:\/\/github.com\/kliment\/Printrun\" style=\"text-align: left\">Printrun<\/a>) is made, the capacitor delays this connection to the reset pin allowing the chip to reset one last time and then keep that pin held high and allowing programming to happen.<\/p>\n<p>Second, I had the RX and TX pins connected backwards, once this was sorted,&nbsp;<a href=\"https:\/\/github.com\/kliment\/Printrun\" style=\"text-align: left\">Printrun<\/a>&nbsp;was able to see the &#8220;printer&#8221; as online. It would seem that these pins are connected differently to my CP2102 programmer, despite being labelled the same.<\/p>\n<p>Still I have never known any harm come from connecting these the wrong way round, and often found this to be a suck it and see exercise to locate the correct orientation of the 2 pins &#8211; TX-TX and RX-RX never actually achieves anything &#8211; 2 sides attempting to talk on one pin but both listening on the other.<\/p>\n<div style=\"clear: both;text-align: center\"><a href=\"http:\/\/2.bp.blogspot.com\/-DWXTxnowDx4\/T0VHzocwQ9I\/AAAAAAAAANE\/TQ26yUq-tvY\/s1600\/BT-module.jpg\" style=\"margin-left: 1em;margin-right: 1em\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"240\" src=\"http:\/\/2.bp.blogspot.com\/-DWXTxnowDx4\/T0VHzocwQ9I\/AAAAAAAAANE\/TQ26yUq-tvY\/s320\/BT-module.jpg\" width=\"320\" \/><\/a><\/div>\n<p>Further tests have shown that I don&#8217;t actually need the status pin connected for&nbsp;<a href=\"https:\/\/github.com\/kliment\/Printrun\" style=\"text-align: left\">Printrun<\/a>&nbsp;to talk to the chip, if I had sorted problem 2 first, I would have noticed this sooner, though it may still be required for wireless re-programming should I feel the need to do this from avrdude or&nbsp;<a href=\"http:\/\/arduino.cc\/\">Arduino<\/a>.<\/p>\n<p>I have been having a closer look at the Sanguinololu schematic:<\/p>\n<div style=\"clear: both;text-align: center\"><a href=\"http:\/\/reprap.org\/mediawiki\/images\/8\/83\/Sanguinololu-schematic.jpg\" style=\"margin-left: 1em;margin-right: 1em\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" height=\"217\" src=\"http:\/\/reprap.org\/mediawiki\/images\/8\/83\/Sanguinololu-schematic.jpg\" width=\"320\" \/><\/a><\/div>\n<p>I am wondering if one can get away without needing to install the FTDI chip at all, especially if you have access to an external serial programmer like the CP2102. all the pins for the USB2TTL connector loop through to the relevant pins on the ATmega644p chip, and all of the pins required for flashing the bootloader are available via the 6 pin ISP header (also used by the SD board).<\/p>\n<p>This would mean a potential saving of 5 components:<\/p>\n<p>IC100 &#8211; FTDI chip<br \/>PS1\/PS2 &#8211; USB connector<br \/>C8, C11 &amp; C15 &#8211; 0.1uF Capacitors<br \/>C16 &#8211; 4.7uF Capacitor<\/p>\n<p>The FTDI chip and USB connector are the most expensive components on the board after the Stepper drivers and the ATmega644p chip, a programmer like the CP2102 can be had on <a href=\"http:\/\/www.ebay.co.uk\/\">eBay<\/a> for as little as \u00a31.83, the FTDI chip alone costs more than that, and without it, there is no SMD soldering required at all.<\/p>\n<p>I have since seen this confirmed by some of the postings on the forums, though it is far from obvious on the <a href=\"http:\/\/reprap.org\/wiki\/Sanguinololu\">Wiki<\/a>, or the <a href=\"https:\/\/github.com\/mosfet\/Sanguinololu\/tree\/master\/rev1.3a\">github<\/a> home of this product.<\/p>\n<p>I have ordered a couple of microSD card adapters:<\/p>\n<div style=\"clear: both;text-align: center\"><a href=\"http:\/\/3.bp.blogspot.com\/-h8lVpLQjVIg\/T0UT-ZgisuI\/AAAAAAAAAM8\/ay4vcBJ_S3o\/s1600\/MicroSD.JPG\" style=\"margin-left: 1em;margin-right: 1em\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/3.bp.blogspot.com\/-h8lVpLQjVIg\/T0UT-ZgisuI\/AAAAAAAAAM8\/ay4vcBJ_S3o\/s1600\/MicroSD.JPG\" \/><\/a><\/div>\n<div style=\"clear: both;text-align: left\">These worked out at \u00a35.84 each including postage, which is only slightly above the bare board price for&nbsp;<a href=\"http:\/\/reprap.org\/wiki\/Sdramps\">SDRamps<\/a>, just over half the price of a populated <a href=\"http:\/\/reprap.org\/wiki\/Sdramps\">SDRamps<\/a> and about a third of the price of an <a href=\"http:\/\/reprap.org\/wiki\/SDSL\">SDSL<\/a> (Sanguinololu version).<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\">It also has a built in voltage regulator, so works with 5V or 3.3V (same as <a href=\"http:\/\/reprap.org\/wiki\/Sdramps\">SDRamps<\/a> and <a href=\"http:\/\/reprap.org\/wiki\/SDSL\">SDSL<\/a>) and will use the same pins on the ISP header (actually only 6 of the pins used by the other boards are required anyway), despite them using a 10 pin connector:<\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<div style=\"clear: both;text-align: left\"><\/div>\n<table>\n<tbody>\n<tr>\n<th>Sanguinololu<\/th>\n<th>ADPmicroSD<\/th>\n<\/tr>\n<tr><\/tr>\n<tr>\n<td>5V<\/td>\n<td>5V<\/td>\n<\/tr>\n<tr>\n<td>GND<\/td>\n<td>GND<\/td>\n<\/tr>\n<tr>\n<td>MOSI<\/td>\n<td>MO<\/td>\n<\/tr>\n<tr>\n<td>MISO<\/td>\n<td>MI<\/td>\n<\/tr>\n<tr>\n<td>SCK<\/td>\n<td>SCK<\/td>\n<\/tr>\n<tr>\n<td>A0<\/td>\n<td>CS<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well after loads of trial and error and lots of searching on the web, I am finally able to talk to the&nbsp;ATmega644p&nbsp;chip on my breadboard via a bluetooth connection. There were 2 issues: First, I have no RST pin on my bluetooth module, so I had to find a way of generating one. This involved&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-46","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/posts\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/comments?post=46"}],"version-history":[{"count":0,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/posts\/46\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/categories?post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hslracing.com\/3dprinters\/wp-json\/wp\/v2\/tags?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}