Skip to main content

Posts

Building a Quadcopter

Note: This is the start of the 'My Projects' section. This is where I post about the projects that I personally do. You can track my progress, my decisions and their outcomes for the problems I face and of course failures (sort of...). So, I hope you enjoy this as much as I do and please leave comments. Ever since I started building model aircrafts I wanted to build a Quadcopter (a.k.a. Quadrotor). I was fascinated by their agility, their simple design and control but need of a complicated stabilization system. The only thing that delayed me to build one is the relatively high cost for the components. But finally I found an opensource quadcopter project named AeroQuad ( link ) which was just within my budget. So, I started gathering my resources... The first thing I needed was a good Transmitter/Receiver pair, which turned out to be a problem because a good pair costs a lot. A quad will need at least a 4-Channel one. That's a bare minimum, so a 6-Channel one would be th...

Li-Po Batteries Explained - Part 4

Note: It's been about 2 months since I've posted the part 3 of this article. Sorry for being late with this part. I hope you have read my earlier articles on Li-Po batteries (Li-Po Batteries Explained Part 1 , Part 2 and Part 3 ). Now let's look at the most important part - charging and maintenance. First of all, why is this so important? Well, just watch the following video on what happens when you mistreat a Li-Po battery. So....., now that you've seen the dangers of Li-Po batteries, it should be clear that they should be handled with care. Li-Po's are very different from conventional rechargeable batteries, so you should only use a charger specifically designed for Li-Po's. Doing so will increase the life span of the Li-Po battery pack and yours as well.

How Hall Effect Sensors Work

If you have studied about brushless motors, you'll probably know that they need a electronic controller (ESC) to run. Since the ESC can't actually see how the motor is running,  it needs to somehow detect the orientation of the rotor (moving part) relative to the stator (stationary part) of the motor. The two most popular ways of doing this is to use a Hall Effect Sensor or to measure the Back EMF of the undriven coils. The Back EMF method does not require any additional sensors, but it's implementation is complicated and has to overcome several issues. The Hall Effect method is much simpler than that, but requires a Hall Effect Sensor near the rotor of the motor to operate. So, how does a Hall Effect sensor work? Simply put, it is a device that varies its output voltage based on changes on a magnetic field. The operation of the sensor is based on the Hall Effect which was discovered by Edwin Hall in 1879. The theory is explained as follows,  The Hall Effect

What is the meaning of the numbers on Brushless Motors?

If you go shopping for Brushless motors you will be confronted with a lot of numbers to choose. For an example, you would see motors marked with 3632 22turn 1500Kv, 2213 20turn 920Kv etc. So what does all those numbers mean, and how would you choose? Here's a simple guide... Let's take this motor for an example, Turnigy 2213 20turn 1050Kv Outrunner It's marked as "2213 20turn 1050Kv Outrunner". Let's see what it means. First of all, it's clearly written that this is an Outrunner motor. The "2213" indicates the size of the stator, First two numbers = diameter of the stator = 22mm Second two numbers = length of the stator stack = 13mm

How to get 2 PWM Signals from the same PIC Microcontroller - mikroC

Using a popular PIC microcontroller such as the 16F877A and a high level compiler such as mikroC, you can do a lot of things. In the last post I discussed about how to get a PWM signal based on an analog signal. Now let's try to do extend that and try to get 2 PWM signals from the same PIC chip. Why would you need 2 PWM signals? Let's say you are building a robot, and you have 2 motors that need to work independently. Or 2 servos you need to control separately etc. As you know, the CCP (Capture/Compare/PWM) module in a microcontroller is responsible for generating PWM signals. So, to get 2 separate PWM signals, you need a microcontroller with 2 CCP modules. If we look at the datasheet ( link ) of the 16F877A, we can see that it has 2 CCP modules (PIC16F87XA Datasheet - Section 8). So, now let's get our PWM signals... However, there's one thing you have to know when you use the 2 CCP modules together. If you look at Table 8-2 from the datasheet, when you configure...

Generating a PWM Signal Based on an Analog Input - mikroC

If you like to experiment with microcontrollers you've probably tried out analog-to-digital conversion and generating PWM signals. Using a popular PIC microcontroller like the 16F877A, which has both ADC and CCP (Capture/Compare/PWM) modules, you can test out both of these easily because mikroC provides easy to use library functions for both of them. (Most of you will be familiar with these libraries, so I won't be going in to much detail about them here. Leave a comment if you like to learn more.. :) ) Now, think of a scenario like this: You want to change the duty cycle of your PWM signal based on a analog signal. It can be from a variable resistor that you want to use to increase or decrease the duty cycle, or it can be a feedback from a sensor which is analog. So, how can we do it?... we simply use the ADC to convert the analog signal and use that value as the duty cycle value. All we need is a microcontroller that has both a CCP and a PWM module. As I said before, the...

Li-Po Batteries Explained - Part 3

If you've read my previous posts about Li-Po batteries (Li-Po Batteries Explained Part 1 and Part 2 ), you'll now understand the basics of Li-Po's. Now let's look at some standard ratings of Li-Po's that you'll need to consider when you buy them. Voltage A single Li-Po cell is rated at 3.7V. This however doesn't mean that the fully charged voltage of a Li-Po cell is 3.7V. Actually, Li-Po cells have a minimum voltage of 2.7V (fully discharged) and a maximum of 4.23V (fully charged). The 3.7V is just the average operating voltage of a single cell. Many Li-Po battery packs have two or more cells connected in series to provide higher voltages. The cell count of the battery pack is denoted by the 'S' number. A 2S battery pack means that there are 2 cells connected in series, thus providing 7.4V. Here are some examples of standard size battery packs: 1S = 1 cell x 3.7V = 3.7V 2S = 2 cells x 3.7V = 7.4V 3S = 3 cells x 3.7V = 11.1V and so on....