Showing posts with label Robot. Show all posts
Showing posts with label Robot. Show all posts

Sunday, 23 January 2011

Software architecture

Just to comment that I have created a project in SourceForge and the source code is available in a SVN project. The address of the project is:

And the address of the SVN repository is:

To accede to the repository I’m using TortoiseSVN that is a tool to manage SVN repositories. You can visit the web above and download the software:

The software architecture of the main board is something like this.

Each box in the picture represents a software component that is named with a three letters acronym. The software is divided in three layers, application (APP), services (SRV) and drivers (DRV). There are also two layers in drivers. The layer bellow is the low level driver that manages the microcontroller peripherals and the layer above is a manager. We have also a services layer that gives services to the application like angle or arm positions calculations. I mean that make this kind of calculations.

We have also a diagnostic layer, which is not implemented yet and will be used to manage directly peripherals without the application and test the hardware. And also will be able to configure parameters.

Managing all the system we have an operating system that in fact is a scheduler. It uses a 1ms tick to count time. It have a list of task that can we configured how long have to launched and with which delay. I have added in the operating system the WinAVR libraries.

Let’s going to review the software components. For the time being the services that I have are:
ACL: This is the arm calculations module and from the ADC measurements of the potentiometers from the arm, calculates the arm angles and the hand position.

BVM: This module is the battery voltage manager. It has a task to be executed every 100 ms that takes the ADC measurement from the battery voltage, calculates the battery voltage and turns on the red led if the voltage is to low.

HPM: This is the hand pulses manager. It has a cyclic task to be executed every 1 ms and counts pulses from the hand encoder to know the position. I have planned to store the hand position in EEPROM but I haven’t implemented yet.

USS: This is the ultrasound manager that drives the I2C to read the distance measured by the sensors. It has a task to be executed every 50 ms and functions that returns the distances to the objects.

In the drivers layer we have:
ADM: This component manages the ADC converters. It has a task to be executed every 10 ms and for the time being measures the elbow position, shoulder position and battery voltage. This is done every 30 ms.

IOM: This is to configure and manage the input-output pins. It has functions that manage the leds and motors and drives each function to the adequate pin.

DCM: This component manages the DC motors. It has a cyclic task called every 10 ms and one instance for each motor. Each motor has its own configuration constants to configure the end of each movement. In the future these parameters would be in EEPROM and they will be calibrated. Also I’ll try to detect objects collisions but this will be in next versions.

ICM: This module is the I2C manager. It has the functions to start and read the ultrasound sensors measurement.

LCD: This is the display driver. It has the functions to initialize and to write in the display.

PAP: This module manages the stepper motors. It has a task to be executed every 1 ms

TCK: It has the functionality to manage the tick measurement. Initializes a timer and has a counter.

And the low level drivers:
ADC: Here we have the functions to manage the analogue-digital converters peripherals.

DIO: In this module we have the functions to configure and manage the digital input-output pins.

I2C: We have the functions to manage the I2C peripheral.

GPT: In this component there are the functions to configure and mange the general purpose timers.

Well, I have finished describing the available components. The next steps will be to develop more drivers like PWM or communications. The communications are important because I want to make software in a PC based on Linux to manage the robot. I have a board with an embedded Linux were I’ll try to put a software developed in the PC. The idea is to make all the drivers implemented in the ATMega64 board and the application in the embedded Linux board.

Wednesday, 9 June 2010

The robot

Here are some photos of Svbot.


As it is showed in the pictures the robot is made with Lego and it has a shoulder, elbow and a hand. The elbow and the hand are moved by two CC motors situated on the back of the arm. The CC motor that moves the shoulder is situated on the base of the robot. To move the wheels there are two stepper motors situated on the bottom of the basis. There is also a CC motor that moves a camera in the arm. Anyway the electronics to transmit the video signal is not placed on the robot yet.



To have a feedback about the arm position there are placed two potentiometers on the axles that move the shoulder and the elbow. On this way, using and analogue-digital converter is possible to know the arm position. Regarding the hand, there are an encoder and an end carrier sensor. To know the position the software will have to count pulses and store the value in the eeprom.




In the next chapter I'll write about the electronics.

Wednesday, 31 March 2010

Introduction

My name is Esteban and this blog is about a robot that I'm building. First of all, let me introduce myself. I'm electronic engineer and currently I'm working for an important automotive supplier company. I'm working in the drivers layer of modules that control some car functionalities like lights, wipers, doors...

When I was a child I liked to play with lego and some years ago I started to build robots with it. Then I started to study electronics to learn how to control these robots. In the first design, I made a simple board with a couple of transistors bridge connected to a parallel port in a computer and I made a simple program to mode the motors. Then I was improving the robot and the electronics and currently I'm working in a new board based on a Atmega64. It's an atmel 8-bits microcontroller with all the necessary like A/D converters, enough general purpose I/O to control all I want, two uarts, 4 timers, PWM outputs...

My objective is to use this blog to put all the information about it and the project progress.