Bits, Bytes and Signals

Just another WordPress.com weblog

Arduino – How-To

Posted by igormoochnick on August 28, 2008

After a very very very long wait, followed the Boarduino USB kit order, I’ve finally received the package. And, without loosing any more time, decided to give it a test spin.

The assembling experience was a breeze. Within 15 minutes I was running my very first Arduino “Hello, World!” program. And you can too …

This is how you can do it (I guess that you know how to solder):

Step 1

  1. Don’t forget to order a kit. There are a couple of different Arduino kit distributors as well as a bunch of Arduino clones. I’ve ordered a Boarduino USB kit from Adafruit Industries.
  2. Wait patiently for the kit to arrive.
  3. Prepare some essential tools:
    1. Solder iron, solder and (optionally) flux
    2. Angle cutters
    3. Small pliers
    4. It’ll help you if you’ll have a 3-rd hand.

Step 2

  1. Unpack everything carefully – there are a lot of small parts.
  2. Verify that all the parts in the kit are present.

Step 3

  1. Start with putting the capacitors C1 and C3
  2. Green LED (D1). Make sure that you use a correct polarity (long leg is a ‘+’, the short leg and a shaved side is a ‘-‘)
  3. Resistors R2 (1K), R3 (1K). To make the resistors fit nicely in the holes – use small pliers to bend the leads.
  4. Solder everything and clip the extra legs

Step 4

  1. Use angle cutters to cut a 2-pin header of the long header strip. Be careful not to burn your fingers holding it in place while soldering it. You can use a drop of a glue to hold it in place or hold it with a tweezers while soldering.

  2. Add the electrolytic capacitor C2. Make sure that you using a correct polarity – align the ‘+’ sign on the cap with the ‘+’ sign on the board.

Step 5

  1. Now you can plug in the Boarduino using a plain USB A-B cable.
  2. Check that the green LED is turned ON – this tells you that your board is now powered up by the USB
  3. Tap yourself on the back, smile and get back to work …

Step 6

  1. Add a Red LED (D2)
  2. 16 MHz Resonator
  3. Capacitor C2
  4. Resistors R1 (10K) and R4 (1K)
  5. Don’t forget to clip all the extra legs after the soldering is done

Step 7

  1. Now we’re going to add some extra hardware
  2. Add a reset button
  3. Add a 3-pair header
  4. Add a chip socket. To ease the pain putting it through the hole – use a solid table surface to bend the pins inward. Make sure to follow the diagram on the board to correctly orient the notch on the socket.

Step 8 – breathtaking

  1. Now hold your breath and insert the chip. Match the notch on the chip with the notch on the socket. To make the insertion easy – use a solid table surface to bend the chip’s legs.
  2. Go to FTDI site and download the latest drivers. More detailed you can find in Arduino Tutorial Lesson 0.
  3. Plug in the USB cable and:
    1. See that the Green LED is turned on
    2. Note that the Red LED begins blinking. This tells you that the bootloader on the chip does it’s job
  4. On your computer go to Device Manager:
    1. Start –> Control Panel –> System
    2. Select Hardware tab
    3. Press “Device Manager” button and you’ll see the following window:List_of_devices
  5. Under the Ports section look for extra “USB Serial Port” item – this is your Boarduino.
  6. Note the COM port number – you’ll need it later
  7. If everything is OK – hold your breath for the next step where we’re going to have a real fun.

Step 9 – awestricken

  1. Go to the official Arduino site and download the development software.
  2. Install it and run the development environment
  3. Configure the Boarduino:
    1. Tools –> Board leave the setting as “Arduino Decimila”
    2. Tools –> Serial port select the port that you’ve noted in the Device Manager in the previous step.
  4. Open a Blink sketch:
    1. From the File menu select: “Sketch Book” –> Examples –> Digital –> Blink
    2. Note that you have a piece of code in the editor
  5. Compile the code: Sketch –> Verify/Compile (there should not be any errors)
  6. Upload the code to the board: File –> “Upload to I/O Board” (if everything is OK – there should not be any problems either)
  7. If you’ve followed all the steps to the point – you should see the Red LED blinking after a very short period of time.
  8. Breathe in and breathe out – go grab a cold beer! You’ve earned it.

Step 10 – optional

  1. If you want to use your Boarduino on bread boards you need to solder the rest of the headers.
  2. Use your angle cutters to cut the header pieces to the required length
  3. Use your breadboard to align them in the correct configuration:
  4. Place Boarduino on the headers.
  5. Solder them one by one. Make sure you don’t heat the leads too much – it may melt the breadboard. Try to solder the headers randomly and one on each side – it will minimize the chance of melting your breadboard.
  6. Now you’re really DONE. Be very careful when you’ll be pulling the Boarduino from the breadboard – you can bend the legs. Try to pull it out by slightly rocking and preserving it parallel position to the breadboards as close as possible.

Extra Links

  1. Official Arduino site and Arduino Development software – http://www.arduino.cc/en/Main/Software
  2. Boarduino site and USB Boarduino Schematics – http://ladyada.net/make/boarduino/download.html
  3. Arduino tutorial – http://www.ladyada.net/learn/arduino/index.html
  4. Getting started with Arduino – http://www.arduino.cc/en/Guide/HomePage
  5. FTDI Chip drivers – http://www.ftdichip.com/FTDrivers.htm

Posted in Tutorials | Tagged: , | 1 Comment »

Ultra-light event-driven framework/rtos for Avr

Posted by igormoochnick on July 8, 2008

QP is a family of ultra-light, open source, state machine-based frameworks for embedded systems. QP enables developing well-structured applications as a set of concurrently executing hierarchical state machines (UML statecharts). With QP, coding of modern state machines directly in C or C++ is a non-issue and no big design automation tools are needed.

QP consists of a universal UML-compliant event processor (QEP), a portable event-driven framework (QF), and a selection of a cooperative or full preemptive kernels (QK). Current versions of QP include: QP/C and QP/C++, which require about 4KB of code and a few hundred bytes of RAM, and the ultra-lightweight QP-nano, which requires only 1-2KB of code and just several bytes of RAM. QP is described in great detail in the book Practical UML Statecharts in C/C++, Second Edition, (Newnes, 2008).
The QP Development Kits (QDKs) for AVR have been recently released and are available for immediate download from www.quantum-leaps.com/avr.

Posted in Thoughts, Tutorials | Leave a Comment »

Welcome to my electronics blog

Posted by igormoochnick on July 8, 2008

I’ve decided to take my tutorials, thoughts and rants about all electronics-related topics into a separate blog: igorbits.wordpress.com.

Welcome to my new blog!

Posted in Community, Thoughts, Tutorials | Leave a Comment »

Hello world!

Posted by igormoochnick on July 8, 2008

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Posted in Uncategorized | 1 Comment »

 
Follow

Get every new post delivered to your Inbox.