Difference between revisions of "Baremetal Arduino"

From Interaction Station Wiki
Jump to navigation Jump to search
m
Line 8: Line 8:
  
 
The steps we need to follow:
 
The steps we need to follow:
# download and install Fritzing
+
# download and install Fritzing.
 
# download and install the Arduino Unleashed project files  
 
# download and install the Arduino Unleashed project files  
 
# create your breadboard layout using Fritzing
 
# create your breadboard layout using Fritzing
Line 17: Line 17:
  
 
== Download and install the Arduino Unleashed project files ==
 
== Download and install the Arduino Unleashed project files ==
 +
The Arduino Unleashed project files can be found in the [https://github.com/mywdka WdKA Github repository]. If you are familiar with git<ref>http://www.git-scm.com/</ref> you can clone the Arduino Unleashed [https://github.com/mywdka/ArduinoUnleashed repository]. Otherwise download a zipped copy of it [https://github.com/mywdka/ArduinoUnleashed/archive/master.zip here].
 +
 +
To install the Arduino Unleashed board to your Arduino environment follow the following steps<ref>You will need at least version 1.6.0 of the Arduino IDE</ref>:
 +
* in your Arduino sketch folder<ref>Usually Documents/Arduino for OSX and Windows, ~/Arduino on GNU/Linux</ref> create a folder called <code>hardware</code>
 +
* 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 ==
 
== Create your breadboard layout using Fritzing ==
 +
To help you along the way there is a Fritzing<ref name="fritzing"/> project in the BaremetalArduino directory of the zip archive you downloaded in . To get the latest version you can also download it [https://github.com/mywdka/ArduinoUnleashed/raw/master/BaremetalArduino/BareMetalArduino.fzz here].
 +
 +
The project contains the electric schematic:
 +
<span class="plainlinks"><div class="image320px">[https://raw.githubusercontent.com/mywdka/ArduinoUnleashed/master/BaremetalArduino/BareMetalArduino_schem.png https://raw.githubusercontent.com/mywdka/ArduinoUnleashed/master/BaremetalArduino/BareMetalArduino_schem.png]</div></span>
 +
 +
And a template to start your breadboard layout:
 +
<span class="plainlinks"><div class="image320px">[https://raw.githubusercontent.com/mywdka/ArduinoUnleashed/master/BaremetalArduino/BareMetalArduino_bb.png https://raw.githubusercontent.com/mywdka/ArduinoUnleashed/master/BaremetalArduino/BareMetalArduino_bb.png]</div></span>
 +
 +
To make it a bit easier the following rules have been followed:
 +
* all <span style="color: red;">'''red bar'''</span> are connected to the '''+5V''', make sure you also connect the +5v to the row with the <span style="color: red;">'''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 <span style="color: blue;">'''blue bar''' on the breadboard.
 +
* all <span style="color: orange;">'''orange wires'''</span> have a relation to the button
 +
* all <span style="color: blue;">'''blue wires'''</span> have a relation to the LED
 +
 +
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 ==
 
== Copy your breadboard layout to the physical world ==
 
== Program the &mu;Controller ==
 
== Program the &mu;Controller ==
Line 29: Line 56:
  
  
<span class="plainlinks"><div class="image480px">[https://raw.githubusercontent.com/mywdka/ArduinoUnleashed/master/BaremetalArduino/BareMetalArduino_schem.png https://raw.githubusercontent.com/mywdka/ArduinoUnleashed/master/BaremetalArduino/BareMetalArduino_schem.png]</div></span>
 
<span class="plainlinks"><div class="image480px">[https://raw.githubusercontent.com/mywdka/ArduinoUnleashed/master/BaremetalArduino/BareMetalArduino_bb.png https://raw.githubusercontent.com/mywdka/ArduinoUnleashed/master/BaremetalArduino/BareMetalArduino_bb.png]</div></span>
 
  
 
== Notes & References ==
 
== Notes & References ==

Revision as of 00:52, 20 April 2015

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 in the BaremetalArduino directory of the zip archive you downloaded in . To get the latest version you can also download it here.

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

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