4 Legs Walking Robot Tutorial

March 23rd, 2008 by Robot Technology | 9 Comments | Filed in Electronics, Mechanics, Microcontroller, Programming, Robotics Tutorial, Sensors

4 Legs walking Robot

Another robot project you can find here:

======================================

Introduction
Once I made this robot to get some study points while I was studying at the Technical High school in Rijswijk, the Netherlands. I made this in my limited free time, that is why it took me about a year to finish the project. A lot of the used techniques where new, so the research took a lot of the time, but is also the reason why this project had great value to me.

Target
Before I started developing the robot I made a few targets:

Tags: , , , , , ,

Interfacing Microcontroller with PC Keyboard

March 22nd, 2008 by Robot Technology | No Comments | Filed in Microcontroller

Why would you want to interface the Keyboard? The IBM keyboard can be a cheap alternative to a keyboard on a Microprocessor development system. Or maybe you want a remote terminal, just couple it with a LCD Module.Maybe you have a RS-232 Barcode Scanner or other input devices, which you want to use with existing software which only allows you to key in numbers or letters. You could design yourself a little box to convert RS-232 into a Keyboard Transmission, making it transparent to the software.

An interfacing example is given showing the keyboard’s protocols in action. This interfacing example uses a 89s51 MCU to decode an IBM AT keyboard and output the ASCII equivalent of the key pressed at 9600 BPS.

Note that this page only deals with AT Keyboards. If you have any XT keyboards, you wish to interface, consider placing them in a museum. We will not deal with this type of keyboard in this document. XT Keyboards use a different protocol compared to the AT, thus code contained on this page will be incompatible.

PC Keyboard Theory

The IBM keyboard you most probably have sitting in front of you, sends scan codes to your computer. The scan codes tell your Keyboard Bios, what keys you have pressed or released. Take for example the ‘A’ Key. The ‘A’ key has a scan code of 1C (hex). When you press the ‘A’ key, your keyboard will send 1C down it’s serial line. If you are still holding it down, for longer than it’s typematic delay, another 1C will be sent. This keeps occurring until another key has been pressed, or if the ‘A’ key has been released.

Tags: , , , , ,

Driving Stepper Motor

March 22nd, 2008 by Robot Technology | No Comments | Filed in Electronics, Mechanics, Microcontroller, Programming, Robotics Tutorial

Stepper motor is very useful for some robots to make their high accuracy movement. How to drive or control your stepper motor? Use this tutorial as your guide….

General Theory of Stepper Motors
An ordinary DC motor will turn around and around as long as power is supplied. No intelligent circuitry is required to drive such a motor, unless you want to slow it down or reverse direction – just apply power and it spins. A stepper motor is very different. If you just feed it power, it will stay where it is. In order to make the motor move, you have to feed it a changing signal. This is best illustrated by thinking of a magnetic compass with electromagnets around it:

Motor Stepper
Figure 2.7.1 Motor Stepper

The drawing on the bottom shows power applied to the N electromagnet, drawing the compass toward it. On the right, power is instead applied to the E electromagnet, and the needle has rotated toward that side.

motor stepper control
Figure 2.7.2. Basic Stepper Motor

Just four electromagnets would give coarse jumpy motion. Now

Tags: , , ,

Processing Frequency of Color Sensor TCS230 with Microcontroller AT89S51

March 22nd, 2008 by Robot Technology | No Comments | Filed in Microcontroller, Sensors

The TCS230 programmable color light-to-frequency converter combines configurable silicon photodiodes and a current-to-frequency converter on single monolithic CMOS integrated circuit. The output is a square wave (50% duty cycle) with frequency directly proportional to light intensity (irradiance). The full-scale output frequency can be scaled by one of three preset values via two control input pins. Digital inputs and digital output allow direct interface to a microcontroller or other logic circuitry. Output enable (OE) places the output in the high-impedance state for multiple-unit sharing of a microcontroller input line.

The light-to-frequency converter reads an 8 x 8 array of photodiodes. Sixteen photodiodes have blue filters, 16 photodiodes have green filters, 16 photodiodes have red filters, and 16 photodiodes are clear with no filters. The four types (colors) of photodiodes are interdigitated to minimize the effect of non-uniformity of incident irradiance. All 16 photodiodes of the same color are connected in parallel and which type of photodiode the device uses during operation is pin-selectable. Photodiodes are 120 mm x 120 mm in size and are on 144-mm centers.

Functional Block Diagram

Terminal Function

Tags: , , ,

The Atmel AVR and its Development Hardware Up Close

March 22nd, 2008 by Robot Technology | 1 Comment | Filed in Microcontroller

atmel microcontrollerThe AVR series consists of a fairly broad range of hybrid-bit-width microcontrollers (nominally 16-bit code word, 8-bit data bus and ALU) sharing a common instruction set and differing primarily in the on-chip peripherals and package options. These devices don’t show a clear genealogical relationship to any other microcontroller core I’m aware of, but some variants do show superficial signs of having been designed for people migrating away from the 8051 (the 40-pin AVRs are in a very similar pinout to a standard 40-pin 8051, for instance). AVR is a Harvard- architecture RISC core with 32 8-bit general-purpose registers, named R0—R31.

These registers are mapped into the core’s data address space at address $00-$1F. Registers R26—R31 have a secondary function for indirect addressing modes; they are divided into pairs named X (R26—R27), Y (R28—R29) and Z (R30—R31). Any of these three paired registers can be used as a 16-bit pointer into data RAM (the first register named is, in each case, the less significant byte of the address word). Most instructions can operate on any register; a few instructions (such as word-add, wordsubtract, and load immediate) can operate only on a subset of the registers, R16—R31. The AVR core also has a separate 64-byte I/O address space to interface with the on-chip peripherals. All of these peripheral control registers are conveniently mirrored in the general data address space at locations $20-$5F, so that you can access them with different addressing modes if you wish. The ATtiny26L also has 128 bytes of SRAM from $60-$DF, and the remainder of the data address space is unimplemented.

Tags: , , , ,