{"id":551,"date":"2014-10-15T11:03:28","date_gmt":"2014-10-15T11:03:28","guid":{"rendered":"http:\/\/4tronix.co.uk\/blog\/?p=551"},"modified":"2014-10-15T11:07:04","modified_gmt":"2014-10-15T11:07:04","slug":"wiring-the-unotron-for-raspberry-pi-microcon-3","status":"publish","type":"post","link":"https:\/\/4tronix.co.uk\/blog\/?p=551","title":{"rendered":"Wiring the Unotron for Raspberry Pi &#038; Microcon 3"},"content":{"rendered":"<h2>Wiring the Unotron with Raspberry Pi and Microcon 3<\/h2>\n<p>Click on any image to enlarge.<\/p>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step10.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-552\" alt=\"step10\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step10-300x230.jpg\" width=\"300\" height=\"230\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step10-300x230.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step10.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>For the basic mechanical building instructions, please <a href=\"http:\/\/4tronix.co.uk\/arduino\/4tronix-Unotron.php\" target=\"_blank\">refer to here<\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Step 1 &#8211; Fit the Mounting Pillars<\/h3>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step01a.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-555\" alt=\"step01a\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step01a-300x240.jpg\" width=\"300\" height=\"240\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step01a-300x240.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step01a.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>For the Model B+ you should place 4 of the 25mm pillars in the positions shown above. (Note that the one bottom-right in above picture will need the screw removing later to allow the motor to sit properly on the baseplate)<\/p>\n<p>For Models A or B only 2 pillars are required in the positions shown with red ring.<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 2 &#8211; Fit the Raspberry Pi<\/h3>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step02.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-554\" alt=\"step02\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step02-300x240.jpg\" width=\"300\" height=\"240\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step02-300x240.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step02.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>After screwing in all 4 pillars for the B+, then remove the screw underneath the bottom right-hand pillar so it sites on the baseplate but isn&#8217;t screwed in.<\/p>\n<p>Also, note the rubber bumper on the bottom of the mounting pillar of the Microcon v3. This rubber bumper rests onto the PCB of all models (For the Model A and B, you can removed the rubber bumper so the Microcon sits flat with its pillar on top of the mounting screw)<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 3 &#8211; Push On the Microcon v3<\/h3>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step03.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-556\" alt=\"step03\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step03-300x240.jpg\" width=\"300\" height=\"240\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step03-300x240.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step03.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Make sure it is connect correctly to the end of the GPIO connector. For the B+ there will be 14 pins left exposed. For Models A and B, all pins will be covered.<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 4 &#8211; Connect The Motor<\/h3>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step04.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-557\" alt=\"step04\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step04-300x240.jpg\" width=\"300\" height=\"240\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step04-300x240.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step04.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Screw in the motor (see instructions for base build here, steps 1 to 7<\/p>\n<p>Depending on the wiring to the motor, you may need to swap the wires so that the software moves forwards and not backwards when required. Check this when first testing the software<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 5 &#8211; Connect the Servo Lead<\/h3>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step05.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-558\" alt=\"step05\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step05-300x240.jpg\" width=\"300\" height=\"240\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step05-300x240.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step05.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Plug the servo lead into the position shown (marked 22 on the PCB). Make sure you have this the correct way round with the Black wire next to Gnd, Red wire on 5V and White wire on Sig(nal)<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 6 &#8211; Plug in the Ultrasonic Sensor<\/h3>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step07.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-559\" alt=\"step07\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step07-300x240.jpg\" width=\"300\" height=\"240\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step07-300x240.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step07.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Plug the sensor into the breadboard &#8211; approximately centred left to right, but it is not critical<\/p>\n<p>Then connect 4 of the 30cm Male-Female wires, ensuring you plug into the same 4 columns of the breadboard as the sensor is in<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 7 &#8211; Wire the Ultrasonic Sensor to Microcon<\/h3>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step06.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-560\" alt=\"step06\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step06-300x240.jpg\" width=\"300\" height=\"240\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step06-300x240.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step06.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Ensure that the wires match the signal names printed on the sensor and the PCB. So:<\/p>\n<ul>\n<li>Gnd -&gt; Gnd<\/li>\n<li>Echo -&gt; Echo<\/li>\n<li>Trig (or Ping) -&gt; Ping<\/li>\n<li>Vcc -&gt; 5V<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Step 8 &#8211; Wire in the Line Follower Sensors<\/h3>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step08.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-561\" alt=\"step08\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step08-300x240.jpg\" width=\"300\" height=\"240\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step08-300x240.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step08.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Again it is important that the voltage is the correct way round. Connect:<\/p>\n<ul>\n<li>G -&gt; Gnd<\/li>\n<li>V+ -&gt; +5V<\/li>\n<li>S -&gt; Sig<\/li>\n<\/ul>\n<p>The Left sensor should be plugged into the 3 pins labelled 07<\/p>\n<p>The Right sensor into pins labelled 11<\/p>\n<p>&nbsp;<\/p>\n<h3>Step 9 &#8211; Wire in the Battery Pack<\/h3>\n<p><a href=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step09.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-562\" alt=\"step09\" src=\"http:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step09-300x240.jpg\" width=\"300\" height=\"240\" srcset=\"https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step09-300x240.jpg 300w, https:\/\/4tronix.co.uk\/blog\/wp-content\/uploads\/2014\/10\/step09.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><strong>Very Important: <\/strong>The positive (Red wire) goes into the terminal marked Vin, and the negative (Black wire) into the terminal marked Gnd. If you get these the wrong way round, you will damage the driver chip.<\/p>\n<p>&nbsp;<\/p>\n<h3>Testing &amp; Software<\/h3>\n<p>You have now completed the wiring of the Microcon onto the Unotron single-wheek robot. Please download the sample code to test it, remembering that you may need to swap the motor wires so forwards is forwards and not backwards. With the Pi powered up and connected to the internet, go into a terminal window (eg LXTerminal) or from the startup terminal if that&#8217;s how you run your Pi, then type (or copy and paste):<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #800080;\">wget http:\/\/4tronix.co.uk\/unotron.sh -O unotron.sh<\/span><\/p>\n<p>When that is complete, type:<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #800080;\">bash unotron.sh<\/span><\/p>\n<p>Now you will have a new folder \/home\/pi\/unotron with a library module and examples to try. Eg:<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #800080;\">sudo python motorTest.py<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Wiring the Unotron with Raspberry Pi and Microcon 3 Click on any image to enlarge. &nbsp; For the basic mechanical building instructions, please refer to here &nbsp; Step 1 &#8211; Fit the Mounting Pillars For the Model B+ you should place 4 of the 25mm pillars in the positions shown above. (Note that the one &hellip; <a href=\"https:\/\/4tronix.co.uk\/blog\/?p=551\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Wiring the Unotron for Raspberry Pi &#038; Microcon 3<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-551","post","type-post","status-publish","format-standard","hentry","category-robotics-for-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=551"}],"version-history":[{"count":2,"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/551\/revisions"}],"predecessor-version":[{"id":564,"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/551\/revisions\/564"}],"wp:attachment":[{"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/4tronix.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}