Skip to main content

Posts

Showing posts from January, 2011

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.

Li-Po Batteries Explained - Part 2

I explained about Li-ion batteries (the predecessor of Li-Po) in my earlier post ( Li-Po Batteries Explained - Part 1 ). Now let's see what these 'Lithium Polymers' are. Lithium-Polymer Batteries - The real ones Li-Po batteries - also known as Li-Poly, Pi-Pol, PLI and PLI - are a type of rechargeable batteries that uses same types of electrodes as the Li-ion batteries. The difference is with the electrolyte it uses. Instead of the liquid solvent used in Li-ions, Li-Po uses a polymer electrolyte. In the original design, which dates back to the 1970's, the electrolyte is a dry, plastic-like, thin film. It doesn't conduct electricity, but allows the exchange of ions between the electrodes. Theoretically, with this design, batteries could be made very thin (less than 1 millimeter) and to a variety of form factors. And because of the electrolyte being dry, the manufacturing process can be simplified and the safety of the battery will be higher because of no risk in

Make Your Own Jupmer Wires for Electronic Breadboard

Note: After starting the 'Tips and Tricks' section I wanted to do my own 'tutorial'. So, here's my first attempt of it. Hope you all find this useful, and sorry about the low quality of the photographs, my camera is just a 2MP. If you, like me, like to experiment with electronics, then you'd probably use an electronic breadboard (also known as protoboard or project-board). These allow you to construct and test circuits without the need to permanently soldering the components. The problem with these is that you have to use wires to connect the components across the bus lines. We normally use single core circuit wires for this purpose, but they tend to bend, break and get stuck in the breadboard when used repeatedly. This may cause short circuiting the bus lines and could be the failure of your circuit. A better option would be to buy a 'Breadboard Jumper Wire' kit, such as this. A Breadboard Jumper Wire Kit These have sets of wire of differ

Li-Po Batteries Explained

If you are interested in radio controlled aircrafts and stuff, you've probably heard about Li-Po batteries. They are very common in RC planes, cars, boats etc. because they have several advantages over other batteries like less weight, variety of form factors, high discharge rates etc. So what are these "Lithium Polymer" battries? How are they different  from the common Li-ion batteries (which are found on mobile phones etc.)? And most importantly, are they really "Lithium Polymer"? To understand these, we must first look at the more common Li-ion battery, and then move on to Li-Po batteries. Lithium-ion Batteries - The predecessor of Li-Po Lithium-ion batteries - also known as Li-ion or LIBs - is one of the most common types of rechargeable batteries used in consumer electronics. They are especially popular in portable electronic devices such as mobile phones. This is because they offer several advantages like high energy density, no memory effect, low se

Calculating the length of an array in mikroC

Note: This is the beginning of a new category on my blog, which it the 'Tips and Tricks' category. This is where I share small tips on all the other subjects I discuss here. On my post about RS232 communication using microcontrollers ( here ), I explained how to send and receive one character (one Byte) at a time. Now I wanted to send a whole string using RS232. Since a string is essentially an array of characters in C, we just have to loop through the array and send one char at a time as usual, which is done in the following code. char *mystr; unsigned int i; void main(){ Usart_Init(9600); mystr = "Testing"; for(i=0; i<5; i++){ Usart_Write(mystr[i]); Delay_ms(500); } } This works well when you know the length of the string and only one string needs to be sent. When there are several strings, writing a loop for each of them isn't a good programming method. The better way is to write a separate method to

How does a Laser 3-D Scanner Work

Here's a quick post about a few things I learned about laser 3-D scanners. In the classification of 3-D scanners, laser scanners fall in to the category of 'Non-Contact Active'. There several types of scanners in this category, but the most common type used is the Laser Triangulation scanner. These are used in scanning relatively small objects with high accuracy. How does it work? A triangulation scanner shines a laser dot to the object and uses a camera to look for the location of the laser dot. Depending of the distance from the laser emitter to the surface of the object, the dot appears at different places on the camera's field of view, as seen on the following diagram. Operating principle of a triangulation laser scanner

Understanding IR Remote Controls - Part 3

We talked about the basics of IR ( Part 1 ) and the SIRC protocol ( Part 2 ). Now let's see how RC 5 protocol works. RC 5 RC 5 was introduces by Philips. It uses IR pulses modulated to 36 KHz. The logic level encoding is simpler than in SIRC. RC 5 Logic Levels Logic '0' is represented by an IR pulse of 0.9ms and then waiting 0.9ms. Logic '1' is the complete opposite, 0.9ms waiting and then 0.9ms pulse. Therefore, both '0' and '1' have a similar 1.8ms pulse width. As in SIRC, a command in RC 5 is also sent as a data packet. Its structure is as follows. RC 5 Data Packet As you can see, RC 5 has 2 start bits, which are always '1'. The address part and the command part are 5 bits and 6 bits respectively. Their function is similar to those of SIRC. The bit marked as 'T' has a special purpose. If you press the same button of the remote several times, the 'T' bit will toggle between 0 and 1. If you press and hold the

Understanding IR Remote Controls - Part 2

In the last post ( Understanding IR Remote Controls ) I explained what IR is and why it is commonly used in remote controls. Now let's see some common encoding methods used in IR remotes. As you know by now, the IR signals emitted by remote controls are modulated to a frequency between 30 KHz and 60 KHz. In order to send a command, it has to be encoded in to this signal. There are several encoding protocols of which the SIRC protocol introduced by SONY and the RC 5 protocol introduced by Philips are used more commonly. SIRC SIRC stands for 'SONY Infrared Remote Control Code'. It used 40 KHz modulated IR signals. The logic levels (0 and 1) are represented by the width of the IR pulse. SIRC Logic Levels As you can see, the logic '1' is sent by a pulse of 1.2ms and then waiting 0.6ms. Similarly, logic '0' is sent by a pulse of a 0.6ms and then waiting 0.6ms. Those who are familiar will identify this as a sort of a pulse width modulation (I'll be

Understanding IR Remote Controls

When hearing the word 'Remote Control', the first thing that comes to most people’s mind would be the TV remote control. They have become so common that other devices - CD/DVD players, Fans, Air-conditioners, Refrigerators, Washing machines etc. - are also getting the same sort of remote controls. These days it's easy to find that almost all consumer electronic devices have a remote control. Almost all of these are IR remote controls. What is IR? IR, or Infrared, is an electromagnetic radiation that has a wavelength between 0.7 and 300 micrometers (frequency range between 1 THz and 430 THz). The Electromagnetic Spectrum There are several advantages in choosing IR for remote controls, such as: Low power requirements Low circuitry costs Simple circuitry Portability Few international regulatory constraints High noise immunity  However, there are a few disadvantages like requiring line of sight, blocked by common materials, short range and light and weather

Long Duration Timer Circuit

I was looking for a good timer circuit, one that can produce delays up to several hours. I did have few basic timer circuits that use the 555 IC, but they couldn't be used to effectively get a time delay of few hours because capacitors with low leakage currents are harder to find. So, searched on the internet for alternate solutions. I found a good circuit at a site named www.brighthub.com . It was a pretty simple circuit but the site claimed it can produce time delays from 60 seconds to maximum of 720 hours! I still haven't tested this out, but I have bought all the parts so I will start constructing it soon. Just thought of sharing the circuit with you in the mean time :) Here's the circuit Timer Circuit The circuit is pretty simple, only two CMOS ICs - 4060 and 4040. The S1 switch is used to select different time configurations and the 50k preset (R1) is used for fine tuning the time delay. The circuit operates on 230v but doesn't use a step-down transform

Picoflyer - Worlds Smallest RC Helicopter

I found this while searching about helicopters. Picoflyer Petter Muren, a Norwegian engineer has invented world's smallest RC helicopter. With just a rotor diameter of 60mm and a weight of just 3.3 grams, the Picoflyer can take off from the palm of your hand. While normal RC helicopters rely on gyros or sophisticated autopilot systems for stability, the Picoflyer uses a unique stability system (invented and patented also by Petter Muren). The Picoflyer relies on a passive-stability system that naturally tilts the ringed rotors to keeps the heli stable if it starts to lean one way. This new system adds no extra parts or weight to the heli. parts of the Picoflyer While intended to be a one-off prototype, the military, universities and hobby manufacturers have expressed their interest to it. The passive-stability system has already inspired a larger commercial RC helicopter named Bladerunner. The Bladerunner References  http://www.popsci.com/diy/article/2006-0

RC Helicopter Gyro Explained - Part 3

I hope you've read my earlier posts on helicopter gyro (RC Helicopter Gyro Explained - Part 1 and Part 2 ). Now let’s see how gyros are categorized by how they respond to yaw movements. Yaw Rate Gyros Yaw rate gyros (sometimes known as Standard Rate Gyros) are the simplest form of helicopter gyros. They work as a dampener to any yaw movements. This limits the amount of yaw movement because of torque variations from the main rotor, gusts of wind trying to turn the helicopter or even commands from the transmitter. A yaw rate gyro doesn't stop a heli turning because of external forces; it just limits them to a controllable amount. For an example, if a helicopter with a yaw rate gyro is hit by a sudden crosswind, it will slowly turn in that direction rather than a sudden spin, making it easier to keep it under control. Almost all the old mechanical gyros and few of the new piezo gyros are yaw rate type. They are mostly being replaced by the new Heading Hold Gyros. Headi

RC Helicopter Gyro Explained - Part 2

Now that we know what a gyro is (from the previous post) lets see how it applies to RC helicopters. Why does a helicopter need a gyro? The answer is - for stability. As you might know, in a helicopter the main rotor generates both the lift and the trust. Therefore the engine (or the main motor) has to provide a lot of torque to the rotor. Unfortunately, this torque not only spins the rotor but also spins the fuselage of the helicopter in the opposite direction. That's why a helicopter needs a Tail Rotor or a similar 'anti-torque' mechanism to cancel out the torque on the fuselage. To keep the helicopter stable the anti-torque mechanism must respond quickly to any changes in torque. But the problem is, the torque is always changing. Changes in the engine or motor speed, changing the pitch of the rotor or even gusts of wind change the torque and will try to spin the helicopter out of control. In a RC helicopter, manually adjusting the tail rotor for these constant ch

RC Helicopter Gyro Explained

I recently bought a RC Helicopter - a Falcon 8911 4-Channel  RC with a built-in Gyroscope (Gyro for short). It's the first time I've seen a 4-Channel RC helicopter, let alone a one with a gyro, in the Sri Lankan market. The heli was pretty good, although I still need more 'flight training'. I will do a separate post on my heli ;) The thing that interested me most is the gyroscope. I knew the basic concept of a gyroscope but didn't know how it applied to helicopters. So I did a little research on the internet and found out a lot about gyros. To others who are interested, here's what I've learned. First of all, what is a gyro? A gyroscope is a device for measuring or maintaining orientation (a.k.a. angular position). The most basic is the mechanical gyro. A mechanical gyro is essentially a wheel spinning at a high rated speed and whose axle is free to take any orientation. Based on the principles of conservation of angular momentum, the orientation of

Code for RS232 Communication

I was using mikroC for the coding because programming microcontrollers in C is much easier than using Assembly. The C code for RS232 communication is pretty easy. void main(){ USART_init(9600); // initialize USART module // (8 bit, 9600 baud rate, no parity bit... while (1){ if (USART_Data_Ready()){ // if data is received i = USART_Read(); // read the received data USART_Write(i); // send back via USART } } } You only need four methods to use the USART module (Universal Synchronous/Asynchronous Receiver/Transmitter). USART_init() method initializes the USART module and sets the bit rate etc. USART_Read() and USART_Write() methods can read and write one Byte of data at a time. USART_Data_Ready() is used to check whether the data has arrived. What this simple program does is read the data send by the computer and repeat it back to the computer one character at a time. While this program alone is not much of a use in pra

Remote Control Based on the RS232 Protocol

A few weeks ago I was studying PIC Microcontrollers and how to interface them with the computer using the computer serial port. This was possible because many PIC Microcontrollers such as PIC16F628 and PIC16F877 has a built in UART module (Universal Asynchronous Receiver/Transmitter) that enables serial communication using the RS232 protocol. The tutorial I used suggested the following circuit. To explain the circuit briefly, The PIC used is PIC16F628A. The MAX232 IC is used for the logic level translation. This is because the logic levels as well as the voltage levels on which the computer serial port and the microcontrollers work on are different.  These levels are illustrated below, Logic levels of the computer serial port Logic levels of the microcontrollers The MAX232 works as an interface between the microcontroller and the computer translating these logic levels. I'll discuss the code used for serial communication in the next post.