Tuesday, March 17, 2009

Introduction To Robotics


An Introduction to Robotics Technology
warsayo writes "The word "robot" originates from the Czech word for forced labor, or serf. It was introduced by playwright Karel Capek, whose fictional robotic inventions were much like Dr. Frankenstein's monster - creatures created by chemical and biological, rather than mechanical, methods. But the current mechanical robots of popular culture are not much different from these fictional biological creations.
Basically a robot consists of:
- A mechanical device, such as a wheeled platform, arm, or other construction, capable of interacting with its environment
- Sensors on or around the device that are able to sense the environment and give useful feedback to the device
- Systems that process sensory input in the context of the device's current situation and instruct the device to perform actions in response to the situation
In the manufacturing field, robot development has focused on engineering robotic arms that perform manufacturing processes. In the space industry, robotics focuses on highly specialized, one-of-kind planetary rovers. Unlike a highly automated manufacturing plant, a planetary rover operating on the dark side of the moon - without radio communication - might run into unexpected situations. At a minimum, a planetary rover must have some source of sensory input, some way of interpreting that input, and a way of modifying its actions to respond to a changing world. Furthermore, the need to sense and adapt to a partially unknown environment requires intelligence (in other words, artificial intelligence).
From military technology and space exploration to the health industry and commerce, the advantages of using robots have been realized to the point that they are becoming a part of our collective experience and every day lives. They often function to relieve us from danger and tedium:
Safety - Robotics have been developed to handle nuclear and radioactive chemicals for many different uses including nuclear weapons, power plants, environmental cleanup, and the processing of certain drugs.
Unpleasantness - Robots perform many tasks that are tedious and unpleasant, but necessary, such as welding or janitorial work.
Repetition and Precision - Assembly line work has been one of the mainstays of the robotics industry. Robots are used extensively in manufacturing and, more glamorously, in space exploration, where minimum maintenance requirements are emphasized.
Mechanical Platforms - The Hardware Base
A robot consists of two main parts - the robot body and some form of artificial intelligence (AI) system. Many different body parts can be called a robot. Articulated arms are used in welding and painting; gantry and conveyor systems move parts in factories; and giant robotic machines move earth deep inside mines. One of the most interesting aspects of robots in general is their behavior, which requires a form of intelligence. The simplest behavior of a robot is locomotion. Typically, wheels are used as the underlying mechanism to make a robot move from one point to the next. Of course, some motive force required to make the wheels turn under command.
Motors
A variety of electric motors provide power to robots, allowing them to move material, parts, tools, or specialized devices with various programmed motions. The efficiency rating of a motor describes how much of the electricity consumed is converted to mechanical energy. Some of the mechanical devices that are currently being used in modern robotics technology include:
DC Motor - Permanent-magnet, direct-current (PMDC) motors require only two leads, and use an arrangement of fixed- and electro-magnets (stator and rotor) and switches. These form a commutator to create motion through a spinning magnetic field.
AC Motor - AC motors cycle the power at the input-leads, to continuously move the field. Given a signal, AC and DC motors perform their action to the best of their ability.
Stepper Motor - Stepper motors are like brushless DC or AC motors. They move the rotor by applying power to different magnets in the motor in sequence (stepped). Steppers are designed for fine control and will not only spin on command, but can spin at any number of steps-per-second (up to their maximum speed).
Servomotors - Servomotors are closed-loop devices. Given a signal, they adjust themselves until they match the signal. Servos are used in radio control airplanes and cars. They are simple DC motors with gearing and a feedback control system.
Driving Mechanisms
Gears and Chains - Gears and chains are mechanical platforms that provide a strong and accurate way to transmit rotary motion from one place to another, possibly changing it along the way. The speed change between two gears depends upon the number of teeth on each gear. When a powered gear goes through a full rotation, it pulls the chain by the number of teeth on that gear.
Pulleys and Belts - Pulleys and belts, two other types of mechanical platforms used in robots, work the same way as gears and chains. Pulleys are wheels with a groove around the edge, and belts are the rubber loops that fit in that groove.
Gearboxes - A gearbox operates on the same principles as the gear and chain, without the chain. Gearboxes require closer tolerances, since instead of using a large loose chain to transfer force and adjust for misalignments, the gears mesh directly with each other. Examples of gearboxes can be found on the transmission in a car, the timing mechanism in a grandfather clock, and the paper-feed of your printer.
Power Supplies
Power supplies are generally provided by two types of battery. Primary batteries are used once and then discarded; secondary batteries operate from a (mostly) reversible chemical reaction and can be recharged several times. Primary batteries have higher density and a lower self-discharge rate. Secondary (rechargeable) batteries have less energy than primary batteries, but can be recharged up to a thousand times depending on their chemistry and environment.
There are literally hundreds of types and styles of batteries available for use in robots. Batteries are categorized by their chemistry and size, and rated by their voltage and capacity. The voltage of a battery is determined by the chemistry of the cell, and the capacity by both the chemistry and size.
The robot platform runs off of two separate battery packs, which share only a ground. This way, the motor may dirty up one power source while the electronics can run off of the other. The electronics and the motors can also operate from different voltages.
Electronic Control
There are two major hardware platforms in a robot. The mechanical platform of unregulated voltages, power and back-EMF spikes, and the electronic platform of clean power and 5-volt signals. These two platforms need to be bridged in order for digital logic to control mechanical systems. The classic component for this is a bridge relay. A control signal generates a magnetic field in the relay's coil that physically closes a switch. MOSFETs, for example, are highly efficient silicon switches, available in many sizes like the transistor that can operate as a solid state relay to control the mechanical systems.
On the other hand, larger sized robots may require a PMDC motor in which the value of the MOSFET's "on" resistance Rds(on) results in great increases in the heat dissipation of the chip, thereby significantly reducing the chip's heat temperature. Junction temperatures within the MOSFET and the coefficients of conduction of the MOSFET package and heat sink are other important characteristics of PMDC motors.
There are two broad families of transistor - bipolar junction transistors (BJT) and field-effect transistors (FET). In BJT devices, a small current flow at the base moderates a much larger current between the emitter and collector. In FET devices, the presence of an electrical field at the gate moderates the flow between the source and drain.
Sensors
Robots react according to a basic temporal measurement, requiring different kinds of sensors. In most systems a sense of time is built in through the circuits and programming. For this to be productive in practice, a robot has to have perceptual hardware and software, which is updated quickly. Regardless of sensor hardware or software, sensing and sensors can be thought of as interacting with external events (in other words, the outside world). The sensor measures some attribute of the world. The term transducer is often used interchangeably with sensor. A transducer is the mechanism, or element, of the sensor that transforms the energy associated with what is being measured into another form of energy. A sensor receives energy and transmits a signal to a display or computer. Sensors use transducers to change the input signal (sound, light, pressure, temperature, etc.) into an analog or digital form capable of being used by a robot.
Logical Sensors - One powerful abstraction of a sensor is a logical sensor, which is a unit of sensing or module that supplies a particular percept. It consists of the signal processing, from the physical sensor, and the software processing needed to extract the percept.
Proprioceptive Sensors - Proprioception is dead reckoning, where the robot measures a signal originating within itself.
Proximity Sensors - A proximity sensor measures the relative distance between the sensor and objects in the environment.
Infrared (IR) Sensors - Another type of active proximity sensor is an infrared sensor. It emits near-infrared energy and measures whether any significant amount of the IR light is returned.
Bump and Feeler Sensors Another popular class of robotic sensing is tactile, or touch-based, done with a bump and feeler sensor. Feelers or whiskers are constructed from sturdy wires. A bump sensor is usually a protruding ring around the robot consisting of two layers.
Microcontroller Systems
Microcontrollers (MCUs) are intelligent electronic devices used inside robots. They deliver functions similar to those performed by a microprocessor (central processing unit, or CPU) inside a personal computer. MCUs are slower and can address less memory than CPUs, but are designed for real-world control problems. One of the major differences between CPUs and MCUs is the number of external components needed to operate them. MCUs can often run with zero external parts, and typically need only an external crystal or oscillator.
There are four basic aspects of a microcontroller - speed, size, memory, and other. Speed is designated in clock cycles, and is usually measured in millions of cycles per second (Megahertz, MHz). The use of the cycles varies in different MCUs, affecting the usable speed of the processor. Size specifies the number of bits of information the MCU can process in one step - the size of its natural cluster of information. MCUs come in 4-, 8-, 16-, and 32-bits, with 8-bit MCUs being the most common size. MCUs count most of their ROM in thousands of bytes (KB) and RAM in single bytes. Many MCUs use the Harvard architecture, in which the program is kept in one section of memory (usually the internal or external SRAM). This in turn allows the processor to access the separate memories more efficiently.
The fourth aspect of microcontrollers, referred to as "other", includes features such as a dedicated input device that often (but not always) has a small LED or LCD display for output. A microcontroller also takes input from the device and controls it by sending signals to different components in the device. Also the program counter keeps track of which command is to be executed by the microcontroller.
R/C Servos - Servomotors, used in radio-controlled models (cars, planes, etc.) are useful in many kinds of smaller robots, because they are compact and quite inexpensive. The servomotors themselves have built-in motor, gearbox, position-feedback mechanisms and controlling electronics. Standard radio control servomotors which are used in model airplanes, cars and boats are useful for making arms, legs and other mechanical appendages which move back and forth rather than rotating in circles.
Animatronic Systems
Animatronic systems are robotic systems which mimic and look like humans. An android is an anthropomorphic robot - in other words, a robot that looks like a human.
Pneumatics Pneumatics is the name for fluid power used in a large number of commercial robots. Pneumatics are also used in a variety of animatronic systems that fall under the category of fluid power. A more well known branch of fluid power is hydraulics. Visit the pneumatics Web site (see Resources later in this article) for additional information.
Open Source Robot Control Software
OROCOS (Open RObot COntrol Software) is an effort to start up an open source robot control software project. Broad discussions are being held about what experiences, code and tools can be re-used from other projects, what open standards should be integrated into the project and what organizational structure is most appropriate for the project. Goals of the OROCOS project are to develop robot control software with the following characteristics:
- Under open source and/or free software license(s),
- As modular as possible,
- Of the highest quality (from both technical and software engineering perspectives),
- Independent of (but compatible with) commercial robot manufacturers,
- For all sorts of robotic devices and computer platforms,
- Localized for all programming languages, and
- Featuring configurable software components for kinematics, dynamics, planning, sensing, control, hardware interfacing, etc.
The project aims to become more than just a copy of existing commercial robot controllers or robot simulation/programming packages. The goal of the OROCOS project is to develop shareable libraries, stand-alone components (sometimes referred to as software agents), and a configurable run-time environment from which to eliminate and control all distributed robotics systems. These types of projects are useful in several ways:
- For re-using code,
- For use as an independent sub-system,
- For copying their organizational structure,
- For learning from the experience of managing an open source project, and
- For designing and developing extensible and reusable software.
Open Source Matrix Libraries
The following are open source matrix libraries that satisfy the above-mentioned requirements. Octave is recommended, since it is GPL-licensed and delivers all required functionality.
GNU Octave - GNU Octave is a high-level language, primarily intended for numerical computations. It provides a convenient command line interface for solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with Matlab. It is easily extensible and customizable via user-defined functions written in Octave's own language, or using dynamically loaded modules written in C++, C, Fortran, or other languages.
GNU Octave is freely distributed software. You may redistribute it and/or modify it under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation. More detailed information about GNU Octave can be found by visiting the Octave Web site (see Resources).
GSL (GNU Scientific Library) - GSL is an ongoing effort to develop a modern extensive and ANSI C library for numerical computing. The GNU Scientific Library (GSL) is a collection of routines for numerical computing. The routines are written from scratch by the GSL team in ANSI C, and are meant to present a modern Applications Programming Interface (API) for C programmers, while allowing wrappers to be written for very high level languages.
GSL is free software. It is distributed under the terms of the GNU General Public License. Visit Red Hat's Web site (see Resources) for more information concerning GSL.
Real time kernels
Real-Time Linux (RTLinux) - RTLinux(TM) is a hard real-time operating system that handles time-critical tasks and runs Linux as its lowest priority execution thread. In RTLinux, the kernel shares one or more processors with standard Linux. This allows the system to run accurately timed applications performing data acquisition, systems control and robotics, while still serving as a standard Linux workstation.
RTLinux.org is the non-commercial RTLinux site for the open source user and developer community. Their sister site, RTLinux.com (see Resources), discusses commercial support and development.
eCos (embedded Configurable operating system) - eCos is an open source real-time operating system for deeply embedded applications. It meets the requirements of the embedded space that Linux cannot yet reach. Linux currently scales upwards from a minimal size of around 500 kilobytes of kernel and 1.5MB of RAM, before taking into consideration application and service requirements. The eCos open source project can be found at their Web site (see Resources).
RTEMS (GPL License) - RTEMS is an open source real-time operating system and environment for C, C++ and Ada95. It is distributed under the terms of the GNU General Public License. Visit the RTEMS site (see Resources) for downloads and more detailed information about RTEMS.
Utilities and Tools
ROBOOP (A robotics object oriented package in C++) - This package is an object-oriented toolbox in C++ for robotics simulation. Technical references and downloads are provided in the Resources.
CORBA - A real-time communications and object request broker software package for embedding distributed software agents. Each independent piece of software registers itself and its capabilities to the ORB, by means of an IDL (Interface Definition Language). Visit their Web site (see Resources) for technical information, downloads, and documentation for CORBA.
TANGO/TACO - This software might be useful for controlling a robotics system with multiple devices and tools. TANGO is an object oriented control system based on CORBA. Device servers can be written in C++ or Java. TACO is object oriented because it treats all (physical and logical) control points in a control system as objects in a distributed environment. All actions are implemented in classes. New classes can be constructed out of existing classes in a hierarchical manner, thereby ensuring a high level of software reuse. Classes can be written in C++, in C (using a methodology called Objects in C), in Python or in LabView (using the G programming language).
TACO was designed to be portable and runs on a large number of platforms (for example, Linux, Solaris, HP-UX, Windows/NT, Windows/95, and OS9). To download the source code and other technical documents visit their web site (see Resources).
Controllers
Task Control Architecture - The Task Control Architecture (TCA) simplifies building task-level control systems for mobile robots. "Task-level" refers to the integration and coordination of perception, planning, and real time control to achieve a given set of goals (tasks). TCA provides a general control framework, and is intended to control a wide variety of robots. TCA provides a high-level machine-independent method for passing messages between distributed machines (including between Lisp and C processes). TCA provides control functions, such as task decomposition, monitoring, and resource management, that are common to many mobile robot applications. The Resources section provides technical references and download information for Task Control Architecture.
EMC (Enhanced Machine Controller) - The EMC software is based on the NIST Real time Control System (RCS) methodology, and is programmed using the NIST RCS Library. The RCS Library eases the porting of controller code to a variety of UNIX and Microsoft platforms, providing a neutral application programming interface (API) to operating system resources such as shared memory, semaphores and timers. The EMC software is written in C and C++, and has been ported to the PC Linux, Windows NT, and Sun Solaris operating systems.
Darwin2K - Darwin2K is a free, open source toolkit for robot simulation and automated design. It features numerous simulation capabilities and an evolutionary algorithm capable of automatically synthesizing and optimizing robot designs to meet task-specific performance objectives.
Languages
RoboML (Robotic Markup Language) - RoboML is used for standardized representation of robotics-related data. It is designed to support communication language between human-robot interface agents, as well as between robot-hosted processes and between interface processes, and to provide a format for archived data used by human-robot interface agents.
ROSSUM - A programming and simulation environment for mobile robots. The Rossum Project is an attempt to help collect, develop, and distribute software for robotics applications. The Rossum Project hopes to extend the same kind of collaboration to the development of robotic software.
XRCL (Extensible Robot Control Language) - XRCL (pronounced zircle) is a relatively simple, modern language and environment designed to allow robotics researchers to share ideas by sharing code. It is an open source project, protected by the GNU Copyleft.
Open System Architecture for Controls within Automation Systems (OSACA) - OSACA is a joint European project that aims to improve the competitiveness of the manufacturers of machine tools and control systems in the world market. The main goal of the project is to specify system architecture for open control systems, which is manufacturer independent.
Author: Darrick Addison (dtadd95@bellatlantic.net)

55 comments:

Guru said...

Hi Aditya

Thanks for your help and pointers on my Robotics project. I am sorry that I did not mention couple of things in my earlier email

1) I am from Mumbai and Im sort of kicka$$ programmer in c++ but only at application level. But I have lots of interest in Hardware interaction
2)I used 8051 controller board looong time back but will revisit this to brush up my knowledge and skill

Your blogs are really cool and helpful and so was your earlier email.

Yes im still hoping to find 28 pin DIP socket (Narrow) one..I tried only one shop so far www.vishaworld.com but seems they dont have narrow one but standard 28 pin

heloitsadi said...

good to see that you are interested. If you have done some programming and implementation in 8051 you can go for other families of microcontrollers.

Just brush up your programming skills refer some example programs of basic robots and go for it.

Regarding the DIP availability. There are many shops at Lamington road where you can find the components. Some of the addresses where you can find it..

1.) NDS Components Dealers in Electronics Components
shop no. 5 , Ramakrishna Bldg , Chunam Lane ,
Lamington Road, Mumbai-400007
56357100/7200

2.) Bhagwati Enterprises (House of Ferrite core)
shop no. 114, 1st floor ,Gandhi Bhavan,
Chunam Lane, Off Lamington Road
Mumbai-400007.
256330560,223870760

3.) Component Masters
2,Yamuna Building , Tara Temple Lane
Off Lamington Road, Mumbai-400007.
23826278

4.) CEE PEE ELECTRONICS
Ground Floor, Goa Association Bldg.,
Opp. Sanson Electronics,358, Chunam Lane,
Lamington Road , Grant Road, Mumbai-400007
23825859

5.) Hi-tech electronics components
54/A, Jyoti Estate, Proctor road ,
Grant Road (E) Mumbai-7
23870106 , tech_hi@vsnl.com

6.) GALA Electronics
20, Kalpana Building, 1st floor,
357, Lamington Road,
Mumbai-400007
23863549 / 23854510 , vega@bom5.vsnl.net.in

7.) CENTRONICS
358,Chunam Lane ,
Dr D.B.Marg
Mumbai-400007
23813372 / 23828041

8.) KAYCEE Electronic
1, Ramakrishna Building Chunam Lane,
Of f. Lamington Road, Mumbai-400007
23882397 / 23876808

9.) Keltronix
4097, Bhandup Industrial Estate, Co.op Society,
Pannalal Compoound, L.B.S. Marg , Bhandup (w),
Mumbai-400078
25686974

10.) Kapil Electronics
21, Jalimsingh Bldg. , Chunam Lane,
Off Lamington Road , Mumbai-400007
23804133

11.) Silikon Electronics
351, Lamington Road, shop no. 4 ,
Kalpana Mansion , Opp Police Statoin,
Grant Road, Mumbai-400007
23850644

12.) REX Electronics
Shamrao Vithal Marg, Opp Kiln Post Office ,
Off Lamington road, Mumbai-400007
23876821 / 23892631

13.) Atlantic Sales and Service
2A.B, Hanuman Terrace , Tara Temple Lane ,
Lamington Road, Mumbai-400007
23896396 / 23896397



14.) Terra electrosoft,
101-103, sagar ratan indl. premises,
D-265, TTC indl area,
thane - belapur road,
turbhe naka
navi mumbai - 400 703.
tel:7902638, 7671298
terra@bom3.vsnl.net.in

14.) Surface Mount devices
16/181 shell colony
Chembur, Mumbai-400071

esemdee@bom3.vsnl.net.in
www.smdin.com

Guru said...

Wew..Thanks once again. This is pretty exhaustive list, I will definitely try this weekend.

Guru said...

Hi Aditya

Thanks for that list, i found the 28 pin dip narrow socket for ATmega8 MC. I think im really making small progress here but need small information (excuse me if its really silly question)

I purchased Standard Dual Ball Bearing Servo (http://robokits.co.in/shop/index.php?main_page=product_info&cPath=2&products_id=187) ,
can you please tell me its wire connectivity.
It has Orange-Red-Brown.

Assuming
Red = goes to +ve of battery which one goes to -ve and to Microcontroller?
Is Brown = -ve?? and Orange to MC? Site says nothing to say on this..or it may be some assumed standard that im not aware of??

Thanks
Guru, Mumbai

Guru said...

Sorry forgot to add, i also have usb programmer which has 6 pins and the site talks about 10 pins (some old one)..although my programmer has given pin description so I soldered them to correct dip pin..just by looking at both (MC and programmer pin diagram)..do you think i need to aware of anything more while doing this exercise?

heloitsadi said...

Your connection should be like this:
Red - (+)ve.
Brown - (-)ve.
Orange - Microcontroller.

Please do confirm it with the dealers also, they will definitely clear your doubt.
This link will also be useful:
http://www.mrrobot.com/images/ms455dgm.gif

heloitsadi said...

Regarding the programmer you need only 6-pin connection for it, if your programmer is attached with a 10-pin connector, just connect the desired pins only and leave other as it is. Please be more elaborative in your query if you face furthur problems.

Guru said...

Thanks a lot..I will make sure to include more details.

The seller told me this

Orange: signal
Red: +Ve
Brown: -Ve

so I think you were right...

as per Orange goes to MC? Is my interpretation correct?

heloitsadi said...

Yes go with this..

Guru said...

Hi Aditya

I am having small trouble here with the circuit(Actually more with language)..The author says

http://www.societyofrobots.com/step_by_step_robot_step3B.shtml

[see the para just above image sbs_connect1_large.JPG]
His words =>
First add the three 5 pin male headers and solder them in. Also, I want you to connect all the pins as you see in the image (or schematic). For the pins closest to the DIP socket, connect each one individually. For the outer rows, connect them in parallel, as shown. These parallel rows are your power buses (they 'bus' power around).

My 1st question here is more on "HOW"
1) When he says [I want you to connect all the pins as you see in the image] Is he referring to soldering of 2 pins together or connect them using "wire"..I am more confused with words here. Do I have to connect 2 pins using "wire"?? Or I have to connect those pins using solder ONLY only without wire??

My next question is more on "WHY" and I dont expect really an explaination from you as it can go to basics which I need to learn and figure out myself...but Can you give me some pointers ?

As of now i can follow some instructions blindly but someday i must know the reason and Sometimes Ignorance is Bliss!

Many Thanks for all your help so far..

Guru

heloitsadi said...

Hello GURU

Answer to Q-1:
As far as connecting with wire and connecting directly are concerned you can do either of these, if your controller DIP and male headers are very near on the PCB, you can directly connect them with solder itself and if far away then u can use wires. The Row1 of male headers is connected to controller DIP and the other two rows are connected in parallel means short each pin of individual row directly by solder (as they are very close to each other).
"They form the power bus" means you can make one of the rows as +Vcc and othe as GND.

Answer Q-2:
This is done so that you don't have to supply the +Vcc and GND at other places in the circuit saperately, you can just take connections from these rows to other parts, its same like in breadboards you have upper rows shorted horizontaly.

Hopefully you are getting what i explained. You are always welcomed to ask anything anytime. Let me know if it is not clear to you, i will try to elaborate it furthur.

Keep Roboting...!!!

Guru said...

Thanks buddy!!

I think 1st question was more of common sense (sorry to ask) but I read your reply again ...as my perfboard is so small 2 adjacent pins can barely be connected using wires. Ok I will have to solder them.

I think for 2nd - your example of breadboard clicked me..i recollected it from my college days. I think Im getting fair idea of what Im doing

I will keep you updated with my baby steps! and thanks again for all your efforts in reading and replying this.

Guru said...

Hi Aditya

I have finished 70% of with the circuit (thanks for help!) and also I understood the concept for each pins w.r.t my project...but I have one question (yes again :-)) w.r.t its programmer and power it needs.

I buy Programmer from robo-kits with 6 pins. It has USB interface from computer.

And the societyofrobots guy designed circuit with 9v (for Programmer or MC while writing on it) and 4.5/6 v with AA batteries for actual robot (Servo).

Do you think I need 9v separate supply and Why?..I couldn't find anything like this in documentation given by www.robokits.in for using Programmer.

Can you please explain ...As I know as Im reading it and moving step by step so I might not have understood the concept properly or read entirely.

Thanks
Guru

heloitsadi said...

Hello Guru

Please clear which programmer you bought, their are lots of 6-pin programmers available.

Regarding power supply your basic robot board will have a diffrent power supply but USB programmers (AVR High Speed USB Programmer) do not need any saperate power as the USB supplies +5V to the circuit.

Guru said...

Hi Aditya

I have bought this one

http://robokits.co.in/shop/index.php?main_page=product_info&cPath=12&products_id=54

Also the six pins are like this
GREEN-MOSI
YELLO-MISO
ORANGE-SCK
RED-RESET
BROWN-VCC
BLACK-GND

and I have soldered them to my MC already except Brown and Black which i will do it to those parallel bridge at the both edges of circuit as you explained in earlier post (breadboard e.g.!)

I hope Im doing right.

heloitsadi said...

Yes their is no need of any extra battery for this programmer. You'r right keep it going...

Guru said...

Hi Im back with one more doubt

In the last step it says to add ceramic capacitor between AVCC and GND..how do I connect this capacitor? and what purpose it achieves?

http://www.societyofrobots.com/step_by_step_robot_step3B.shtml (second last picture on this page)

heloitsadi said...

Welcome back...

AVCC is a saperate supply for the ADC (Analog to Digital Converter) of Atmega. Now the ceramic capacitor is connected to maintain stability in the circuit and to reduce the noise signals (infact you can memorise this that whenever unpolarized capacitors are connected in any circuit most of the times their job is to reduce noise and achieve stability).

As far as connection.. just connect one of the leg of capacitor to AVCC and the other to ground (GND).!!! Simple!!!.. do also connect AVCC to AREF because it sets the refrence voltage for your ADC as 5V.

Keep posting...

Guru said...

Hey many thanks..its been hectic 2 weeks...so is it something i did as lab experiments in physics with low pass and high pass filters?

Guru said...

Just for other peoples reference ....i found this one

http://winavr.scienceprog.com/example-avr-projects/programming-avr-adc-module-with-winavr.html

heloitsadi said...

You can try these as well:

http://www.thinklabs.in/resources/?p=64

http://extremeelectronics.co.in/avr-tutorials/using-the-analog-to-digital-converter/

Guru said...

Hi Aditya

I'm thru' with my circuit (hope so and its looking ugly!) and i need a method to check if its correctly soldered and wired.

1) What is best way to check w/o power supply? I have digital multimeter but dont know which points to check and for what

2) If i attach power source (e.g. 6.2 V i.e. 1.2 v AA batteries)? will it be ok? I dont want to fry it up..also dont want to add my MC yet

3) This is more about battery usage in circuit.
I have 4+ AA NiH 2100mAH cells. How can I make them use for this circuit with 2 male-header pins.
Once I do crimping on them ..how can i recharge them because then I have to tape them..Im not sure about this procedure either.

Again looking for your help!

Thanks
Guru

heloitsadi said...

Hello Gur
Congratulations for being done with the circuit. Now start the troubleshooting.

Ans1: Ragarding the circuit check, you can use your digital multimeter which has a continuity terminal (a kind of diode with buzzer sign must be their), set the multimeter nob at it and try checking for short points, if its buzzer gives the beep means those 2 points are connected with each other. This way you can check.

Ans2: Its bit risky for the controller to give it 6.2V, you can use it what you just have to do is just add a diode in forward biased mode between the batteries (+)ve terminal and the battery connector. The diode will offer a 0.7V voltage drop and the voltage going to the controller will be now 5.5V and its safe now.

Ans3: A 4-battery inserter is available in the market (Rs5 approx) you can use it.. it has the connector also and keep the batteries in series, so adds the potential and will make it to 4.8V. But why do you need this battery, go with the previous one (1.2V AA batteries), coz 4.8V may slow down the processing, coz ideal voltage to work upon is 5V.

Hope you got all this, Get back if you need any further clarification.

Keep it going... wishes

Guru said...

Thanks about this multimeter idea..i never knew it!!!
..no wonder i found glitch in my circuit already.. my + and - bridge are connected :-0
..I think i dropped soldering coil too much..but couldnt get it removed even with desoldering machine since its really tiny.

As I suggested you earlier you should have something more on you blog about this!! for newbies like me :-)

About my point 3..can you suggest me how can i create my own battery pack with desired voltage or any article about it?

Thanks a lot..will update you
g

heloitsadi said...

Ya i am trying to get something relevant.. and these messy circuits happen .. when its first time.. don't worry.. just carefully keep the soldering iron over the messed up area and try to melt the extra paste and then remove with some forcips etc.. etc...

You can also go for de-soldering thread available in the market.. the shopkeeper will give u an idea how to use it..!

If you have 1.2V cells you can only create battery packs with voltages ranging in multiples of 1.2V. SO you can take as many batteries connected in series according to voltage you wan't... and then reduce the voltage levels to desired value by introducing some voltage drop bringing components (one is diode).

Otherwise make a battery pack with voltage of 12V (10 x 1.2V).. and use 7805IC, its a voltage regulator.. it gives 5V output whenever its input is greater then 7.5V.

Why 12V?
you can then supply direct 12V to your motors to maintain their RPM.. because general geared DC motors used are of 12V rating.

Guru said...

Ok so I already have L7805CV voltage regulator just after my 2 pin voltage supply...so I shouldnt be worried?!! and also the same is going to my motors Pin -2 and 3 of MC and rest to +ve and -ve supply...

I removed extra solder paste as much as i can and tested with buzzer option ..looks ok..

..is there any quick way i can see my circuit LED light up?..Im too eager to see it..

heloitsadi said...

Its OK then.. just keep a note that the input voltage to 7805 is atleast 7.5V, otherwise you will not get the 5V output..

Guru said...

Hi Aditya

Can you suggest me good battery to buy along with Charger. I found this one of 8.4 Volts

http://www.nex-robotics.com/products/batteries-and-chargers/lithium-ion-8.4v-660mah-rechargeable-battery-pack.html

http://www.nex-robotics.com/products/batteries-and-chargers/lithium-ion-battery-charger-with-adaptor.html

but this pack has small mAH value so wont last long.

Do you think its good to have them in kit? or can you suggest me one?

heloitsadi said...

Ya you can go with it.. but if current rating is bothering you... this one can be another option..

http://thinklabs.in/shop/product_info.php?cPath=33&products_id=124

Guru said...

Hi Aditya ..one more trouble

Im using Robokits USB Programmer for my this project for Atmel8 MC. I have my circuit properly ( at least I checked with Multimeter - buzzer option you said).
Also Im not using any external DC power supply as I will be getting it from this USB programmer itself.

Now when Im trying to upload my hex file I get an error saying

avrdude.exe: stk500v2_command(): command failed
avrdude.exe: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude.exe done. Thank you.


Im using USB HID connection on my Vista laptop.

Can you suggest me any obvious steps I should look into or How can I debug this.

Thanks
Guru

Guru said...

Please dont bother to answer to my last comment..i think i found something obvious goof-up in my circuit...BRWON from Programmer pin should go to VCC of MC..as I have mine is going to the bridge of VCC (mainly used for 3 pin header for Photoresistor) and then this bridge is connected to other (parallel) bridge to opposite side of 3 pin header (which is again used for dual Motor)..so basically no VCC is going to MC VCC!!...

Let me check and comeback

thanks
Guru

Guru said...

Hi Aditya

Now I corrected my circuit but still error is same..seems like he is not able to find the MC

avrdude.exe: stk500v2_command(): command failed
avrdude.exe: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude.exe done. Thank you.

Im using USB HID connection on my Vista laptop.

I have

Guru said...

Hi I have done more debugging and now when I issue the command below

avrdude -c stk500v2 -P robokitsusbprog -p m8 -D -U flash:w:"C:\Guru\Code\Robotics\$50 Robot\Photorove_v1\Photovore_v1.hex":a -v

I get error as

avrdude: Version 5.5, compiled on Aug 24 2008 at 01:59:59
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

System wide configuration file is "C:\WINAVR\bin\avrdude.conf"

Using Port : robokitsusbprog
Using Programmer : stk500v2
avrdude: robokitsusbprog_open(): Device not found.


Now Once I REMOVE my 6 pin connector from my circuit and issue the command i get lots of other details and Red LED from Programmer blinks..but it eventually fail saying

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this che
ck.

Which is OK.

Still not able to figure out why!?

heloitsadi said...

"initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check." This error is generally encountered due to loose connection problem only. Just do some continuity test between microcontroller pins and the programmer connector. Specially "Ground connection should be proper".

If failing to debugg, i suggest you to contact the place from where you bought the programmer, they can guide you better.

Guru said...

sorry if my earlier post was confusing..Im getting this error when I try to upload my hex file.

Using Port : robokitsusbprog
Using Programmer : stk500v2
avrdude: robokitsusbprog_open(): Device not found.

but after removing the 6 pin header I get the initialization error..which is right as im not connected to MC.

Yes I asked this to Robokits vendor also but i got confused as document says STK500 mode is not supported in Vista but the command it submits to avrdude is

avrdude -c stk500v2 -P robokitsusbprog -p m8 -D -U flash....

Not sure whats going on

heloitsadi said...

Go with them, try on XP, it may be bacause of the platform also, actually every programmer has its unique specifications, so manual can only give you the right way and as such command

avrdude -c stk500v2 -P robokitsusbprog -p m8 -D -U flash

is seems to be all right..

Guru said...

Hi Aditya

I reworked my circuit all over again but still no breakthru'. I know it difficult for you to just speculate w/o looking at circuit..but here my troubleshooting

1) when I connect my programmer I get voltage across +ve and -ve as 2.6 to 2.8 V which I thought should have been 5V??

2) When I still use the -F switch to override the init.() check I get below error Can you explain what does that mean

avrdude.exe: Device signature = 0x0000ff
avrdude.exe: Expected signature for ATMEGA8 is 1E 93 07
avrdude.exe: safemode: Verify error - unable to read lfuse properly. Programmer may not be reliable.
avrdude.exe: safemode: To protect your AVR the programming will be aborted

avrdude.exe done. Thank you.

Device signature keeps on changing everytime I fire the command.

3) I was thinking that my LED which is connected to Pin 7 (VCC) and Pin 6(XCK/T0)PD4 will glow as soon as I connect the programmer ..what is the purpose of connecting it?

Guru said...

I checked the voltage again and now after a 1 min or so im getting 5.02 V consistent and my 7805IC voltage regulator is also heats up. Now where my programmers VCC (brown wire) is connected to +ve bridge and the same bridge is connected to o/p pin of Voltage regulator and the volatge to that pin is also ~~5.02 V. There is no external supply to i/p pin of my Voltage regulator as my programmer doesnt need it

My programmer has 12MHz of external clock so my circuit

but error is still same in -F switch

avrdude.exe: safemode: Verify error - unable to read lfuse properly. Programmer may not be reliable.

Guru said...

Hi Its me again! :-( one more observation...

I have connected AREF (21) and AVCC (20) but avdude tells me that

Programmer Type : STK500V2
Description : Atmel STK500 Version 2.x firmware
Programmer Model: STK500
Hardware Version: 1
Firmware Version: 2.04
Topcard : STK501
Vtarget : 4.8 V
Varef : 0.0 V
Oscillator : 1.229 MHz
SCK period : 2.2 us

varef - 0.0V shouldnt it be be eqaul to Vtarget?

I checked the voltage across -ve and aref it reads as 5.02 v when connected to programmer.

Guru said...

ADITYA Whoopee!

I flashed my hex program on Atmega8!!!

I just replaced the Atmega8 chip with new one and used my old XP machine and it worked with charm..

Thanks for all your patience with my resolving my doubts ( and still few are there ;-) ) and help...I think I couldnt have reached upto this stage without your help and guidance..

Now next step is Robot Mechanics and still some little electronics to work with!!

Thanks buddy!
Guru

heloitsadi said...

Congratulations GURU, finally you did it. Please keep posting about your and further work. Also do post some video or snaps links of your work if you manage any..

Reagarding your earlier doubts i think its the fusebits settings which was troubling you, can't tell exactly but you can refer to Atmega8 datasheet.

CHEERS!!!!!

Guru said...

Hi Aditya I got some questions regrading circuitry

1) Why LED is connected to Pin 6 (XCK/T0) datasheet says its UART but i used USB ..I dont understand its use.

2) The program that uploaded and when I read it back from ATMEGA8 i see the size difference of few bytes ..Im not sure why

3) Photoresistors that i need attach..would they be easily done..site said if you want you do the crimping on them

http://societyofrobots.com/schematics_photoresistor.shtml

Not sure but looking for easy way out here..

4) When I power up my circuit will not be required to have external clock to work? does MC have internal clock..may be i need do more education/reading myself but thought to be quick questions for you!

And yes once I get the whole thing work I will have it explained and uploaded somewhere..!!

Thanks
Guru

heloitsadi said...

Hi Guru

I was a bit busy these days, so sorry for delay in replies. Actually i think i also have to do some homework before replying to your queries.

I am looking for your answers and will get back to you as soon as i got something for you.

Meanwhile regarding the crystal thing the Atmega have an internal crystal of 1Mhz and the external crystal is only active when we do sertain fusebit settings through programming(do refer to Atmega8 datasheet, for that).

Cheers!!!

Anonymous said...

Hi Aditya,

I am Peter from Pune.

thanks for posting valuable information in this site. I am a novice in elec. and would like to know how to programme a PIC and where can i get a PIC programer.

2) I would like to build a CNC 3 axis machine. how to connect the stepper motors to serial port? and which software to use for the same.

I will be grateful if you could answer my querries. Sorry to bother you.

thanks in advance.

peter_s_franklin_2003@hotmail.com

heloitsadi said...

Hi Peter,

Sorry for the late reply.

I have not worked on PIC, so am not able to provide any manual or so, but you can google out for PICs they are very common uCs, you can get a lot of stuff about programming PICs.

Regarding connection of stepper motor, you have to UART port of the uC through which you can control the motion of Stepper.

Regards,
Aditya

chain pulley block manufacturer India said...

Manufacturer,Exporter,Supplier of chain pulley block,triple spur gear chain pulley block from India - MAX INDUSTRIES - Visit online business catalog for chain pulley block manufacturers,chain pulley block exporters,chain pulley block suppliers

Unknown said...

Thank u for sharing with us.N. K. Engineers was established in the year 1966 at Ahmadabad in the state of Gujarat, India. N. K. Engineers are into the business of Manufacture, Export, Wholesale and Trade of Double Girder Eot Crane, Single Girder Eot Crane, Chain Pulley Block, Electric Wire Rope Hoist, Jib Crane etc.Chain Pulley Block.

Unknown said...

This blog is nice.N. K. Engineers was established in the year 1966 at Ahmadabad in the state of Gujarat, India. N. K. Engineers are into the business of Manufacture, Export, Wholesale and Trade of Double Girder Eot Crane, Single Girder Eot Crane, Chain Pulley Block, Electric Wire Rope Hoist, Jib Crane etc.Chain Pulley Block.

Mandeep Singh said...

Aditya., can u help me .
Im makin a wired remote controlled multiple function robot , I have 1 month

portable stair stepper said...

Found this link while searching Google, thanks

iniyan said...

Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.
Surya Informatics

Uvaska said...

I am sure that you will come up with such relevant posts in the future as well. I anticipate your next post.
Custom/Special Purpose Machines in India | Gantry Robots in India | Contract Manufacturing in India

Techimpero said...

Amazing post. Edgemotion is a well-known trader, wholesaler and retailer of gearboxes and robots in Delhi. To supervise work process systematically, we have hired a team of trained professionals who create various services like Servo planetary, Strainwave gearboxes, Six axis collaborative robot, Pic & place gantry robot, AGV etc.

For More Information:
Contact Us: Edgemotion
Email: info@edge.in
Website: https://edgemotioncontrols.com
Phone: 9971097990

Jagdish Prajapat said...

Great information!

Read more here related robotics teacher training in India.

Thanks

Anonymous said...

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own Blog Engine blog now. Really the blogging is spreading its wings rapidly. Your article is a fine example of it.
Data science classes in pune
Data science course in pune
Data science training in pune