BLOG > EE Basics in Tutorial 3 for Arduino

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:

GNU GPL License Distributed under the GNU General Public (Open-Source) License.
Please Attribute and Share-Alike.


56 comments

  1. 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?

  2. 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.

  3. 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….

  4. 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?

    1. 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”.

      1. 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?

  5. Jeremy,

    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.

    Thank you.

    1. 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.

  6. Jeremy,

    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.

    Michael

  7. 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!

  8. 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)
    http://www.uploadarchief.net/files/download/arduino5pushbuttons.png

    Thank you very very much!

  9. Jeremy,

    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

    1. 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.

      1. Jeremy,

        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?

        1. 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.

  10. Hi Jeremy,

    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.
    For example:

    – 22uF capacitor:
    (They are out of stock and minimum order quantity is 3000)

    – 1N4004Diode:
    (minimum order quantity is 5500)

    Could you please advise me where to find these parts or maybe find some alternatives ?

    1. If you live in the United States, your local RadioShack should have the components you need. Those parts will be available for individual sale.

  11. 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?

  12. Hey Jeremy,
    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!

  13. Hi
    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
    Best
    Salim

    1. 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.

  14. Hi Jeremy.
    The tutorials are really very useful for me as i m a beginner. But I am confused abt the connections.

  15. 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.

    Edwin

  16. Hi Jeremy,

    Great work!
    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).

    Regards

    Can you give me the clue

  17. 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

  18. Hello,

    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,
    Derek Welch

  19. What is the différence between a voltage regulator and a transistor and how to diffirentiate between them

  20. Dear,

    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

  21. hi. Thanks for your help but I did the exact same program but I didn’t get the same COM23. Can you please help.

  22. 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?

    Thanks
    SuperDave

  23. 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.

  24. 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

  25. Pingback: Arduino Tutorial 4: Analog Inputs | Ayarafun
  26. Pingback: Arduino Introductory Course | t00bl1pp3
  27. Pingback: H4H Arduino Course Resources | House 4 Hack
  28. Pingback: Learn arduino - From noob to Ninja - video series

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Advertisement