Friday, 12 June 2015

BOOTLOADER HEX FILE FOR ARDUINO UNO

BOOTLOADER HEX FILE FOR ARDUINO UNO

I have given here the Bootloader Hex File for Arduino Uno R3 board. If the original hex file is corrupted at any time then you can use this file.

Hex:  

:107E0000112485E08093810082E08093C00088E1A6
:107E10008093C10086E08093C20080E18093C4001B
:107E200084B714BE81FFD0D08DE0C8D0259A86E0FB
:107E300020E33CEF91E0309385002093840096BBD3
:107E4000B09BFECF1D9AA8958150A9F7DD24D3944D
:107E5000A5E0EA2EF1E1FF2EA4D0813421F481E0E7
:107E6000BED083E024C0823411F484E103C08534A1
:107E700019F485E0B4D08AC08535A1F492D0082FDA
:107E800010E010930102009300028BD090E0982F35
:107E90008827802B912B880F991F90930102809344
:107EA000000273C0863529F484E099D080E071D057
:107EB0006DC0843609F043C07CD0E0910002F0919F
:107EC000010283E080935700E895C0E0D1E069D0DB
:107ED0008993809102028150809302028823B9F72E
:107EE00078D007B600FCFDCF40910002509101020E
:107EF000A0E0B1E02C9130E011968C91119790E0C8
:107F0000982F8827822B932B1296FA010C01D0927E
:107F10005700E89511244E5F5F4FF1E0A038BF078E
:107F200049F7E0910002F0910102E0925700E895D4
:107F300007B600FCFDCFF0925700E89527C08437C4
:107F4000B9F437D046D0E0910002F09101023196A9
:107F5000F0930102E09300023197E4918E2F19D043
:107F600080910202815080930202882361F70EC043
:107F7000853739F42ED08EE10CD085E90AD08FE018
:107F800096CF813511F488E019D023D080E101D05B
:107F900063CF982F8091C00085FFFCCF9093C600DF
:107FA0000895A8958091C00087FFFCCF8091C600FE
:107FB0000895F7DFF6DF80930202F3CFE0E6F0E00A
:107FC00098E190838083089580E0F8DFEE27FF2713
:107FD0000994E7DF803209F0F7DF84E1DACF1F93FD
:0E7FE000182FDFDF1150E9F7F4DF1F9108952D
:0400000300007E007B
:00000001FF

The above dumped hex can be copied into a text file and loaded that file into your new Atmega328P chip. To load the hex into your chip, there lot of methods are being used by the people. You can refer that in the web. In the next post, i will describe the complete way to load bootloader into the Atmega328P.    

A simple and minimal Atmega328P Target Board

A simple and minimal Atmega328P Target Board

The following circuit will definitely be helpful for any electronic hobbyists who seek a simple circuit useful for small small embedded applications such as domestic timers, PIR base lights on/off circuits, remote switches, burglary alarms, measuring instruments such as voltmeters, ammeters, LED Displays etc... The circuit is designed with minimum components so that the cost of fabrication of PCBs will be less and also for assembling the circuit, the expenditure will be less.  


  

Thursday, 11 June 2015

HOW TO USE TILT SENSOR WITH ARDUINO UNO

HOW TO USE TILT SENSOR WITH ARDUINO UNO

In this example, let us see how a tilt sensor can be interfaced with an Arduino Uno. Through this article you can imagine some applications where you can use these type of sensors. Through this tilt sensor, you can sense a tilt by means of any movement of normal and abnormal in nature.

What is a tilt Sensor?
Tilt Sensor allow you to detect orientation or inclination. They are small, inexpensive, low-power and easy-to-use. If used properly, they will not wear out. Their simplicity makes them popular for toys, gadgets and appliances. Sometimes they are refered to as " mercury switches", "tilt switches" or "rolling ball sensors" for obvious reasons. 

In construction, they are usually made by a cavity of some sort(Cylindrical is popular, although not always) and a conductive free mass inside, such as a blob of mercury or rolling ball. One end of the cavity has two conductive elements (Poles). When the sensor is oriented so that the end is downwards, the mass rolls onto the poles and shorts them, acting as a switch throw.

The diagram shows such sensor.


The following wiring diagram shows the Tilt sensor to be connected to the Arduino Uno.


The following diagram also shows the 3D view of connections of Arduino Uno with Tilt sensor at Pin no.2 and Led at Pin no.3

 
  
                    The following shows the Arduino sketch. Load the sketch into the Arduino IDE and run it, now shake the tilt sensor, the led connected to the Pin no.3 will become on and off depending upon your tilt.

int SensorPin = 2;
int LEDPin = 3;
int LEDstate = HIGH;
int reading;
int previous = LOW;
long time = 0;
long debounce = 50;


void setup()
{
pinMode(SensorPin, INPUT);
digitalWrite(SensorPin, HIGH);
pinMode(LEDPin, OUTPUT);
}

void loop()
{
int switchstate;
reading = digitalRead(SensorPin);
if (reading != previous)
{
time = millis();

if ((millis() - time) > debounce)
{
switchstate = reading;
if (switchstate == HIGH)
LEDstate = LOW;
else
LEDstate = HIGH;
}
digitalWrite(LEDPin, LEDstate);
previous = reading;
}

After loading the above sketch, incline the tilt sensor and the LED connected on pin 3 will turn on. If you have any problem please send feedback.