Arduino Crash Course
Welcome to the 2nd Project of this Arduino Crash Course. In this project you will leverage all the knowledge obtained through the first 4 lessons of this crash course to provide a solution without any wiring or code provided. You can do it, I know you can!
Enjoying the Arduino Crash Course? Follow us on Facebook and share with all your friends!
Before we jump into the project, I think now is a great time to talk about multimeters, and why everyone building electrical circuits needs one.
01
Multimeters – What Is That
A multimeter is a very important tool for every electronics hobbyist (in fact, every electronic hobbyist should have at least 2 of them – more on this later).
If you don’t have a multimeter yet, I recommend purchasing this one by Klein Tools MM700. If you want a cheaper multimeter at first, then I recommend the Klein Tools MM300:
So why Klein Tools? Klein Tools is a very reputable brand and these multimeters are well built and if taken proper care of will last forever! I have had my fair share of cheap multimeters, and they don’t last long. Trust me, get a Klein Tools, and you won’t have to worry about it breaking in the middle of a project (very frustrating!).
A multimeter is an all-in-one tool where you can measure voltage, amperage, resistance, and continuity testing (all of these explained below and how to do it with most common multimeters on the market).
Before we get started, most multimeters have three inputs, but only two leads. The middle input is usually the ground input, where you would want to plug in the black lead (NOTE: there is no physical difference in the leads that are colored Black and Red, it’s just common practice to use Black for Ground, and Red for Positive). If you are measuring volts or small amounts of current usually less than 200mA (max is usually displayed on the unit itself, DO NOT EXCEED THE CURRENT LIMITS AS IT CAN BREAK THE MULTIMETER). If you are ever measuring current, I would always recommend to connect it to the other input (usually 10A max). Why? Well because the left input with max Amps is usually fused, and the fuse may blow, but your multimeter itself will not be broken (would just need to replace the internal fuse). With that said, I always like to put the leads back into the right side whenever I am storing my multimeter away.
02
MultiMeter – Measuring Voltages
One of the main functions of a multimeter is measure voltages (also known as a voltmeter). It does this by placing the Positive lead (red) to the positive of what you are trying to measure, and the negative lead (black) to the negative. Ensure that the ground (black) is connected to the middle input port on the multimeter, and the positive (red) lead is connected into right side (usually denoted by what it measures as well as a max Amperage it can measure).
If you don’t have an auto-sensing multimeter, you will have a dial. You will need to change the dial to that the expected measurement is below the value selected, but more than the next lowest available measurement. For example, if you wanted to measure the voltage of a 9V battery, you will select 20V, because you are expecting around 9V, and 2V (the next lowest available option on most multimeters) would not be enough.
If you are measuring and the multimeter is showing 0 (and you are sure the connection is proper), then you may have to change the dial to a higher (or sometimes lower) source.
You can measure whole circuits, or individual components for their voltage (note: ground doesn’t always mean 0V in this case, it’s just measuring the starting voltage and the ending voltage, and providing the differential as a measurement). If you were to measure the voltage from the positive side of an LED, to and connect ground to the negative side of an LED, you will get the forward voltage of the LED. Take the original voltage supply and subtract out the forward voltage, and you have the voltage dropout caused by the LED. Go back to previous lessons in this Arduino Crash Course and measure it. How close do your LED’s match the table provided in Lesson 1?
03
MultiMeter – Measuring Current
Like I said in the intro to this project, I always prefer to switch the red lead to the fused input whenever measuring current (even if I know the measured current will not even come close to the max I can measure on the right input).
To measure current, your 2 leads are no longer positive and negative, but actually become a part of the circuit itself. How this works is you break up the circuit you are working on, and connect the 2 leads to reform the “break” (in essence you are making the current flow into the multimeter).
I can’t stress this enough. It is extremely important that you do not try to measure above the max rating given on the multimeter! Even if you are on the fused input (who likes dissembling just to replace a fuse).
To start measuring, disconnect all power and ensure that all capacitors in your circuit are completely discharged. Once you are sure that the circuit is powered down, find a part of the circuit where you want to measure the current (I usually am testing the full circuit, so I will simply connect the red lead from the power source to the entry point of my circuit – or Arduino). Granted, if you are using USB as the power source, this can get a little tricky unless, but you can measure the current from any of the pins or any other “sub-circuit”.
You will need to adjust the dial, similar to how you adjusted it for voltages to ensure the multimeter knows the rough range of what it is measuring.
04
Multimeter – Measuring Resistance
Have a resistor where the bands are wiped off, or you can’t make out whether a color is brown or red or whatever? Or simply you want to get the real value of the resistance with the tolerance already incorporated?
Multimeter can help. First, switch back the red lead to the right input so we can measure Resistances. Then on the dial find where the expected range is. Then simply connect the leads together (much simpler if using alligator clips!). That’s it. The multimeter will calculate the resistance of the resistor for you.
Now say you didn’t pay attention or you skipped Lesson 1 on Ohm’s Law, and you skipped the section on series or parallel resistance or simply too lazy to do the calculation. Well you can use the multimeter. Connect the leads of 2 or more resistors to each lead of the multimeter to get the parallel resistance value. If you want to calculate the series resistance, well connect the multimeter to one leg of the resistor, the other leg will connect to the other resistor, and the last leg connect to the other lead. Boom! Series resistance!
05
Multimeter – Continuity Testing
I honestly don’t think this is mentioned enough in the plethora of tutorials and how-to’s out there in the electronics hobbyist world. This is by far my favorite feature of the multimeter and may be the one I use the most (make sure your multimeter you get has some sort of continuity testing on it).
This is a very simple test where the multimeter will beep if the 2 ends are connected. I use this all the time for all pins I solder to ensure that:
A. There is a good connection from one end to the other
B. There is no shorted pins (i.e. pin 1 is not touching anything else but pin 1).
I am a creature of habit, but whenever I turn to continuity mode, I always test the multimeter is working by just touching the 2 leads together (this should always beep as the 2 leads are electrically connected).
Go back into other lessons in this Arduino Crash Course, and test some of the other components. Buttons are always fun. Remember when I said to always pick the pin diagonally from where you connected the first pin, well, you don’t have to if you know the other pin is not connected when the button is not pressed because there is no continuity. Press the button down, and you should hear the beep as they are now connected. Rocker switches, in the off state, no beep. When flipped on, you should hear that beep because they are electronically connected.
06
multimeter – Summary
It’s almost impossible to get very far in this hobby without the use of a multimeter. In fact, you will quickly notice the need for 2 multimeters (and sometime even 4 multimeters). Perfect example of this is you want to measure the voltage and current of a circuit. Well the multimeter can do one or the other at any given time, but have 2 connected at same time, and then you have the total Watts (review previous lesson of this Arduino crash course if you do not know what Watts are).
This all in one tool is the most important and valuable asset we have to analyze our circuits, so it is imperative to have one.
07
Project Description
OK. It’s finally time to discuss the second project to be done in this Arduino Crash Course. If you remember from Lesson 3 we learned about how to measure distance with the HC-SR04. In lesson 4, we used a 16×2 LCD character display to show output.
In this project, combine these 2 lessons to print out the distance an object is from the HC-SR04 and display the output on the LCD display.
Once you have completed that, add a button to the schematic that toggles the distances between metric system (cm) to the imperial system (inches). Add a rocker switch to the LED backlight.
Finally, measure the current of the LCD display with the LED backlight on vs not on? How much difference does the LED light make in terms of energy consumption. Calculate the watts used in both scenarios.
Enjoy the Arduino Crash Course so far? Join our facebook group https://www.facebook.com/Circuit-Fanatic-103372208107053/ and share this course to all your friends!