This tutorial was featured on the official Arduino blog on 3/9/2011
In this week’s arduino tutorial, we take a bit of a detour and focus on some key elements of electrical engineering design that we’ll be using in future episodes. Included amongst these topics is Ohm’s Law, current-limiting resistors, pull-down and pull-up resistors, voltage dividers, potentiometers, analog inputs, and voltage regulators.
If you’re yearning to learn more after watching this video, I’d suggest you check out Jeri Ellsworth and Dave Jones on youtube. They offer videos about everything from circuit design to pinball machines.
You can download the files associated with this episode here:
Distributed under the GNU General Public (Open-Source) License.
Please Attribute and Share-Alike.
Hello, I’m a beginner and got lots of questions. Now i’m trying to do a WMR project. The concept is like the WMR will follow the fuzzy logic rules to avoid obstacle. The problem i got is, I have no idea how to make the motors, sensors and Arduino UNO work together. The 4 motors are 250W 24V DC Motors, and sensors are Maxbotics LV-EZ0 ultrasonic sensors. Would you like to teach and help me about this?
You should control the motors using a mosfet, see this post: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1253402459
Take a look at the datasheet for the sensor: http://www.maxbotix.com/uploads/LV-MaxSonar-EZ0-Datasheet.pdf You can choose to grab the distance from the sensor via serial, or by querying it as an analog input.
Thanks so much for the tutorials. They are great and really well explained. I finally understood what a pulldown resistor is good for and how a voltage divider works. thx again.
How can I open the .sch file for the schematics? Thanks for these excellent tutorials.
That’s an eagle cad file. You can download eagle here: http://www.cadsoftusa.com/
Hi, thanks for ur tutorials. I just wanted to ask what was actually that java com 23 that u used in putting the signals of 1, 0 ,1 etc….
Hi I just watched this video and sorry but I don’t understand the pull down resistor bit. I was looking at the diagram at 7:05 and wondering shouldn’t the resistor be on the other side of the switch. But even before that how does current flow through when the switch isn’t even enabled?
We are concerned with the voltage that the arduino pin sees. When the button is not enabled, and we use digitalRead() to see what the arduino is “seeing” on pin 8, the pulldown resistor ensures it sees a zero. When the button is pushed, it “sees” a 5V signal with no resistance, and a gnd signal with 10k resistance, so the 5V signal “wins”.
Hi Jeremy, amazing work love it I am beginner into the arduino world and u made me understand so much better. How do u generate that Java screen to give u the feedback from the arduino?
Thanks so much for your tutorials. Being a noob, without your step by step teaching I would be lost!
I do have a question about this tutorial. You mention that the led will drop 2 volts automatically but you do not explain why.
Any further explanation would e greatly appreciated.
The LED is using energy to generate light. That energy comes in the form of voltage. The voltage drops across an LED because the potential energy is being converted to light energy.
Thanks for the excellent explanation of voltage dividers and regulators. Such circuits had been a mystery to me until I discovered your blog.
Keep up the good work.
Hi Jeremy – *love* your tutorial series. Your explanations seem to be much simpler than many of the books I’ve read. I have a question about tutorial 3 where you’re working out the resistance required to safely operate an LED. You say that the voltage will be 3V when working out Ohm’s Law for the required resistance. I was expecting 5V, as this is the voltage supplied by the battery. Where does the other 2 volts go?
Thanks very much – I’ve now subscribed to your Twitter feed and your YouTube channel. Keep up the amazing work!
About 2V drops over the LED, so that leaves 3V to drop over the resistor.
Hello Jeremy. Thank you for your tutorials. They are awesome!
I am really new in electronics, so also in Arduinos. But I took the challenge to make an EL-wire suit with 12 different wires. These I want to control with 6 buttons. Everything needs to be portable.
So… I want to buy 1 Arduino, a Protoshield and a mini breadboard.
On this mini breadboard I need to connect 6 buttons with the Arduino. Following the tutorials I made a scheme (a schematic picture of how the breadboard would actually look like). But I am completely unsure if it is correct/possible.
Before I am going to buy all the expensive stuff for my suit, I need to know if this is possible.
Can you please take a quick look at the image? I am sorry for the baby-like-image, but I am not familiar with electrical symbols…
Please find the picture here (I am Dutch, so it is a Dutch upload site)
Thank you very very much!
Your schematic looks reasonable to me.
in the voltage regulator, as I am understood, already has its own capacitor build inside. my question is, what is the need of another capacitor outside the voltage regulator? how that contribute to the function of voltage regulator itself?tq
Voltage regulators do not have a capacitor built in – the caps that you need for decoupling power lines are generally pretty big, and would be impractical to construct using layered silicon.
I have seen other videos regarding voltage regulators that have 2 electrolytic caps (one on the vIn to gnd, and one on vOut to gnd) + the ceramic cap on vIn to gnd.
In the video your schematic only shows one eletrolytic cap on vOut to gnd and one ceramic cap on vIn to gnd. What is the benefit of adding a second electrolytic cap between vIn and gnd?
It all depends on the circuit that you are regulating for. Ceramic and Electrolytic caps are available in different sizes, and have different response times. Using multiple sizes and types of capacitors protects you from more types of voltage ripple. What is actually depends on your circuit requirements.
Thanks for those great tutorials about electronics!!
First, thank you for your tutorials, they are awesome :)
I am just beginning to watch them and decided to order all spare parts needed for for them.
The problem is that there are some spare parts which you just cannot get anywhere.
– 22uF capacitor:
(They are out of stock and minimum order quantity is 3000)
(minimum order quantity is 5500)
Could you please advise me where to find these parts or maybe find some alternatives ?
If you live in the United States, your local RadioShack should have the components you need. Those parts will be available for individual sale.
Jeremy i like the way how you explain the led changed to yellow light instead of green (as expected) due to over current (unbias) flowing into it. are you an Engineer?
Your tutorials are awesome and have helped me understand Arduino, but due to me being a total noob, i don’t understand the difference between a voltage regulator and a resistor. Please help me!
Thank you for your Tutorials
It’s really very useful
I would like to know What java program did you use to read from Arduino throw USB
In the arduino programming interface go to the “Tools” menu, and pick “Serial Monitor”. That will bring up the terminal where you read from the Arduino.
anyone can share me arduino uno schematic with “.sch” file and “.brd”?
They are on the Arduino Website: http://arduino.cc/en/uploads/Main/arduino_Uno_Rev3-02-TH.zip
The tutorials are really very useful for me as i m a beginner. But I am confused abt the connections.
Hi, I need to learn how to build and test analogue circuits and linux programming.
Hi, thanks for your great tutorials. I just wanted to ask what was actually that java com 23 that u used in putting the signals of 1, 0 ,1 etc….. I too like to experiment my program on the terminal. Thanks in advance.
That’s the serial terminal built into Arduino. You can access it from the top right of the IDE
I’m an experienced Java programmer and your approach to the elecronic stuff is amazing!!
I’ve got a question:
The program (read_button) mentions pin 8 for the button, on the video it is pined on the 11.
I guess the answer to my question is linked to that but i only get ‘0’ on the print rendering (for instance at the 05:21 sec of the video).
Can you give me the clue
Use whatever pin (in the code) that you have the button connected to.
could you answer me thsome questions.i´m from spain and we don´t have this things.i´m so interesting but i don´t have many time
I am trying to get the Arduino uno to run 2 74hc4017B Decade counter that are chained to each other. I have the circuit running great just having trouble with the sketch. I would like the program to send a clock pulse to keep the circuit counting, and control the reset and enable pins of the 4017 with the computer keyboard.
ty so much for all the help you have already given me,
I got it, Thanks anyways.
What is the différence between a voltage regulator and a transistor and how to diffirentiate between them
Voltage Regulator: http://en.wikipedia.org/wiki/Voltage_regulator
You need to look at the markings on the package to determine the product number.
Thank you so much for your valuable tutorial regarding programming and lots of fun with Arduino.
I am an Electrical Engineer and have good command on electro-mechanical work, i made an egg incubator and need a controller which have relays and LCD to control the temperature, humidity and egg turning motor etc.
Please do favor to me that prepare a tutorial on this project.
thanks in advance
hi. Thanks for your help but I did the exact same program but I didn’t get the same COM23. Can you please help.
Again Jeremy Blum Book is great for beginner and intermediate users as well!
I’m about ready to order from element14 a website that works with Jeremy Blum book. You can order for each chapters of Jeremy books the parts that work with each projects.
Are there any problem with shortage of parts? If so would they give us notice before we buy?
Arduino is one of my favorite open source hardware hacking platform for hobbyists, designers, and artists? Arduino gonna be a big thing in the future. Jeremyblum I want a little favor from your end I am looking for best arduino courses online over the web. I try to find it but I am little confused which one is good for professional level. Can you help me out. Link is in the website coloum. Do reply and please help me.
Newbie here. I’ve been trying for a few days now to understand the difference between a rheostat and a potentiometer but to no avail. I’ve tried to read about it on Wikipedia and even this article with a video about rheostats https://www.derf.com/rheostat-overview-article-and-video-explanation/ but they don’t really explain the difference in layman’s terms.. Too many long words :) Could somebody here please explain the difference like I’m 5? Any and all help will be much appreciated. Thanks in advance