Bionic Arduino – Introduction to Microcontrollers with Arduino

Bionic Arduino

Bionic Arduino is a set of four 3-hour classes in November 2007 hosted by Machine Project and taught by Tod E. Kurt. It is an introduction to microcontroller programming and interfacing with the real world using the Arduino physical computing platform. It focuses on building new physical senses and making motion with the building blocks of robotics, using Arduino as a platform.

In the class, participants are shown and experiment with the Arduino’s capabilities and learn the basics of common microcontroller interfacing, such as: digital output to control lights and LEDs, digital input to read switches and buttons, analog output to control motor position or LED brightness, and analog input to read sensor inputs.

The class assumes no previous electronics knowledge, though it does assume a little programming knowledge. No soldering is needed during the class, as all circuits are built with solderless breadboards.

Class Notes

Arduino Sketches Used in Class

Processing Sketches Used in Class

Parts Suppliers, New

  • SparkFun — Arudino board and shield, and many other neat gizmos.
  • Jameco — General electronic parts, easy-to-use, also has computer parts.
  • Digikey — Exhaustive parts supplier. Cheaper than Jameco usually, has more variation, more hard-to-find parts.

Parts Suppliers, Surplus

112 Replies to “Bionic Arduino – Introduction to Microcontrollers with Arduino”

  1. Hi Todd,
    Not to blatantly advertise my own product, but if you’re looking to drive 3 RGB LEDs with Arduino, perhaps the easiest solution are three BlinkMs.

    If that’s not what you’re doing, then you can recreate PWM by hand using really fast loops, like how the Sevo library works.

  2. I need at least 9 pwm enabled pins for a project I am working on using LEDs. What is the best way to get this done but have all outputs independent of each other?

    I looked around and have not found any solutions that did not seam like overkill.

    Thanks you for your time.

  3. Oh…I forgot

    As some one approaches the piece, a motor will turn on the closer a viewer gets, so that when a viewer is 6″(or so) away, all the motors are on, but at, say 4 feet, only one is on. I am looking to learn, so any suggestions on code I can hack…

    int ledPin = 13; // select the pin for the LED
    int i=0; // simple counter to show we’re doing something

    void setup() {
    pinMode(ledPin,OUTPUT); // declare the LED’s pin as output
    Serial.begin(19200); // connect to the serial port
    }

    void loop () {
    Serial.print(i++);
    Serial.println(” Thanks Again !”); // print out a thanks
    digitalWrite(ledPin, HIGH);
    delay(500);
    digitalWrite(ledPin, LOW);
    delay(500);
    }

    //Christopher//

  4. I am learning the arduino…I am over loaded with info…I am looking for some one to do this with…are there any classes or seminars in the Chicago area ?

    I am working towards controlling a set of motors that turn on the closer some one approaches the piece. Do you recommend the ultrasonic range finder, or the Infrared range finder ?

    Much thanks
    Christopher

  5. Hi Job,

    You want to be able to turn on multiple LEDs with one digital out? If you’re using red LEDs, you can put two (sometimes three) in series instead of just having one LED.

    If you want to drive many more than that (or what to drive non-red LEDs), then you would use a transistor. See page page 20 of the Bionic Arduino Class3 notes for a brief description of this. The schematic would be:

    You would need to adjust the number of LEDs and the resistor value depending on the color of the LED using Ohm’s Law (red LEDs are ~1.2V, green ~2.0V, and blue ~3.4V). I can help with some example scenarios if you like.

    Alternatively, you can run the LEDs in parallel, by duplicating the LED+resistor sub-circuit as many times as you want, until you reach the current limit of your transistor. This has the advantage of you can keep adding LEDs without tuning resistor values and being limited by your source power. The above example uses 12V so you could stack LEDs, but the one below can just use the 5V on the Arduino board for as many LEDs as the Arduino has power for and the transistor has current capability for. The downside is you need a resistor for each LED.

  6. I really liked your lessons, only thing i want to know now is how i can use more led’s on one digital out….
    your help oould be much appreciated.

    greetz Job

  7. Hi Tod,

    Thanks so much for posting all this info- it’s been a tremendous learning experience and a lot of fun.

    I was able to modify the NunchuckServo code so I could access the other controller inputs- now I have multiple servos and both the buttons working- woohoo! But I do have a question about trying to smooth out the servo motion. I’ve changed the refresh rate and that definitely helped- any other suggestions?

    Thanks!

    Jerome

  8. Hi Zac,
    Thanks, I’m glad you’ve found the class notes useful.

    Controlling multiple RGB LEDs can be difficult, especially if you want to control their brightness. There are LED driver chips out there, but they can be hard to use.

    I’ve been developing a solution to this problem that is called a “Smart LED”. You can read about them and the general concept of smart interface components in my Smart Interface Components talk slides.

    In about a month we’ll have a type of Smart LED called “BlinkM” for sale. Each BlinkM is a smart RGB LED with 24-bit color control and an I2C serial interface, so you can control 127 BlinkMs with a single Arduino.

  9. Hi Todd,

    Great site. This has has been a tremendous help in finally understanding microcontrollers. I am an absolute newbie and now have my LEDs blinking morse code!

    Question: How would you control multiple RGB LEDs with only the Arduino’s limited PWMs? Is the expandable without purchasing multiple Arduinos?

    Thanks again!

    Zac

  10. Hi Christin,
    If you’re using an Arduino Diecimila, opening the serial port will reset the board on Mac OS X & Linux, so the pin13 blink is probably that. (and that’s a good thing) After opening the port, you need to wait a bit (around 1.5 seconds on Diecimila or 5 secs on older Arduinos) for the bootloader to timeout before you can send or receive stuff.

    What sketch are you trying out? I’d suggest trying out something like the SerialHelloWorld and see if you can just receive characters being spit at you by the Arduino.

  11. Hey Todd,

    I just found an osX implementation of php_serial.class here: http://www.geekymedia.com/phpserial.html as the original class didn’t include calls for darwin/osx.

    I am running into weird problems with it, however, and have emailed the author to see if he has any suggestions (basically, it doesn’t appear to be opening a serial port, but every time I try to, I see my pin13 LED blink, so it must be doing something)

  12. Hey one of the guys at the class mentioned ITC on Olympic in Korean Town as a cool place to pick up components and such. I can confirm this, and recommend it! The prices are… well it’s retail, so they aren’t fabulous, but they have a lot of good stuff. I didn’t see much in the way of ICs, but there were lots of LEDs/ Resistors/Caps/etc. a handful of kits, some tools, a decent wire section, and a big audio area that was mostly focused on the car. Worthy of a quick trip into K-Town, and a notable place to have on your list. Happy Monday!

Leave a Reply

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