go_away

Author Topic: Axon programming issues  (Read 3911 times)

0 Members and 1 Guest are viewing this topic.

Offline Dmntd1Topic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 1
Axon programming issues
« on: February 25, 2009, 06:35:23 PM »
Finally got it, today, and following through the set-up tutorial, I got a program (no, it didn't work!) loaded to it. Trying to edit the program, and upload it to the Axon, and I can't get the computer to connect with the Axon. When I do the cmd line code, it doesn't even realize the axon was connected when I turn it on. I've uninstalled, and re-installed all of the drivers for the USB->UART bootloader, but..... nothing!

Even trying to upload the axon_tst.hex doesn't work.

Offline cosminprund

  • Robot Overlord
  • ****
  • Posts: 284
  • Helpful? 8
Re: Axon programming issues
« Reply #1 on: February 26, 2009, 01:38:19 AM »
Show us a printscreen of the command window where you issued the bootloader command and tell us the COM port number that got assigned to your Axon.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: Axon programming issues
« Reply #2 on: February 26, 2009, 04:47:14 AM »
A few basic things to check . . .

is the battery fully charged?

does your PC recognize that USB is connected at all?

Offline Dmntd1Topic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 1
Re: Axon programming issues
« Reply #3 on: February 26, 2009, 01:32:11 PM »
Battery is fully charged, that was one of the first things I double checked (6V battery putting out about 6.7V).

No screen shot of the CMD screen, running the compiler, because I tried it again right before I went to bed, and it worked.

It worked once again this afternoon. Once. After that, the computer crashed while reading from the HyperTerminal, and since then, it won't recognize the USB programmer. I've uninstalled and reinstalled it, and yet nothing good happened. I"m going to give it a few, and see if it works again.

Thanks for the replies :-)

Abe

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: Axon programming issues
« Reply #4 on: February 26, 2009, 10:01:42 PM »
Hmmmm this seems really odd. I almost feel as if you have a ghost short on the USB.

Ok I want you to try this, but I'm not really sure this is the problem.

On the USB connector on the Axon, you will see 5 tiny pins. Put pressure on those pins with your hand and try programming again.

if that doesn't do anything . . .

With the Axon turned on and sending data (if you can ever get a program loaded or not), measure each USB pin using a multimeter and report the voltages here.

and if that doesn't help I may have you do some soldering . . .

Look around for access to a really fine tipped soldering iron and thin solder just in case.

Offline Dmntd1Topic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 1
Re: Axon programming issues
« Reply #5 on: February 26, 2009, 10:33:42 PM »
I've been working this, off and on, all afternoon/evening. I'm thinking it might be a computer problem, but I'm still not sure. I only have one computer that AVR Studio seems to work on.

Another reason I think it's my computer.... I keep getting ghost serial devices showing in the device manager. They can't seem to be uninstalled, I actually have to restore that computer to get rid of them. With them around, I usually get an error (and go figure, I can't reproduce it now!) stating that it can't open the com1.

I've got it running, it's got the "stuff" printing through HyperTerminal, and the pins on the axon are showing a max voltage of 0.336VDC (I have the DMM set to record MIN/MAX). I connected the DMM to the ground bus (tell me if that's wrong) and the pos(+) to the pins individually.

It's working now, go figure.

I'm clueless. I'm thinking I might need to invest in a hardware programmer.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: Axon programming issues
« Reply #6 on: February 28, 2009, 10:35:20 AM »
Well, you still want USB to see your data and for debugging.

I suggest trying on another PC to verify it isn't a problem with the Axon. You don't need AVR Studio, just the USB drivers installed to see if there is a problem.

What PC brand/model are you using?

Offline Dmntd1Topic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 1
Re: Axon programming issues
« Reply #7 on: February 28, 2009, 11:47:25 AM »
*shrug* it's working today. I ignored it, for the most part, all of yesterday and haven't had an issue with it at all today. I'll chalk it up to EEOC (Equipment Exceeds Operator's Coordination) error. I've been reprogramming and checking the sensors all morning, via USB. Seems something is still wrong, as the sonar and Sharp IR rangefinder are giving goofy numbers, but again, probably just a user error.

Computer is a Toshiba laptop, running XP-SP3. Older model, but seems to be working just fine otherwise.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: Axon programming issues
« Reply #8 on: February 28, 2009, 11:54:36 AM »
Quote
Computer is a Toshiba laptop, running XP-SP3.

Hope this helps you a bit!
http://www.societyofrobots.com/axon/axon_FAQ.shtml#boot_slow

Offline Dmntd1Topic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 1
Re: Axon programming issues
« Reply #9 on: February 28, 2009, 01:22:57 PM »
I read that before, and did that, too. After I had all of the problems, I restored the computer to an earlier point, and the problems have gone away. I'm not sure I really want to tempt fate by uninstalling it again. It takes about a minute to load the program, but the Axon is working.

Now, if I couuld only get the sensors to show accurately.  ??? ???


Offline Dmntd1Topic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 1
Re: Axon programming issues
« Reply #10 on: February 28, 2009, 02:43:42 PM »
Another new, different, interesting, issue....

I have the MaxSonar EZ0 hooked up. I have it hooked up with the power and ground to the Axon, but the signal (using the analog output) is connected to my multimeter (with ground connected to the ground on the Axon). The program waits for a button press to start reading the Sonar, then reads the sonar and prints the value to HyperTerminal. Before I hit the button, the mV is about right for the distance (averages about 630mV to the ceiling, about 5'5 away). I hit the button, and the voltage drops from the Sonar, to the 340-380mV range.

The voltage on the Axon board is steady at 5V throughout this.

If I weren't already bald, I'm be pulling my hair out about now LOL

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: Axon programming issues
« Reply #11 on: February 28, 2009, 08:15:08 PM »
Odd . . . so pushing the button causes the Sonar output voltage to drop, but not the Axon voltage to drop . . .

Can you show us some code?

Is it constantly chirping, or only chirping after you push the button?

Offline Dmntd1Topic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 1
Re: Axon programming issues
« Reply #12 on: February 28, 2009, 08:51:40 PM »
Pertinent sensor code:

int sensor(int value)
{
int input = a2dConvert10bit(value);
return input;
}

I've fully determined that the IR Sonar Range Finder is essentially dead.

There is no beep, just hitting the button on the axon to start the ball rolling.

edit: Sorry.... misread that. It's constantly chirping.
Current readings, pointing at the ceiling, shows a range of 60 - 124.
« Last Edit: February 28, 2009, 09:02:36 PM by Dmntd1 »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: Axon programming issues
« Reply #13 on: February 28, 2009, 09:08:46 PM »
Quote
the IR Sonar Range Finder
IR? :P

Quote
Current readings, pointing at the ceiling, shows a range of 60 - 124.
nothing changing distance, but that much range?!

Try this and let me know what you see:
Code: [Select]
a2dSetPrescaler(ADC_PRESCALE_DIV128); // configure ADC scaling
while(1)
      rprintf("%d\r\n",a2dConvert10bit(value));

Offline Dmntd1Topic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 1
Re: Axon programming issues
« Reply #14 on: February 28, 2009, 09:21:09 PM »
I have a sharp GP2D12 that puts out 2.55V period. No ifs and or buts.

The sonar is set on my tabletop, pointing straight up.

Your code (I added a delay_ms(100) to it) puts out a range of 27-32.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: Axon programming issues
« Reply #15 on: February 28, 2009, 09:38:30 PM »
I have a sharp GP2D12 that puts out 2.55V period. No ifs and or buts.

The sonar is set on my tabletop, pointing straight up.

Your code (I added a delay_ms(100) to it) puts out a range of 27-32.
ok wait you got me confused . . . you are using two sensors?

So the Sharp IR, power to regulated and ground to ground, outputs 2.55V on the ADC line no matter what?

And the sonar outputs the correct value *except* when you push the button?

Offline Dmntd1Topic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 1
Re: Axon programming issues
« Reply #16 on: February 28, 2009, 09:44:13 PM »
Ignore the references to the IR, I haven't had it plugged in since I realized it was putting out 2.55 no matter what. But yes, power to reg+, ground to ground and multimeter to the ADC line.

Here is current changed code:
Quote
   while(1)
      {
         int Reading = a2dConvert10bit(value);
         if (MAX < Reading)
            MAX = Reading;
         if (MIN > Reading)
            MIN = Reading;
         rprintf("Reading = %d MAX = %d MIN = %d\r\n", Reading, MAX, MIN);
         rprintf("Measurement = %d cm.\r\n\n", sonar_MaxSonar(Reading));

         delay_ms(500);
      }

Here is my output:
Quote
Reading = 37 MAX = 83 MIN = 0
Measurement = 1799 cm.

Reading = 37 MAX = 83 MIN = 0
Measurement = 1799 cm.

Reading = 38 MAX = 83 MIN = 0
Measurement = 1849 cm.

Reading = 36 MAX = 83 MIN = 0
Measurement = 1749 cm.

Reading = 37 MAX = 83 MIN = 0
Measurement = 1799 cm.

Reading = 83 MAX = 83 MIN = 0
Measurement = 4099 cm.

Reading = 34 MAX = 83 MIN = 0
Measurement = 1649 cm.

Reading = 37 MAX = 83 MIN = 0
Measurement = 1799 cm.

Reading = 80 MAX = 83 MIN = 0
Measurement = 3949 cm.

Reading = 38 MAX = 83 MIN = 0
Measurement = 1849 cm.


Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: Axon programming issues
« Reply #17 on: February 28, 2009, 09:58:09 PM »
Sounds like the Sharp IR is broken.


As for sonar . . .

are MIN and MAX long ints?

and this line:
Code: [Select]
int Reading = a2dConvert10bit(value);
should be either of these:
Code: [Select]
int Reading = a2dConvert8bit(value);
Code: [Select]
long int Reading = a2dConvert10bit(value);
'cause storing a long int into an int variable doesn't make sense :P

Offline Dmntd1Topic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 1
Re: Axon programming issues
« Reply #18 on: February 28, 2009, 10:09:49 PM »
MIN and MAX are ints, and I went with the 8bit version. here is the output. FWIW, there are 65 inches between the top of the sonar and the ceiling.

Quote
Reading = 8 MAX = 31 MIN = 0
Measurement = 349 cm.

Reading = 8 MAX = 31 MIN = 0
Measurement = 349 cm.

Reading = 9 MAX = 31 MIN = 0
Measurement = 399 cm.

Reading = 5 MAX = 31 MIN = 0
Measurement = 199 cm.

Reading = 9 MAX = 31 MIN = 0
Measurement = 399 cm.

Reading = 10 MAX = 31 MIN = 0
Measurement = 449 cm.

Reading = 9 MAX = 31 MIN = 0
Measurement = 399 cm.

Reading = 8 MAX = 31 MIN = 0
Measurement = 349 cm.

Reading = 8 MAX = 31 MIN = 0
Measurement = 349 cm.

Reading = 10 MAX = 31 MIN = 0
Measurement = 449 cm.

Reading = 7 MAX = 31 MIN = 0
Measurement = 299 cm.

Reading = 8 MAX = 31 MIN = 0
Measurement = 349 cm.

Reading = 7 MAX = 31 MIN = 0
Measurement = 299 cm.

Reading = 9 MAX = 31 MIN = 0
Measurement = 399 cm.

This shows generally steady, but over double the distance it should be. That could be a problem with sonar_MaxSonar().

You have no idea how grateful I am for your help!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: Axon programming issues
« Reply #19 on: February 28, 2009, 10:19:29 PM »
Hmmmm I'm a bit confused on this . . . the output seems so noisy . . .

New idea . . . put a ~10uF cap between power and ground on the max sonar.

Whats the specs on your battery?

Offline Dmntd1Topic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 1
Re: Axon programming issues
« Reply #20 on: February 28, 2009, 10:29:03 PM »
I have a 6V 3800mV Tenergy battery NiMh (http://www.trossenrobotics.com/store/p/5917-NiMH-Rechargable-Battery-6v-3800mAh.aspx) battery.

Here's the output with the 10uF 16V capacitor.

Quote
Reading = 31 MAX = 32 MIN = 0
Measurement = 1499 cm.

Reading = 31 MAX = 32 MIN = 0
Measurement = 1499 cm.

Reading = 31 MAX = 32 MIN = 0
Measurement = 1499 cm.

Reading = 31 MAX = 32 MIN = 0
Measurement = 1499 cm.

Reading = 32 MAX = 32 MIN = 0
Measurement = 1549 cm.


System Warming Up.0 = 101
.1 = 97
.2 = 89
.3 = 85
.4 = 82
.5 = 79
.6 = 74
.7 = 70
.8 = 19
.9 = 33
.10 = 43
.11 = 51
.12 = 55
.13 = 59
.14 = 64
.15 = 63
Initialization Complete
Reading = 19 MAX = 19 MIN = 0
Measurement = 899 cm.

Reading = 19 MAX = 19 MIN = 0
Measurement = 899 cm.

Reading = 20 MAX = 20 MIN = 0
Measurement = 949 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 20 MAX = 20 MIN = 0
Measurement = 949 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 20 MAX = 20 MIN = 0
Measurement = 949 cm.

Reading = 20 MAX = 20 MIN = 0
Measurement = 949 cm.

Reading = 20 MAX = 20 MIN = 0
Measurement = 949 cm.

Reading = 20 MAX = 20 MIN = 0
Measurement = 949 cm.

Reading = 20 MAX = 20 MIN = 0
Measurement = 949 cm.

Reading = 20 MAX = 20 MIN = 0
Measurement = 949 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 20 MAX = 20 MIN = 0
Measurement = 949 cm.

Reading = 20 MAX = 20 MIN = 0
Measurement = 949 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 20 MAX = 20 MIN = 0
Measurement = 949 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 20 MAX = 20 MIN = 0
Measurement = 949 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 20 MAX = 20 MIN = 0
Measurement = 949 cm.

Reading = 19 MAX = 20 MIN = 0
Measurement = 899 cm.

Reading = 20 MAX = 20 MIN = 0
Measurement = 949 cm.



Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: Axon programming issues
« Reply #21 on: February 28, 2009, 11:07:34 PM »
lol, just adding a cap changed the output that much! Well, it appears to have stabilized at least.

Which max sonar model are you using?

Offline Dmntd1Topic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 1
Re: Axon programming issues
« Reply #22 on: February 28, 2009, 11:15:34 PM »
I've got the EZ0

I've also got the Devantech CMPS03 and the Parallax 2d accelerometer. Both have been opened, but only the CMPS has seen power. Until the Sonar is working, though, that's all it's going to get LOL

Oh yeah, and I've got a futaba 3003S servo that doesn't like me. If I could demonstrate the actions it does with a simple for- loop, you'd feel like you were watching a tennis match!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: Axon programming issues
« Reply #23 on: March 01, 2009, 01:08:13 AM »
Hmmmm I can't really figure this one out . . . ok do this:

get out a ruler, and take measurements from like 5 different distances.

Offline Dmntd1Topic starter

  • Jr. Member
  • **
  • Posts: 23
  • Helpful? 1
Re: Axon programming issues
« Reply #24 on: March 03, 2009, 05:03:35 PM »
Sorry this took so long.

I set the sonar up, measured out 15, 30, and 45 inches, and ran the program.

The readings were 7, 6 and 10, respectively. Yes, it went down from 15-30.

I re-ran the program without the capacitor. Same measurements.

The readings were 7, 9  and 8, respectively. If I hold my ear RIGHT up to the sonar, I can hear the clicks (barely).

Again, sorry this took so long, life has a way of throwing diversions into plans!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: Axon programming issues
« Reply #25 on: March 15, 2009, 09:19:54 AM »
Quote
The readings were 7, 6 and 10, respectively. Yes, it went down from 15-30.
Thats really odd . . . sounds like maybe the sonar is broken.

I recommend hooking up an oscilloscope to power and ground across the sonar, and see how the voltage changes as it chirps. If it changes a lot, there is a power issue for sure.

And are you completely sure the battery is fully charged?

 


Get Your Ad Here

data_list