Baremetal Arduino

From Interaction Station Wiki
Revision as of 11:46, 13 January 2023 by Annasa (talk | contribs) (Annasa moved page Baremetal arduino to Baremetal Arduino)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Bare machine (or bare metal), in computer parlance, means a computer without its operating system. Modern operating systems evolved through various stages, from elementary to the present day complex, highly sensitive real-time systems. In the very first stage of computing there was nothing like an operating system at all. Programs were fed to the computer system directly using machine language by the programmers without any system software support. This approach is termed the "bare machine" approach in the development of operating systems. [1]

Here with Bare metal we mean the μController without it's Arduino layer. We remove the μController from it's comfortable position on the Arduino hardware and place it on a breadboard. This page will take you throught the steps on how to do this. It will not tell you how you should layout your breadboard. These are considered implementation details and are up to the you. However, to assist with this there is a Fritzing[2] project available with the electrical schematic and starting point for laying out your breadboard design.

The steps we need to follow:

  1. download and install Fritzing.
  2. download and install the Arduino Unleashed project files
  3. create your breadboard layout using Fritzing
  4. copy your breadboard layout to the physical world
  5. program the μController

Note: this page is a work in progress.

Download and install the Arduino Unleashed project files

The Arduino Unleashed project files can be found in the WdKA Github repository. If you are familiar with git[3] you can clone the Arduino Unleashed repository. Otherwise download a zipped copy of it here.

To install the Arduino Unleashed board to your Arduino environment follow the following steps[4]:

  • in your Arduino sketch folder[5] create a folder called hardware
  • unpack the zip file and copy the folder WdKA into the hardware folder you just created
  • start the Arduino IDE and verify in the boards menu there is a new board called Arduino Unleashed Uno

That's it :-)

Create your breadboard layout using Fritzing

To help you along the way there is a Fritzing[2] project BareMetalArduino.fzz in the BaremetalArduino directory of the zip archive you downloaded. To get the latest version you can also download it here. To open the project you will, of course, need to have Fritzing installed. You can download it for OSX, windows and GNU/Linux at via http://fritzing.org/download .

After you have installed Fritzing start it and open the project BareMetalArduino.fzz.

The project contains the electric schematic:

BareMetalArduino_schem.png

And a template to start your breadboard layout:

BareMetalArduino_bb.png

To make it a bit easier the following rules have been followed:

  • all red bar are connected to the +5V, make sure you also connect the +5v to the row with the red wires on the breadboard.
  • all black wires are connected to the GND, make sure you also connect the GND to the row with the blue bar on the breadboard.
  • all orange wires have a relation to the button
  • all blue wires have a relation to the LED

The connections (wires / lines) in the schematic view are represented as dashed lines in the breadboard view. Remember that a dot on the intersection of two lines crossing each other means they are electrically connected! If there is no dot there is no connection.

Now go ahead and play around with Fritzing and create the schematic layout on the breadboard. Try to work as neat as possible with as little wires as possible. This will make it a lot easier to transfer your layout into the real world during the next step.

And don't forget to save your work regularly!

Copy your breadboard layout to the physical world

Program the μController

Unleash your μController

One note of warning: work carefully, detailed and pay attention to the correct orientation and pin numbering of the parts. Hooking up your power source the wrong way can destroy the μController.

First of all you need to relieve the μController from the Arduino board. Another option is to buy one. The μController on the Arduino is the Atmel AVR ATMEGA328P-PU, you can order these for example at Conrad.

To remove the chip from your Arduino can be a bit challenging. Carefully push a small flat screwdriver in between the chip and the socket lifting the chip out of its socket bit by bit. Be careful not to bend the legs too much as they will break easily.


Notes & References

  1. https://en.wikipedia.org/wiki/Bare_machine
  2. 2.0 2.1 http://www.fritzing.org
  3. http://www.git-scm.com/
  4. You will need at least version 1.6.0 of the Arduino IDE
  5. Usually Documents/Arduino for OSX and Windows, ~/Arduino on GNU/Linux