Programmable Electronics – Hazard

 

Learning Library
Trent Class
Programmable Electronics
Real World Programming Using Microcontrollers.

This page contains reference material and instructions for your Programmable Electronics Workshop. Each of the Lessons are introduced below on the left. Click MORE to access the full information for that Lesson. The CLASS MESSAGE BOARD below is where the instructor will provide ongoing instructions and answers to common questions submitted by students.

 

To submit a question to the instructor simply send an email to instructor@kydataseam.com. Frequently asked questions may also be posted on the CLASS MESSAGE BOARD.

 

Please note class materials are copyrighted by Dataseam and for the sole use of students enrolled in this class.

 

Programmable Electronics
Real World Programming Using Microcontrollers.

Introduction
Designed to give student a solid framework in electronics, microcontrollers, programming and coding including industry terms and practical applications. Using the electronic kit provided the student will learn with a mix of short lectures and hands on projects. Course provides a solid framework from participants can further expand their knowledge through academic coursework or additional self-education and experimentation.

 

1: Current Flow Although this is a programming class, not a Physics or Electrical Engineering class, we will be working directly with electrical components, so we need to understand a little bit about how they operate. Plus, computers are electrical devices, and knowing something about how they operate will give you some insight into why some things are done the way they are in various programming environments. (more)

 

2: Diodes & Resistors It is common to use pipes and water flow as an analogy for wires and current flow. While it breaks down at a certain level, it can be useful for visualizing the basics. (more)

 

3: Capacitors Along with resistors and diodes, capacitors round out the ‘big three’ basic electric components. To fit them into the fluid analog requires a little bit of creativity, and there are many examples on the internet and in various text books. (more)

 

4: Series & Parallel Circuits When you have two or more components in a circuit, they can be connected in two primary ways. (more)

 

5: Transistors, Semiconductors, & ComputersIt is often said that semiconductors started the computer revolution. And that the transistor started the electronic era. And those statements are sorta true, but what exactly are semiconductors and transistors.(more)

 

6: The Arduino IDE An IDE is a TLA1 for Integrated Development Environment. In order to develop software for a system the programmer needs to use several tools and follow a variety of steps. The IDE can assists the programmer by simplifying or automating many of these processes. (more)

 

7: Programming Language Basics The processor in a modern computer can perform many millions of operations per second. Although as was discussed, the processor can only perform operations on numbers, specifically binary numbers. These numerical operations, when properly combined then result in everything from web pages, to video games, to Artificial Intelligence. (more)

 

8: Interfacing with Microcontrollers Now that you know what programming languages and
IDEs are all about, and the fundamentals of DC electrical flow, we need to look at the device we are going to be using for the rest of the class.(more)

 

9: The Serial Monitor As mentioned, many uses of microcontrollers have them embedded in a device interacting with either humans or components though very specific inputs and outputs — but sometimes they need to communicate with other systems. The programming process is one example of such communication, and observing the logic and workings of your program, aka debugging, is another. (more)

 

10: Statements, Blocks, Lines & Symbols In order to be as clear as possible when describing things, it’s helpful to use a very specific and well defined set of terms. (more)

 

11: Program Flow A program is essentially a list of instructions for a computer to follow. Unlike a person, the computer will follow the instructions exactly and in the order specified. (more)

 

12: Working with Variables In addition to doing things rapidly, one area where computers can easily best your average human is memory, trivially recalling things quickly and precisely, assuming they were explicitly asked to remember it. (more)

 

13: Inputs, Comparisons, Branching We saw how to read data from the serial port, but we also saw references to I/O ‘pins’ and something called GPIO, which is an acronym for General Purpose Input Output. We also saw how to turn on the built-in LED by writing a 1 to it. (more)

 

14: Loop de Loop (Do) Previously we talked about the ability for the processor to execute a branch instruction so that the next instruction it executes isn’t just the next one in the ordered list of instructions. We used that be able to jump back in the list to some that had already been executed, creating a loop. (more)

 

15: Loop de Loop (For) The do/while loop is pretty common and quite flexible, but sometimes a simpler mechanism is needed. And something that’s maybe a little easier for the programmer to read and understand. (more)

 

16: Functions & Abstraction Programming is about breaking down a complex problem into manageable, solvable pieces. As you go about this process a few will start to become apparent. (more)

 

17: Binary Numbers: Bits, Bytes & Hex As mentioned previously the primary building block of a computer is the transistor, and specifically a transistor used as a switch, which can either be on or off. These on/off, or Yes/No, True/False conditions can also be thought of as a 1 or a 0.(more)

 

18: Buttons & Tones; Bleeps and Blorks As you probably know from science class, sounds are just air pressure waves at certain frequencies. Speakers are just diaphragms moved in and out to create these pressure waves. (more)

 

19: PWM First, what is a ‘Pulse’. In Digital Electronics, a Pulse is transition of the state of the voltage and/or current on a part of a circuit. In our case what will be transitioning is the voltage on a GPIO pin from our micro controller. If we drive the pin HIGH when it was previously LOW, a transition has occurred. Another will occur when it returns to LOW. (more)

 

20: A2D D2A In the PWM experiment we saw how a digital signal could create the appearance of an analog result — specifically we sent a series of digital pulses to rapidly flicker an LED such that appeared to us humans that it was just getting dimmer. (more)

 

21: Protocols & Smart DevicesWorking closely with the hardware, it is easy to see many key uses for abstraction. Perhaps one of the most obvious is dealing with complex subcomponents, often called peripherals.(more)

 

22: Arrays and LEDs In your kit is a short LED strip containing 30 LEDs. Actually it contains 90, since each of the LED units is an RGB LED. That is it internally contains a Reg, Green, and a Blue LED emitter. (more)

 

23: Sound ReAktorOne of the sensors in your box is a sound detector. There are various types of microphone and sound detection devices available. The particular one we are using is a simple digital sound detector, sending a trigger when it ‘hears’ a sound. (more)

 

24: Rotary EncodersThe Potentiometer is popular as a user input for many types of functions. Volume control is quite popular, as is heat, speed, brightness, etc. but if has a few limitations. (more)

 

25: LDRThe Light Dependent Resistor (LDR), also called a photoresists or photocell is simply a resistor whose resistance value decreases based on the amount of light which strikes its surface. (more)

 

26: Motion DetectionIncluded in your kit is a PIR motion sensor (HCSR501 clone). This ubiquitous sensor is actually quite complex. PIR is commonly said to be a TLA for ‘Passive InfraRed’, but it is probably more accurately called a Pyroelectric InfraRed sensor. (more)

 

27: State MachinesState Machines are another programming concept with an origin in mathematics. There are many complex components concerning various types and implementations of state machines. Entire text books and college classes are devoted to them. (more)

 

28: Barometric PressureThe BMP180 is a multifunction sensor. It can detect barometric pressure and temperature. This is not by chance, but because barometric pressure varies with temperature, so providing both sensors in a single package makes sense. (more)

 

29: An Ultrasonic RangefinderThis sensor also uses the BIS0001 microcontroller internally, just as the motion detector did. It is also fairly simple to use, but quite complex in its actual design.(more)

 

30: An OLED displayProbably the most complex item in the kit is the OLED display. It includes a variety of components to manage the display and control all the individual LEDs — not to mention the LEDs themselves. The display is 128×64 OLED pixels in size — that’s 8,192 individual LEDs to keep track of and update. (more)

 

31: AppendixReference material for class, such as pinouts, schematics, etc. (more)