Society of Robots - Robot Forum

Mechanics and Construction => Mechanics and Construction => Topic started by: donggyu on September 10, 2010, 04:46:58 PM

Title: Robot Ant Farm; looking for some help
Post by: donggyu on September 10, 2010, 04:46:58 PM
Hello everyone! My name is Donggyu and I have currently got involved into the robot making community. I made my first simple obstacle avoiding robot and I'm now looking for my next project. What I really want to do right now is to make an ant farm type of small robots.

My idea is there to be two teams of robots, and their goal is to get "food" to their base. If one robot finds food, it sends out a signal (ir of course) to the other robots and the robots that get the signal tell other robots that they have seen a robot with food and heads towards it. You know what happens next! ;D If it is one "food" in the middle of a playing field then the heading towards wont do much. But think what would happen if a robot happenes to sense a food from the other teams base!  ;) that would result in a whole base food robbery. I have little experience in robotics and dont have much idea for where to start. I hope you guys can help me or direct me to some tutorials or guides.
Title: Re: Ant Farm; looking for some help
Post by: donggyu on September 10, 2010, 04:50:23 PM
I would like some help in:

Navigation
"Language" or robots sending signals
The "grippers" for the food.

In case you were wondering, this project was inspired by this: http://www.ai.mit.edu/projects/ants/ (http://www.ai.mit.edu/projects/ants/)
Title: Re: Ant Farm; looking for some help
Post by: Ro-Bot-X on September 10, 2010, 05:39:26 PM
I have started such a project, read about my idea here: http://seriousrobotics.wordpress.com/2010/05/14/new-project-swarm-robots/ (http://seriousrobotics.wordpress.com/2010/05/14/new-project-swarm-robots/)
and my first prototype that I did not finish yet, as I hate soldering so many wires, I'll design a PCB and get 10 of them from SeeedStudio for about $2 each:
http://seriousrobotics.wordpress.com/2010/05/15/first-drone-prototype/ (http://seriousrobotics.wordpress.com/2010/05/15/first-drone-prototype/)
Title: Re: Ant Farm; looking for some help
Post by: donggyu on September 10, 2010, 07:14:07 PM
Niceee I see that your design does not include grippers or pincers of any kind though. Won't it be a problem to take it from the other sides nest without them? Oh and how did you build it so it recognized the foam cubes? I am very interested  :)
Title: Re: Ant Farm; looking for some help
Post by: Ro-Bot-X on September 10, 2010, 08:53:14 PM
Foam cubes are just objects. They reflect the IR light from the proximity sensors. I'm not sure exactly how this will work, but it doesn't have to be super precise. The robot will have the upper and lower copper wires (see the Formica robots) that will be enough to keep the cube inside and push it and drag it where the robot wants to move it. I thought to keep things simple. The Queen robot will have a one servo gripper. How? Think of a plate that has 2 channels like this: ) ( . Imagine the gripper as 2 straight wires that go through those channels and move up and down. When the wires are at the bottom, the cube will fit between them with some room to spare. When the wires slide up, the wires will get closer and grip the cube between them. Then lift the cube from the surface and if they keep sliding up, the wires will start to loosen up and finally the cube will be dropped when the wires get close to the top of the channels. Use a servo to move the wires up and down, use a rubber band to keep the wires together.
Title: Re: Ant Farm; looking for some help
Post by: donggyu on September 11, 2010, 08:47:50 AM
Oh I see. Thanks you're a great help. Any tips or links for the ir communication?
Title: Re: Robot Ant Farm; looking for some help
Post by: Ro-Bot-X on September 11, 2010, 02:31:43 PM
Here is a sample (http://letsmakerobots.com/node/18878) of IR communications and proximity using the same sensors. Basically, for proximity I will use 2 IR LEDs pulsed at 56kHz and a demodulator sensor like TSOP4856 to receive the signal after it bounces off of objects. For communication, the IR LEDs will send a Sony code signal (38kHz) that will be received by the other robot's TSOP4838 sensors.

The drones will use 2 pager motors and a FAN8200 H-bridge, that works with low voltage logic circuits (3.3V).

I decided to use ATmega8 because they are cheap, I have a few, and they can work at 3.3V (8MHz internal) so they can be powered by a single LiPo cell. The TSOP sensors also work at 3.3V, so it's all fine. Oh, to charge the LiPo I will be using a MAX1555 charging regulator on each drone, so all can be charged at the same time from a power rail. The power will be provided by solar panels, so the whole project will be self sustainable.

There will pass some time until this project will be completed, as I have some other projects I am focusing at the moment.

So far, there is no code for this project, as the hardware is not done yet. But it will be written in Arduino.
Title: Re: Robot Ant Farm; looking for some help
Post by: donggyu on September 11, 2010, 03:50:34 PM
Cool. But doesnt it have to be programmed at Avr? Also, I'm having trouble understanding how the robots communicate to each other messages like: "I found food" or something like that.
Title: Re: Robot Ant Farm; looking for some help
Post by: Ro-Bot-X on September 11, 2010, 06:53:12 PM
Cool. But doesnt it have to be programmed at Avr? Also, I'm having trouble understanding how the robots communicate to each other messages like: "I found food" or something like that.

AVR is my microcontroller of choice. You can use anything you want.

The messages are simple. Robots don't talk like humans in words. They talk in numbers like 125 or 23 or whatever you set them. Make a list of messages that are expressed by a byte (0-255). Then just send out the byte you want at a certain moment.

For example:

Code: [Select]
byte FoundFood=12;
byte GoHome=100;
byte Beacon=200;

IR_send(FoundFood);
The IR_send() function you define to actually pulse the LEDs to send that message. If you decide to program in Arduino, you can find all the code needed in the Playground.

To receive the messages, you can do this:

Code: [Select]
byte Message=0;
Message=IR_receive();
switch (Message){
  case GoHome:
    FindDirection(Beacon); // home is marked by a beacon that pulses twice a second
    Forward();
  break;
  case FoundFood:
    FindDirection(Message); // similar with above, but different message
    Forward();
  break;
}

As you see, I used a bunch of functions that you will have to create that will do the proper action.
Title: Re: Robot Ant Farm; looking for some help
Post by: donggyu on September 13, 2010, 01:53:12 PM
Thanks again, you've cleared up a bunch of my questions and I am almost ready to make my first protoype. The last feature I want to add: a charger. I dont really understand how it is supposed to be made, how it charges the robot, and what connections/antenas of some sort allow it to be connected to the batteries to the charger for charging. Can anyone help me out here? Have any of you guys had experience with self-charging robots and making chargers?
Title: Re: Robot Ant Farm; looking for some help
Post by: Ro-Bot-X on September 13, 2010, 06:17:06 PM
Look at this schematic:
(http://seriousrobotics.files.wordpress.com/2010/05/drones.png?w=1024&h=421)

You will see the MAX1555 that is a special charger for single cell LiPo battery. The battery and charger negatives are connected at GND, the battery positive is connected at the point "Bat" (pin 5, BATT) and the charger positive is connected at the point "Charger" (pin 4, DC). You will notice this is before the On/Off switch, so I can charge the battery when the robot is turned off.

If you look at the following image:
(http://seriousrobotics.files.wordpress.com/2010/05/formica.jpg?w=300&h=225)
You will see some copper wires that go on the floor (they are connected to GND) and other copper wires that are bended down, but don't touch the floor (they are connected to the "Charger" point). The charging rail is a metallic strip on the floor (GND) and another metallic strip on the wall (+5V). The robots are "lured in" by an IR beacon and they keep driving until the CHG pin of the MAX1555 goes Low, that means it is charging, so the microcontroller will detect that and stop the robot. When the charging is complete, the pin goes High Impedance, that means it will look disconnected, but because of the pull up resistor, the microcontroller will sense a High so it will drive the robot away.
Title: Re: Robot Ant Farm; looking for some help
Post by: donggyu on September 13, 2010, 07:14:45 PM
I just looked up the MAX1555. It's awfully small, how did you do the connections/mount it on the board? How did you mount the motors? Sorry to bother you with these questions :(
Title: Re: Robot Ant Farm; looking for some help
Post by: Ro-Bot-X on September 14, 2010, 05:30:08 AM
The motors are mounted like this:
(http://seriousrobotics.files.wordpress.com/2010/05/dsc00521.jpg?w=300&h=225)

And the MAX1555 is soldered by hand between 4 adjacent pads on the proto board. Then I soldered a thin wire from the middle pin to GND. Easy. But, if you think you will have problems with it, get a adapter.
Adapter:
http://www.sparkfun.com/commerce/product_info.php?products_id=717 (http://www.sparkfun.com/commerce/product_info.php?products_id=717)
MAX1555:
http://www.sparkfun.com/commerce/product_info.php?products_id=674 (http://www.sparkfun.com/commerce/product_info.php?products_id=674)
Title: Re: Robot Ant Farm; looking for some help
Post by: donggyu on September 14, 2010, 03:15:54 PM
Ok , I think that's just about it! :) Thanks for all your help! Ill ask for more help if I need some through the building process
Title: Re: Robot Ant Farm; looking for some help
Post by: Ro-Bot-X on September 14, 2010, 05:29:56 PM
You're welcome.

Cheers!
Title: Re: Robot Ant Farm; looking for some help
Post by: donggyu on September 15, 2010, 06:36:36 PM
The communications thing in the lower part of the schematic? Is that a floating ground? I see a lot of grounds leading to nowhere in the schematic. I also see that you did not use ATmega8 in the schematic, so I am confused. Finally, what is the cost of one drone?
Title: Re: Robot Ant Farm; looking for some help
Post by: voyager2 on September 15, 2010, 07:59:00 PM
Heres a nice link for you:

http://www.swarm-bots.org/ (http://www.swarm-bots.org/)

I'm thinking of building a swarm robot too...
so I'm learning from this topic  ;)
Title: Re: Robot Ant Farm; looking for some help
Post by: donggyu on September 15, 2010, 08:48:19 PM
Yesss :) Lets help each other out! Oh and I've almost gathered enough info for designing and the prototype.
Title: Re: Robot Ant Farm; looking for some help
Post by: donggyu on September 17, 2010, 04:06:14 PM
Can anyone answer my question? It's a few posts up and I need it answered...
Title: Re: Robot Ant Farm; looking for some help
Post by: Ro-Bot-X on September 17, 2010, 05:55:43 PM
Dude, I have no idea how much the drones will cost. I have started a prototype with the parts I had in my parts bin. If you want to look up prices to figure out the total price, be my guest. I stopped working on this project for a while, mostly because I've had enough soldering tiny wires. I'll design a PCB and since it is smaller than 5x5cm (2" square) I can get 10 boards done for $20.

About the "floating ground" you should do more homework before asking such basic questions. Really.
To get things short, it's all in the CAD software. As soon as you get a GND part the software will just connect all the GND parts together in that schematic. Same with Vcc part and V+ part or Bat part. They are all different Power parts. Same with signal wires that have the same name like RST or Rx, Tx. The software automatically connects them together. This is a convention to keep the schematic clearer.

You should also find out that ATmega8, 48, 88, 168, 328 have the same pinout so you can use whatever you get your hands on. Well, they have different size memory and some extra features as their ID number increases.
Title: Re: Robot Ant Farm; looking for some help
Post by: donggyu on September 22, 2010, 05:33:59 PM
Ok. So do you mean that ALL the different power parts get connected in their separte groups and ALL the signal wires get connected in their separate group also in a pcb board?
(sorry for all the questions i have only worked with picaxe in the past and am making a jump to designed pcbs)
Also, I do not fully understand why the trimpotpth is needed.