quinta-feira, 16 de dezembro de 2010

FireTracker


Libraries Used:

Description:
This application is very similar to the ColorTracker but instead of colors it tracks flames.

To link the wiimote to your computer you just have to have the bluetooth on and press 1 & 2 buttons.

It has some vertical lines, the white ones represent the x center of the flames and the other two, x min and x max, which are blue, divide the image in three parts. If the white lines are on the left part the application gives the robot an order to turn left and if they are on the right part it should turn right. 
There are one other horizontal line, the y center of the flame which is white.  The flame is represented by a yellow circle. If it is between the x min and x max lines the robot goes foward. 

The blue lines can be adjusted using the correspondent sliders. 

The serial commands (w,s,a,d and g) can be sent at a 4800 baud to the COM port specified on the text field, you just to write it there and press ENTER (example: "COM5"). 

domingo, 5 de dezembro de 2010

Using a WiiMote with Processing


The wiimote is a really cool controller to use with your robots. It has many buttons, accelerometers and even a camera which tells the coordinates of the four principal IR emitters that it sees.
There are many examples of applications using it, some of the most populars are from Johnny Chung Lee. But there are much more, just search for "wiimote" or "wiimote robot" on youtube or google. On LMR there are some examples too:
And others with just its camera:

But I wanted to use it, without having to hack it, to communicate with processing and control my robot TheBox.
On my computer I have installed WIDCOMM bluetooth software which I found here.

To install the processing libraries I followed this tutorial.
I had some problems placing the folders so here is a simple scheme:
+ Prossessing
    + libraries
        + Loc
            + library
                - Loc.jar
            + lll
                + Loc
                     - ...
        + wrj4P5
            + library
                - bluecove-2.1.0.jar
                - bluecove-gpl-2.1.0.jar
                - WiiRemoteJ.jar
                - wrj4P5.jar
                - Loc.jar (optional)
            + lll
                + wrj4P5     
                    - ...

To test if it is all working you can try these examples found here:
If they work, you can pass to the next step, the serial communication with your robot.

The application MyFirstWii is really easy to adapt. 
All you have to do is to import the serial library, create a serial object, define the COM port & the baud rate and add the serial communication where the data about the buttons is analyzed. Here is an example:
import processing.serial.*;
import lll.wrj4P5.*;
Wrj4P5 wii;
Serial TheBox;
void setup() {
  size(300,300,P3D);
  wii=new Wrj4P5(this);
  wii.connect();
  TheBox = new Serial(this, "COM5", 4800);
void draw() {
  background(0);
  stroke(255);
  translate(300/2,300/2,0);
  lights();
  rotateX((int) (wii.rimokon.senced.x*30+300));
  rotateY((int) (wii.rimokon.senced.y*30+300));
  rotateZ((int) (wii.rimokon.senced.z*30+300));
  box(100,100,100);
}
void buttonPressed(RimokonEvent evt, int rid) {
   if (evt.wasPressed(RimokonEvent.TWO)) println("2");
   if (evt.wasPressed(RimokonEvent.ONE)) println("1");
   if (evt.wasPressed(RimokonEvent.B)) {
     println("B");
     TheBox.write('g'); 
    }
   if (evt.wasPressed(RimokonEvent.A)) println("A");
   if (evt.wasPressed(RimokonEvent.MINUS)) println("Minus");
   if (evt.wasPressed(RimokonEvent.HOME)) println("Home");
   if (evt.wasPressed(RimokonEvent.LEFT)){
     println("Left");
     TheBox.write('a'); 
    }
   if (evt.wasPressed(RimokonEvent.RIGHT)){
     println("Right");
     TheBox.write('d');      
    }
   if (evt.wasPressed(RimokonEvent.DOWN)){
     println("Down");
     TheBox.write('s'); 
    }
   if (evt.wasPressed(RimokonEvent.UP)){
     println("Up");
     TheBox.write('w'); 
    }
   if (evt.wasPressed(RimokonEvent.PLUS)) println("Plus");
}


quarta-feira, 24 de novembro de 2010

Dual Motor Driver Board


THE BOARD HAS A LAYOUT PROBLEM IT'S NEEDED TO MAKE SOME CORRECTIONS:



FIND THE NEW ONE HERE:
http://www.franciscodias.net/boards/motor-driver-board

Download Eagle File: http://lusorobotica.com/index.php?
action=dlattach;topic=2981.0;attach=911


Purpose: 
  • Control two big motors by PWM
Features:
  • Easy to use
  • Easy to find components
  • Easily divided in two individual motor controller boards
Components:
  • 4x 4N25
  • 4x IRF540
  • 4x IRF9540
  • 8x LED
  • 4x 470 Ohm Resistor
  • 4x 22k Ohm Resistor
  • 8x 220 Ohm Resistor
  • 4x Screw Terminal
  • 8x TO-220 Dissipater
  • 4x 8 pin IC socket 
Dimensions:
  • 85 mm x 65 mm
Links for more information (in Portuguese):


















Speed Control by PWM Test:



segunda-feira, 8 de novembro de 2010

Arduino Controller



Description:
This was my first arduino project.
It is an application developed on processing that controls arduino's Inputs and Outputs.

To use just follow the instructions:
1. Program your arduino with Standart_Firmata that is on the folder Firmware.
2. Choose your OS folder and open the aplication.
3. Choose the serial port and wait a few seconds.
4. The digital pins start on INPUT mode, if you want to change to OUTPUT mode just press 'O'. To return to INPUT mode press 'I'.
5. On the OUTPUT mode to High or Low a pin (2-7) press the little button. To use PWM (pins 3,5,6,9,10 e 11) pass over the rectangle. 

SimpleClient & SimpleServer - How to use

 

These applications are very easy to use.
They are supposed to remote control a robot with two motors.


To make them work with yours you'll only have to do the following:
 - First of all you'll have to have both computers connected on a wirelless network. If you don't have any you can create an computer-to-computer network like it is explained on this site: http://www.cs.washington.edu/research/edtech/presenter/doc/adhoc.html.
 - Open your board correspondent Firmata, change the highlighted areas and upload it
 - Open SimpleServer.pde on your controller computer and run it.
 - Open SimpleClient.pde on the computer connected to your board, change the highlighted areas (COM port and server IP) and run it.

They work like this:

When you press one key (UP, DOWN, LEFT, RIGHT or S) on your controller computer keyboard, the server application analyzes, shows the arrows images and sends the correspondent letter (w, s, a, d or g) to the client application that analyzes, shows the arrows images and re-sends the letter to the arduino or the picaxe board which analyzes again and do whatever you wrote on the highlighted areas of the Firmata.

Movie with the robot of The Tank Project:

Wall Avoider





Libraries Used:

Description:
This application is very simple.
It is based on the Color tracker application, but the serial commands are sent in a different way.
If it is detecting the floor color specified on the sliders it orders the robot to move forward, otherwise the robot is told to turn right.  

Movie with the robot TheBox

Face Tracker





Libraries Used:

Description:
This application is very similar to the ColorTracker but instead of colors it tracks faces.

It has three vertical lines, the yellow one represents the x center of the face and the other two, x min and x max, which are red, divide the image in three parts. If the yellow line is on the left part the application gives the robot an order to turn left and if it is on the right part it should turn right. 
There are other two horizontal lines, y max which is red and the y center of the face which is yellow.  So, if the blob is between the x min and x max lines and it's above the y max the robot goes backward, if it's below the line it goes foward. 

All those red lines can also be adjusted using the correspondent sliders. 

The serial commands (w,s,a,d and g) can be sent at a 4800 baud to the COM port specified on the text field, you just to write it there and press ENTER (example: "COM5"). 

Color Tracker




Download Zip File: http://letsmakerobots.com/files/ColorTrackerV3.zip


Libraries Used:

Description:
This application finds a color specified on the sliders and tracks it.


It has three vertical lines, the yellow one represents the center of the blob and the other two, x min and x max, which are red, divide the image in three parts. If the yellow line is on the left part the application gives the robot an order to turn left and if it is on the right part it should turn right. 
There are other two horizontal lines, y max which is red and the y center of the blob which is yellow.  So, if the blob is between the x min and x max lines and it's above the y max the robot goes backward, if it's below the line it goes foward. 


All those red lines can also be adjusted using the correspondent sliders. 


The serial commands (w,s,a,d and g) can be sent at a 4800 baud to the COM port specified on the text field, you just to write it there and press ENTER (example: "COM5"). 




Movie from a previous version with the robot TheBox:

domingo, 7 de novembro de 2010

The Box




See it on LMR:

Functions:

Output Devices:
  • 2 DC Motors
Microcontrollers:
  • PICAXE 28x1 - Botn 'Roll ONE
Power Sources:
  • 7,2 V Battery Pack


Well, this is probably the simplest robot I've ever made. It is just this event's robot mounted in a old IBM box.
I've built it just to serve as a testing platform for some processing applications that I've been developing lately.
It is simply programmed to read the letter (w,s,a,d,g) sent by the application running on the computer and to move according to it.




The Tank Project





See it on LMR:

Functions:
  • Navigate arround being remote controlled by someone on another computer

Output Devices:
  • 2 Servos
  • 2 Drills' Motors
Microcontrollers:
  • Arduino Duemilanove
Power Sources:
  • 2 12V Drills' Batteries


After seeing the tank tracks that amando96 did for hisAATV, me and my friend Purdom, decided to build our own tank.
We've started building it last Saturday and here are the first movies and photos.
The tracks are really good and easy to make, they just take a lot of pacience.
It uses two 15€ drills' motors, but instead of an metal chassis our has a wooden one.
We use a netbook on the robot just as Calex64 uses on hisPROTOS III to reduce the costs and to facilitate the comunications.
On the controller PC we have a processing application that sends an information of a key we press over an ad hoc wireless network, on the robot PC we have an other application that intrepretates the information and sends it to the arduino that decides what command gives to the servos witch move the switches that control the motors.







The Indiscreet Spy



See it on LMR:
http://letsmakerobots.com/node/20554

Functions:
  • Navigate arround being remote controlled by someone on another computer

Output Devices:
  • 2 Servos
  • 2 DC Motors
Microcontrollers:
  • PICAXE 28x1 - AXE020 - For the Servos
  • PICAXE 28x1 - Botn 'Roll ONE - For the motors
Power Sources:
  • 7,2 V Battery Pack for the  Botn 'Roll ONE
  • 4 AA Batteries for the AXE020
  • 4 AA Batteries for the Servos


It was basically formed by two 28x1 that are serial controlled by a processing application, one for the motors and other for the two servos of the Pan&Tilt system
It could be remotely controlled by Remote Assistance of Windows Live Messenger, as it is shown in the video. 
It was very easy to build, I just needed to learn the basics of processing.
The application I made sends E,D,S,D to the servos Picaxe when these keys are pressed and X,W,Y,Z to the motors picaxe when the direction keys are pressed.

Mr. Unnamed



See it on LMR:
Functions:
  • Navigate around via ultrasound without falling from tables or seats using LED and LDR
  • Line following.
Output devices: 

  • 5 LED's
  • 2 DC Motors
  • 2 Servos
  • 1 LCD03

  • Microcontroller:

  • PICAXE 28x1
  • Power Source:

  • 4 AA Batteries for Microcontroller
  • 4 AA Batteries for output devices
  • Input Devices:
  • AXE121 (IR sensors)
  • LDR
  • SFR05


    Mr. Unnamed was my first robot. I've built it some months ago, and it is all dismantled now.


    I've built many versions of it as you can see in the photos bellow:

    Mr. Unnamed v1

    And finally the movies: