Arduino Zero to Hero
Arduino is an open-source microcontroller used for building electronics projects. Since it arrived on the scent, Arduino completely revolutionized DIY electronics, making it possible for artists, teenagers and hobbyists to create a vast array of projects which interact with people and the environment.
This course is a product of my 5 years of playing and teaching with Arduino’s. The learning sequence of
Sections 1-3 introduce Arduino and build student confidence by first learning how to just build circuits and afterwards how to write programs.
Section 4 teaches the fundamentals of analog circuits and applies those to sound sensors, temperature sensors, light mixers and musical instruments.
Section 5 takes on digital circuits, starting with button inputs being used to create sound effects, memory games, guessing games with a 7 segment display and measure human reaction time.
Section 6 is all about installing and using sensor libraries with Gyro Accelerometer Circuits and Remote Control Circuits.
Section 7 Wraps up the course with some spectacular visualizations of sensor outputs using a software called Processing.
Building basic Circuits (no programming
In this tutorial we are going to get familiar with three components LEDs, resistors and push buttons. We are going to use all three to build a circuit where a push button turns and LED on and off.
We are also going to burn some LEDs for demonstration purposes and discuss the concept of current voltage and resistance
in this tutorial we are going to introduce a component called potentiometer. The potentiometer as a variable resistor whose resistance Changes by turning of a knob. We will demonstrate this by changing the brightness of an led by the turning off the potentiometer knob.
in this tutorial we are going to introduce a key Electronics component called a transistor. Transistors can be used in multiple ways, they can use a small current to control the intensity of a larger current, they can also be used as an on off switch. In this tutorial we are going to use a tiny current flowing through our own bodies to control a larger current which turns and LED on to different intensities.
In the wider world transistors are used in all microprocessors to perform logic operations. There are actually hundreds of millions of transistors inside most computer CPUs.
in this tutorial we are going to use to transistors, the first one will amplify a current by a factor of around 100, the second one was an amplifier amplified current. The final result will be a current that is amplified by around 10,000 and this will work very much like an antenna where buy electromagnetic radiation in the air and small touches of the base which transfer some electrons will be reflected in the flashing of the LED.
in this tutorial we are going to use a light dependent resistor transistor and a potentiometer to construct a circuit which gets an led to glow when it is in dim light. The point at which led turns on is actually going to be controlled by changing the setting on the potentiometer.
In this tutorial we will learn how to use a transistor to create a logic circuit that is EXTREMELY common, as in there are millions of them inside your CPU. We are talking about a logic gate: specifically AND Logic gate. This gate has two inputs and one output. The output will always be off unless both the inputs are on.
in this tutorial we are going to learn how to construct the OR logic gate Circuit. Like the end logic gate circuits this Circuit has to push buttons, however the premise is that the late is going to go on when one or both of the push buttons are pressed.
The NOT logic gate Circuit uses only one push button. The premise is that when the button is not pressed so that means at all times the LED will be on when button pressed then the LED goes off, hence the name: NOT logic gate.
Basic Input / Output Circuits and Programs
Attached here are all the program files for this module
In this tutorial we are going to start to program the Arduino. We will begin with a very basic program which just gets the LED to blink. Then we are going to change the code in such a way to change this blinking rate making it go faster and slower.
We will then create a variable called blinkRate which will control the rate at which the LED Blinks and then we will look into the implications of blink rates that are too fast to be received. It turns out that somewhere between 30 and 60 Blinks per second are more than enough for anyone to not be able to perceive the LED as blinking
In this tutorial we are going to create a circuit with 4 LEDs and program it in various ways so that we have different LED blinking patterns. We are going to experiment with variables as well as with the Arduino random function. We are going to make a random selection of which led to blink as well as a random amount of time for which this LED will blink
In this tutorial we are going to add a push button to the 4 LED Circuit. The push button will initially just turn all the LEDs on, we will then write programs which use booleans to change the state of the LED Circuit in such a way that when the button is pushed the state of the LEDs changes from off to on or from on to off. We will also use the button to change the value of a variable which controls the blink rates and other factors.
in this tutorial we are going to explain what a voltage divider is and how it works. The idea is that we take a variable resisting device like a potentiometer and put it in series with a regular constant resistor. Then by varying the potentiometer we can change the voltage on both the resistors. This is essentially a method for creating power supplies two components that take specific voltages. It is also in its own a method of sensing because if the variable resistor was varying in due to some other Factor like light, the voltage on this resistor is then proportional to the amount of light. Measuring this voltage can act like a light sensor.
Read more here:
in this tutorial we are going to change the variable resistor with a photo diode. The circuit will now act as a light sensor, with a maximum voltage of 5 volts which translates to a maximum value of 1023 on the analogRead(A0). We will also Auto calibrate this Circuit by taking the initial light value when the program uploads into the Arduino and then comparing all future values to this initial value.
in this tutorial we are going to take the light-dependent resistor / photodiode voltage divider Circuit configuration and use the analogue input of this Circuit as an output for a loudspeaker. Since the way to generate sound on loudspeaker is to turn it's power on and off we can feed the light value as the delay between the speaker switching on and off. We can thus change the frequency of the speaker by changing the amount of light that falls on the light dependent resistor
In this tutorial we are going to use an LM35 temperature sensor. This sensor is powered by 5 volts and has one analog output. The analogue output is put through a simple equation and that equation produces the exact temperature. To make things interesting we are also going to plot this temperature on the serial monitor graph.
in 1855 at that time a very young Scottish scientist called James Clerk Maxwell created an experiment which proved that white light can be reproduced by a quick alteration between red green and blue lights. This experiment can be reproduced with an RGB LED and this is precisely what we are going to do in this tutorial. We will also find out what type of delay between the switching is sufficient to fool our eyes that we are seeing white rather than red green and blue.
On a final note this very experiment was the first strong indication that our human eyes have 3 light colour sensors. Indeed it turned out to be true you can read more about it in this article:
in this tutorial we are going to connect three potentiometers to the three legs off the RGB LED. Each potentiometer is going to be attached to an analog input and the values of these inputs are going to then be translated in such a way that using pulse width modulation we can precisely turn each potentiometer and change the strength of each colour in the RGB LED.
You can read more about pulse width modulation here:
In this tutorial you will learn how to wire a microphone, display its analog output and observe how it reacts to various sounds. Once you have done that you will be able to write some basic if statements which trigger actions based on sound levels. We will also intruduce booleans which are going to change the state of the lights so that if the lights are off the clap turns them on and vice versa.