There are a
large number of controller boards
that you can pick from for your projects.
Two of the most popular are the Arduino
and the Raspberry Pi. So which one
do you pick? On the surface these boards
look about the same. They are a couple
of circuit boards with some chips and
I/O connectors, right? In this episode of
AddOhms we're going to take a look at the
differences between these boards and how
you choose one for your project.
Let's start by
looking at the Arduino. If we visit the product page on the Arduino website you're going to see that
there's many different boards
available. So in this tutorial
we're going to focus on
the Arduino
Uno, which is based on the ATmega 328.Inside of the 328 is 2K of RAM, 32K of FLASH memory, some timers and
hardware that talks serial, I2C
and SPI, or also known as
"spy."
Outside of the
chip the Arduino board contains parts like, voltage regulators, passive
components and the I/O connectors. It
is a relatively simple design with an even simpler software structure. The code that you write in the IDE is
the ONLY code that runs on the chip. There's
no interpreter,no operating system, and no firmware. Your C-code is compiled into machine language and then it runs on the Arduino itself This is as bare-bones as you can get! The Raspberry Pi, on the other hand, is
actually a single board computer or S-B-C.
On the board there is a 32-bit microprocessor and ports
that support: Video, Audio, USB Host, Ethernet, SD
cards and even an HDMI port. There's also some GPIO headers that
look like Arduino pins and are
KIND of like Arduino pins, but
we'll talk about how they're
different here in a little bit. Overall what does this mean? Well it means that your Raspberry Pi has more
in common with your computer, than it does an Arduino. For example, instead of writing code to control the hardware directly you are actually writing programs that run within an operating
system. In the case of the
Raspberry Pi the operating system
is typically Linux. I said the
Arduino is a microcontroller and
the Pi is microprocessor. So then,
what's the difference between those two? They
both have a CPU which is what execute the instructions, timers and memory. As well as io pins. But those I/O pins
is where the key difference lies. Microcontrollers
tend to have a strong I/O
capability so that they can drive
external hardware directly, While
"micro processors" tend to have weak I/O which need transistors to
drive most hardware. Micro
processors are good at
processing so
they're a little bit "brainier"
(get it?) than a microcontroller. So
for the sake of comparing the Arduino to the Pi, let's look at some raw
specifications between the two. The
Raspberry Pi has a clock speed
that's over 40 times faster than
the Arduino and is based on a 32-bit
architecture. The Uno's RAM is
measured in KILOBYTES, while the PI's is measured in HUNDREDS of Megabytes. Both have general purpose I/O, or GPIO,
but the Arduino can drive OR sink up to 40 milliamps, while the PI is really limited to more around 5 milliamps.
In terms of power consumption, the PI consumes more power than the
Arduino but, always keep in mind
what is the project going to have
and what other hardware is going to
be included. Lastly remember that
the Pi usually runs some form of
Linux while the Arduino has no
operating system.So at first you might look at this and say clearly the PI is better! But we have to really
talk about how would you pick one
of these for project. It's not all about the specifications! This often leads to the question: which
one is best?? But. there isn't a
simple answer. It does get a little simpler when you add the phrase,
"...for my project." Think
about projects with things that get controlled
like motors, character LCDs, and
sensors. These are going to work really
well with a microcontroller like the
Arduino. And then projects with things
like video or cameras, complex math,
and graphic interfaces are going to be
better suited for the Raspberry Pi Both
boards have their place in the electronics
world neither is perfect, and neither
is going to be perfect for every single
application. However if your
application is more about controlling things, the Arduino is probably a better choice. While if you need to process
lots of data the PI is your best
bet For links and resources
related to the Arduino and the Pi,
as well as, downloadable versions
of this video, visit
addohms.com/ep7. To stay in touch
you can follow us on Twitter, like us on Facebook, or leave comments along with this video.
No comments:
Post a Comment