In this tutorial, we going to discuss how can we interface a microcontroller with the Bluetooth technology. The Bluetooth will work with an Arduino board through the serial communication. The data is received to the Arduino with the HC-05 Bluetooth module through the serial communication and the LED’s will turn ON/OFF according to the receiving data. There are different types of Bluetooth modules are available in the market, but here we are using the HC-05 Bluetooth module because it is commonly used.
Generally, we all known about shift register, combinational circuits and the other important element in the digital electronics is a counter. The counter circuits are used for counting purposes, and it is also used for measuring the frequency and time. The counter circuits are designed especially for synchronous sequential circuits. The state of the counter is equal to the count held in the circuit by the flip flops. The counters will calculate the number that how many times an event occurred. The counters are the crucial hardware components and they are also known as timers and these are the best examples of the flip flops. These are also used to design programmable timers.
What is a Counter Circuit?
Generally, the counter circuits are constructed by using a number of flip-flops which are connected in cascade. The manufacturing of counter circuits is separate integrated circuits and it is inbuilt in the part of larger integrated circuits. The counter circuits are widely used in the digital circuits. There are different types of counter circuits like synchronous counters, asynchronous counters, decade counters, ring counters, and Johnson counters.
Pin Configuration of AVR Atmega8 Microcontroller
The AVR Atmega8 Microcontroller consists of 28 pins and all the pins of the microcontroller will support two signals except 5 pins. From the 28-pins of microcontroller the port B pins are 9,10,14,15,16,17,18,19, the port C pins are 23,24,25,26,27,28, &1, and the port D pins are 2,3,4,5,6,11,12. The following image shows the pin configuration of the AVR Atmega8 microcontroller and description of each pin is described below.
Pin-1: RESET pin. If we apply low-level signals for a longer time than the minimum pulse length will produce the RESET pin
Pin-2 & 3: A serial communication in the USART
Pin-4 & 5: An external interrupt. From these two pins, one of the pins is active when an interrupt flag bit of the status register is set and the other pin will be active as long as the intruder condition succeeds.
Pin-9 & 10: An external oscillator pins as well as timer counter oscillators. The crystal oscillator is associated with the two pins directly. The pin-10 is used for lower frequency crystal oscillators or the crystal oscillators.
Pin-19: Used for the SPI-channel as a Master CLK o/p, slave CLK i/p.
Pin-18: A CLK I/P, slave CLK O/P.
Pin-17: Used for the SPI-channel as a Master data o/p, slave data i/p. When it is allowed by the master, it is used as an i/p when it is improved by the slave & bidirectional. This pin can also be utilised as an o/p compare with match o/p, which helps as an external o/p for the timer/counter.
Pin-16: Used as a timer or counter1 comparatively by ranging the PB2-pin as an o/p. It is also used as a slave choice i/p.
Pin-15: Used as an external o/p of the timer or counter compare match A.
Pin-23 to 28 is used as an ADC channel. Pin-27 is used as a serial interface CLK and pin-28 is used as a serial interface data.
Pin-12 &13: Analog Comparator Inputs.
Pin-6 & 11: Timer/counter sources.
Frequency Counter Circuit By Using ATmega16
The following circuit shows frequency counter circuit using the ATmega16 microcontroller. This frequency meter or counter is used to measure the frequency up to 4MHz because we are using an 8MHz clock for the ATmega16 microcontroller. The working operation of this circuit is to count the number of pulses of a signal in one second is simply the frequency counter circuit.
To count the pulses of a signal, we are using the timer1 of the ATmega16 and it will measure the frequency by using the normal mode. When we are starting the count pulses it makes a delay of one second, then we stop the timer and read it in the register which contains the number of pulses. If the timer1 is made an overflow then we are enabling the overflow interrupt of timer1 then we are going to count the number of overflows which are which are made by the timer1. The overflow means the timer1 has made 2^16 count. Therefore, by using the following equation the number of pulses in one second can be calculated.
Frequency = i*2^16 + TCNT1
From the above equation
It is used to calculate the number of overflows in one second. Reading the frequency meter is updated for every second.
Digital Stop Watch Using Atmega8 Microcontroller
The following schematic diagram shows the digital stopwatch using an Atmega8 microcontroller. The operational principle of this circuit is, in the starting stage the stopwatch is in the STOP condition and it is identified by through the blinking display. Generally, the counting stats from 00:00, if we press the START button then the count starts. If the watch is in the running condition then the display will not blink and the display will be on.
It will start counting and the mini seconds are displayed. By pressing the halt key the digital stopwatch is stopped, in the halt state the counting freezes and the display starts blinking. By pressing again START key the digital stopwatch starts from the resume counting. The RESET key is used to reset the clock and the clock starts from 00:00 i.e. 0 minute and 0 Sec.
Applications of Counters
- The counters are used widely in the flip-flops.
- It is used in the cricket stadiums to count the number of people entering & leaving the stadium or room or auditorium.
- The operations of microwave ovens and washing machines are by using the counters
- The counters are used in the digital electronic devices like the digital clock, analogue to digital converts, and digital triangular wave generators.
The information in this article is about simple counter circuits AVR Atmega8 microcontroller. I hope by reading this article you have gained some basic information on the counter circuits. If you have any queries about this article or about the implementation of electrical and electronic projects, please feel free to comment in the below section. Here is the question for you, what is the function of the counter circuit?
The term LCD stands for “Liquid Crystal Display” is made use of different types of devices like from small display devices to large display devices like calculator, TVs, etc. The advantages of the LCD display include size, low cost, power efficiency, etc. LCD display modules are usually found in all types of embedded devices. These displays even though look simple, but it is really hard to make it work. This display works with voltage pulses only with specific timing and also voltage levels. Hence special types of LCD drivers are implemented to drive the display. LCD module can be formed with two or more types of driver ICs together with the LCD screen which is normally found in embedded systems. This module makes a system separate which can take i/p and display the equivalent output. This specific project determines LCD interfacing with Arduino board.
There are different types of projects based on the temperature indicator. Now, here we are explaining about the temperature indicator with the LED display by using a temperature sensor. This project shows the use of a V/F converter monitoring temperature in degree Fahrenheit (F). The benefits of the LED temperature indicator are it can calculate the room temperature, atmospheric temperature, and body temperature. This article discusses the block diagram & circuit diagram of the LED temperature indicator.
Generally, in any kind of work, several tasks need to be done in the progression of meeting the purposes and goals intended at accomplishing through that effort. In addressing “what type of task need to be achieved”, numerous inputs and outputs and the complete contents of these tasks are defined and planned in a logical manner, which is jointly stated to as the “process”. In order to complete the expansion of software as a product, several types of tasks need to be achieved with layers like in any other productions. The activities estimated necessary in the making of a software development process will jointly become the so-called embedded systems development process when they are planned in a logical manner.
If you are preparing to build a Quadcopter but don’t know how to start, this comprehensive tutorial about Quadcopter helps you as much as. Building a Quadcopter consumes a lot of time and also effort. If you are an inpatient, afraid of a good budget, you can also buy a pre-built kit which is available in the market. But, making the arduino controlled Quadcopter gives you hands on experience otherwise, you will miss the fun part of building a Quadcopter. From selecting the required parts, for designing the circuits, you will be involved in every feature of building a Quadcopter. This article discusses how to build an Arduino board controlled Quadcopter.
Arduino Controlled Quadcopter
Quadcopter is basically a flying vehicle like a helicopter with four electric motors and also four propellers.When compared to other RC flying vehicles, this comes with the most stable platform. This is why these are perfect for filming and aerial surveillance. Quadcopters are available in different sizes and shapes From the small ones these can easily fit in the palm of your hand, to the big ones that are accomplished by lifting serious filming gear and gimbals.
Opposing to the traditional helicopter, Quadcopter relies on its 4-rotors to produce uplifting push by working together.Every rotor lifts around one sector of the whole weight, which permits us to use tiny and low cost motors.Basically, the movement controlling of the quad can be done by varying the amount of power every motor sends to propellers.
Required Parts of Arduino Controlled Quadcopter
In order to make the Quadcopeter, there are different parts are used such as frame, rotors, propellers, battery, Arduino, ESC, IMU and RC controller.
The frame is the basic structure of Quadcopter that grips all the components together, but it also has to be flexible enough to reimburse the vibrations the motors produce.The frame includes the following parts
- Center holding plate is used for mounting the electronics
- The required Arms are four
- Four motor brackets are used, so that we can connect the motors at the end of the Arms
The material used to make a frame is aluminum, wood, carbon fiber, but aluminum is the most used material for the arms. More exactly, the square hollow rails are finished of aluminium. They are somewhat lightweight, inflexible and inexpensive. But, since they are not identified as great compensator for the motor vibrations such as carbon fiber ones can confuse the sensors.
Carbon fiber gives much better immersion of the motor vibrations, and is the most inflexible one. But, it is the most exclusive one. Wood boards are also superior for motor vibration leaky, but are quite delicate and can break simply in the event of a crash.
The brushless DC motors are also known as electronically commutated motors (ECMs, EC motors). BLDC motor is most suitable for applications that require high efficiency , high reliability, more torque per weight, etc. These motors are almost the same thing as traditional DC motors, but they constructed using an integrated inverter / switching circuit instead of brush , which is used to achieve unidirectional torque.
That is why these motors are, sometimes, also referred as ‘electronically commutated motors. One of the most important factor while choosing a suitable brushless motor is “Kv-rating“, which gives the number of RPMs the motor is capable of generating on a certain amount of electric power. Also, we need motors that rotate counter-wise, so that they counteract the props torque effect.
Propellers generate thrust, and each motor needs one in order for the quad to fly . These propellers should mount on top of the each brush-less motor. The 4 propellers are actually not identical. The front and the back propellers are tilted to the right(clockwise), while the left and right propellers are tilted to the left (anti-clockwise).
The propellers can be available in various pitches and diameters. We have to choose them according to the size of our frame, and once we have decided which propellers we will use, only then we can choose our motors. Propellers are standardized, and here are the most used ones for quads:
- 5 pitch, 8 diameter – Small quads
- 8 pitch, 9 diameter – Small quads
- 5 pitch, 10 diameter – Medium-sized quads
- 7 pitch, 10 diameter – Medium-sized quads
In general when we are selecting propellers we can always follow these rules
The larger diameter and pitch the more thrust the propeller can generate. It also requires more power to drive it, but it will be able to lift more weight.
When using high RPM (Revolutions per minute) motors you should go for the smalle or mid-sized propellers. When using low RPM motors we should go for the larger propellers as we can run into troubles with the small ones not being able to lift the quad at low speed.
Electronic Speed Controller
ESC is the device that is in charge of controlling the motor speed is a cheap controller board, only used for motors. It comes with an i/p for a battery, and has a motor o/p with 3-phases, so for each motor you need four of them.
When you buy the proper ESC, you need to pay attention is the max current level that comes from the basis. Select a controller with 10A or advanced. Also, you need to check how the programming can be done, meaning that you need to purchase an ESC that will let you to change the frequency of the signal range to the required value.
‘LiPo’ battery is the most recommendable power source for Quadcopter. It is light weight, and the levels of current are perfect for your need. NiMH battery is inexpensive, but weightier and it is also a choice.
The voltage of the LiPo battery is a single 3.7V cell, or packed composed as one (up to 10 cells which offer 37V). The most current version among the drone hobbyists is famous as the 3SP1 battery, which comes with three cells and offers 11.1V.
IMU – Inertial Measurement Unit
The term IMU stands for “Inertial Measurement Unit” is an electronic sensor device that is used to measure the velocity, gravitational forces and orientation of the Quadcopter. The measurements of Quadcopter allow the controlling electronics to compute the changes in the speed of the motor.
The IMU is an arrangement of the 3-axis accelerometer 7 3-axis gyroscope, composed they signify a 6DOF IMU. Sometimes there is also an extra 3-axis magnetometer for superior Yaw stability.
The programming and controlling of the Quadcopters can be done in several ways, but the common one is an RC controller in a stable mode. The difference is the way the controller interprets the locations feedback together with an RC controller joystick.The gyroscope values are used in rate mode to control the Quadcopter. Then, the joysticks on RC TX are used to set and control the required rotation speed of the axes, though if we release the joysticks it doesn’t automatically re-balance. This is applicable when doing acrobatics with Quardcopter as we can tilt it a bit to the right.
The joysticks on your RC transmitter are then used to control and set the desired rotation speed of the 3 axes, though if you release the joysticks it does not automatically re-balance. This is useful when doing acrobatics with your Quadcopter as you can tilt it a bit to the right, release the joysticks, and then your Quadcopter will keep that fixed position.
For the learners the Rate mode might be too hard, and you must start with the Stable mode. All the sensors are used to control the Quadcopters orientation in the stable mode. The 4-motor’s speed will be familiar automatically and continued to keep the Quadcopter balanced. We can control & change the angle of the Quadcopter with every axis using the joystick. For instance, to go forward, you can simply tilt one of the joysticks to alter the pitch angle of the Quadcopter. When liberating the joystick, the angle will be rearranged and the Quadcopter will be stable again.
Thus, this is all about tutorial to build an Arduino controlled Quadcopter.Hopefully this article has given you a better understanding what every part of the Quadcopter does, and how to go about choosing the right product for your Quadcopter. Please do not hesitate to write a comment regarding this article or How to implement electrical and electronics projects, please give your feedback by comment in the comment section below.Here is a question for you, what are the applications of Quadcopter?
Day by day, technology trends are changing towards the world of allied devices. Computing will become more prevalent, and soon it won’t be incomplete to PCs & mobile phones. Modernization in connected devices will be determined not by big companies, but by industrialists that are able to cost-effective research using different platforms like the Arduino. If you aren’t aware with Arduino, check out this; Infographics: An overview of Arduino boards.If you’re considering to get into this world of microcontroller expansion and see what is possible with this technology. We have listed a few of Arduino projects here, that are suitable for beginners. The best Arduino projects for beginners should give you an understanding of the possibilities of this adaptable platform, and possibly give you particular motivation to dive into the world of device technology.
The rapid growth in science and technology offers several advantages of using integrated circuits, microprocessors, microcontrollers, embedded chips, etc., in designing electrical and electronics projects and circuits by reducing their size, cost, and complexity. Using these embedded chips and microcontrollers is increasing due to its simplicity and benefits. The microcontrollers can be programmed to perform various tasks based on requirement of the circuit operation. Thus, simply by changing program instructions various tasks can be performed by a single circuit without changing any hardware circuitry of the project. Thus, the application of microcontroller in science and technology is increasing rapidly. [Read more…]
An Arduino board is a one type of microcontroller based kit. The first Arduino technology was developed in the year 2005 by David Cuartielles and Massimo Banzi. The designers thought to provide easy and low cost board for students, hobbyists and professionals to build devices. Arduino board can be purchased from the seller or directly we can make at home using various basic components. The best examples of Arduino for beginners and hobbyists includes motor detectors and thermostats, and simple robots. In the year 2011, Adafruit industries expected that over 3lakhs Arduino boards had been produced. But, 7lakhs boards were in user’s hands in the year 2013. Arduino technology is used in many operating devices like communication or controlling. [Read more…]
Charles Stark developed embedded systems to reduce the weight of the projects by reducing its size and also resulted in the reduction of cost. There are plentiful applications in various fields, but, in this article let us discuss about embedded systems applications in real time. Primarily, we must know what is embedded system, embedded systems basics, embedded system design, types of embedded system, embedded systems applications in real time. [Read more…]