Posts

Measuring steps using the ADXL335 accelerometer

Image
In this project I will tell you how to make a simple fitness tracker (step counter) using Arduino. In this project we will be using a simple ADXL335 accelerometer to count the number of times our hand accelerates and decelerates and count it as one step. What does the ADXL335 do? The ADXL335 is a triple axis accelerometer with extremely low noise and power consumption  The and has a full sensing range of +/- 3g. It has a voltage consum ption of between  1.8 and 3.6Volts DC. The ADXL335 Materials required An Arduino uno An ADXL335 accelerometer A few male to femalejumper wires Making the Arduino connections The connections for this project are very easy. Connect the pin labelled VCC on the ADXL335 to the pin labelled A4 on the Arduino. You can also connect it to the in labelled 3.3V on the Arduino. Connect the GND on the ADXL335 to the  pin labelled A0 on the Arduino. You can also connect it eo the GND of the Arduino Connect the X_OUT on the ADXL335 to

Controlling DC motors with a L298n dual h bridge motor controller

Image
In this blog I will discuss how to control a DC motor with a L298n Motor controller. A L298n motor controller can be used to control the direction of a motor and also the speed of a DC motor. Materials required An arduino uno, Few male to male jumper wires, Few male to female jumper wires, A DC motor(in this project i used a 100rpm ,12 V motor), A l298n motor controller, A 9V battery , A Snap connector Making the Arduino connections Connect the In1 and In2 pins to pins to pins 7 and 8 on the Arduino. Connnect the ENA pin to pin number 5 on the Arduino. Connect the motor to the OUT1 and OUT2 pins located on the side of the motor controller Connect the 12V pin to the + terminal of the battery using the snap connector Connect the GND pin of the motor controller to the -terminal of the battery and the GND of the Arduino Connect the 5v pin on the motor controller to the Vin pin on the Arduino. The code The code for this project is pretty simple. if we

Understanding the Arduino Code

Image
Structure An Arduino sketch runs in two parts: void setup() This is where you place the initialization code that is the instructions that sets up the board before the main loop of the sketch starts. void loop() This contains the main code of your sketch. It contains a set of instructions that get repeated over and over until the board is switched off. Special symbols Arduino includes a number of symbols to delineate lines of code, comments, and blocks of code. ; (semicolon) Every instruction (line of code) is terminated by a semicolon. This syntax lets you format the code freely. You could even put two instructions on the same line, as long as you separate them with a semicolon.  comments(// or /*........*/) These are portions of text ignored by the Arduino processor, but are extremely useful to remind yourself (or others) of what a piece of code does. A comment can consist of one line or multi Constants Arduino includes a set of predefined k

Controlling LEDs with an IR remote

Image
In this post, I will describe how to connect your TV remote to Arduino through a simple IR sensor.  As you may be aware, the TV remote is based on the principle of using infrared light as the medium of communication. The IR LED is connected to the end of the circuit board of the remote and emits infrared light which is sensed by the sensor placed at the receiver of the TV. In this project, we will capture the IR light signals sent by the remote and use it to control LEDs in the way we want. The Completed Project Materials required Arduino UNO USB 2.0 Cable Type A/B Any TSOP IR reciever(in this project i used a TSOP1838 IR reciever) LED(s) IR remote (in this project we will use a TV remote, but you can also use any other IR remote) Jumper wires Breadboard Downloading the IR library Libraries are used to extend the Arduino environment. We need to install libraries to work with different sensors. The IR library can be downloaded from https://github.com

Getting started with Arduino UNO

Image
About Arduino Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the micro-controller on the board. In this blog, I will give you a brief description of the Arduino Uno board. Components of an Arduino Uno Analog Reference pin (orange) Digital Ground (light green) Digital Pins 2-13 (green) Digital Pins 0-1/Serial In/Out - TX/RX (dark green) - These pins cannot be used for digital i/o (digitalRead and digitalWrite) if you are also using serial communication (e.g. Serial.begin). Reset Button - S1 (dark blue) In-circuit Serial Programmer (blue-green) Analog In Pins 0-5 (light blue) Power and Ground Pins (power: orange, grounds: light orange) External Power S