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?
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.
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.
This week's challenge was the Electronic Dice Machine that would generate a random number using 7 LED's to simulate the possible combinations that you may get when you roll the dice. I found the project to be fun and challenging. I want to give a shout out to Nichole Hahn for trying to help me understand the code. Interestingly enough, I understand the code and was able to writing and find some additional code pieces that I was able to use to construct a automatic random number generator that works just fine. However, I can't seem to get my button to work for manual number generation. This is something I will work on later. Check out my video of my automatic random number generator and my manual number generator that I am still working on.
Here is the chart from my random number generator:
Here is the code for my automatic electronic dice machine:
//Pin to to turn dice on & off
int button = 2;
//LED for DICE
int bottomLeft = 7;
int bottommiddleLeft = 8;
int uppermiddleLeft = 9;
int upperLeft = 10;
int bottomRight = 11;
int middleRight = 12;
int upperRight = 13;
Here is the code from my manual electronic dice machine that I am still working on:
//Pin to turn dice on & off
int button = 2;
//LED for DICE
int bottomLeft = 7;
int bottommiddleLeft = 8;
int uppermiddleLeft = 9;
int upperLeft = 10;
int bottomRight = 11;
int middleRight = 12;
int upperRight = 13;
I like my automatic electronic dice machine. But I am still working on my manual electronic dice machine, because I know that it will working when I find what is not working with the button.
Here is a picture of my board configuration:
SketchUp
SketchUp is a really great designing tool. I enjoyed getting familiar with all of the tools it has available for designing my MakerSpace. I have in fact purchase a one year student copy because I know I will be able to use it for other designing purposes as well. I am just getting started but here is a picture of my starting design project:
I am really going to enjoy designing my MakerSpace with SketchUp.
This week’s
Adventures in Making was about the RGB LED and using Loops, Arrays and Analog Read/Write.This week’s # 3 circuit was particularly
challenging for me because of a reason I have not figured out yet, I could not
get it to work.
I spent entirely too
much time (2 ½ days) trying to figure out why I could not get this circuit to
work. I just was not going to let this go without me solving it. I even reconfigured my board back to circuit # 1 just to make sure my breadboard had not burned out. Circuit # 1 worked just fine as it had before. I tried to alter the code in several different edits:
I even striped out all of the comments and tried to run it, alas no joy!
I even went so far as to go to a
couple of the local electronics stores (Fry’s and Microcenter) trying to find replacement RGB
LEDs to eliminate the possibility that I had a defective RGB LED. After spending a lengthy time at Fry's going through the LED at Fry's and getting a sales tech involved, who, after searching through them concluded that they were online and not in the store, I proceed to go to Microcenter. For those of you who don't know, Microcenter is another great electronics store on US 75 and Spring Valley in Richardson. They actually have a Hobbyist section that has several electronic Maker kits. I found the 4 pin RGB LEDs at Microcenter and bought the last two packs the store had.
When I made it home, I tried one of the new
LEDs, but still no joy. So I finally succumb to the fact that, though I may be able to figure it out later, which I think has to be my code, I didn't have enough time right now and needed to try circuit # 4. I had absolutely no problem configuring the Arduino with circuit # 4. I ran the code that is in the USK without editing it in any fashion (including the all of the comments) due to lack of time and a small confidence factor because I wanted to see if it would run, after my experience with not being able to get circuit # 3 to work.
It ran as advertised :
I have not included my usual Microsoft Visio drawings this week due to lack of time from my frustrating experience with the Circuit # 3 failure. I am not going to count circuit # 3 as a failure. Just lack of time to finish troubleshooting right now.
This week's project was a demonstration of how to vary the voltage
using a potentiometer in the circuit.
A potentiometer can be used to vary voltage using an analog resistance, rather than the
steady on or off state that is supplied from a digital signal.A digital signal has either an on or off
state (0 or 1) as in a light switch.Using a potentiometer to vary the voltage from the analog side of the
board, you can regulate the voltage.
The code I used for this project.
int sensorPin = 0;// The
potentiometer is connected to //
analog pin 0
int ledPin = 13;// The LED
is connected to digital pin 13
void setup() // this
function runs once when the sketch starts up
{ pinMode(ledPin, OUTPUT); }
void loop() // this function runs repeatedly after setup() finishes
{ int sensorValue; sensorValue =
analogRead(sensorPin); digitalWrite(ledPin, HIGH);// Turn
the LED on delay(sensorValue);//
Pause for sensorValue //
milliseconds digitalWrite(ledPin, LOW);// Turn the LED off delay(sensorValue);//
Pause for sensorValue // milliseconds }
A picture of my circuit including Arduino and Breadboard for this project
An Visio drawing of my electronic diagram of my week 2 project
A couple of YouTube Video of my project
Circuit and Code Play
See what happens if you use two digital pins rather that one digital and one analog pin:
I try to switch the analog pin over to digital, however the light would not function. I would think that a code change would be necessary in order for this to work. I will explore this a t a later time.
Extension Challenge
Can you control 2 lights with the same brightness or same blink rate
Yes, plugged a red LED into slot (g) 19 and 20 next to the amber LED and both blinked at the same rate.
Thoughts and Final Reflections: I found this project to fun and informative. The most challenging part of this project I encountered was having to go out and search the internet for the USK guide to get the proper code for this project. The code that I originally used, that I thought was the code for the project, did not work. Although I had a blinking light, the potentiometer was not working. I knew that there should have been some type of reaction when I turned the potentiometer, but there was no reaction. The light kept blinking at a steady rate. What I learned from this project: I really never understood what component of the electronic circuitry controlled things like volume and attenuation (If that's a word). I now have a much better understanding of the hardware and software that controls the electronic circuitry.
2.This project was a pretty simple
configuration and coding project for a blinking light.I found this project to be fun and
engaging.I recalled some of my coding
knowledge. The only hiccup was having 2 USB cords laying by the computer and
plugging in the wrong one and not get a response from the board (DUH)!
Code
for this project
/*
Blink Turns on an
LED for one second, then off for one second, repeatedly. This example
code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13; // the seup routine runs once when you press reset: void setup() { // initialize
the digital pin as an output. pinMode(led,
OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); //turn the LED on (High is the voltage level) delay(3000);//wait for
a second digitalWrite(led, LOW); //turn the LED off by making the voltage LOW delay(3000);//wait for
a second
Here
is a picture of my Week 1 Project
Electronic
Drawing:
This is my Visio Drawing of my project.
Circuit Play
What happens if you turn the LED around (reverse the
wiring)?
It does not
work.The light does not flash.
What happens if you remove the positive lead from the
breadboard? Does the circuit still work?
If you
remove the positive lead, the board still works, which makes me question the
purpose of the positive lead.
What happens if you place the resistor to the positive
side of the LED and simply used a wire to run back from the LED to ground?
When you do this, you will need to change up the wiring a little so check
this closely to make sure you have not shorted out the circuit.
The Pin 13
Troubleshooting light still flashes off and on., if without the LED light.Does this mean the board is in
troubleshooting mode?I will need to
research this.
What happens if you move the wire from port 13 to port
12 on the Arduino?
The Pin 13
Troubleshooting light still flashes off and on., but the LED does not.Probably because the board is not properly
grounded.
Code Play
If you
moved the wire from port 13 to port 12 on the Arduino, what do you need to
change in the code?
int led = 12
What
happens if you change the two delay code lines from delay(1000) to
delay(2000)? Take out a stop watch or timer of some sort and time the rate
of blinking for each of these settings. How many times does the LED blink
in a minute for each of these settings? What have you learned about the
value that is placed between the parenthesis after delay()? What value
(parameter) would you place in delay() if you wanted the LED to blink at a
rate of once every 3 seconds? How about every half second?
The larger the number, the longer
the light stays on, thereby creating the blinking effect.Therefore, to create a blink every 3 seconds,
the value in the delay code has to be delay(3000).For a half second delay, delay(500).
What
happens if you place // before the words void setup()?
What
happens if you place // before the words void loop()?
// is for comments and does not act
as active code.When you start a line
with //, it is just to make a note so that other coders will know what you are
doing with your code.
What
happens if you remove the last curly brace “}” in the program?
The program will not run because it
is not a completed program.
What
happens if you place a // before pinMode(13,HIGH) in setup()?
// is for comments and disables
that part of the code.
What
happens if you changed HIGH to high on the pinMode(13,HIGH) line?
high (as opposed to HIGH) is not a
recognize varirable and will not turn the LED on.
What
happens if you change the word pinMode to pinmode in pinMode(13,HIGH)?
pinmode is not a recognized
function and will not set the pin mode.
Final Reflection:
I really enjoyed this first project.The steps it took to configure the project,
includes paying detailed attention to the ports on the bread board and the
circuit board may the whole project worthwhile when I finally got it to work.
The coding brought back some coding memory that I had not used in a while.It gave me confidence to continue on.Can’t wait until the next project.