Thursday, June 24, 2010

The Bare Bones Board



The Bare Bones Board was designed by Paul Badger and is sold at ModernDevice.com. Besides the BBB, ModernDevice also sells a radio enabled version and several useful sensors.

Differences from an Arduino

This rework of the arduino design is completely compatible with the Arduino software. The Arduino software is a big part of what makes the platform easy to work with. Reusing the bootloader and the community libraries is important. The microcontroller that comes with the BBB is preprogrammed with the Arduino boot loader.





The first, and most obvious difference between the two is the layout of the I/O pins. The BBB was designed to be plugged into a breadboard for easy debugging and prototyping. This change means that the many Arduino expansion boards, called shields, will not fit the BBB. I felt this is a valuable tradeoff as I don't personally use shields.

Another significant difference is the USB connectivity. The on-board usb-serial connection that the Arduino provides is one of the more expensive components on that board. In low quantities this single chip costs about $5 which is 1/4 the cost of the whole Arduino. This allows the Arduino to be programmed over USB- however, in many devices if only needs to be programmed once and may not be used again. The BBB saves this cost by offloading the USB chip onto a separate board. You can use this separate board to program any number of microcontrollers.

Lessons learned

The BBB also saves costs by coming as a kit. This means you have to solder it yourself. It's good practice. It builds character. It comes with very complete instructions for the soldering and to help understand what the various components are for.

I am not going to include a full tutorial on soldering in this blog. There are plenty of web sites that do a much more thorough job of it than I would. There were a couple techniques that I found to be very helpful when putting together the BBB.
  • Solder components shortest to tallest. This will make it easier to rest the board upside down without components falling out
  • Use sockets for the expensive components. An IC socket may be $0.30-$0.50 but it is well worth it if it keeps you from burning up a $5.00 microcontroller. And if (when?) you do burn one out by not using a flyback diode when driving a relay you can replace it without any soldering.
Components


Some of the components I remembered from my physics classes. Some of them were new to me.
  • Microcontroller
    Abbreviated uC. This is the brain of the board. This has an internal clock, program storage and memory, timers, interrupts, Analog To Digital converters, digital I/O, PWM generation, I2C and serial communication. It is the most expensive component of course (except for the PCB itself) and is fragile. It can be easily destroyed by a stray voltage spike.
  • Resistors
    Limit the flow of current. One of these resistors is used to keep the LED from burning up.
  • Capacitors
    Caps store a charge. They fill up when the voltage to them is high and discharge when it is low. They are filters that try to keep voltage constant the same way a water tower tries to keep water pressure constant. The big capacitors help even out the incoming DC power. The little ones are filters that the uC uses.
  • Diodes
    Allow current to flow in one direction only.
  • Inductor
    An inductor simply generates a magnetic field. As a capacitor stores charge in an electric field, so an inductor stores a charge in a magnetic field. On this board, the little inductor is being used as a filter for the uC.
  • External clock
    The uC has its own internal clock but it can use an external clock for slightly faster speeds.
  • Linear Voltage Regulator
    A linear voltage regulator takes in a DC voltage and outputs a specific DV voltage. In this case the regulator outputs the 5V that the uC requires. It is very important to note that all the extra power from the voltage drop is wasted as heat. If you supplied 9V then 4V would be burnt off. The uC can draw around 300mA. Using the power function P=IV this would mean at 9V the regulator would have to dissipate 1.2W- not too bad. However, if you supplied 12V the resulting 2.1W might be too hot.

    Power supply considerations are a future topic of discussion.