Sunday, November 29, 2020

Semester Countdown

This Week's Overview

Week 5 in some ways has been more stressful than even the first week of class.  Trying to juggle Thanksgiving, my children coming in from the Houston area, and the week 5 assignments has been challenging.  My 1 year old granddaughter hid my mouse, and my 9 year old granddaughter had to help me with my circuit.  Luckily my 4 year old grandson was happy to watch TV & play with the goats.

I was excited that we were able to pick our own Tech Play circuit for the assignment.  Since I am counting the days to the semester's end, I chose to build a circuit with a 7 segment display.

7 Segment Display

This particular circuit requires more than just placing the display on the board & uploading the code.  In addition to the 7 segment display there is a 74HC595 shift register integrated circuit (IC), 8-220 ohm resistors, & approximately 26 jumper wires.  Learning the pin out for the IC and the display was a bit confusing.  When I first looked at the diagram for the circuit all the pins on the display were depicted to be on the left side.  In actuality, the 10 pins on the display are at the top & bottom of the component.  Pins 3 & 8, which are the center pins on each end, are the ground pins.  I had to look on the internet to refresh my memory on how to read the pin positions on the 74HC595 shift register IC.  Using components that have fixed pin positions made the assembly process much harder than using LEDs which can be spread out on the breadboard.

IC to Display Pin Configuration

7 Segment Display Pin Designation

Looking at the chart helped me understand which pin on the IC should connect to the corresponding pins on the display.  I am glad that the CD which came with my starter kit has such good information.  The CD contained step by step instructions, but they seemed confusing to me, so I opted to use the schematic to make my wiring connections.

Schematic

Picture Wiring Diagram

It was difficult to wire up the circuit even with the color coded schematic.  The pins on the IC & the Display are so close together that it was extremely difficult to connect the jumper wires on the breadboard to the corresponding pins.  It took me several attempts to get the wires in the correct position.  The first time I tested the circuit the G designation on the display did not light up.  I had to retrace all the jumper wires and ultimately swap two of them.  Once I did that I was able to run the program successfully.  Immediately below is the code that was furnished with the kit, with some timing modifications.  The original code had the delay set at 1000, but I thought the numbers changed too fast so I changed the delay to 2500.

7 Segment Display Code

//www.elegoo.com
//2016.12.12

// define the LED digit patterns, from 0 - 9
// 1 = LED on, 0 = LED off, in this order:
//                74HC595 pin     Q0,Q1,Q2,Q3,Q4,Q5,Q6,Q7 
//                Mapping to      a,b,c,d,e,f,g of Seven-Segment LED
byte seven_seg_digits[10] = { B11111100,  // = 0
                              B01100000,  // = 1
                              B11011010,  // = 2
                              B11110010,  // = 3
                              B01100110,  // = 4
                              B10110110,  // = 5
                              B10111110,  // = 6
                              B11100000,  // = 7
                              B11111110,  // = 8
                              B11100110   // = 9
                             };
 
// connect to the ST_CP of 74HC595 (pin 3,latch pin)
int latchPin = 3;
// connect to the SH_CP of 74HC595 (pin 4, clock pin)
int clockPin = 4;
// connect to the DS of 74HC595 (pin 2)
int dataPin = 2;
 
void setup() {
  // Set latchPin, clockPin, dataPin as output
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
}
 
// display a number on the digital segment display
void sevenSegWrite(byte digit) {
  // set the latchPin to low potential, before sending data
  digitalWrite(latchPin, LOW);
     
  // the original data (bit pattern)
  shiftOut(dataPin, clockPin, LSBFIRST, seven_seg_digits[digit]);  
 
  // set the latchPin to high potential, after sending data
  digitalWrite(latchPin, HIGH);
}
 
void loop() {       
  // count from 9 to 0
  for (byte digit = 10; digit > 0; --digit) {
    delay(2500);
    sevenSegWrite(digit - 1); 
  }
   
  // suspend 4 seconds
  delay(2500);
}

Pictures/Videos of the circuit

Top View

Side View

Arduino Side View

Video 1: Slower Speed

Video 2: Faster Speed

Reflections

This project was much more difficult than I thought it would be when I picked it.  I initially placed a couple of wires in the wrong place and had to trace all the connections to find the mistake.  That took considerable time.  This project is most like the score boards and the countdown timers used at sporting events, although they have more than one display (typically 3).  It could also work in a kitchen timer. I feel very satisfied that I was able to get the project to function, even though I had to use the furnished code. I am glad I was able to modify the timing on the code.

Sunday, November 22, 2020

It's a Two in One Week

The week at a glance:

This week has been filled with challenges for Grad School and at work.  Students always get crazy the week before the holiday, and this week was no exception!  By the time I made it home at 7pm each night I was so exhausted that I would grab a quick snack and then crawl into bed.  Needless to say I did not get any work done for our assignments this week until Friday night.  We had two projects to do this week: design a Maker Space and build a "Dice" LED circuit.

Maker Space Challenge

Last week we turned in information on what we envisioned for our dream Maker Space.  I am not very good at drawing, so I searched for hours until I found a picture that came closest to what I want.  It was very well designed, but I thought there should be a few changes to it.  This week we were assigned to learn SketchUp to make our floorplan for the Maker Space.  Even though I have experience with CAD, SketchUp is very different from the Autodesk Inventor that I am accustomed to using.  I spent several hours watching YouTube videos on how to use SketchUp, but even after that I had a hard time doing the assignment.  It took me so long to do just the building floor plan that I had to stop to work on the other assignment for this week.  I was not able to draw any of the furniture, and I also did not figure out how to draw doors for the openings.  I specifically made the main entrance and one of the shop entrances large enough to accommodate large equipment. (Small garage door size.)  All doors meet the minimum ADA requirement for wheel chair accessibility, and many are larger to allow for larger furniture and/or storage cabinets.  Hopefully from seeing the original picture I modeled my design after you will be able to visualize my intentions.

SketchUp Floor Plan for Dream Maker Space

Dream Maker Space Example
URL for Picture

LED DICE

This circuit has been the most challenging build so far.  The placement of the LEDs on the breadboard is extremely tedious.  Then getting the 330 ohm resistors attached to the correct lead is even more difficult.   I am accustomed to the programming being difficult for me, but this week the assembly has been just as difficult.  Configuring the LEDs in an H pattern is what made assembling the circuit so hard.  Every example I found on the internet seems to be different.  I tried to look at some of my classmates examples that were already posted, but even that did not help make it easier.  I wasn't sure if I followed the schematic I found correctly.

LED Dice Schematic
Instructables Web Site

Since I was having so much trouble understanding the schematic above, I went in search of an example that I might be able to understand easier.  Below is the color example of the LED Dice circuit that I found on a different web site.  With it being in color it made a little more sense to me.

Color Circuit Diagram for LED Dice
Circuitlib Web Site


I tried building the circuit on Tinker Cad, but I never could get the wiring worked out to look like what I built.  Tinker Cad has set a width on the LED leads and adding the additional jumper wires to attempt to match my working circuit did not happen.  Maybe I can do an update later if I can work out that portion.  For now, I will follow the diagram above so that I can finish my circuit on time.

After several hours (approximately 8) I finally got the circuit to function.  It was difficult at times because of the bread board having some ports that are lose and not making a good connection.  When I made my video I could not get all the numbers to work.  I think it was because I was holding the phone with one hand and using the other to hit the push button switch.  I tried to wiggle the wires at the same time, but it didn't work well one handed.  To show that my circuit will produce all the numbers, I took pictures of each one working in addition to the video I made.  

Assembled Circuit 


All 6 Dice Configurations

I took pictures with the lights on in the room and with them off so that I could see the difference on how the LEDs show up.  I don't think my phone takes very good pictures, but that is all I have to work with.  You can definitely see why the circuit uses 7 LEDs in an H pattern.  I wish my kit would have had 7 Red LEDs, but it didn't.  So I used a Blue LED in the center position.  

I tried to think of other uses for a configuration like this.  The one that first came to mind is the Score Boards at almost every sporting event.  I know the one in the gym at school functions very similarly to this circuit.  It also reminds me of the crosswalk signs as they count down right before they change to do not cross. 

A search of the internet was of no use when it came to figuring out the Distribution of Rolls graph for this circuit.  I assume it has something to do with Statistics, and Math is not something I can do well.  I barely manage to keep up with the Inclusion Support in Geometry at school, and if I didn't get example sheets from the teacher I couldn't do that.

I tried to write my own code, but as always it did not work.  Then I printed the code and was trying to copy it by typing the code myself.  But I must have made too many typing errors because when I checked it it was full of errors.  So to get my circuit functioning I downloaded the code below from CircuitLib.com.  This is the link:CircuitLib.com


Code for Dice LED Circuit

//Simple LED Dice based on Arduino
/*circuitlib.com*/
//By G. Adam

int i;
int button=5;
int A=6;
int B=7;
int C=8;
int D=9;
int E=10;
int F=11;
int G=12;

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital IO direction
  pinMode(button, INPUT_PULLUP);
  pinMode(A, OUTPUT);
  pinMode(B, OUTPUT);
  pinMode(C, OUTPUT);
  pinMode(D, OUTPUT);
  pinMode(E, OUTPUT);
  pinMode(F, OUTPUT);
  pinMode(G, OUTPUT);

  // initialize counter value
  i=1;
  
}

// Turn on LEDs for mode 6
void turn_on_6 ()
 {
    digitalWrite(A,HIGH);
    digitalWrite(B,HIGH);
    digitalWrite(C,HIGH);
    digitalWrite(D,HIGH);
    digitalWrite(E,HIGH);
    digitalWrite(F,HIGH);
 }

// Turn on LEDs for mode 5
 void turn_on_5 ()
 {
    digitalWrite(A,HIGH);
    digitalWrite(C,HIGH);
    digitalWrite(D,HIGH);
    digitalWrite(F,HIGH);
    digitalWrite(G,HIGH);
  }

// Turn on LEDs for mode 4
void turn_on_4 ()
 {  
    digitalWrite(A,HIGH);
    digitalWrite(F,HIGH);
    digitalWrite(D,HIGH);
    digitalWrite(C,HIGH);
  }

// Turn on LEDs for mode 3
void turn_on_3 ()
 {  
    digitalWrite(C,HIGH);
    digitalWrite(G,HIGH);
    digitalWrite(F,HIGH);
 }

// Turn on LEDs for mode 2
void turn_on_2 ()
 {  
    digitalWrite(F,HIGH);
    digitalWrite(C,HIGH);
 }

// Turn on LEDs for mode 1
void turn_on_1 ()
 {  
  digitalWrite(G,HIGH);
 }

// Turn off all LEDs
 void turn_off_all ()
 {  
    digitalWrite(A,LOW);
    digitalWrite(B,LOW);
    digitalWrite(C,LOW);
    digitalWrite(D,LOW);
    digitalWrite(E,LOW);
    digitalWrite(F,LOW);
    digitalWrite(G,LOW);
 }

// the loop function runs over and over again forever
void loop() 
{
  bool state;
  state=digitalRead(button);   
  if (state==LOW) // Button is pressed?
  {
    turn_off_all();
    if (i==1) turn_on_1();
    if (i==2) turn_on_2();      
    if (i==3) turn_on_3();
    if (i==4) turn_on_4();
    if (i==5) turn_on_5();
    if (i==6) turn_on_6();
  }
 
 i=i+1;
 if (i>6) i=1;
 delay(15);
 
 } 

 

My video did not turn out as well as I would have liked.  There are lose connections on the breadboard and when I would push the button switch I would cause wires to lose connection.  I was unable to get the circuit to cycle through all 6 numbers.  



Dice Circuit Video

Reflections

This is the second time I have written the reflection for this week’s challenges.  I usually write directly on the blog post compose screen.  For some reason when I logged out to see if my hyperlinks worked everything I wrote for the Reflections section was lost.  I don’t know if it was caused by a glitch with the internet or by something I did wrong.  So here I go again!

 There were so many things that did not go well this week that I am not sure where to begin.  My Dream Maker Space was hard to design.  SketchUp was extremely difficult for me even after watching multiple videos and going to the help area for the software for tutorial help.  I believe the difficulty I experienced is because I am so accustomed to using Autodesk Inventor.  My brain just couldn’t easily maneuver the differences between the two softwares.  It took me entirely too long to design the building layout.  I had to make the decision to quit working on it or jeopardize having enough time to get the circuit done.  Because of this I did not get to add furniture or equipment to the diagram.  I also did not have the opportunity to research cost for the building, furnishings, or equipment. 

The Dice LED circuit was the most difficult assembly I have encountered during this class.  The circuit needing to be in an H configuration required the LEDs be placed closely together.  This made it hard to insert the components and jumper wires by hand, so I had to use needle nose pliers for every lead.  Additionally, the breadboard has loose ports on it which caused connection errors.  I had to keep tension on the wires by pulling the Arduino at an angle so the current would flow.  During the video I must have jarred loose wiring when pushing the button switch, which caused two of the numbers in the sequence not to work.  I was able to get regular pictures of each number working. And since Math is my weakest subject, I never figured out how to do the Distribution of Rolls graph.  I tried to find information on the internet for how to do it but did not have any luck.  I assume it is a statistical function, but I am not good at Statistics. 

Overall, I am pleased that I got the circuit to eventually work.  I tried printing the code and looking at that to type it myself, but I obviously can’t do that well either because I ended up with too many errors to figure out.  I ended up downloading the code from the internet.  At least it did work using that code.  Praying I will eventually learn some coding!


Sunday, November 15, 2020

Challenge 3 is a Twofer

This week we were assigned two separate circuit challenges, hence the "twofer" comment in the title.  Having to tackle one circuit is daunting enough, but needing to build two circuits was scary!  

                                                            RGB LED Build

 I have a good understanding of a regular LED and how it works.  I had never encountered an RGB LED prior to this assignment.  In an attempt to be more efficient I did a lot of research on the internet and found a virtual Arduino & Breadboard program on Tinkercad. It allowed me to build the circuit virtually and test the programming.  Tinkercad also is a good way to have a professional looking diagram (instead of my horrible sketching) to post on the blog.  Building the circuit on Tinkercad was actually fun.  I think I like building the circuits in the software and having the option to test the programming before I actually touch the components and use the Arduino program.

When I virtually build the circuit it went together correctly on the first try.  An RGB LED is actually capable of showing all the colors in the color spectrum if you can accomplish the programming to make it work.  I downloaded the Arduino code from Sparkfun, and it the virtual circuit functioned correctly on the first try.  The LED only showed the basic colors, but it was awesome to watch it.  I spent several hours trying to change the program to make more than just the basic colors appear.  Regardless of what I tried the program would not work, so I stuck with the original program.  Seems the only thing I have mastered is changing the timing on the frequency/duration of the LEDs being on/off.  

RGB Circuit Parts 

RGB Circuit Diagram

Functioning Code

Click the link to watch the circuit below: RGB Video 1 




I made some adjustments to the timing so that the colors changed slower.  When I made a video of the circuit in action after changes I took it with the lights off so you can see the colors better. 

                                     Click the link to watch the circuit below: RGB Video 2

                                           
I have thought about this circuit a great deal the last few days.  The one example I can think of that stands out in my mind is the lighting on the Omni Hotel in Downtown Dallas.  I know there are many more, but that is the one I thought of.


Now it is on to the next circuit!


                                                    8 LED Circuit

Circuit 4 is a bit more daunting than the previous circuits I have worked on during this class.  There are LEDs connected in a row with 8 resistors.  The circuit shares the same ground and the LEDs are connected to pins 2 through 9 on the Arduino.  As the programming runs the LEDs cycle on till they are all lit and then cycle off in the reverse direction.  It is similar to chasing light that you can sometimes see on buildings.  The original example only used red and yellow LEDs, but I chose to use red, yellow, green, and blue.  Christmas is coming and I thought it made the circuit look more festive.  I suck at programming from scratch, but I was able to get the sample program that Sparkfun furnishes to work.  I spent a great deal of time trying to adjust the program, but again I was only successful with changing timing and duration of the LEDs flashing.  I really need some 1 on 1 tutoring to figure out the programming!

8 LED Circuit Diagram



Parts List



8 LED Code


Click the link to watch the video: 8 LED Chasers

8 LED Circuit

I was able to adjust the the timing on the circuit without crashing the program.  I wanted to be able to see the sequence of the LEDs changing better.  Switching the timing accomplished that.

                              Click the link to watch the slower version: Slower LED changes

The real life examples I thought of for this circuit cover a couple of areas.  First is a turn signal that has multiple LED bulbs and cycles in the direction that you are turning, or the construction warning lights on road work vehicles warning you to move over due to the work.  The other example is the start lights at racetracks that cycle from top to bottom.

Reflections

Programming is not my forte!  I can figure out the wiring and building the circuit with the furnished information, but not the programming.  Every time I try to change more than just speeds the programs crash on me.  I have spent more time trying to find help with programming than I should have because now I am behind on the other assignments for this week.  When I was taking classes at the community college we always had a lab partner.  Because of my deficiencies in Math and programming the professors would pair me up with someone strong in that area, but that needed assembly help.  I know I built missile circuit boards in a past career, but I was never exposed to the programming.  For me to be successful at programming I will need some 1 on 1 tutoring.

Sunday, November 8, 2020

Challenge 2- Controlling 2 Blinking LEDs with a Potentiometer

 This weeks challenge has been stressful for me.  I worked and worked on this circuit, but I could not get it to function as intended.  It took several attempts to get the wiring in the correct configuration to even make a direct connection by using the battery to test it.  I then added the potentiometer to the circuit.  I downloaded the program from Sparkfun, which initially had errors and would not upload.  After several attempts at editing the code I was able to get it to upload.  My biggest issue is that I was never able to get the 2 LEDs to blink independently.  Every time I changed the code the whole circuit quit working.  I decided that I need to get help from someone who is better at programming than me.  Maybe I will be able to do an update after I get help.

2 Blinking LED Code


Circuit Diagram
Component List


The video I took of my circuit turned out a little blurry to me.  My cell phone is acting silly & I had to order a new one yesterday since Best Buy couldn't fix it.  So to compensate for the blurry video, I took a regular picture so you can see the configuration of the wiring better.  It took 4 tries before I actually got the circuit configured in a manner that both LEDs lit up and the potentiometer would adjust the brightness.

Picture of circuit configuration

Click the link to view the active circuit: Video of 2 LEDs Blinking Circuit

My reflection on the current project comes with mixed feelings.  I have difficulty seeing the markings on the circuit board, even with my bifocals on.  I had to get a magnifying glass to double check the positioning on everything.  I also realize that my attempt to save money by using my phone as a hot spot is very time consuming.  It took 36 minutes to upload the working circuit video to You Tube so that I could link it to the blog.  The phone companies really need to add to their infrastructure in rural areas so that everyone can efficiently reach the internet.  Additionally, I need a great deal of help & practice with the programming.  I didn't include pictures of my failed attempts this week because of my phone issues, but there were multiple programming failures when I tried changing the original code to make the LEDs blink separately.  I would like to get that issue figured out.  I also wish this crazy pandemic would calm down so I could have a real study partner.  I learn better when someone shows me how to do something than I do when I read directions. 







Sunday, November 1, 2020

Challenge Build 1- Blinking LED

 For our first challenge we were to build a circuit that contained a resistor, an LED, and an Arduino board.  The LED was supposed to Blink on and off every second if we compiled the program correctly.  Below you will see my attempts at programming.  I have included the failed attempts and the final working program, along with my sketch of how to build the circuit, a picture of the finished circuit, and a video of the "Blinking LED".

First Failed Program

First attempt at uploading the program got this error message.  I had forgotten the semicolon at the end and I also put the wrong pin number in the program.

Another Failed Programming Attempt

Another attempt at uploading the program got a different error message. I had the correct pin but forgot the semicolon again.  In all I had 4 failed attempts at getting the program to upload.  Each time I got an error message I had forgotten the semicolon at the end of a line somewhere in the program.

Working Program for Blinking LED

I am not an artist, but I tried to draw a diagram of what the circuit would look like when assembled.

  

LED Circuit

I ran into another problem after I finally got the program de-bugged.  I had installed the LED with the polarity wrong.  I discovered it when I started checking all my connections to see if I had plugged the wires or components into the wrong position.  It is now “Blinking” as it should.


Blinking LED Working 

I tried 5 different videos to explain what I did through out this project.  I finally had to cut it very short to show you the functioning circuit, but I will have to explain through text.  All but the last video were too big and would not upload to the blog.  

My first challenge was not having a working Arduino kit to work with.  I finally received the first kit I ordered on Friday afternoon. (It was supposed to be here Wednesday.)  Then when I opened it the Arduino would not power up.  God was watching over me because the replacement kit arrived at 3pm today, and I have worked steadily since to get this done.

I had several failed attempts at programming.  I am not an experienced programmer with code.  I am more familiar with icon driven programming.  I was very relieved when I eventually got the code to upload without getting an error message.  I continually forgot to put semicolons at the end of lines and initially programmed to the wrong pin number on the Arduino.  Then when I did get the program to upload, the LED did not turn on.  So I went back to the basics and started checking wiring connections.  Eventually I realized that I had the LED installed in the wrong direction.  Once I changed that the circuit started working.

The first example of a real world circuit that is similar to this project is actually in my utility room.  The charger for my Ryobi tools has blinking LEDs that tell you if the battery is bad, if it is charging, and then when it is fully charged.  

Overall I enjoyed this project, but I know I would have liked it more if I had not had so many complications before I ever got to start it.






Starting a NEW Adventure

 Starting today my posts will be for a new course, ETEC 568- Maker Spaces.  The previous posts were for ETEC 524- Introduction to Educational Technology.  

My journey for Maker Spaces has started off a bit rocky.  I was put into a new position at work, so I did not log into my college email account during the two week break.  BIG MISTAKE!  Our professor had sent out an email to order an Arduino kit that is needed for this class.  I ordered it on Tuesday with an Amazon delivery of Wednesday by 9pm.  It finally showed up in Friday afternoon's mail.  But when I tried to work on our assignment the Arduino would not power up.  After a very heated discussion with an Amazon customer service representative I was issued an RMA number and assured a new kit would be expedited to me.  It arrived at 3pm today, and I am still trying to get the project done.  Praying I make the 11:30 deadline, but I had to take a short break to clear my head.  Hence the post about my experience.

I was able to create a You Tube channel.  That was a little tedious due to my slow internet connection, but I was finally successful.  I posted a cute little Dancing Lego Robot video that I had taken in a Robotics' class I taught.  The students were supposed to be dong a demonstration of a fork lift and it turned into more of a dance routine.  This is the link to my You Tube Channel: Georgette Jordan

I loved the reading assignment this week in "The Maker Movement Manifesto".  I have always said that students and adults alike learn better by doing.  It was wonderful to find out that there is such a large movement in that direction.  I wish more Administrators had a Career & Technology Education (CTE) background.  Project based learning is such an engaging way to teach, but many administrators frown on the freedom of expression that it affords even with the pedagogy being followed.

Time to get back to my project.


 




The Last Hurrah

  Final Vanity Search FireFox Search In addition to the original information I found in our first vanity search, I found this informatio...