Show Posts
Pages: [1] 2
1  Topics / Robotics / Re: Thesis suggestions in robotics for electromechanical engineer on: May 05, 2011, 04:56:57 pm
Congrats on narrowing it down!

Although I must say, you've set an extremely high goal. Make sure you decide exactly what it is you want to achieve, and talk it through with someone who can confirm its a reasonable set of goals.

Not to put a dampener on what you're doing, but creating this gripper AND some nice interface sounds like its would be too much, especially if you have classes to attend! Even making the arm may take you a lot long er than you expect... on top of that you have to make it controllable, then integrate the control with some user interface... Each of these is a project on its own! As long as you're sure what you're getting into. It does sounds really cool.

My project was a completely modular robotic arm. The arm can be any number of segments long, and each segment was it's own computer (which is quite cool :3 ). The whole thing is controlled by sending the x,y coords of where you want the end to be, so it can be controlled by anything with a serial (RS232) output, which is also cool. Oh, and it self-corrects for servo errors, which is another cool thing. All programmed with Arduino, of course. It got me a job a a robotics lab this summer, which is awesome.
2  Using Arduino / Networking, Protocols, and Devices / Re: Serial comm between 2 Arduinos on: March 23, 2011, 07:43:36 pm
Try this;

Code:
// Arduino1

int button = 10;
int ledPin = 13;
int val = 0;

void setup()  
{
  pinMode(button, INPUT);
  pinMode(ledPin, OUTPUT);
  Serial.begin(9600);
}

void loop()
  {
  val = digitalRead(button);
  if (val == HIGH)
    {
    digitalWrite(ledPin, HIGH);
    Serial.print(1); // This should print the ascii value for '1' - 49
    }
  else if (val == LOW)  
    {
    digitalWrite(ledPin, LOW);
    Serial.print(0); // This should print the ascii value for '0' - 48
    }
  }


Code:
//Arduino2

int ledPin = 13; //led is on pin 12
int val = 0; //variable to store the serial read data

void setup()  {
  
  pinMode(ledPin, OUTPUT); //led pin is an output, duh
  Serial.begin(9600); //open the serial port
}


void loop()
  {
  if(Serial.available() > 0)
    {
    char val = Serial.read();
    if(val == '1')  // if received 49 (ASCII for '1')
      {
      digitalWrite(ledPin, HIGH);
      }
    else if(val == '0') // if received 48 (ASCII for '0')
      {
      digitalWrite(ledPin, LOW);
      }
     else
      {
      // shouldn't get here
      }
    }
  }

Serial.print and Serial.write aren't the same. Stick to one and you should be fine. I find .print easier to predict, so I use that.

Also remember that you'll have to hold the button down for this to work - it won't toggle or latch.
3  Topics / Robotics / Re: Thesis suggestions in robotics for electromechanical engineer on: March 23, 2011, 05:13:08 pm
I had the exact same issue as you about 6 months ago. I like robotics, but couldn't narrow it down to a particular project. I did in the end and it's been a blast.

I'd suggest you try and narrow down your interest even further. The "tele-operation of humanoid robots" involves a rediculous number of things - mechanical, electrical, psycological!

I get a lot of inspiration from robotics blogs and news sites - they'll often report on some cutting-edge stuff and you'll think 'Hey, that would be useful in [xyz]', or 'What if you combine that [widget] with a [gizmo]...'

Here's the few I frequent;

http://spectrum.ieee.org/blog/automaton [has a massive lost of blogs in the bottom right - the 'blog roll']
http://www.robots-dreams.com/
http://www.neurdon.com/
http://robots.net/
http://blog.trossenrobotics.com/
http://www.hizook.com/

I suggest you read through those and see if they give you any ideas.

Once you've found something, try going to IEEExplore and searching for it. If you're doing a degree then I'm sure your university has some subscription you can utilise. A lot of the papers may at first seem intimidating, but they're often very accessable. They can give you further inspiration.

If you want any more info, try being a bit more specific and I'll see if I can think of anything.
4  Development / Other Hardware Development / Re: Changing CPU speed & boards.txt on: March 14, 2011, 03:09:37 pm
By "crystal" do you mean "crystal and capacitors"?

I do!

So after all that, and all your help, it worked.

When uploading the bootloader it gave a verification error, yet I can upload programs absolutely fine.

Having uploaded and tested them, I can confirm that all functions to do with timing work fine. All I had to change was the cpu speed and upload speed, as suggested.

I've no idea why it wasn't working before, but it does now!

Thanks for all your help.

5  Development / Other Hardware Development / Re: Changing CPU speed & boards.txt on: March 09, 2011, 03:21:07 am
In my experience, once you switch the fuse settings to an external crystal, if there is a problem with the external crystal, then the processor will not communicate through an ICSP.  Once the crystal issue was resolved everything worked.  Your experience sounds similar to mine but not identical.

Do you have anything connected to the board?

I did have, but I took it it all out to go 'back to basics'. I connected the 'L' LED, but that's all. (Aside from the crystal, of course)

Your point about the crystal is intersting. After I'd burnt the bootloader, I could upload Blink fine the first time. Then I changed the delay to 100ms (so that it would be obvious the program had definitely uploaded), and sometimes it would upload, sometimes it would give the verification error. I was never able to upload more than 2 programs without having to re-burn the bootloader.

It would be simpler if I were able to use the FT232 breakout I have... My first thought was that it's a problem with the timings, as maybe they're never 'syncing'?

I'll try another few crystals and double check the crystal setup and report back.

Thanks for the advice so far.
6  Development / Other Hardware Development / Re: Changing CPU speed & boards.txt on: March 08, 2011, 08:40:11 pm
Thanks for the quick reply.

I did the blink-check already - it seemed okay at the time, but I will test it more thoroughly and properly tomorrow.

As for your second point, I forgot to mention that I am already using an 8MHz crystal in place of a 16MHz one. This is also why I'm not sure why the fuse settings wouldn't be correct - the datasheet gives one setting for external crsytals in the frequency range 8MHz-16Mhz. And as that's all that's really changed, surely the fuse settings should be the same...

Tom
7  Development / Other Hardware Development / Re: Changing CPU speed & boards.txt on: March 08, 2011, 07:05:40 pm
An update.

I got my breakouts made, and soldered on the ATMega2560-8AUs.

I added a new board to boards.txt, the burnt the default bootloader using a USBTinyISP from Adafruit.

Something odd then, that maybe someone with an Arduino MEGA 2560 can help me with. With the old MEGA (the 1280), the bootloader put a program like 'blink' onto the chip, such that the 'L' LED would flash periodically. I'd best drescibe it as a 'dash-dash-dash...' sequence, if you think in morse code.

But when I put the bootloader on my reduced-speed 2560s, I get a 'dot-dash-dot-dash...' light sequence. Is this an indication that the bootloader upload didn't go quite right, or does the MEG2560 bootloader just have a different default flash sequence...?

I assumed that it was just a different flash sequence.

Next, I tried to upload my program using an FTDI Friend. I had managed to upload to the Arduino MEGA1280 using this method, but when I tried to do it on my 2560, it would sit at the 'uploading to board' status.

So then I added a new board to boards.txt that would use the USBTinyISP to upload the program. When using that, the program would upload but then there were two new issues;

The serial output is garbage now. I've tried receiving at half the baud I was expecting it to send at (and I even tried double, just to see), but it was always garbage.

Uploading the first program after burning the bootloader was fine, but if I tried to upload again then I'd get an error (something about verification - I forgot to write it down) and the program wouldn't be uplaoded.

...I know it's a lot, but any thoughts?

Tom


8  Development / Other Hardware Development / Re: Changing CPU speed & boards.txt on: February 15, 2011, 07:49:49 am
Okay, I'm in the process of writing the code and getting a PCB made to do the testing. But as we all know, PCBs are cheap, so I only get one test, and even then I can't call it a test. :S

I'm developing the system using a normal Arduino MEGA until then (the old 1280 version), and I think a better approach would be for me to ask - If i change the speed, what difinitely *WON'T* work?

Thanks
Tom
9  Development / Other Hardware Development / Re: Changing CPU speed & boards.txt on: February 12, 2011, 05:12:26 am
Okay well to get it to run at 8MHz I wouldn't need to change the prescaler, surely, as 8MHz is still the default 'Full speed' of the chip.

Thanks for all this info though - I fininshed soldering the chips to their breakout boards yesterday, so I should be able to test burn the bootloader some time next week. I'll report back then!

Tom
10  Development / Other Hardware Development / Re: Changing CPU speed & boards.txt on: February 11, 2011, 06:29:57 pm
Thanks for the reply.

Quote
Quote
what will this effect?

Sketches built for that board will run correctly at 8 MHz.
Everything will still work? The only info I could find relating to this was from several versions ago, and apparently some things like PWM could stop functioning properly. Have all the functions been made CPU speed-independent now, then? Just want to make sure, as this chip has a range of tasks to do, from servo control to serial comms.

Quote
Quote
Do I also have to fiddle with the bootloader somehow?

Possibly. To upload at 115200 baud, you will need to install a bootloader built to run at 8 MHz.  You may be able to halve the baud rate and leave the existing bootloader.

I thought this might be the case. I suppose that changing the mega2560.upload.speed parameter will change the upload speed, but as for modifying the bootloader I've no idea where to even start. If I want to use the Arduino bootloader, I can just modify that, right? I found the .hex files, but couldn't make head nor tail of them (What with them being a long list of hex numbers...).

Thanks for the help so far...

Tom
11  Community / Bar Sport / Re: Earthshineelectronics.com on: February 11, 2011, 05:34:44 pm
Throwing my lot in to say I didn't have the best experience with them. After ordering was told that the UNO was out of stock, so I request a cancel and refund (needed it soon), but got the silent treatment, charged, and it still arrived 2 weeks later :/
12  Development / Other Hardware Development / [solved] Changing CPU speed & boards.txt on: February 11, 2011, 05:29:55 pm
Hi,

I've asked this before, but never got a definitive answer... I have an ATMega2560-8AU chip that I want to make a standalone circuit from. Its given speed is 8MHz, not the normal 16MHz.

If I make a new board profile in boards.txt based on the current 2560 one, such as;

Code:
##############################################################

mega2560.name=Arduino Mega 2560

mega2560.upload.protocol=stk500v2
mega2560.upload.maximum_size=258048
mega2560.upload.speed=115200

mega2560.bootloader.low_fuses=0xFF
mega2560.bootloader.high_fuses=0xD8
mega2560.bootloader.extended_fuses=0xFD
mega2560.bootloader.path=stk500v2
mega2560.bootloader.file=stk500boot_v2_mega2560.hex
mega2560.bootloader.unlock_bits=0x3F
mega2560.bootloader.lock_bits=0x0F

mega2560.build.mcu=atmega2560
mega2560.build.f_cpu=8000000L
mega2560.build.core=arduino

##############################################################

what will this effect? Do I also have to fiddle with the bootloader somehow? The datasheet says that the timer fuse settings won't change (apparently there is one setting for an external xtal at 8-16MHz).

Thanks
Tom
13  Using Arduino / Project Guidance / Re: Trigonometry for motion capture on: February 06, 2011, 05:49:18 am
I had a really tough trigonometry problem for a big project of mine this year (Wolfram-Alpha said it was unsolvable - hah!). I don't think there's software out there that's going to help you easily or cheaply. Besides, there's nothing like sitting down with a pen and paper and crunching through some hard maths yourself  smiley-grin

To solve it properly we need to know more about the setup. Could you come up with a diagram showing what the mechanical setup is? If it's a connection from head to back then I don't know why you need a 5 DoF setup for your 3 DoF head...

So try and get a diagram up, or if that's not possible then a more detailed description of the setup. Then we can get to the business of trigonometry...

Cheers
Tom
14  Using Arduino / Project Guidance / Re: Counting Ants on: February 05, 2011, 12:48:45 pm
So it's pretty clear that the 'counting ants' section of this project is really not trivial.

To make it a bit clearer, is this your propsed setup?
(Apologies for ACSII art)
Code:
        IR LEDs
----|_|---------|_|------
<outside         colony> |_ one ant width
     _           _       |
----| |---------| |------
       IR Sensors

There are obviously many many issues, some of which have been discussed. What kind of accuracy do you need? Dealing with scenarios, such as those suggested by Graynomad, will be a big part of it. For instance, what if an ant passes the first sensor but by the time he's reached the second another ant has already passed the first? You could say you'll keep them less than an ant's length apart, but then what if two ants enter one after the other really close (touching, say), then separate between the sensors? If you're not looking for to-the-ant accuracy then I'm sure it's possible to come up with something to deal with that, but even then it would require some testing to find out how often you're expected to deal with these non-trivial scenarios.

I think what I'm trying to get across is that I doubt it's going to be a simple case of looking for 'beam 1 broken, beam 2 broken, therefore ant going in'. When you're working at such small scales how will you multiple triggers by the ant's sedmented body shape, for instance or legs or anything else?

But maybe you've consiered this already - Could you describe your physical detection setup a bit more in depth?
15  Forum 2005-2010 (read only) / Development / ATMega1280/2560 at 8Mhz on: January 18, 2011, 08:11:38 am
So I'm looking to use a 1280/2560 chip in a circuit, programmed with Arduino. However, apparently they're as rare as hens' teeth, and I've managed to get hold of some ATMega1280-8AUs, which are set to run at 8Mhz instead of 16.

Now clearly this is going to affect some things, as I've read bits here and there about fiddling with the clock on the ATM128/328, but nothing I could gather together completely.

What will I need to do to make sure that the programs I write will work okay? I need accurate timings as I need the chip to do some servo control....

Thanks!
Tom
Pages: [1] 2