Thursday, December 17, 2015

Week 7 - A Personal Retrospective


Well, to start this blog, the build I was most proud of could be divided between the last 2 builds that really brought out the maker that is within me. I built new board for my projects.  As I stated in Arthur’s review, my Dad was a maker is his own right.  One of the first things (projects) that I built along with him was turn our basement into a recreation area.  We painted the ceiling and floors in the basement, installed a couple of speakers, with enclosers into a sheetrock wall (not known at the time as enclosed speakers). So when I started building my projects fro scratch, that when the Maker in me started to come out.
                When I started this class I was not unsettled by the Making so much as I was about programing (coding).  As an IT manager, I don’t get to code that much anymore.  So the idea of coding had me uneasy.  Not anymore.  Now I want to get back into coding even more.

                The Arduino circuit board is fun.  The breadboard is a great way of experimenting without knowing how to solder a circuit board.  The Arduino circuit makes experimenting with technology projects a fun experience.
I came to learn this new knowledge by stepping out of my comfort zone.  This class allowed me to fail without the anticipated repercussion. 
                 I am a maker (by inheritance).

                I learned that failure is not failure.  It is just another chance to succeed.

                My challenges were internal.  I had to learned that failure was not a bad thing.

                Over time, I learned to not be afraid to fail, which as a career military individual was not an option.
My next adventure in the world of making is to challenge the unknown.  It is not about what the repercussion will be if I fail.  It is what was the failure and how do we get past that failure to make it work.  I want to explore some of the many ideas I have been afraid to try due to the stigma of failure.  Can I make a sensor that will alert Confined Space Entry workers when the oxygen levels are below substainable levels?  
                My next steps will be to Make something!

Sunday, December 13, 2015

Week 6 Adventures in Making - LCD RPM Project


This week I developed my final project using an LCD screen to read RPM readings taken from an Infrared LED Emitter and Detector.  I got the original design and code from arduinoprojects101.com  This is a picture of the original diagram.

I originally intended to create a working model of the above diagram after which I would try some modifications.  To construct this project I needed a larger breadboard than the standard one that came with the Arduino kit.  To accommodate this  larger breadboard, I had to construct a larger base to hold the breadboard and Arduino Uno.

 
 
 
The larger breadboard has 64 rows (I called them pins in the video which was incorrect).  The larger breadboard has 840 tie points for connections.
 
 

 
 
The newly constructed base with larger breadboard and Arduino circuit board came out quite nicely (if I do say so myself)  :-)
 
 

 
 
Next, I did all of the jumper connections as shown on the arduinoproject101.com diagram and powered the board up.
 
 

 
 
 
I then compiled and loaded the code from arduinoproject101.com. which is based on code from instructables.com/id/Arduino-Based-Optical-Tachometer.
 
 
int ledPin = 13;   // IR LED connected to digital pin 13
volatile byte rpmcount;
unsigned int rpm;
unsigned long timeold;
 
// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
 
void rpm_fun()
 {
   //Each rotation, this interrupt function is run twice, so take that into consideration for
   //calculating RPM
   //Update count
      rpmcount++;
 }
 
void setup()
 {
   lcd.begin(16, 2);  // intialise the LCD
 
   //Interrupt 0 is digital pin 2, so that is where the IR detector is connected
   //Triggers on FALLING (change from HIGH to LOW)
   pinMode(ledPin, OUTPUT);
   digitalWrite(ledPin, HIGH);
   attachInterrupt(0, rpm_fun, FALLING);
 
   //Turn on IR LED
   rpmcount = 0;
   rpm = 0;
   timeold = 0;
 }
 
 void loop()
 {
   //Update RPM every second
   delay(1000);
   //Don't process interrupts during calculations
   detachInterrupt(0);
   //Note that this would be 60*1000/(millis() - timeold)*rpmcount   if the interrupt
   //happened once per revolution instead of twice. Other multiples could be used
   //for multi-bladed propellers or fans

   rpm = 30*1000/(millis() - timeold)*rpmcount;
   timeold = millis();
   rpmcount = 0;
 
   //Print out result to lcd
   lcd.clear();
   lcd.print("RPM=");
   lcd.print(rpm);
 
   //Restart the interrupt processing
   attachInterrupt(0, rpm_fun, FALLING);
  }
 
 
 

 
 
 
 
 
After compiling and loading (and connecting my missing LCD read jumper), my LCD was responding properly with a RPM=0 display.  The next step was constructing my motor with a blade that I could pass between the infrared diodes to get a RPM reading.  Unfortunately, the motor that came with the Arduino kit did not come with a blade that I could attached to it for this project.  So I visited a couple if the local electronics stores that I knew carried Arduino kits and parts.  Neither Microcenter nor Radio Shack carried a DC motor with a blade attachment that I could use for this project.  Consequently, not letting this stop me, I had to resort to other measures.... I borrowed my wife's little portable fan she keeps in her purse for emergency cool offs ......
 
  
 
 
Now.  With a small motor in hand to test my project, I check for readings.  However, there was a problem.  My LCD was not displaying any readings.
 
 

 
 
So there was something amiss.  I proceeded to recheck all of my jumper connections in accordance with the arduinoprojects.com diagram.  I check and rechecked.  I changed the infrared diodes (I had purchased a couple of extra sets).  After reexamining the diagram, I determined that I may have the wrong type of infrared diodes.  I researched and found the exact same type of diodes that are pictured in the arduinoprojects.com website.  Eureka!  This must be the problem.  I immediately ran back to Radio Shack and purchased 2 sets of the exact ones.  I ran back to the house plugged them in and....... no joy.  :-(  So, I thought to myself, just maybe there is a different way to configured to jumpers.  So I started experimenting with different jumper configurations for just the infrared diodes (which would have been the next step in my project anyway).  The LCD display was functioning properly.  So there must be another way to configure the infrared diode jumpers.  After several different configurations, I found the right one and Success!  I had a working LCD RPM reader....
 
 

 
 
One of the problems I noted from the original arduinoprojects.com configuration was that there seem to be a double ground for the infrared diode configuration.  Every time I plugged the second ground lead for the infrared diodes into the breadboard, the LCD display would dim and the pin 13 light for that jumper would go out.  This indicated to me that this extra ground was grounding my whole circuit out.  So I eliminated that extra ground jumper and repositioned the other ground jumper so that there was a complete circuit without the double ground and it worked.  Here is a picture of the working circuit without the double ground.


 
 
 
 
This has been a fun and rewarding project.  I have learned more about using libraries in code and using infrared diodes.  Also, here is a note about infrared diodes.
 


 


 Thanks for reading and following the journey!

David

Sunday, December 6, 2015

Week 5 Adventures in Making - Arduino LCD Screen

This week's adventures in making allowed us to explore new ways to experiment with the Arduino board and software.  I chose to use the LCD screen that came with the more advanced kit that I ordered from Amazon.  For this week's adventure, I also purchased an additional UNO circuit board and breadboard kit from Microcenter of Dallas ($14.95). 


The kit from Microcenter that I purchased did not come with a base board like the Vilros kit from Amazon, so I had to make my own baseboard.  I knew I needed to construct my new baseboard on a material that would not cause cross circuit interference.  So I chose to construct my board of Plexiglass material.


 
The first constructed version of the project yielded a functioning LCD that was not displaying the expected results. The LCD screen was working, but not showing any recognizable characters.
 
 

 
 

I was not sure if the potentiometer that came with the Vilros kit was able to control the voltage for this project.  The hardware requirements list called for a 10K potentiometer, and I was not sure if the kit supplied one met that requirement.  So, I purchased, what was listed as a 10K potentiometer from Microcenter.  The new potentiometer did not have leads attached to it, so I had to solder some leads to the new potentiometer.

 
 
 
The new potentiometer did not work at all with the system.  In fact, I had no visible reaction to the LCD screen at all.
 
 
 
So back to the drawing board...
 
 

 
 
After a good nights sleep, time to get back at it..
 
 

 


 
And after much internal deliberation (I just new I had the board wired correctly), I decided to recheck my wiring setup using a magnifying glass.  I learned that my regular glasses were not enough.  Upon rechecking my wiring with the magnifying glass, I discovered a slight error in lead placement.  I corrected that error and eureka!, there it was..
 

 
Yes, it worked as advertised.  Now just a little bit a code play with a Hello to the class..
 

 
 
and a change in the timer display speed change.. 
 

 
 
And this is a demonstration of the potentiometer and it's applicable use in television and computer monitors.  The potentiometer would be used to not only adjust contrast, but different color levels, brightness and other features. 
 
 

 
Thanks for reading my project blog.