Arduino Due is the first 32 bit ARM Processor development environment released by the Arduino community after their widely successful 8 bit development platform – Arduino Uno. The main advantages of using a 32 bit ARM Processor based Arduino Due for your next project are:

1.) Can act as USB Host – Supports USB On the Go (OTG) devices like Tablets, Smartphones, Keyboard, Mouse, etc.

2.) Compatible with the Android Development Kit 2.0 Protocol.

3.) Compatible with all Revision 3 Shields or Custom ones that are able to exploit the IOREF pin.

4.) Two Digital to Analog Converters (DAC) on-board (in addition to the conventional Analog to Digital Converters – ADC)

5.) Low Power Consumption (Due runs at 3.3V).

6.) Increased Flash Memory – 512 KB (Code Upload capacity of Uno is 32 KB while that of Due is 16 times higher).

7.) More Input/ Output Ports.

8.) Higher Clock Speed (a jump from 16 MHz to 84 MHz).

A recent article posted on the Wired has confirmed that the Due will support the ADK 2.0 Protocol and will be compatible with Google’s Libraries and some of the code written for the Android Development Kit (ADK).

USB Ports

There are two USB Ports on the Arduino Due:

a.) Micro USB B connector (for Programming).

b.) Micro USB AB connector (for Debugging and acting as Host for USB On-The-Go (OTG) Devices).

For details about programming Arduino Due, see the Programming Section.

To learn about how to setup and program an Arduino Board from the beginning, refer to our tutorial here: Explore Labs – Arduino Beginnings

Arduino Community has released a Beta version of Arduino IDE 1.5.0 which will support the new generation Arduino Due board.

Arduino Due is powered by Atmel’s AT91SAM3X8E ARM Cortex M3 32-bit MCU (datasheet).

The Arduino Due is said to be Cross-Compatible with its predecessors. The method of installing the drivers, using the IDE, coding techniques and uploading Sketches will be identical.

Arduino Due at Explore Labs – Buy

Discuss your queries related to Arduino Due at our Forum

Imagine if you could forget about soldering the crystal and different resistors/capacitors and stop worrying about a serial connection to your computer before using a microcontroller in your next project! What if you had a simple way of doing this, like using the plug-and-play features of the USB.

Imagine a way of taking inputs from variety of things like switches and different types of sensors (light, temperature, etc.) and controlling the movements of motors, LEDs, or animating the physical world around you.

Introducing Arduino…(curtains raised)

 

Design By Numbers Processing Wiring Arduino
1999 2001 2003 2005
Massimo Banzi and David Cuartellis, founders of the Arduino project, named it after King Arduin of Ivrea, Italy. (Pronounced “Hardwin”) which means “strong friend”.Actually, Arduino owes its birth to Design By Number programming language created by John Maeda, at the MIT Media Lab. It allowed artists, designers and non-programmers to easily start computer programming.
Processingis a programming language and development environment that makes sophisticated animations and other graphical effects accessible to people with relatively little programming experience.” – John Maeda, MIT.However, two of his students, Casey Reas and Ben Fry took it even further by developing Processing, to teach computer programming in a visual context.
Next came Wiring, a programming language which allowed to control physical world objects attached to Wiring I/O electronic boards to create interactive objects, like, lighting up an LED when there is no light in the room.It was created by Hernando Barragán as a Master’s thesis at the Interaction Design Institute Ivrea under the supervision of Massimo Banzi and Casey Reas.
Arduinois the descendent of the open-source Wiring platform, designed to make the process of using electronics very easy and accessible to all disciplines.The hardware consists of an open source hardware design for the Arduino board with an Atmel’s microcontroller which can be programmed easily with a Processing-based IDE through a USB cable.
Fritzingis an open-source software environment for designers and artists to document their interactive prototypes and to take the step from physical prototyping to actual product (from Breadboard to Printed Circuit Board).It can be though of as an Electronic Design Automation (EDA) tool for non-engineers.

“Arduino was intended to be an electronics version of Processing that used our programming environment and was patterned after the Processing syntax. It was supervised by myself and Massimo Banzi, an Arduino founder. I don’t think Arduino would exist without Wiring and I don’t think Wiring would exist without Processing. And I know Processing would certainly not exist without Design By Numbers and John Maeda. etc. This is what is exciting to me – the iteration and growth of this community.” – Casey Reas, Rhizome.

At first, there was binary… Long strings of 1s and 0s… Then, assembly language was introduced to make the programmers life less miserable. It was also abstracted into High Level Languages such as BASIC, COBOL, FORTRAN, C, etc.

When electronics prototyping and tinkering reached the hands of common users (us!), there was a need to make the life of a tinkerer even simpler. This was the beginning of Open Source era and Do-It-Yourself (DIY). With the introduction of Processing and Wiring it was easy for a designer or an artist or even a non-programmer to adapt the simple look and feel of the IDE and start writing programs.

The use of Microcontroller in Hobby projects as well as commercial products is not new. It dates back to the era of 80s, the Intel 8051, Motorola 68000 and many more. Later, to BASIC Stamp and PIC, etc. All these had one common caveat to them; their programming.

Earlier, the code was written in assembly language in the Intel HEX format and then burnt onto the Microcontroller using a dedicated programmer board. This programmer board was connected to the computer using Parallel or Serial Port.

Then, it was made even more simpler with the introduction of C-based programming environments like the KEIL uVision compiler which was used to write code for a microcontroller in C language. Assembly was gone. The code written in C was compiled and converted to an Intel hex file and then burnt onto the Microcontroller. (How?) Well, the programmers had to be used still.

Then came Arduino which changed every programmer’s, hobbyist’s view towards electronics prototyping and programming. The programming language was as simple to write code on, as simple was the hardware and connection.

An Arduino board can be connected to a computer using USB cable and code written in the Arduino IDE can be uploaded (burnt) onto the board’s ATMega 328 IC without any hassle (again, the code is converted to Intel HEX file, but behind the scenes and uploaded).

Also, it is a complete development environment in itself. You don’t need anything else. It has got the power supply regulators built-in so that you could plug in the USB cable and forget worrying about any power issues. It has its I/O pins broken out onto female headers so that you could directly connect it with your breadboard without worrying a thing. Also, It has got the coolest feature of Serial Communication made easy using Object Oriented Programming so that you could interact visually with Processing. And finally, because of its open source-ness, Arduino has got the world’s largest community of programmers, designers behind it. Even its Eagle layout and schematic files are available for download (this is the beauty of Open Source).


The Makers of Arduino want you to start head-on with your prototype or the idea you have in your mind and not worry about how you will program the Arduino (actually, the ATMega 328 Microcontroller!). This brings the time to implement your idea way down.

Things you will need:

a.) Arduino Uno (The latest variant available)

b.) USB A to B Cable (Mostly used as Printer Cables)

Thats it!

Arduino Uno gets its power from the USB port of your computer (5V). You could also use a 9V battery or a combination of AA cells to power your Arduino through the barrel jack but it is not needed when you are seated near your computer and learning the basics.

The USB interface is provided for three reasons:

a.) It is easily available on all the computers, notebooks present today as compared to serial port.

b.) It powers the Arduino

c.) It sends the code from the computer to the Uno board.

The following instructions are written for Mac OS X Lion 10.7.4

a.) You need to download the Arduino IDE which can be found here. [Current version as of August 3, 2012 is Arduino 1.0.1]
For users other than the Mac, download the appropriate files: Windows, Linux (32-bit), Linux (64-bit).

b.) Connect USB cable to your Arduino Board. The “ON” LED should light up (above the reset button).
You will get the following dialog box with it:

Select (Network Preferences…) It will open up Network Preferences. Click (Apply) and quit Network Preferences.

c.) The .dmg file which you downloaded would open up as a new window. Drag the Arduino.app file to your Applications folder.


a.) Start the downloaded Arduino IDE (from your Applications folder). You will get an empty sketch with the name as the present date.
 

b.) Go to Tools -> Boards. Select “Arduino Uno” from the Menu Bar on the top.

c.) Go to Tools -> Serial Port. Select /dev/tty.usbmodem621 (or a similar number at the end depending on how many serial devices you have connected at present).

d.) To start off, go to File -> Examples -> 01.Basics -> Blink
It should open up a new sketch named Blink with the following code written in it:

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */
 
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

e.) Do not worry about the code. We will go through it step by step. First, lets verify if your Arduino board is working or not!

Select File -> Upload or press ⌘ + U or Click on the following button:
 

 
f.) The The Tx and Rx LEDs on the Arduino should blink indicating a successful upload of the ‘Blink’ code to the Board. After some time, LED at pin 13 (built into the Arduino board) will start blinking at the rate of 1 second. So, you have successfully uploaded a sketch to your Arduino Uno Board.
 

Now going back to the code. Lets break it down to understand it completely.

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */

Anything between a /* … */ is treated as a comment by the compiler, i.e., not compiled. It is for the reference of user only.
Also, Each line that has a // prefixed before it is also a comment (a single line comment).

int led = 13;

The LED on Pin 13 (L LED) on the Arduino Board will now be called as led.

void setup()                

Every sketch that you will make from now on will have a setup() function. It is like the init() function for a seasoned programmer for initializing some things before the actual start of the code.

  pinMode(led, OUTPUT);     

pinMode() is a function in which you tell the Arduino about a specified pin and what will be its behavior (Input/Output).

{...}

A curly bracket is used to specify the end of a function. Take a look at the start of void setup() function.

void loop()

Every microcontroller needs an endless loop to perform its function, not only Arduino. If it is not present, a microcontroller will do its work once and then stop. Any code written in this endless loop will start as soon as the microcontroller is turned on and will repeat itself infinitely until the power supply is cut off. The loop function does the exact same task.

  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)

As you can see in the comment, digitalWrite() function will set the pin 13 HIGH, i.e., Turn ON the LED

  delay(1000);               

The delay() function will stop any activity for the specified amount of time (in mili seconds). Here, 1000 ms = 1 second

  digitalWrite(led, LOW);    
  delay(1000);               

Again, the LED is turned OFF and then we wait for a second. Then, again we go back to the start of the loop() function and repeat the steps, i.e., Turn ON then OFF the LED.


The Arduino has taken the world of electronics and microcontrollers by a storm. Due to Open Source, many makers and DIYers are following it and the Arduino community has become one of the largest community of DIYers in the world. The Arduino hardware reference designs are distributed under a Creative Commons Attribution Share-Alike 2.5 license and are available on the Arduino Web site.

There are many different variants of the Arduino board available in the market with the ever increasing number of shields growing day by day.

Arduino is the best example of “Physical Computing” meaning interacting with the real world objects using software and hardware. Physical Computing is a subject taught in many universities across the world.

 
References

Getting Started with Arduino 3rd Release by Massimo Banzi
Arduino – Home Page
Technology Review, MIT
Interview with Casey Reas and Ben Fry

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

ArduBoard is an Arduino Compatible Board designed by keeping in mind easy interfacing of I2C devices, on-board 5V, 3.3V Voltage Regulators and FTDI compatibility in a compact form-factor which is also BreadBoard Compatible!

Here is the ArduBoard, the perfect fit for your Arduino-based projects.


If you need the power of an Arduino Uno Board either on a BreadBoard or anywhere else in your project, you only need an ATmega328 IC. To configure/ program this IC, there are a few components that you need to make it work.

 

The components that you need would be as follows:

Qty. Component Value
1 ATmega328P-PU Arduino Optiboot Bootloader
1 Crystal 16 MHz
2 Ceramic Capacitors 22pF
1 Ceramic Resonator 16 MHz (optional)
2 Resistors 330 ohm, 10K
2 LED Green, Yellow
1 PushButton (Reset) Tactile Switch
1 Switching Diode Reset Pin Protection (Optional)
1 On-Off Switch (Optional)
2 Voltage regulators 5V and an optional 3.3V
2 ByPass Capacitors Electrolytic
1 Rectifier Diode Reverse Voltage Protection (Optional)
3 Ceramic Capacitors 0.1uF for High Frequency Noise Cancellation
n Hook-up Wires 22 AWG

To make it FTDI Compatible, you need to route the Tx, Rx, Vcc, GND wires where your FTDI Board can plug in while keeping track that the Tx needs to go into Rx of FTDI and vice-versa. Also, remember to add the Auto-Reset Functionality in the Board by including a 0.1uF Ceramic Capacitor between the Reset and DTR Pin of FTDI. If you prefer the In-Circuit System Programmer (ICSP), then you may route the Wires from MISO, MOSI, SCK, etc.

Or, you may choose an ArduBoard with All the above mentioned components in Surface Mount Form and of the Highest Quality especially chosen by keeping the level of Arduino in mind.


Voltage Inputs – A DC Jack as well as an empty header for connecting bare wires from an adapter. The input voltage range of the ArduBoard is 7V to 12V.
On-Off switch A simple On-Off switch. There is a silkscreen indicator with “ON” written on it.
Inter-Integrated Circuit (I2C) – Onboard I2C Header for connecting your I2C Devices directly from the board. Just connect the required Pull-ups and you are good to go. Take care that the Vcc pin of the I2C header is running at 3.3V.
Programming – There is an FTDI Port for connecting a programmer directly to the ArduBoard. A list of supported Programmers is given below:
FTDI board – SparkFun Electronics
USB2Serial Adaptor – Arduino.cc
ATmega8U2 Breakout Board – SparkFun Electronics
Remember, the Tx and Rx lines of the Board are already reversed for mating with the FTDI Board. Just Plug-n-Play.
In-Circuit System Programmer (ICSP) – These pins are used to bypass the Arduino Bootloader and directly program the ATMega328 Chip from a Compatible AVR Programmer. The MISO, MOSI and SCK pins can be accessed from the ICSP header for your SPI (Serial Peripheral Interface) Device needs.
Power Pins – There are different headers for 5V, GND and 3.3V, GND for easy interfacing. There are a lot of grounds on the Board so that you may never run out of Grounds!
LEDs – There is a Power LED (Green) that turns ON as soon as you switch on the ArduBoard. D13 pin has a yellow LED just like an Arduino Board. Remember the Blink Sketch!


Input Voltage – The input voltage range of the ArduBoard is 7V to 12V. It is capable of running at a minimum of 6.2V if input Voltage is supplied from the External Vin header. From the DC Jack, it will need a minimum of 7V as there is a Diode Drop involved. The ArduBoard will run from a 9V Battery or a Power Supply capable of running at 9V/ 1A. The absolute maximum voltage is 20V but don’t think of running the ArduBoard at 20V at all times. It is essentially for compensating the irregular spikes in your supply.
Diode – It is used for reverse voltage protection. In case you plug in the input supply backwards inverting the Vcc and GND. The diode also protects against Short Circuits.
5V Regulator – It is capable of supplying 800mA at normal load and even slightly above 1A in case you need it. But take care that the Board will get pretty hot and the Regulator circuit may even try to shut down the circuit. If you have the problem that your board switches off as soon as it is powered on, there might be a short in the circuit or your load might be sinking a lot of current.
3.3V Regulator – An onboard 3.3V Regulaotr is useful for your sensors, IMUs, etc. It is capable of providing your sensors or devices up to 300mA at 3.3V. The ArduBoard uses Analog Devices’ ADP122 LDO Regulator. You would be able to run an xBee Pro at full power (according to it’s Tech Specs, the Transmit Current requirement is 215mA @ 3.3V) with some external Sensors. Be aware, that you need a Logic Level Converter for connecting the Tx-Rx lines to-and-from the Din and Dout of xBee.
Capacitors – There are no Tantalum Caps on the Board, only Ceramic Caps. After the Dispute in the Democratic Republic of Congo about Coltan, the ore from which Tantalum is extracted, we have strictly transferred all our upcoming products to Ceramic Capacitors (no tantalums).
Reset – RESET pin has a 10K pullup resistor as well as a Protection Diode. According to the Official Atmel Application Note on AVRs (AVR042 – AVR Hardware Design Considerations), the reset pin is the only pin on the ATmega328 that is not protected for High Voltages because it supports High-Voltage/ Parallel Programming mode by drawing the reset pin HIGH (11.5V to 12.5V) for Programming. Thus, a Protection Diode is used.


1.) Plug-n-Play – Upload any sketch to your Arduino Uno R3/R2/R1 Board and then take out the ATmega328 IC. Plug it in your ArduBoard in the correct orientation and enjoy the power of Arduino in a compact footprint.

After completing your prototyping on the Arduino board, you can shift to ArduBoard for your Final Project.

2.) Programming – You will receive a Bootloaded ATmega328P-PU IC in the Kit when you purchase the ArduBoard. You then also have an option to program it via the FTDI Port (DTR, Rx, Tx, Vcc, GND, GND).

Just plug in any USB to Serial Board (FTDI Compatible) from any manufacturer and you will get USB Capability. You will now be able to debug your Program from the Serial Monitor. A list of supported devices is given below:

FTDI Basic Breakout – 5V – SparkFun Electronics
FTDI Cable – 5V – SparkFun Electronics
USB Serial Light Adaptor – Arduino.cc
ATmega8U2 Breakout Board – SparkFun Electronics

Remember, the Tx and Rx lines of the Board are already reversed for mating with the FTDI Board hence the names – RXin and TXout. For additional clarification, the Basic FTDI Color Coding is followed on the Board. There are two SilkScreen Indicators at the bottom of the board showing the correct orientation of the FTDI Cable – BLK and GRN. Just Plug-n-Play.

For an Introduction to Programming an Arduino Board, see our Tutorial on Arduino Beginnings.



The ArduBoard in Action with a Futaba S3003 Servo.


See it in Action:


Boarduino by Limor ‘Ladyada’ Fried.
Femtoduino by Fabio Varesano

Schematic and Design Files may be found here:

Schematic – .pdf
Eagle Schematic and Board Files – .zip
Gerber Data – .zip



ArduBoard is available in following versions:

ArduBoard
ArduBoard Kit – Not Assembled
ArduBoard Kit – Fully Assembled

You may discuss your hardware or software related queries at our Forum.



You will learn how to make a 5V Voltage Regulator on a BreadBoard to use in your DIY electronics projects. It will help you get started quickly by converting a regulated, unclean input Power Supply source to a regulated one.

An Empty BreadBoard. It is a standard 840 tie-point BreadBoard with two power rails. Nothing to do here, proceed to Step 2.


Power Rails – Breadboard showing power rails. Note that there are breaks in the inter-connections, so you need to put jumper wires to make your power supply available to all four parts of the Breadboard


Start Prototyping – A standard Breadboard showing internal connections of the power rails with some basic components

(see the arrows)


 

Voltage Regulator – The Voltage Regulator IC (LM7805) is used to regulate 7V to 15V unregulated power supply to regulated 5V supply for further connecting components like LEDs, Microcontroller, etc. Connect it in the same format, i.e. :

From Left to Right: Pin 1 – Input, then Ground and finally Output at Pin 3


 

Switch – You need to have control when you want the current to start flowing

  

Capacitors – They act as storage tanks for charge. So, You don’t have to worry about the noise coming in the supply or getting out.

This also explains the size difference. Fat one is 100µF and the smaller one is 10µF. They also have a voltage rating

written on them which tells the maximum voltage they can handle. One has 25V rating and the other has 15V rating

(Guess which?)


LED – Look at that standing in Elvis Presley style. This gives a visual feedback whether you are getting output or not.

Well, what about that little resistor down there?
Ans – It helps to limit the current going through the LED.

Does the resistor has any special value?
Ans – Well, you need to keep in mind that 330Ω will take you through any project with 5V rails.

Why only 330Ω?
Ans – Ohm’s Law


Diode – They allow the current to flow in one direction only, in the direction of the silver/white band. Thus, it prevents your circuit if you accidentally plug in the power supply reversed! ,i.e., positive to the negative and vice versa.

You will need a 1 Ampere rating diode – 1N4001 – 1N4007 (Any one will work. The only difference between these range of diodes is the maximum reverse Voltage that they can handle.)


Thermistor – A thermistor will protect the circuit from large currents. Typically, if the current is more than 500mA, a Positive Temperature Coefficient (PTC) Thermistor will heat up and its resistance will increase to bring the current flow down to 250mA. Then, after the problem is solved, like the most common case of a ‘short’ between power and ground, it will cool down and start working normally


You can also connect a DC Barrel Power Jack compatible with any common wall adapters (mostly 9V or 12V) to provide input power supply. The Regulated Output can be used from the Screw Terminals and can also be given to the bottom Power Rails.


Qty. Product Code Specifications
1 5V Voltage Regulator IC KA7805 or LM7805 KA7805 from Fairchild Semiconductor
1 9V Battery 9V or 6 x AA cells of 1.5V each
1 Switch On/ Off not Pushbutton
1 Capacitor 100µF / 25V Electrolytic Capacitor
1 Capacitor 10µF / 16V Electrolytic Capacitor
1 LED (Light Emitting Diode) Red/ Green Forward Current = 20mA
1 Resistor 330Ω Color Coding: Orange-Orange-Brown
1 Diode 1N4001 Reverse Protection Diode
1 Thermistor 500mA – PTC Positive Temperature Coefficient (not really needed)
1 Screw Terminals 2-Pin Optional

All the circuit diagrams are 

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

A tutorial to show the basic interfacing of two Servos with an Arduino. Here, the servos are controlled with a two-axis Joystick.


Schematic to show the wiring connections.


// Controlling movements of two servos using a Joystick
// Joystick's x- and y- axes are connected to A0 and A1 analog pins of Arduino.
// Servos are connectd to PWM Pins 9 and 10.
// By Explore Labs

#include <Servo.h>

Servo tilt, pan; // create servo object to control a servo 

int joyX = A0; // analog pin used to connect the X - axis of Joystick
int joyY = A1; // analog pin used to connect the Y - axis of Joystick
int x, y; // variables to read the values from the analog pins 

void setup()
{ 
  tilt.attach(9); // attaches the tilt servo on pin 9 to the servo object 
  pan.attach(10); // attaches the pan servo on pin 10 to the servo object void loop()
{ 
  x = joyX;    // reads the value of the Joystick's X - axis (value between 0 and 1023) 
  y = joyY;    // reads the value of the Joystick's Y - axis (value between 0 and 1023) 
  x = map(analogRead(joyX), 0, 1023, 900, 2100); // scale it to use with the servo b/w 900 usec to 2100 usec
  y = map(analogRead(joyY), 0, 1023, 900, 2100);
  tilt.write(x); // sets the servo position according to the scaled value 
  pan.write(y);
  delay(15); // waits for the servos to get there 
}

Here, we are going to start Physical Computing by controlling an LED using a light sensor. There will be two circuits which are very similar; First – LED lights up when there is light, and Second – LED lights up in the absence of light. Before we go on to the Arduino, i want to show and make this using the primitive techniques – Voltage Regulation, Transistors, etc.




You will need the following:

Qty. Product Value Specifications
1 LDR (Light Dependent Resistor)
1 LED (Light Emitting Diode) Forward Current, If = 20mA
1 Transistor BC547 – NPN
1 Resistor 220Ω or 330Ω both will work, but with 220Ω, LED will be more brighter
1 Resistor 1kΩ or 1000Ω or 1K
1 Resistor 10kΩ

Plus all the components from the Voltage Regulator circuit on a BreadBoard for converting your unregulated power supply to a circuit friendly voltage (Regulated 5V).



Case 1: LED lights up in the absence of light, i.e., in a dark room.

Case 2: LED lights up when there is light in the room and turns off if there is no light.




For both the cases, the circuit will be same. The LED is optional. If you really want some lights to flicker in your room, you can put it in pin 13 of your Arduino board with a 220Ω or 330Ω resistor as shown in the figure.


Case 1:

/*

  From Darkness to Light (Analog Input using an LDR)
 
 Demonstrates analog input by reading an analog sensor
 (here, an LDR) on analog pin 0 and turning on and off
 a light emitting diode (LED) connected to digital pin 13.
 The amount of time the LED will be on and off depends on
 the value obtained by the LDR using the analogRead() function.
 
 The circuit:
 * A Light Dependent Resistor (LDR) attached to analog input 0
 * one pin of the LDR is connected to the analog pin 
   and also through a 1K resistor to the ground
 * other pin of the LDR to +5V
 * Built-in LED at Pin 13 or an external LED connected as follows:
     LED anode (long leg) attached to digital output 13
     LED cathode (short leg) attached to ground
 
 Created by David Cuartielles
 Modified 4 June 2011
 By Explore Labs
 
*/

int ledPin = 13;            // the default pin where Uno's LED is connected
int ldrPin = A0;            // input pin for the LDR
int ldrVal = 0;             // variable to store value coming in from the analog pin

void setup()
{
  //Serial.begin(9600); // Debug: for serial communication to view output in your computer
  pinMode(ldrPin, INPUT);   // not necessary
  pinMode(ledPin, OUTPUT);  // declare pin 13 as output
}

void loop()
{
  ldrVal = analogRead(ldrPin);    // read value coming from the LDR

  //Serial.println(ldrVal, DEC); // Debug: un-comment if you want to see the output
                                  // in Serial Monitor

  digitalWrite(ledPin, HIGH);     // turn the ledPin ON
  delay(ldrVal);                  // wait for milliseconds
  digitalWrite(ledPin, LOW);      // turn the ledPin OFF
  delay(ldrVal);                  // wait for milliseconds
}

Case 2:

For the second case, i.e., to light up the LED in the presence of light, no change is done in the circuit. Only the code needs a little rework.

/*

  From Darkness to Light (Analog Input using an LDR)
 
 Demonstrates analog input by reading an analog sensor
 (here, an LDR) on analog pin 0 and turning on and off
 a light emitting diode (LED) connected to digital pin 13.
 The amount of time the LED will be on and off depends on
 the value obtained by the LDR using the analogRead() function.
 
 The circuit:
 * A Light Dependent Resistor (LDR) attached to analog input 0
 * one pin of the LDR is connected to the analog pin 
   and also through a 1K resistor to the ground
 * other pin of the LDR to +5V
 * Built-in LED at Pin 13 or an external LED connected as follows:
     LED anode (long leg) attached to digital output 13
     LED cathode (short leg) attached to ground
 
 Created by David Cuartielles
 Modified 4 June 2011
 By Explore Labs
 
*/

int ledPin = 13;            // the default pin where Uno's LED is connected
int ldrPin = A0;            // input pin for the LDR
int sensorVal = 0;          // variable to store value coming in from the analog pin
int ldrVal = 0;             // variable in which the rework, i.e., mapping is done
void setup()
{
  //Serial.begin(9600); // Debug: for serial communication to view output in your computer
  pinMode(ldrPin, INPUT);   // not necessary
  pinMode(ledPin, OUTPUT);  // declare pin 13 as output
}

void loop()
{
  sensorVal = analogRead(ldrPin);    // read value coming from the LDR
  ldrVal = map(sensorVal, 0, 1023, 1023, 0);  // to change the range of values from
                                              // 1023 to 0 (default was 0 to 1023) 

  //Serial.println(ldrVal, DEC); // Debug: un-comment if you want to see the output
                                  // in Serial Monitor

  digitalWrite(ledPin, HIGH);     // turn the ledPin ON
  delay(ldrVal);                  // wait for milliseconds
  digitalWrite(ledPin, LOW);      // turn the ledPin OFF
  delay(ldrVal);                  // wait for milliseconds
}

After uploading the codes to the board, if you want to see the output in the Serial Monitor, just uncomment the two lines of code starting with the keyword Serial. Then, while Arduino is running with any of the above codes, click on Serial Monitor.

The Serial Monitor showing the result of Case 1 with real time changes in values of the light falling on the LDR. (shown on Arduino 0022)





The Arduino has taken the world of electronics and microcontrollers by a storm. Due to Open Source, many makers and DIYers are following it and the Arduino community has become one of the largest community of DIYers in the world. The Arduino hardware reference designs are distributed under a Creative Commons Attribution Share-Alike 2.5 license and are available on the Arduino Web site.

There are many different variants of the Arduino board available in the market with the ever increasing number of shields growing day by day.

Arduino is the best example of “Physical Computing” meaning interacting with the real world objects using software and hardware. Physical Computing is a subject taught in many universities across the world.
References

Circuits were Made with Fritzing. For more circuit examples, see the Fritzing project page
Code – Analog Input from Arduino

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.


An open source hardware kit for the Makers in India.

The BreadBoard Power Supply fits right into your BreadBoard and powers its rails with either 5V or 3.3V.
After it is fully assembled, it can easily connect to the power rails of a standard 840 tie-point Bread Board. It takes its input from a standard wall adapter supplying 6 – 12V into the DC Jack of the PCB. And provides a regulated 3.3V or 5V output from a power selection jumper. The PCB is fully labeled and includes names and values of all the components needed and has a very High Quality RoHS Compliant Lead-Free finish. Get yourself an open source hardware in the form of BreadBoard Power Supply Kit.




The following components are present in the kit:

Bare PCB with Silkscreen Indicators
DC Barrel Connector (2.1mm center positive)
LM317 Voltage Regulator (TO-220)
Resettable Fuse – 500mA PTC
1N4007 Reverse Protection Diode
100uF 25V Capacitor
10uF 16V Capacitor
0.1uF Ceramic Capacitor
Power LED
SPDT Slide Switch
7 x 0.1″ Header Pins (2+2+3)
2 x 330 Resistor 1/4W
390 Resistor 1/4W
240 Resistor 1/4W
Open Source Hardware Logo (Cool!)



Some features of the Printed Circuit Board

Double-Sided PCB
FR-4 Fiberglass Reinforced Epoxy sheets
RoHS Compliant – Only PCB
Solder Mask – Green
Surface Finish – Immersion Gold
White Silkscreen Layer (Everything Labeled Clearly)






BBPS in Kit Form available at our Store.




The Schematic and Design files can be found here:
Schematic – .pdf
EAGLE Board and Schematic Files – .zip


The ADXL345 Chip from Analog Devices is a 3-Axis Accelerometer that measures static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion or shock.

Remember to connect the Vcc line of the Accelerometer to 3.3V of your Micro controller. Anything above 3.6V will burn the IC.

The Board supports SPI (3- or 4-wire) or I2C (2-wire) digital interface.

The 10K pull-up resistors help you to connect the SDA and SCL lines to 5V tolerant Micro controller pins like an Arduino Uno (running at 5V). This may shorten the life span of your ADXL345 hence, it is suggested to use a Logic Level Converter between the (5V) Microcontroller and the (3.3V) ADXL345.

Just connect this Board as shown in the pictures and enjoy creating advanced applications such as a pedometer like your cell phone does. [Video at the end].



The Schematic and Design files may be found here:
Schematic – .png
EAGLE Design Files – .sch and .brd



The 3-axis Accelerometer – ADXL345 pack includes:

Accelerometer 3-Axis ADXL345 Board
2x 10K Pull-up Resistors
4x Jumper Wires 12″ M/M
4×2 Breakaway Male Headers

The full pack can be purchased from: Store

Questions may be asked here (in the appropriate Sensors Category): Forum


Honeywell’s HMC5883L 3-Axis Magnetometer can measure both the direction and the magnitude of Earth’s magnetic fields. Think of it as a Digital Compass.

HMC5883L features low-voltage operation (2.16 to 3.6V) and low-power consumption (100 μA) thus an excellent choice for battery powered applications. It has 12-bit ADC that enables 1° to 2° compass heading accuracy. The Board supports I2C (2-wire) digital interface.

Applications: These tiny sensors are used in Cell Phones to detect your heading in GPS/Maps application. Their applications include and are not limited to Auto Navigation Systems, like Unmanned Aerial Vehicles for finding the Heading and Personal Navigation Devices.


According to Honeywell’s HMC5983 Datasheet (.pdf), the Circuit Board containing this sensor should not bear any Power or Ground plane/ traces on the Bottom side of the Printed Circuit Board below the sensor. Since the HMC5983 sensor is similar to the HMC5883L sensor (with an added benefit of SPI capability), we followed the guideline. Hence, the back side of our board looks like this:

The Board has Two Pull-Up resistors for SDA (Serial Data) and SCL (Serial Clock) lines. The suggested value for Pull-Ups is 2.2K.


Just connect our Board as shown in the pictures. It is suggested to use a Logic Level Converter between the (5V) Microcontroller and the (3.3V) HMC5883L Sensor. The default (factory) HMC5883L 8-bit slave address is 0x3C for write operations, or 0x3D for read operations.



The Schematic and Design files may be found here:
Schematic – .pdf
EAGLE Board and Schematic Files – .zip



The Magnetometer v2.0 can be purchased from: Store

Questions may be asked here (in the appropriate Sensors Category): Forum