martes, 7 de enero de 2014

Raspberry PI and Arduino - Great combination!

Raspberry PI

For those of you who dont know the Raspberry PI yet, it is a VERY cheap and VERY tiny computer. It costs around $35 - $40 and its of the size of a credit card. Of course its not a core i7 with 16GB of RAM, but has a quite decent ARM 700MHz CPU with 512MB of RAM, which allows you to do a lot of things. You can see the Raspberry PI's offical site to see all the crazy ideas that people come up with the Raspberry PI.

The Raspberry PI has some interesting benefits:
  • For the cost its pretty powerful (of course its useful for some applications, its not for everything, you wont be able to play GTA V on it, ha)
  • It runs linux
  • It works without a fan (yeah! no noise!)
  • Low power consumption (700-1000mA for Model B, which is the model with an ethernet port)
  • Its really small
The Raspberry PI has some limitations though and during its usage I found some issues. The one that struggled me most, is that the USB ports cannot power most of the devices, so you need a powered hub for them, and the Raspberry PI is not compatible with every USB hub... so its a bit complicated (you can get a list of compatible devices from here). For example some webcams, wifi dongles and external hdd need a powered USB hub.

Although the Raspberry PI its quite powerful, it has a major drawback for robotics or any electronic projects... it has no built-in analog inputs/outputs.


Arduino is very popular electronics prototyping platform that makes everything easier for those of us that are amateurs on the electronics field. There are multiple Arduino boards, but I'll talk about the "Arduino Leonardo" which is the one that I bought. The Arduino Leonardo is a cheap board (you can get it for around $20) that includes a bunch of digital and analogs pins for input/output and a serial port which can be used to communicate the Arduino with a computer (this is also used to load the programs)

Arduino has its own IDE for coding and you code in an "arduino programming language" which is pretty similar to to C. One of the greatest things, is that it has an awesome community, so its really easy to find solutions to your problems and there are a lot of libraries to interact with sensors  and actuactors (ultrasonic for distance, infrared, servos, etc).

The arduino is awesome but it also has its limitations... it has a 16Mhz microprocessor and 32KB of memory. So, forget about doing heavy processing in the arduino.

Raspberry PI + Arduino = SUCCESS!

As you may have noticed, the Raspberry PI and the Arduino complement each other pretty well. The Raspberry PI is pretty powerful but it lacks of analog inputs/outputs which the arduino has. So, I think that the combination of both is a great success.

For my projects Im planning to communicate both boards through the serial interface (USB). The Arduino will just be an interface between the Raspberry PI and the hardware, exposing the sensors readings and getting commands for the actuator through a simple custom reusable serial protocol that Im going to code. And in the Raspberry PI I'll create a program for each project in the language that I want (for example python) and I can use all the power of the Raspberry PI to do the computation.

No hay comentarios:

Publicar un comentario