Monday, 4 April 2011

Arduino - Open source hardware and software platform

I've just discovered the open source HW and SW platform called Arduino, this platform allows inexpensive prototyping of your ideas.  Your Ideas are called "sketches" and are similar to the C type programming language, not that I've done any programming in C!

The UNO
The Arduino range includes several different types of processor/PCB arrangements from the "UNO", which I bought, to the very small "Nano".

The Nano










The software "Sketches" are written in an open source IDE, available from the website www.arduino.cc, this allows you to write and download the software to the target board.

The really good thing about the design is that they have all the I/O on header pins along each edge of the PCB allowing addon PCBs, called Shields, to be stacked on top of the main processor PCB, if it's an UNO or Mega, the smaller boards use DIL sockets to connect to other circuits using breadboard for example.

Due to the open nature of the whole enterprise there are quite a lot of third party addons that can be found on the Internet especially on Ebay, things like:
  • Ethernet adapter boards
  • LCD displays
  • Prototyping boards
  • Wireless adapters (WiFi, Bluetooth etc.)
  • Relay boards for switching mains equipment
  • H-Bridge motor controllers
  • Servo Controllers
  • Real Time Clock
Most of these addons come with Arduino Libraries which give simplified commands to allow quick and easy configuration of the Shields.

The UNO comes with a surface mount LED connected to Pin13 on the PCB so it is very easy to write your first programme, for example the first code to try from the Arduino site would be: -
/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
   This example code is in the public domain.
 */

void setup() {                
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT);     
}

void loop() {
  digitalWrite(13, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the LED off
  delay(1000);              // wait for a second
}

All you need to do is copy and paste this code into the Arduino IDE software and squirt it down to the board via the USB connection and the LED on the PCB will start to blink.

At the moment I'm putting together an Uno with a Real Time Clock, LCD display and a couple of temperature sensors to control my central heating and hot water, I'm also hoping to control it via the USB connection using a Visual Basic programme on a PC, I'll add more details to the blog as I progress.

No comments:

 Time for another post. A while ago I bought a new Oscilloscope, a RIGOL DHO914, but this scope doesn't have WiFi built in just a LAN co...

Popular Posts