Free AI web copilot to create summaries, insights and extended knowledge, download it at here
6321
Abstract
s well as Inverting Directions</b></p><figure id="20d9"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*mdW7RBWN3oRXolmnMvKMMg.jpeg"><figcaption></figcaption></figure><figure id="ff24"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*M-FHambiU5CcLRsexyEjdA.png"><figcaption>Eagle Schematic for your guidance!</figcaption></figure><h1 id="42a8">4.1. Here is Arduino Code</h1>
<figure id="348a">
<div>
<div>
<iframe class="gist-iframe" src="/gist/giljr/1b927302364350a91fb34c7994045fa6.js" allowfullscreen="" frameborder="0" height="undefined" width="undefined">
</div>
</div>
</figure></iframe></div></div></figure>
<figure id="7369">
<div>
<div>
<img class="ratio" src="http://placehold.it/16x9">
<iframe class="" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fc9CHKSBk2rc%3Ffeature%3Doembed&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dc9CHKSBk2rc&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fc9CHKSBk2rc%2Fhqdefault.jpg&key=a19fcc184b9711e1b4764040d3dc5c07&type=text%2Fhtml&schema=youtube" allowfullscreen="" frameborder="0" height="480" width="854">
</div>
</div>
</figure></iframe></div></div></figure><h1 id="0620">4.2. What You'll Need to Know Now</h1><p id="0b59">Notice that we commented on serial outputs. Well, there are the initial settings. You need to know what the analog A0 pin is. It is technical and mapped in the variables LEFT, RIGHT, UP, AND DOWN. Enable rows:</p><div id="87fb"><pre>Serial.println (analogRead (BUTTON))<span class="hljs-comment">;</span>
//Serial.println(buttonPress)<span class="hljs-comment">;</span>
Delay (<span class="hljs-number">100</span>)<span class="hljs-comment">;</span></pre></div><p id="eb77">And disable:</p><div id="e9ec"><pre><span class="hljs-function">Void <span class="hljs-title">stepGo</span> ()</span> {
<span class="hljs-comment">//Serial.println (dPause);</span></pre></div><p id="7e30">Run the code, open the serial, and check the outputs and note the number range on a paper while pressing each button.</p><p id="5431">This is what I’ve got (abstract the number 1023):</p><div id="dd89"><pre><span class="hljs-attribute">Test</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">735</span> <span class="hljs-number">726</span> <span class="hljs-number">727</span> <span class="hljs-number">727</span> <span class="hljs-number">727</span> <span class="hljs-number">727</span> <span class="hljs-number">727</span> <span class="hljs-number">727</span> <span class="hljs-number">727</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">495</span> <span class="hljs-number">495</span> <span class="hljs-number">495</span> <span class="hljs-number">495</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">325</span> <span class="hljs-number">325</span> <span class="hljs-number">325</span> <span class="hljs-number">325</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">137</span> <span class="hljs-number">138</span> <span class="hljs-number">138</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">2</span> <span class="hljs-number">9</span> <span class="hljs-number">10</span> <span class="hljs-number">23</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> <span class="hljs-number">1023</span> …</pre></div><p id="c18a">You notice 5 packets of numbers. Your result is likely to be different. These numbers should be packaged like this:</p><div id="3ad8"><pre><span class="hljs-built_in">int</span> SELECT[] = {<span class="hljs-number">0</span>, <span class="hljs-number">20</span>}; <span class="hljs-comment">// pulsante A</span></pre></div><div id="b8eb"><pre><span class="hljs-built_in">int</span> LEFT[] = {<span class="hljs-number">100</span>, <span class="hljs-number">200</span>}; <span class="hljs-comment">// pulsante B</span></pre></div><div id="2e4c"><pre><span class="hljs-built_in">int</span> RIGTH[] = {<span class="hljs-number">300</span>, <span class="hljs-number">390</span>}; <span class="hljs-comment">// pulsante C</span></pre></div><div id="39b4"><pre><span class="hljs-built_in">int</span> UP[] = {<span class="hljs-number">400</span>, <span class="hljs-number">500</span>}; <span class="hljs-comment">// pulsante D</span></pre></div><div id="af5c"><pre><span class="hljs-built_in">int</span> DOWN[] = {<span class="hljs-number">700</span>
Options
, <span class="hljs-number">830</span>}; <span class="hljs-comment">// pulsante E</span></pre></div><p id="850f">Return the comment to the previous code and redo the stepGo method.</p><h1 id="f20c">4.3. Run Stepper Motor and Regulate DRV8825 Driver Pot</h1><p id="c136">Make all necessary connections and test your engine. Now you can confirm that the A +, A-, B +, and B- poles are connected correctly. See the figure below for guidance.</p><p id="c9ee"><b>Figure 5. <a href="https://www.pololu.com/product/2133">DRV8825</a> Pinout Diagram</b></p><figure id="aa82"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*VDsav8lBk0bqguuv9rs5-Q.jpeg"><figcaption></figcaption></figure><div id="f791"><pre>That’s <span class="hljs-keyword">it</span> — Problem solved so far. We already have <span class="hljs-keyword">some</span> knowledge <span class="hljs-keyword">of</span> how <span class="hljs-keyword">the</span> stepper works <span class="hljs-keyword">with</span> <span class="hljs-keyword">the</span> driver. Let’s <span class="hljs-keyword">continue</span>!</pre></div><h1 id="787c">5. ‘Houston, we’ve had a problem here!’ How to put the modules and reuse them later?</h1><p id="c80a">Solution: Arduino Scavenger Hunt! I’m gonna unsolder some peace from 2 older Arduinos! See this video:</p>
<figure id="8cc2">
<div>
<div>
<img class="ratio" src="http://placehold.it/16x9">
<iframe class="" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FiSJhCSJCiRw%3Ffeature%3Doembed&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DiSJhCSJCiRw&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FiSJhCSJCiRw%2Fhqdefault.jpg&key=a19fcc184b9711e1b4764040d3dc5c07&type=text%2Fhtml&schema=youtube" allowfullscreen="" frameborder="0" height="480" width="854">
</div>
</div>
</figure></iframe></div></div></figure><p id="1481"><b>We’ve got this:</b></p><figure id="b0fc"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*LRRHgosrNku3qjLSwRmGVQ.gif"><figcaption></figcaption></figure><h1 id="30c6">6. Reconstructing the Car</h1><p id="60f9">As I have mentioned I will make another prototype. Here is the video:</p>
<figure id="3d8f">
<div>
<div>
<img class="ratio" src="http://placehold.it/16x9">
<iframe class="" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FTel-_jYvDRM%3Ffeature%3Doembed&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTel-_jYvDRM&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FTel-_jYvDRM%2Fhqdefault.jpg&key=a19fcc184b9711e1b4764040d3dc5c07&type=text%2Fhtml&schema=youtube" allowfullscreen="" frameborder="0" height="480" width="854">
</div>
</div>
</figure></iframe></div></div></figure><p id="a876"><b>We’ve got this:</b></p><figure id="cae0"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*cqDapBTC8a_zjEbWQxRwoA.jpeg"><figcaption></figcaption></figure><figure id="7570"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*bXnxg7k0C13dCa0OuclFAQ.jpeg"><figcaption>working…Pause for vacation! Jul 05 till Aug 27, 2017, if God’s will ;-)</figcaption></figure><p id="2f6b"><b>Open Letter</b>:</p><p id="ebb4">During this project, several fronts of battle were presented. The experience gained from the time of dedication to the hobby is important now.
Simple experiments, such as turning on and off an LED, knowing how a transistor works, capacitor, and there it goes, are fundamental, they are levers to lift stones!
What we are looking for, the solution to the project is not on the shelf of any online site. It springs from our will to create, it is our audacity to invent!
This Project, <a href="https://www.youtube.com/playlist?list=PLK3PeNcUzb8TbQpy3wmGWzjDLNV_lyHSm">Jay Three Balancing Car</a>, is no longer the same … It’s been transformed! Took another Form! It paved the way for new projects.</p><p id="c812">This project challenged what I thought I knew. It instigated me to go one mile more. Flowed and expanded! I Calm down now to outline a more viable plan. Broader!
As the key to maintaining this creative will resides in the knowledge I take my time, and my vacations, now to study. I chose <a href="http://www.microgenios.com.br/">Microgenios</a>, a pioneer tech startup in my country.
By investing in myself, I risk time and money, especially. But it will be worth it, I am sure! As my son would say at one stage of the game, ‘this is insane!’.
Insanity is not to have fun! Wait until August 2017 for news … affection to those who <a href="https://www.facebook.com/profile.php?id=100007875044585">followed me</a>. God grant me back!</p><p id="9911">Best,</p><p id="cc6e">JayThree, The Hobbyist.</p><p id="0ced">NEW! Finally on Aug 27, 2017: See Part 2: <a href="https://readmedium.com/jaythree-balancing-car-project-part-2-5-86222f018e41">Click here</a>!</p><h2 id="1c81">References & Credits</h2><p id="2dc6">Part 1 — — <a href="https://readmedium.com/jaythree-balancing-car-project-part-2-5-86222f018e41">Part 2</a> — — <a href="https://readmedium.com/3b3117047ac6/edit">Part3</a> — <a href="https://readmedium.com/jaythree-balancing-car-project-part-4-5-4964ab5af128">Part 4 </a>— -<a href="https://goo.gl/JKVE3P">Part5</a></p><p id="4fb4"><a href="http://www.mauroalfieri.it/elettronica/drv8825-stepper-driver-arduino.html">drv8825 stepper driver Arduino</a></p><p id="de3f"><a href="http://www.mauroalfieri.it/elettronica/centralina-irrigazione-arduino-pulsanti.html">Centralina irrigazione arduino aggiungi i pulsanti</a></p><p id="9734"><a href="https://www.pololu.com/file/download/drv8825.pdf?file_id=0J590">DRV8825 Stepper Motor Controller IC</a></p><p id="9ff4"><a href="https://www.pololu.com/product/2133">DRV8825 Stepper Motor Driver Carrier, High Current</a></p><p id="32eb"><a href="http://www.pbclinear.com/Download/DataSheet/Stepper-Motor-Support-Document.pdf">Stepper Motor NEMA 17 Datasheet</a></p><p id="228f"><a href="https://www.youtube.com/user/doctoralma77/videos">Mauro Alfieri Youtube Videos</a></p><p id="9342"><a href="https://github.com/giljr/Ardu_Serie">My Github Repo</a></p></article></body>